Machine learning model construction method for pollution source analysis of rivers flowing into the west region of taihu lake

By constructing a machine learning model adapted to the hydrological characteristics of western Taihu Lake, the problems of adapting hydrological characteristics and insufficient data in pollution source analysis were solved, achieving efficient identification of pollution source types and quantification of load intensity, and improving the technical support for pollution control.

CN122114072APending Publication Date: 2026-05-29JIANGSU ENVIRONMENTAL MONITORING CENT +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU ENVIRONMENTAL MONITORING CENT
Filing Date
2026-02-11
Publication Date
2026-05-29

Smart Images

  • Figure CN122114072A_ABST
    Figure CN122114072A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of environmental monitoring, and in particular to a machine learning model construction method for pollution source analysis of rivers flowing into the western region of Taihu Lake. The method comprises the following steps: data collection and regional division; pollution source analysis basic model building; physical constraint loss function construction; dynamic rule migration mechanism configuration model training and iterative optimization; model verification and result output. The present application sets target domain data sufficiency judgment indexes including effective sample size, data time continuity and feature distribution stability. When the target domain data is insufficient, the present application extracts the nonlinear mapping relationship from the source domain by screening meteorological matching samples, and migrates to the target domain based on the topological similarity of the water system structure after correction, and then supports model training through the "pre-training freezing-fine tuning unfreezing" process, thereby solving the problem of insufficient monitoring data of some branches in the western region of Taihu Lake and providing effective data support for model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring technology, and more specifically, to a method for constructing a machine learning model for analyzing pollution sources in rivers flowing into Taihu Lake in the western region of Taihu Lake. Background Technology

[0002] The Taihu Lake Basin is a core economic zone and an important freshwater resource reservoir in my country. The western region of Taihu Lake (the western part of the lake) is the primary source of inflow, accounting for 84.1% of the total inflow. This region possesses unique hydrological characteristics: a dense river network and significant flood retention in polder areas. The dense river network leads to complex pollution diffusion paths, and flooding in the polder areas easily causes pollutant retention and secondary migration, making the rivers flowing into Taihu Lake a key contributor to nitrogen and phosphorus pollution. Currently, Taihu Lake pollution control has entered a critical stage of deepening source control. The "Action Plan for Promoting a New Round of Comprehensive Taihu Lake Management" clearly requires that by 2025, the water quality of Taihu Lake should achieve "stable level IV, striving for level III." Accurately identifying the types of pollution sources and quantifying the pollution load intensity of the rivers flowing into Taihu Lake in the western region is a core prerequisite for clarifying governance responsibilities and formulating targeted control measures. Therefore, it is urgent to construct an efficient pollution source analysis technology system adapted to the hydrological characteristics of this region.

[0003] In existing technologies, relevant patents have applied data technology and intelligent algorithms in the field of watershed pollution analysis and assessment. For example, Chinese patent CN202511388517.7 discloses a non-point source pollution risk assessment method based on machine learning. By collecting historical water quality monitoring data and synchronous meteorological monitoring data under multiple meteorological conditions in the target watershed, it extracts meteorological extreme events and corresponding water quality response characteristics to construct a meteorological-water quality correlation dataset. It uses machine learning to train a prediction model for meteorological factors and pollution load peaks, assesses the short-term risk level of non-point source pollution based on the prediction results, and generates early warning signals. This provides high-timeliness and high-precision decision support for watershed management, enhances the ability to respond to sudden pollution events, and improves the level of optimal allocation of governance resources. For example, Chinese patent CN202510169392.2 discloses a method and system for tracing and analyzing watershed water pollution sources by integrating spatiotemporal big data. It collects data such as water quality, meteorology, and surface runoff and generates a dataset by associating them with spatiotemporal tags. Based on the dataset, it constructs a migration and diffusion model containing sub-models for pollutant concentration decay and flow direction prediction, calculates the concentration change rate and migration path, and distinguishes point source, area source, and endogenous pollution through a pollution source identification model. It calculates the contribution rate of various pollution sources and generates a source tracing report, thereby achieving precise location and quantitative analysis of pollution sources.

[0004] Despite the advantages of the above-mentioned technical solutions, they also have the following technical shortcomings: First, they lack adaptation to the unique hydrological characteristics of the region. Compared with patent CN202511388517.7, which only trains the prediction model using a general meteorological-water quality correlation dataset and does not consider the special hydrological scenarios that may exist in different watersheds, it cannot adjust the model analysis logic according to regional hydrological differences. Compared with patent CN202510169392.2, although the pollutant migration and diffusion model integrates spatiotemporal data, it does not optimize the model by associating key hydrological parameters such as regional river network density and the proportion of water flowing into the lake. The accuracy of source tracing in areas with complex hydrological characteristics is easily affected. Secondly, the lack of a model adaptation mechanism for areas with insufficient data in the target region is a significant issue. Compared to patent CN202511388517.7, which relies on ample historical monitoring data to construct a meteorological-water quality correlation dataset, the model training lacks sufficient support if some tributaries in western Taihu Lake have limited effective sample sizes and poor data temporal continuity, leading to a decrease in the reliability of pollution risk prediction results. Similarly, patent CN202510169392.2, which also relies on complete spatiotemporal big data for source tracing analysis, fails to design supplementary or adaptation schemes for areas with incomplete monitoring data, making it difficult to meet the pollution analysis needs of data-scarce areas in western Taihu Lake. Therefore, we propose a machine learning model construction method for pollution source analysis of rivers flowing into western Taihu Lake. Summary of the Invention

[0005] The purpose of this invention is to provide a method for constructing a machine learning model for analyzing pollution sources in rivers flowing into Taihu Lake in the western region of Taihu Lake, so as to solve the problems mentioned in the background art.

[0006] To address the aforementioned technical problems, this invention provides a method for constructing a machine learning model for analyzing pollution sources in rivers flowing into Taihu Lake in the western region, comprising the following steps: S1. Data Collection and Regional Division: Collect meteorological data, hydrological data, and pollution source monitoring data of Taihu Lake Basin and surrounding related basins, and divide the data into target area data and source area data according to region. The target area is the western region of Taihu Lake, and the source area is the eastern region of Taihu Lake and Chaohu Lake. S2. Construction of the basic model for pollution source analysis: Based on the feature dimensions of meteorological-hydrological coupled data, determine the scale of input parameters for the deep learning basic model; configure a feature differentiation processing mechanism according to the regional hydrological characteristics representation requirements; set a joint optimization objective for pollution source type classification and pollution load intensity regression; and perform model parameter initialization to complete the construction of the deep learning basic model. S3. Construction of Physical Constraint Loss Function: Based on the physical conservation equations in meteorology, physical constraint terms are constructed and incorporated into the loss function of the deep learning base model. The meteorological sensitivity parameter is designed to dynamically adjust the weight ratio of the physical constraint terms and the prediction loss terms, forming a comprehensive physical constraint loss function. S4. Dynamic rule migration mechanism configuration: Set the target domain data sufficiency judgment index. When it is determined that the target domain data is insufficient to support the accurate training of the deep learning base model, extract the nonlinear mapping relationship between meteorological factors and pollution load from the source domain data, and migrate the nonlinear mapping relationship to the target domain after adaptive adjustment based on the topological similarity of the water system structure. S5. Model Training and Iterative Optimization: Using the target domain data as the core training sample, combined with the meteorological-pollution mapping relationship after transfer adjustment, and with the comprehensive physical constraint loss function as the optimization objective, the deep learning basic model is iteratively trained until the deep learning basic model converges. S6. Model Validation and Result Output: After confirming the effectiveness of the deep learning basic model through numerical accuracy verification, physical law consistency verification, and comparative verification, output the pollution source types, pollution load intensity, and contribution ratio of each pollution source for the rivers flowing into Taihu Lake in the western region.

[0007] As a further improvement to this technical solution, in step S1, data acquisition and area division include the following steps: S11. Acquire rainfall, wind speed and temperature data through automatic meteorological data acquisition equipment; acquire river flow, flow velocity and water level data through hydrological monitoring stations; acquire pollutant concentration data through automatic water quality monitoring stations. S12. Based on timestamps, align multi-source heterogeneous data and use time series interpolation to repair missing data to ensure that meteorological, hydrological and pollution source data are strictly matched in the spatiotemporal dimension. S13. Calculate the river network density, polder ratio, and inflow proportion of water into Taihu Lake in each region of the Taihu Lake Basin, and generate a set of regional hydrological characteristic parameters. S14. Based on the set of regional hydrological characteristic parameters, the region with a river network density significantly higher than the average of the basin and a high proportion of water flowing into the lake is identified as the target region; from the eastern region of Taihu Lake and the Chaohu Lake region, the region with hydrological characteristic similarity that meets the preset threshold is selected as the source region.

[0008] As a further improvement to this technical solution, in step S2, the input parameter size of the deep learning base model is determined and the model parameter initialization is performed, including the following steps: S21. Screening core meteorological and hydrological features directly related to the migration and transformation of pollution sources in the western region of Taihu Lake; S22. Combining the regional hydrological characteristic parameters calculated in S13, construct a feature dimension system directly related to pollution source analysis; S23. The Pearson correlation coefficient is used to assess the linear correlation between the feature and the concentration of pollutants, and the mutual information value is used to assess the nonlinear correlation between the feature and the concentration of pollutants. Based on the assessment results, significant correlation features are retained and redundant features are removed. S24. Principal component analysis is used to reduce the dimensionality of the feature dimension system, retaining the principal components that carry the core information, and finally determining the scale of input parameters that are suitable for the performance of the deep learning basic model. S25. Using the He initialization or Xavier initialization method adapted to the deep learning model, assign values ​​to the weights and bias parameters of the deep learning base model, set the parameter value range to avoid training anomalies, and complete the parameter initialization of the deep learning base model.

[0009] As a further improvement to this technical solution, in step S2, a feature differentiation processing mechanism is configured and a joint optimization objective is set, including the following steps: S26. Based on the regional hydrological characteristic parameters generated in S13, a clustering algorithm is used to classify the hydrological characteristics of the target area in the western part of Taihu Lake, and to clarify the differences in hydrological characteristics among different regions. S27. Configure differentiated feature processing schemes for regions with different hydrological characteristics, and match the pollution migration characteristics of dense river network area, polder area and sparse river network area in western Taihu Lake in terms of normalization method selection and time series feature extraction window setting. S28. Construct an adaptive adjustment mechanism for feature processing, dynamically interpolate and adjust feature processing parameters based on the hydrological similarity of adjacent regions, and ensure the smoothness of cross-regional processing. S29. Incorporate the pollution source type classification task and the pollution load intensity regression task into the same optimization framework. Set weighting coefficients according to the importance of the pollution source type classification task and the pollution load intensity regression task to balance the loss contribution and form a joint optimization objective function of the deep learning basic model.

[0010] As a further improvement to this technical solution, in step S3, physical constraint terms are constructed based on the physical conservation equations in meteorology, including the following steps: S31. Considering the pollution transmission characteristics of the rivers flowing into Taihu Lake in the western region, which are characterized by "dense river networks and significant flood retention in polder areas", the pollution load mass conservation equation and the hydrodynamic continuity equation are selected as the core constraints, and the meteorological energy conservation equation is incorporated to improve the constraint system. S32. Extract the parameters required for each conservation equation from the meteorological and hydrological data and pollution source monitoring data collected in S1, and complete the spatiotemporal alignment of the parameters based on the timestamp to ensure the matching of parameters within the calculation period. S33. Using the deviation between the theoretical value of the core conservation equation and the output value of the deep learning base model as the quantification target, construct physical constraint terms. , Its core function is to characterize the consistency between the model's output and physical laws. The smaller the value, the stronger the consistency.

[0011] As a further improvement to this technical solution, in step S3, the physical constraint term is incorporated into the loss function of the deep learning base model, including the following steps: S34. Define the prediction loss term of the deep learning base model. It consists of two sub-losses: pollution source type classification loss. Regression loss with pollution load intensity ,Right now for and The weighted combination, where Reflects the accuracy of type prediction. Reflects the accuracy of load quantification; S35. Use linear superposition to combine physical constraint terms. Compared with the predicted loss item Fusion, assigning physical constraint terms through initial weighting coefficients. Compared with the predicted loss item The basic contribution ratio is used to ensure that the loss value after fusion can simultaneously correlate the physical law adaptability and the data prediction accuracy. S36. Regarding physical constraints Compared with the predicted loss item To address the dimensional differences, the physical constraint terms are standardized. Compared with the predicted loss item Transformed into standardized physical constraint loss components of the same order of magnitude With standardized physical constraint loss components This provides a comparable numerical basis for subsequent dynamic adjustment of weights.

[0012] As a further improvement to this technical solution, in step S3, the dynamic adjustment of the weight ratio of the meteorological sensitivity parameter is designed to form a comprehensive physical constraint loss function, including the following steps: S37. Using the hourly rate of change of rainfall and the hourly rate of change of wind speed collected in S1 as the core inputs, meteorological sensitivity parameters are constructed. The computational logic, The value range is limited to 0-1, and the value variation is positively correlated with the driving force of meteorological factors on pollution transmission in the western region of Taihu Lake. S38, Definition For the standardized physical constraint loss components in S36 Dynamic weights, Standardized prediction loss components in S36 The dynamic weights, and and satisfy ;based on The real-time values ​​are used to determine the weight adjustment rules: Increase the standardized physical constraint loss component when it is in the high value range The weighting percentage Increase the standardized prediction loss component when it is in the low value range The weighting percentage When the weight transition is in the intermediate range, a linear relationship is achieved. S39. Dynamic weights , With standardized loss components , Integrate and construct a comprehensive physical constraint loss function for the deep learning foundation model. .

[0013] As a further improvement to this technical solution, in step S4, the data sufficiency judgment index of the target domain and the nonlinear mapping relationship of the source domain are set, including the following steps: S41. Construct an index system for judging the sufficiency of data in the target domain. And determine the indicator system. Key evaluation metrics include the effective sample size of the target domain collected by S1. Data time continuity indicators Stability index of characteristic distribution ,for , , After configuring the quantization threshold, a weighted summation system is used to calculate the comprehensive score. ; S42, If the overall score If the target domain data in S1 is below a set threshold, it is determined that the data is insufficient to support the training of the deep learning base model. S43. From the source domain data of S1, select samples that match the meteorological conditions of the target domain, and use the kernel function method to extract the nonlinear mapping relationship between meteorological factors and pollution load. .

[0014] As a further improvement to this technical solution, in step S4, adjusting the mapping relationship based on the topological similarity of the water system and migrating it to the target domain includes the following steps: S44. Using the parameters recorded in S1 as input, the similarity evaluation model is applied. Calculate the topological similarity value of the water system structure between the source domain and the target domain. ; S45, Based on similarity value Set correction rules for nonlinear mapping relationships Adaptive adjustments are made to obtain a mapping relationship that fits the target domain. ; S46. Mapping Relationship The parameters of the feature mapping layer of the deep learning base model are migrated to the target domain and used to initialize the parameters of the feature mapping layer. The model training is supported by the "pre-training freeze-fine-tuning freeze" process.

[0015] As a further improvement to this technical solution, in step S6, model verification and result output include the following steps: S61. Conduct validation of the deep learning foundation model in three categories, including the following sub-steps: S611, Adopting quantitative indicators Calculate the deviation between the predicted value of the deep learning base model and the actual monitored value of the target domain in S1 to complete the numerical accuracy verification. S612, the physical constraint terms constructed in S3 To evaluate the degree of fit between the output of the deep learning base model and the physical laws, and to complete the consistency verification of the physical laws; S613. Select the traditional pollution load statistical model as the reference model. Comparing the deep learning foundation model with the reference model The performance was compared and verified. S62. If all three types of verification results in S61 meet the preset judgment conditions, then the deep learning basic model is confirmed to be effective. S63. Output the types of pollution sources, pollution load intensity, and contribution ratio of each pollution source for rivers flowing into Taihu Lake in the western region.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention addresses the unique hydrological characteristics of the western Taihu Lake region, characterized by "dense river networks and significant flood retention in polder areas." By configuring a feature differentiation processing mechanism in the deep learning basic model and incorporating physical constraints based on the pollution load mass conservation equation and the hydrodynamic continuity equation, it can effectively adapt to the hydrological heterogeneity of the region, ensuring that the model output conforms to the objective physical laws of pollution transmission and improving the regional adaptability and rationality of pollution source analysis of rivers flowing into the lake. 2. This invention sets up a target domain data sufficiency judgment index that includes effective sample size, data temporal continuity, and feature distribution stability. When the target domain data is insufficient, it selects meteorological matching samples from the source domain to extract nonlinear mapping relationships, and then migrates them to the target domain after correction based on the topological similarity of the water system structure. The model training is then supported by the "pre-training freeze-fine adjustment freeze" process. This effectively solves the problem of insufficient monitoring data for some tributaries in western Taihu Lake, provides effective data support for model training, and ensures the reliability of the model in data-scarce scenarios. 3. This invention incorporates the task of classifying pollution source types and the task of regressing pollution load intensity into the same optimization framework, sets weighting coefficients to balance the loss contributions of the two tasks to form a joint optimization objective function, and can simultaneously identify the types of pollution sources and quantify the pollution load intensity of rivers flowing into Taihu Lake in the western part of the lake. It meets the dual analytical needs of "identifying types and calculating intensity", and provides more comprehensive technical support for clarifying pollution control responsibilities and formulating targeted control measures. 4. This invention dynamically adjusts the weight ratio of physical constraint terms and prediction loss terms by designing meteorological sensitivity parameters. When the driving effect of meteorological factors on pollution transmission is strong, physical constraints are emphasized, and when the effect is weak, data prediction is emphasized. This further optimizes the model's adaptability to pollution analysis under different meteorological conditions and improves the consistency and accuracy of pollution source analysis results under different scenarios. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the method steps of the present invention; Detailed Implementation 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0018] like Figure 1 As shown in the figure, this embodiment provides a method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, including the following steps: S1. Data Collection and Regional Division: Collect meteorological data, hydrological data, and pollution source monitoring data of Taihu Lake Basin and surrounding related basins, and divide the data into target area data and source area data according to region. The target area is the western region of Taihu Lake, and the source area is the eastern region of Taihu Lake and Chaohu Lake. In this step, in S1, data acquisition and area delineation include the following steps: S11. Acquire rainfall, wind speed and temperature data through automatic meteorological data acquisition equipment; acquire river flow, flow velocity and water level data through hydrological monitoring stations; acquire pollutant concentration data through automatic water quality monitoring stations. Specifically, the data collection scope covers the entire Taihu Lake basin and related areas of the Chaohu Lake basin, with a collection period set for 12 consecutive months to ensure that the data covers pollution and hydrological response characteristics under different seasons and meteorological conditions. Meteorological data acquisition: CAWS600 automatic weather stations were used as the acquisition equipment. Based on the watershed scope and monitoring needs, they were deployed in the Taihu Lake and Chaohu Lake basins, with appropriately increased deployment density in key areas such as the target area and candidate source areas. Rainfall, wind speed, and air temperature were measured using tipping bucket rain gauges, three-cup anemometers, and platinum resistance temperature sensors, respectively. The data acquisition frequency was once per hour, and the data output format was uniformly CSV (including fields such as acquisition time, equipment number, rainfall, wind speed, and air temperature). The data accuracy met the requirements of the "Ground Meteorological Observation Specifications". Hydrological data acquisition: National and provincial hydrological stations already established in the Taihu Lake and Chaohu Lake basins were selected. River flow and velocity were measured using a TRDIRioGrande acoustic Doppler current profiler (ADCP), and water level was measured using a TD-SW submersible water level gauge. The data acquisition frequency was consistent with that of meteorological data (once per hour). The data output format was CSV (including fields such as acquisition time, station number, river name, flow, velocity, and water level). The measurement accuracy met the requirements of the "Hydrological Measurement Specification". Pollution source monitoring data collection: Relying on the existing automatic water quality monitoring stations in the basin, the monitoring pollutants include total nitrogen, total phosphorus, ammonia nitrogen, and chemical oxygen demand. The ultraviolet spectrophotometry method is used to measure total nitrogen and total phosphorus, the Nessler's reagent spectrophotometry method is used to measure ammonia nitrogen, and the dichromate method is used to measure chemical oxygen demand. The data collection frequency is once per hour, and the data output format is CSV (including fields such as collection time, monitoring station number, river section name, and concentration of each pollutant). The monitoring accuracy meets the requirements of the "Technical Specification for Automatic Monitoring of Surface Water".

[0019] S12. Based on timestamps, align multi-source heterogeneous data and use time series interpolation to repair missing data to ensure that meteorological, hydrological and pollution source data are strictly matched in the spatiotemporal dimension. Specifically, in order to eliminate temporal biases in data from different sources, repair missing or outlier data, ensure the spatiotemporal consistency and validity of the data, and provide a reliable input foundation for subsequent model training, multi-source data spatiotemporal matching processing is performed. The specific operations are as follows: Timestamp alignment: The timestamps of all meteorological, hydrological, and pollution source monitoring data are uniformly converted to Beijing time UTC+8, accurate to the minute, and the format is uniformly "YYYY-MM-DDHH:MM:SS"; Based on the timestamp of meteorological data, the hydrological data and pollution source monitoring data are matched. If the timestamp deviation is no more than 5 minutes, it is directly corrected to the corresponding reference timestamp. Isolated data without a corresponding reference timestamp are marked as "single source data" and stored for separate processing during subsequent model training. Missing and outlier data handling: Missing and outlier values ​​are identified through data validity checks. Missing data is handled based on the duration of consecutive missing values: when the duration of consecutive missing values ​​is ≤6 hours, linear imputation is used (a linear function is constructed to complete the missing value based on valid data before and after the missing period); when the duration of consecutive missing values ​​is >6 hours and ≤24 hours, cubic spline imputation is used (a smooth curve is constructed by combining valid data from the same two consecutive days of the missing period); when the duration of consecutive missing values ​​is >24 hours, the missing value marker is retained, and the missing values ​​are subsequently filled in by migrating data from the source domain; outliers are replaced by the average of valid data from three adjacent time periods, and the replaced values ​​are marked "outlier correction".

[0020] S13. Calculate the river network density, polder ratio, and inflow proportion of water into Taihu Lake in each region of the Taihu Lake Basin, and generate a set of regional hydrological characteristic parameters. Specifically, the generation of the regional hydrological characteristic parameter set includes the following specific process: River network density calculation: Obtain a 1:50,000 scale water system vector map of the Taihu Lake Basin and Chaohu Lake Basin. Use ArcGIS software to extract the centerlines of all rivers in the map, including main streams, tributaries, and tributaries. Rivers with a width ≥1m are included in the statistics. Use the "Length Calculation" tool in the software to calculate the total length of all rivers in each region. At the same time, extract the administrative boundaries or natural watershed boundaries of each region and calculate the total area of ​​each region. River network density = total length of rivers in the region ÷ total area of ​​the region. The calculation result is rounded to two decimal places. Calculation of the proportion of polder areas: Obtain the latest annual land use vector data within the watershed, filter out the land use type "polder area" using ArcGIS software, and use the "area calculation" tool to calculate the total area of ​​polder areas in each region; polder area proportion = total area of ​​polder areas in the region ÷ total area of ​​the region × 100%, and the calculation result is rounded to two decimal places; Calculation of the proportion of water entering the lake: Select the hydrological monitoring stations at the main inlets of the lake in each region, extract the hourly flow data of the station for 12 consecutive months, and calculate the multi-year average runoff of each station. In this embodiment, the arithmetic mean of the 12-month monitoring data is used instead of the multi-year average runoff. The water entering the lake in a single region = the sum of the multi-year average runoff of all monitoring stations at the inlets of the lake in that region; the total water entering the lake in the Taihu Lake Basin = the sum of the water entering the lake in all regions; the proportion of water entering the lake = the water entering the lake in a single region ÷ the total water entering the lake in the Taihu Lake Basin × 100%. The calculation result is rounded to two decimal places. Parameter set integration: Information such as the area code, river network density, polder ratio, and proportion of water flowing into the lake for each region is integrated into a set of regional hydrological characteristic parameters, which is stored in Excel spreadsheet format. The table fields include "area code", "area name", "river network density", "polder ratio", "proportion of water flowing into the lake", and "data statistics period", ensuring that the hydrological characteristic parameters of each region are traceable and verifiable.

[0021] S14. Based on the set of regional hydrological characteristic parameters, the region with a river network density significantly higher than the average of the basin and a high proportion of water flowing into the lake is identified as the target region; from the eastern region of Taihu Lake and the Chaohu Lake region, the region with hydrological characteristic similarity that meets the preset threshold is selected as the source region.

[0022] Specifically, the division between the target domain and the source domain needs to be based on the similarity of regional hydrological characteristic parameters to ensure that the source domain data is compatible with the hydrological characteristics of the target domain. The specific operation is as follows: Target domain determination: Based on the regional hydrological characteristic parameter set generated by S13, the arithmetic mean method was used to calculate the average river network density and the average proportion of inflow into Taihu Lake in the entire basin. The target domain screening criteria were set as "regional river network density ≥ 1.2 times the average river network density of the entire Taihu Lake basin, and regional inflow into Taihu Lake ≥ 5%". Based on this, areas that meet the criteria were selected from within the Taihu Lake basin and determined as the target domain (i.e., the western region of Taihu Lake, specifically including the inflow river basins within the administrative areas of Wujin District of Changzhou City, Yixing City of Wuxi City, and Wuxing District of Huzhou City on the west bank of Taihu Lake).

[0023] Source domain determination: Based on the hydrological characteristic parameters of the target domain generated by S13, the Euclidean distance method is used to calculate the similarity of hydrological characteristics between each candidate region in the eastern Taihu Lake region and the Chaohu Lake region and the target domain. The specific steps are as follows: Normalization: The hydrological characteristic parameters are normalized to eliminate the influence of dimensions. The normalization formula is as follows: Normalized value = (actual parameter value - minimum parameter value) ÷ (maximum parameter value - minimum parameter value) Euclidean distance calculation: Calculate the Euclidean distance between the candidate region and the target domain after normalization of each parameter. The formula is: ; in, These are the normalized river network density, polder ratio, and proportion of water flowing into the lake for the candidate regions, respectively. These are the corresponding parameters after normalization of the target domain.

[0024] A preset threshold for hydrological feature similarity was set at Euclidean distance ≤ 0.3. Candidate regions whose Euclidean distance met the threshold requirement were selected from the eastern Taihu Lake region (specifically including the watersheds within the administrative areas of Wuzhong District of Suzhou City and Kunshan City on the eastern shore of Taihu Lake) and the Chaohu Lake region (specifically including the watersheds of the main rivers flowing into Chaohu Lake). These regions were then identified as source regions to ensure that the hydrological features of the source regions and the target regions have a high degree of similarity, thus providing a reliable data foundation for subsequent model transfer.

[0025] S2. Construction of the Basic Model for Pollution Source Analysis: Based on the feature dimensions of meteorological-hydrological coupled data, the scale of input parameters for the deep learning basic model is determined; according to the regional hydrological characteristics representation requirements, a feature differentiation processing mechanism is configured; a joint optimization objective of pollution source type classification and pollution load intensity regression is set; and model parameter initialization is performed to complete the construction of the deep learning basic model. The construction of the deep learning basic model lays the core framework for building a pollution source analysis model adapted to the hydrological characteristics of western Taihu Lake. By selecting key input parameters, differentiating features, constructing a joint optimization objective, and refining the model structure, the model can accurately learn the correlation between meteorological and hydrological characteristics and pollution source information.

[0026] In this step, S2, the input parameter size of the deep learning base model is determined and the model parameter initialization is performed, including the following steps: S21. Screening core meteorological and hydrological features directly related to the migration and transformation of pollution sources in the western region of Taihu Lake; Specifically, S21 focuses on the pollution migration characteristics of the western Taihu Lake region, characterized by "dense river networks and flood retention in polder areas." It selects meteorological and hydrological features that directly drive or influence the migration and transformation of pollution sources. Based on the actual mechanism of pollution migration in western Taihu Lake—rainfall is the core driving factor for non-point source pollution washout, flow rate and velocity determine the migration speed of pollution, water level affects the retention time of pollutants in polder areas, and wind speed is related to the intensity of air-water exchange of pollutants on the water surface—the core meteorological features are determined to be rainfall and wind speed, and the core hydrological features are flow rate, flow velocity, and water level. Simultaneously, it is clarified that the above features must cover the hourly monitoring data collected by S1 to ensure the capture of the temporal dynamic changes in pollution migration.

[0027] S22. Combining the regional hydrological characteristic parameters calculated in S13, construct a feature dimension system directly related to pollution source analysis; Specifically, using the river network density, polder ratio, and proportion of water flowing into the lake generated by S13 as regional characteristic parameters, these are integrated with the core meteorological and hydrological features selected by S21 to construct a three-layer feature dimension system: Meteorological characteristics dimension: including rainfall and wind speed, reflecting the meteorological driving conditions for pollution migration; Hydrological characteristics include flow rate, flow velocity, and water level, reflecting the migration and retention of pollutants in water bodies; Regional hydrological characteristics dimension: including river network density and polder proportion, reflecting the regional heterogeneity of pollution migration.

[0028] This dimensional system directly addresses the core needs of pollution source analysis in western Taihu Lake—covering both the dynamic process characteristics of pollution migration and the influence of regional characteristics on pollution patterns.

[0029] S23. The Pearson correlation coefficient is used to assess the linear correlation between the feature and the concentration of pollutants, and the mutual information value is used to assess the nonlinear correlation between the feature and the concentration of pollutants. Based on the assessment results, significant correlation features are retained and redundant features are removed. Specifically, using total nitrogen, total phosphorus, ammonia nitrogen, and chemical oxygen demand (COD) as core pollutants (corresponding to pollution source monitoring data collected in S11), the correlation of each feature in the feature dimension system constructed in S22 is evaluated: For the monitoring data of total nitrogen, total phosphorus, ammonia nitrogen, and COD, Pearson correlation coefficient and mutual information value are uniformly used to evaluate the feature correlation; during the model training phase, the input and prediction logic for ammonia nitrogen and COD are consistent with that for total nitrogen and total phosphorus, and are included in the model input for pollution load prediction. The specific operations are as follows: Linear correlation assessment: The Pearson correlation coefficients between each characteristic and the total nitrogen and total phosphorus concentrations are calculated using the following formula: ; In the above formula, Representation of features With pollution load intensity The Pearson correlation coefficient, For the first The values ​​of each feature sample, The mean of all samples for this feature. For the first The values ​​of each pollution load intensity sample, The mean of the pollution load intensity for all samples is given. This represents the total number of samples. Retained during screening. The threshold, referencing the general criteria for "effective feature association" in the field of watershed pollution analysis, ensures that the selected features have a meaningful correlation with the pollution load. Nonlinear correlation evaluation: The mutual information values ​​between each characteristic and the total nitrogen and total phosphorus concentrations are calculated using the following formula: ; In the above formula, Representation of features With pollution source type mutual information value, Features Pick Types of pollution sources Pick The joint probability distribution, Features Pick Marginal probability distribution, Types of pollution sources Pick Marginal probability distribution. Retain during screening. The threshold effectively excludes features that cannot distinguish between pollution source types. Finally, the intersection of the two screening results is taken to form the initial core feature set, which typically includes features directly related to pollution source analysis, such as rainfall, flow rate, total nitrogen concentration, and total phosphorus concentration.

[0030] S24. Principal component analysis is used to reduce the dimensionality of the feature dimension system, retaining the principal components that carry the core information, and finally determining the scale of input parameters that are suitable for the performance of the deep learning basic model. Specifically, principal component analysis (PCA) is performed on the features selected by S23 for dimensionality reduction. The specific process is as follows: First, the features are standardized using the following formula: ; in, The characteristic mean, The characteristic standard deviation; Indicates the first Standardized values ​​of each feature sample; Represents the original values ​​of the feature samples; The formula for calculating the covariance matrix of standardized features is: ; in, The covariance matrix representing the standardized features; The mean of the standardized feature (takes a value of 0); Indicates the total number of samples; Finally, the covariance matrix is ​​decomposed into eigenvalues ​​and sorted in descending order of eigenvalues; the top eigenvalues ​​with a cumulative variance contribution rate ≥ 85% are selected. One principal component (this proportion can retain the core feature information). This refers to the size of the input parameters for the basic deep learning model. For example, if there are 5 features after filtering, and the cumulative variance contribution rate of the first 3 principal components reaches 88%, then the size of the input parameters is determined to be 3.

[0031] Understandably, based on the aforementioned determined input parameter scale of the deep learning foundation model, the adapted model architecture is designed as follows: convolutional layers (extracting temporal features), fully connected layers (feature fusion), and feature mapping layers work together to form the core structure of the model. Specifically, a CNN-LSTM hybrid architecture is adopted (to meet the feature extraction requirements of temporally contaminated data). Among them, there are 2 convolutional layers with a kernel size of 3×1 (a common size for temporal data); there is 1 fully connected layer with ReLU activation function (a common choice in this field).

[0032] S25. Using the He initialization or Xavier initialization method adapted to the deep learning model, assign values ​​to the weights and bias parameters of the deep learning base model, set the parameter value range to avoid training anomalies, and complete the parameter initialization of the deep learning base model.

[0033] Specifically, for the convolutional and fully connected layers of the deep learning foundation model, an adaptation method is used to initialize the parameters: the convolutional layers used for extracting temporal features are initialized using He, with the formula as follows: ; in For weight parameters, It follows a normal distribution. The number of input neurons for the convolutional layer is specified, and the weight values ​​are limited to a certain range. This is achieved through the HeNormal initialization function of the deep learning framework; The fully connected layer used for feature fusion is initialized using Xavier, with the following formula: ; in For weight parameters, , The number of input and output neurons in the fully connected layer, with weight values ​​limited to a certain range. This is achieved through the GlorotNormal initialization function of the deep learning framework; the bias parameters of all layers are uniformly assigned a value of 0.1, with the value range limited to 0.1~0.5.

[0034] In this step, S2, configuring the feature differentiation processing mechanism and setting the joint optimization objective includes the following steps: S26. Based on the regional hydrological characteristic parameters generated in S13, a clustering algorithm is used to classify the hydrological characteristics of the target area in the western part of Taihu Lake, and to clarify the differences in hydrological characteristics among different regions. Specifically, using the river network density and polder ratio generated by S13 as input, the K-means clustering algorithm is used to classify the hydrological characteristics of the target area in the western part of Taihu Lake. The specific operation is as follows: First, the river network density and the proportion of polder areas are standardized to eliminate dimensional differences. Then, the number of clusters is traversed using the elbow rule. Calculate each The corresponding clustering error (sum of squared distances from samples to cluster centers) is taken from the point where the error drops sharply. The optimal number of clusters; Finally, the target domain was divided into three types of regions based on the optimal number of clusters: Dense river network areas with a river network density greater than 3 km / km² and a polder area ratio of less than 20%; A concentrated area of ​​polder areas with a polder area ratio of >40% and a river network density of <2km / km²; Sparse river network areas with a river network density of <1.5km / km² and a polder area ratio of <15%.

[0035] S27. Configure differentiated feature processing schemes for regions with different hydrological characteristics, and match the pollution migration characteristics of dense river network area, polder area and sparse river network area in western Taihu Lake in terms of normalization method selection and time series feature extraction window setting. Specifically, based on the pollution migration characteristics of various regions, customized feature processing schemes are configured for different areas of the target domain in western Taihu Lake, as follows: In dense river network areas, pollution migration is fast and fluctuates greatly within a day. Z-score normalization is used to highlight the characteristic fluctuations, and the temporal feature extraction window is set to 24 hours to cover the intraday pollution migration cycle. The pollutants in the concentrated area of ​​the polder have a long retention time. Min-Max normalization is used to retain the absolute value of the features, and the time series feature extraction window is set to 72 hours to match the pollution retention cycle of the polder. Pollution migration in sparse river network areas is stable and has a short cycle. Standardization and normalization are adopted, and the time series feature extraction window is set to 12 hours to match the rapid migration cycle of pollution. The step size of all time series windows is uniformly 1 hour to ensure data continuity.

[0036] S28. Construct an adaptive adjustment mechanism for feature processing, dynamically interpolate and adjust feature processing parameters based on the hydrological similarity of adjacent regions, and ensure the smoothness of cross-regional processing. Specifically, to ensure the smoothness of cross-regional feature processing, an adaptive adjustment mechanism for feature processing based on hydrological similarity is constructed: First, calculate the hydrological similarity between adjacent areas using the following formula: ; in For similarity, , and , These represent the river network density and polder ratio of adjacent areas, respectively. Then, the feature processing parameters are adjusted using linear interpolation, as shown in the formula: ; in For transition region parameters, , For parameters of adjacent regions, the adjustment logic is as follows: when Synchronize parameters of adjacent regions in real time. Fine-tune parameters as needed. Parameters are kept independent during the process.

[0037] S29. Incorporate the pollution source type classification task and the pollution load intensity regression task into the same optimization framework. Set weighting coefficients according to the importance of the pollution source type classification task and the pollution load intensity regression task to balance the loss contribution and form a joint optimization objective function of the deep learning basic model.

[0038] Specifically, the tasks of pollution source type classification and pollution load intensity regression are incorporated into the same optimization framework to construct a joint optimization objective function for the deep learning base model: First, define the single-task loss function. For the pollution source type classification task, cross-entropy loss is used, and the formula is: ; in For classifying losses, The total number of samples, Pollution source type (point source, area source, internal source). For real labels, To predict probabilities; The pollution load intensity regression task uses the mean squared error loss, and the formula is as follows: ; in To regress the loss, To represent the actual pollution load, This is a predicted value; Subsequently, the weighting coefficients were determined by optimizing the comprehensive index of the validation set. Construct a joint loss function : ; This balances the loss contribution of the two types of tasks and serves as the optimization objective for model training.

[0039] S3. Construction of Physical Constraint Loss Function: Based on the physical conservation equations in meteorology, physical constraint terms are constructed and incorporated into the loss function of the deep learning base model. The meteorological sensitivity parameter is designed to dynamically adjust the weight ratio of the physical constraint terms and the prediction loss terms, forming a comprehensive physical constraint loss function. In this step, S3, physical constraint terms are constructed based on the physical conservation equations in meteorology, including the following steps: S31. Considering the pollution transmission characteristics of the rivers flowing into Taihu Lake in the western region, which are characterized by "dense river networks and significant flood retention in polder areas", the pollution load mass conservation equation and the hydrodynamic continuity equation are selected as the core constraints, and the meteorological energy conservation equation is incorporated to improve the constraint system. Specifically, considering the pollution transmission characteristics of the rivers flowing into Taihu Lake in the western region, characterized by "dense river networks and significant flood retention in polder areas," a suitable physical conservation equation is selected to construct a constraint system: Pollution load mass conservation equation: As the core constraint, it adapts to the mass balance requirements caused by pollutant retention in the polder area and is used to constrain the total input-migration-output matching of pollution load; Hydrodynamic continuity equation: As the core constraint, it adapts to the water transport patterns of dense river networks and is used to constrain the continuity of flow between different cross sections; Meteorological energy conservation equation: as an auxiliary constraint, it adapts to the driving effect of meteorological factors on pollution transmission and is used to improve the constraint of energy transfer law between meteorology and pollution.

[0040] S32. Extract the parameters required for each conservation equation from the meteorological and hydrological data and pollution source monitoring data collected in S1, and complete the spatiotemporal alignment of the parameters based on the timestamp to ensure the matching of parameters within the calculation period. Specifically, from the meteorological and hydrological data and pollution source monitoring data collected by S1, the parameters required for each conservation equation are extracted and spatiotemporally aligned. This includes: Firstly, parameter extraction: Pollution load mass conservation equation: extracting river flow and pollutant concentration (TN / TP); Hydrodynamic continuity equation: Extract river flow and cross-sectional area (obtained from hydrological station cross-sectional data); Meteorological energy conservation equation: extracting air temperature and wind speed.

[0041] Secondly, spatiotemporal alignment: Based on the unified Beijing time UTC+8-minute timestamp of S12, each parameter is matched to the corresponding timestamp; if a parameter is missing under a certain timestamp, the missing data repair method of S12 is used to fill it in, ensuring that the parameters in the same calculation period correspond to the same river section and guaranteeing parameter matching.

[0042] S33. Using the deviation between the theoretical value of the core conservation equation and the output value of the deep learning base model as the quantification target, construct physical constraint terms. , Its core function is to characterize the consistency between the model's output and physical laws. The smaller the value, the stronger the consistency.

[0043] Specifically, physical constraint terms are constructed using the deviation between the theoretical value of the core conservation equation and the output value of the deep learning base model as the quantification target. This is used to characterize the consistency between the model output and physical laws. The smaller the value, the stronger the consistency. Taking the pollution load mass conservation equation as an example, the formula for the physical constraint term is: ; in: For physical constraints; The total number of samples; For the first Measured river flow for one sample; For the first Measured concentrations of pollutants in each sample; The first prediction for the deep learning foundation model River flow in one sample; The first prediction for the deep learning foundation model The concentration of pollutants in each sample.

[0044] In this step, S3, the physical constraint term is incorporated into the loss function of the deep learning base model, including the following steps: S34. Define the prediction loss term of the deep learning base model. It consists of two sub-losses: pollution source type classification loss. Regression loss with pollution load intensity ,Right now for and The weighted combination, where Reflects the accuracy of type prediction. Reflects the accuracy of load quantification; Specifically, the prediction loss term of the deep learning base model It is a weighted combination of the pollution source type classification loss and the pollution load intensity regression loss, consistent with the joint loss in S29, and the formula is: ; in: For predicting loss terms; The pollution source type classification loss (cross-entropy loss); The regression loss for pollution load intensity (mean square error loss); These are the weighting coefficients determined in the optimization process of S29.

[0045] S35. Use linear superposition to combine physical constraint terms. Compared with the predicted loss item Fusion, assigning physical constraint terms through initial weighting coefficients. Compared with the predicted loss item The basic contribution ratio is used to ensure that the loss value after fusion can simultaneously correlate the physical law adaptability and the data prediction accuracy. Specifically, physical constraint terms are fused using a linear superposition method. Compared with the predicted loss item The initial weight coefficients are allocated as follows: Initial weights of physical constraint terms Predicting initial weights for loss terms To ensure that the loss value after fusion is simultaneously correlated with the adaptability of physical laws and the accuracy of data prediction, the initial fusion formula is used. for: .

[0046] S36. Regarding physical constraints Compared with the predicted loss item To address the dimensional differences, the physical constraint terms are standardized. Compared with the predicted loss item Transformed into standardized physical constraint loss components of the same order of magnitude With standardized physical constraint loss components This provides a comparable numerical basis for subsequent dynamic adjustment of weights.

[0047] Specifically, targeting and To address the dimensional differences, Min-Max standardization was used to transform the two quantities into standardized components of the same order of magnitude, providing a comparable basis for subsequent dynamic weight adjustments. Specifically: The formula for the standardized physical constraint loss components is: ; The formula for the standardized predicted loss component is: ; in: The standardized physical constraint loss component; , These are physical constraint terms. Minimum and maximum values; To standardize the predicted loss components; , These are the predicted loss terms. The minimum and maximum values.

[0048] In this step, in S3, the dynamic adjustment of the weight ratio of the meteorological sensitivity parameter is designed to form a comprehensive physical constraint loss function, including the following steps: S37. Using the hourly rate of change of rainfall and the hourly rate of change of wind speed collected in S1 as the core inputs, meteorological sensitivity parameters are constructed. The computational logic, The value range is limited to 0-1, and the value variation is positively correlated with the driving force of meteorological factors on pollution transmission in the western region of Taihu Lake. Specifically, meteorological sensitivity parameters are constructed using the hourly variation rates of rainfall and wind speed collected by S1 as core inputs. (Values ​​range from 0 to 1, positively correlated with the driving force of meteorological factors on pollution transport), the calculation logic is as follows: First, calculate the hourly rate of change of rainfall. : ; Then, calculate the hourly rate of change of wind speed. : ; Finally, the meteorological sensitivity parameters are calculated. : ; Ultimately The value is limited to the range of 0-1 (if the calculated value is greater than 1, then take 1; if it is less than 0, then take 0).

[0049] S38, Definition For the standardized physical constraint loss components in S36 Dynamic weights, Standardized prediction loss components in S36 The dynamic weights, and and satisfy ;based on The real-time values ​​are used to determine the weight adjustment rules: Increase the standardized physical constraint loss component when it is in the high value range The weighting percentage Increase the standardized prediction loss component when it is in the low value range The weighting percentage When the weight transition is in the intermediate range, a linear relationship is achieved. Specifically, based on The weights are adjusted in real time, and each value is determined based on practical experience of pollution transmission in the Taihu Lake Basin, as follows: when (Strong meteorological driving effect): Setting The basis for this value is that the hourly rainfall variation rate in the Taihu Lake Basin often exceeds 80% during the rainy season. At this time, non-point source pollution washout dominates pollution transport. The physical laws such as the mass conservation of pollution load and the continuity of hydrodynamics have a much stronger constraint effect on pollution distribution than data fitting. This is the conventional weight configuration logic for non-point source pollution analysis scenarios in the basin.

[0050] when (Weak weather-driven effect): Setting The basis for its selection is that the hourly rainfall variation rate in the Taihu Lake Basin during the dry season is mostly less than 20%, and pollution transmission is mainly based on steady-state migration in the river channel. The prediction accuracy of the data fitting has a more significant impact on the pollution source analysis results, which is in line with the actual weighting habits of pollution analysis in the basin during the dry season.

[0051] when (Meteorological driving effect is moderate), a linear transition adjustment weight is adopted, and the formula is: ; The basis for this value is that the correlation between meteorological driving intensity and physical constraints and data prediction exhibits a smooth and gradual change, and the above formula ensures... Within the range of 0.2 to 0.8, From 0.2 ( =0.2) linear transition to 0.7 ( =0.8), which not only matches the gradual change requirement of physical constraint weights when "weak to strong weather-driven changes", but also avoids model training oscillations caused by sudden weight changes, while also being consistent with , The boundary weight rules are completely consistent, which is a general engineering practice method for dynamically adjusting the weights of the deep learning loss function.

[0052] S39. Dynamic weights , With standardized loss components , Integrate and construct a comprehensive physical constraint loss function for the deep learning foundation model. .

[0053] Specifically, dynamic weights and standardized loss components are integrated to construct a comprehensive physical constraint loss function for the deep learning foundation model. The formula is: .

[0054] S4. Dynamic rule migration mechanism configuration: Set the target domain data sufficiency judgment index. When it is determined that the target domain data is insufficient to support the accurate training of the deep learning base model, extract the nonlinear mapping relationship between meteorological factors and pollution load from the source domain data, and migrate the nonlinear mapping relationship to the target domain after adaptive adjustment based on the topological similarity of the water system structure. In this step, S4, setting the target domain data sufficiency judgment index and extracting the source domain nonlinear mapping relationship includes the following steps: S41. Construct an index system for judging the sufficiency of data in the target domain. And determine the indicator system. Key evaluation metrics include the effective sample size of the target domain collected by S1. Data time continuity indicators Stability index of characteristic distribution ,for , , After configuring the quantization threshold, a weighted summation system is used to calculate the comprehensive score. ; Specifically, construct an index system for judging the sufficiency of data in the target domain. It includes three key evaluation indicators. The definition, quantification method, and threshold of each indicator are determined in conjunction with the model training requirements of the western Taihu Lake target domain. The specific operation is as follows: Effective sample size index : The percentage of samples in the hourly data of the target domain collected by S1 that have no missing data for more than 6 consecutive hours; Quantification method: (The minimum number of samples required for model training is 720 hourly samples over 30 consecutive days. This value is based on the fact that pollution migration exhibits a periodic pattern on a daily / weekly scale, and 30 consecutive hours of hourly data is the standard minimum sample size for watershed pollution analysis models to capture basic periodic characteristics.) Quantization threshold: The value is based on the following: In environmental model training, the proportion of effective samples ≥ 80% is a general data quality requirement to ensure the stability of model fitting.

[0055] Data time continuity index : The ratio of the longest consecutive period without missing data in the target domain to the total number of data periods; Quantification method: ; Quantization threshold: The value is determined based on the following: Data continuity of ≥70% can ensure that the model captures the temporal migration pattern of pollution, which is a routine continuity requirement for hydrological and meteorological data to support model training.

[0056] Characteristic distribution stability index : The coefficient of variation (ratio of standard deviation to mean) of the core features of the target domain (rainfall, flow, and concentration of pollutants). Quantification method: ;in For the first The standard deviation of each feature For the first The mean of each feature; Quantization threshold: The value is determined by the following criteria: a coefficient of variation of ≤0.3 is a commonly used threshold in statistical analysis to determine the relative stability of data distribution, which is in line with the stability assessment standard for environmental characteristic data.

[0057] Assign weights to the three indicators ( Weight 0.4 Weight 0.3 The weight (0.3) is determined based on the following: sample size is the core foundation for model training convergence and has the greatest impact on data sufficiency, hence it is assigned the highest weight; data continuity and feature stability have a secondary impact on model accuracy, hence they are assigned lower weights. This is the conventional weight allocation logic for machine learning data evaluation. The overall score of the calculation system is as follows: .

[0058] S42, If the overall score If the target domain data in S1 is below a set threshold, it is determined that the data is insufficient to support the training of the deep learning base model. Specifically, a comprehensive score is set. The threshold for judgment is ;when At that time, all indicators met the basic requirements for model training. The weighted combination result (which serves as a general criterion for determining the data sufficiency of deep learning models for pollution analysis in the Taihu Lake Basin) is... If the target domain data in S1 is insufficient to support the accurate training of the deep learning base model, then it is determined that the data in S1 is insufficient.

[0059] S43. From the source domain data of S1, select samples that match the meteorological conditions of the target domain, and use the kernel function method to extract the nonlinear mapping relationship between meteorological factors and pollution load. .

[0060] Specifically, the selection of source domain samples includes: selecting samples from the source domain (eastern Taihu Lake and Chaohu Lake area) data of S1 that match the meteorological conditions of the target domain. The matching condition is that "the rainfall range and wind speed range are consistent with the current time period of the target domain" (for example, if the rainfall in the target domain is 5~10mm / h and the wind speed is 2~4m / s during a certain period, then the source domain will select samples with the same range). The basis for this value is that meteorological conditions are the core driving factor of pollution transmission, and the pollution patterns of meteorological samples with the same range are transferable, which is the conventional logic for cross-regional pollution data selection.

[0061] Furthermore, nonlinear mapping relationships The extraction process is as follows: Meteorological factors (rainfall) were extracted using the Gaussian kernel function method. Wind speed Nonlinear mapping relationship between pollution load (total nitrogen concentration) and pollution load (total nitrogen concentration) The formula is: ; in: Meteorological factors for matching samples from the source domain; , is the Gaussian kernel function ( (take the standard deviation of meteorological factors in the source region). The kernel function coefficients are obtained by fitting the pollution load values ​​of the source domain samples using the least squares method. The least squares method is a classic method for fitting nonlinear mapping relationships, which can guarantee the fitting accuracy of the mapping relationship.

[0062] In this step, S4, adjusting the mapping relationship based on the topological similarity of the water system and migrating it to the target domain includes the following steps: S44. Using the parameters recorded in S1 as input, the similarity evaluation model is applied. Calculate the topological similarity value of the water system structure between the source domain and the target domain. ; Specifically, the river network parameters (river network density) recorded by S1 Number of tributaries Water system connectivity The water system connectivity (number of connected waterways / total number of waterways) is used as input, and the cosine similarity model is applied. Calculate the topological similarity of the water system structure between the source and target domains. The formula is: ; in: The river network density, number of tributaries, and water system connectivity of the source region; For the corresponding parameters of the target domain; The value ranges from 0 to 1. Cosine similarity is a commonly used method for multi-dimensional parameter similarity assessment. It can effectively quantify the degree of similarity in the topological structure of a water system and is a general calculation method for assessing the similarity of watershed water systems.

[0063] S45, Based on similarity value Set correction rules for nonlinear mapping relationships Adaptive adjustments are made to obtain a mapping relationship that fits the target domain. ; Specifically, based on the topological similarity of the water system structure Set correction rules for nonlinear mapping relationships Adjustments are made to obtain a mapping relationship that adapts to the target domain. The revised rules and their basis are as follows: like (Highly similar water system topology): The value is based on the approximately 10% difference in pollution transport characteristics between highly similar water systems in the Taihu Lake Basin (such as the dense river network area in the western part of Taihu Lake and some sub-basins in the eastern part of Taihu Lake). This range can be adapted to the local pollution characteristics of the target area. like (Moderate similarity in topology of the water system): The value is based on the fact that the pollution transmission paths of moderately similar water systems in the Taihu Lake Basin differ by about 20%, which is the normal range for cross-sub-basin pollution mapping adjustment. like (Low-level similarity in topology of water systems): The value is based on the fact that the pollution migration patterns of the Taihu Lake Basin and the Chaohu Lake Basin, which are low-similar water systems, differ by about 30%. This range can balance the adaptability of source domain mapping and target domain characteristics.

[0064] S46. Mapping Relationship The parameters of the feature mapping layer of the deep learning base model are migrated to the target domain and used to initialize the parameters of the feature mapping layer. The model training is supported by the "pre-training freeze-fine-tuning freeze" process.

[0065] Specifically, the adapted mapping relationship Transferring to the target domain, model training is supported through a "pre-training freeze - fine-tuning freeze" process: Pre-training freeze: Assign values ​​to the feature mapping layer parameters of the deep learning base model and freeze the parameters of that layer; train the other layers of the model (convolutional layers, fully connected layers) using existing data from the target domain for 10 epochs. 10 epochs is the usual number of training rounds in the pre-training freeze phase of transfer learning, which allows the other layers of the model to adapt to the data distribution of the target domain. Fine-tuning freeze: Unfreeze the feature mapping layer parameters and continue training the model for 20 epochs using the target domain data. Set the learning rate to 1 / 10 of the pre-training stage, i.e., set the learning rate to 0.0001. 20 epochs is the typical number of rounds in the fine-tuning freeze stage. Reducing the learning rate can avoid parameter oscillations and is a common training process setting for deep learning transfer tasks. Ultimately, this process utilizes the mapping relationship of source domain migration to compensate for the lack of data in the target domain, supporting the model to converge to usable accuracy.

[0066] S5. Model Training and Iterative Optimization: Using the target domain data as the core training sample, combined with the meteorological-pollution mapping relationship after transfer adjustment, and with the comprehensive physical constraint loss function as the optimization objective, the deep learning basic model is iteratively trained until the deep learning basic model converges. Specifically, using valid data from the target domain as the core sample, combined with the meteorological-pollution mapping relationship adjusted by S46 migration... To generate augmented samples and construct a hybrid training sample set, the specific steps are as follows: Core samples: Hourly data from the target domain deemed valid by S41 were selected, accounting for 70% of the mixed sample set. In small sample scenarios, a core sample ratio of ≥70% is a standard proportion for ensuring the model learns the true pollution patterns of the target domain during small sample model training in the environmental field. Enhanced sampling: Inputting meteorological data from the target domain into the mapping relationship The corresponding pollution load prediction values ​​are generated as enhanced samples, accounting for 30% of the mixed sample set; Sample splitting: The mixed sample set is divided into training and validation sets in an 8:2 ratio. An 8:2 split between training and validation sets is a standard ratio in machine learning to balance the amount of training data with the reliability of validation.

[0067] Specifically, configure the training parameters to adapt to the small sample size scenario in the target domain. The specific steps are as follows: Optimizer: The Adam optimizer is used (a commonly used optimizer for deep learning models in the environmental domain, characterized by convergence stability and adaptive learning rate). Initial learning rate: Set to 0.001 (a typical initial learning rate for environment-based deep learning models, which balances convergence speed and parameter stability). Batch size: Set to 64 (combining conventional GPU hardware memory and sample size, this is a commonly used batch size that balances computational efficiency and parameter update stability). Learning rate decay strategy: After training for 20 epochs, the learning rate is multiplied by 0.9 every 5 epochs (a general adjustment strategy to avoid parameter oscillations in the later stages of training).

[0068] Specifically, taking the integrated physical constraint loss function of S39 as an example... To optimize the objective, iterative training is performed, with the specific steps as follows: Load the feature map layer parameters (i.e., mapping relationship) after S46 migration adjustment. This completes the initialization of the deep learning base model; In each round of training, a batch of samples is randomly selected from the training set and input into the model to obtain the prediction results of pollution source type and pollution load. Calculate the overall physical constraint loss for this batch. The model's weights and bias parameters are updated using the backpropagation algorithm. After each training epoch, the comprehensive loss value is calculated and recorded using the validation set to monitor the model's generalization ability in a timely manner.

[0069] Finally, the convergence criteria are set as follows: When the overall loss value of the validation set fluctuates by ≤0.001 for 5 consecutive epochs (i.e. , If the current epoch is used, the model is considered to have converged. A loss fluctuation of ≤0.001 for 5 consecutive epochs is a common threshold for determining whether the parameters of a deep learning model are stabilizing, which can prevent the model from stopping training too early or overfitting. If the convergence condition is not met after 50 epochs, the learning rate decay coefficient is adjusted to 0.85 and the training process is repeated.

[0070] S6. Model Validation and Result Output: After confirming the effectiveness of the deep learning basic model through numerical accuracy verification, physical law consistency verification, and comparative verification, output the pollution source types, pollution load intensity, and contribution ratio of each pollution source for the rivers flowing into Taihu Lake in the western region.

[0071] In this step, S6, model validation and result output includes the following steps: S61. Conduct validation of the deep learning foundation model in three categories, including the following sub-steps: S611, Adopting quantitative indicators Calculate the deviation between the predicted value of the deep learning base model and the actual monitored value of the target domain in S1 to complete the numerical accuracy verification. Specifically, the mean absolute error (MAE) is used. ) + coefficient of determination ( ") as a quantitative indicator The deviation between the model's predicted values ​​and the actual monitored values ​​in the target domain is calculated to verify the numerical accuracy. The specific steps are as follows: Indicator Calculation: Mean absolute error ( )formula: ; in The pollution load value predicted by the model. The actual monitored value of the target domain in S1. To verify the sample size; Coefficient of determination formula: ; in This represents the average of the actual monitored values.

[0072] Judgment conditions: (Regarding TN / TP concentration) and In environmental pollution load prediction models, , It is a standard criterion for judging whether numerical accuracy meets the requirements.

[0073] S612, the physical constraint terms constructed in S3 To evaluate the degree of fit between the output of the deep learning base model and the physical laws, and to complete the consistency verification of the physical laws; Specifically, the physical constraint terms constructed in S3 are associated with Evaluate the degree of fit between the model output and physical laws: Verification logic: Its core function is to characterize the consistency between the model output and physical laws (pollution load mass conservation, hydrodynamic continuity, etc.). The smaller the value, the stronger the consistency. Judgment conditions: Combined with S3 The definition is that 0.1 is a conventional and acceptable threshold for the consistency of the physical laws of the environmental model, ensuring that the model output conforms to the physical logic of actual pollution transmission.

[0074] S613. Select the traditional pollution load statistical model as the reference model. Comparing the deep learning foundation model with the reference model The performance was compared and verified. Specifically, a traditional pollution load statistical model is selected as the reference model. The comparison of model performance includes: Reference model selection: The "output coefficient method model" is selected as the reference model. The output coefficient method is a commonly used statistical model for estimating traditional pollution loads in the Taihu Lake Basin, and it has a broad application base. Comparison metrics: Comparing the two types of models (Numerical precision) and computation time; Judgment criteria: Deep learning foundational model Below the reference model And the computation time should not exceed twice that of the reference model (deep learning models should be superior to traditional statistical models in terms of accuracy or efficiency, which is the conventional judgment logic for model comparison and verification).

[0075] S62. If all three types of verification results in S61 meet the preset judgment conditions, then the deep learning basic model is confirmed to be effective. Specifically, if the three types of verification results in S61 simultaneously meet the following preset conditions, then the deep learning base model is confirmed to be effective: S611 and ; S612 ; S613 Below the reference model And the calculation time is ≤ twice that of the reference model.

[0076] S63. Output the types of pollution sources, pollution load intensity, and contribution ratio of each pollution source for rivers flowing into Taihu Lake in the western region.

[0077] Specifically, after validating the model, three core analytical results for the rivers flowing into Taihu Lake in the western region are output: Pollution source type: Identify the pollution source type (point source, area source, internal source) for each monitoring section. Pollution load intensity: The concentration of pollutants such as total nitrogen and total phosphorus at the hourly / daily level and the total daily load; Pollution source contribution ratio: Calculate the proportion of the total load of various pollution sources to the total load of this section using the following formula: ; The results of each monitoring section are finally output in tabular form to support the decision-making on pollution source control of rivers flowing into Taihu Lake in the western part of the lake.

[0078] Those skilled in the art will understand that the process of implementing all or part of the steps of the above embodiments can be carried out by hardware or by a program instructing the relevant hardware.

[0079] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, characterized by: Includes the following steps: S1. Data Collection and Regional Division: Collect meteorological data, hydrological data, and pollution source monitoring data of Taihu Lake Basin and surrounding related basins, and divide the data into target area data and source area data according to region. The target area is the western region of Taihu Lake, and the source area is the eastern region of Taihu Lake and Chaohu Lake. S2. Construction of the basic model for pollution source analysis: Based on the feature dimensions of meteorological-hydrological coupled data, determine the scale of input parameters for the deep learning basic model; configure a feature differentiation processing mechanism according to the regional hydrological characteristics representation requirements; set a joint optimization objective for pollution source type classification and pollution load intensity regression; and perform model parameter initialization to complete the construction of the deep learning basic model. S3. Construction of Physical Constraint Loss Function: Based on the physical conservation equations in meteorology, physical constraint terms are constructed and incorporated into the loss function of the deep learning base model. The meteorological sensitivity parameter is designed to dynamically adjust the weight ratio of the physical constraint terms and the prediction loss terms, forming a comprehensive physical constraint loss function. S4. Dynamic rule migration mechanism configuration: Set the target domain data sufficiency judgment index. When it is determined that the target domain data is insufficient to support the accurate training of the deep learning base model, extract the nonlinear mapping relationship between meteorological factors and pollution load from the source domain data, and migrate the nonlinear mapping relationship to the target domain after adaptive adjustment based on the topological similarity of the water system structure. S5. Model Training and Iterative Optimization: Using the target domain data as the core training sample, combined with the meteorological-pollution mapping relationship after transfer adjustment, and with the comprehensive physical constraint loss function as the optimization objective, the deep learning basic model is iteratively trained until the deep learning basic model converges. S6. Model Validation and Result Output: After confirming the effectiveness of the deep learning basic model through numerical accuracy verification, physical law consistency verification, and comparative verification, output the pollution source types, pollution load intensity, and contribution ratio of each pollution source for the rivers flowing into Taihu Lake in the western region.

2. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 1, is characterized in that... In step S1, data acquisition and area delineation include the following steps: S11. Acquire rainfall, wind speed and temperature data through automatic meteorological data acquisition equipment; acquire river flow, flow velocity and water level data through hydrological monitoring stations; acquire pollutant concentration data through automatic water quality monitoring stations. S12. Based on timestamps, align multi-source heterogeneous data and use time series interpolation to repair missing data to ensure that meteorological, hydrological and pollution source data are strictly matched in the spatiotemporal dimension. S13. Calculate the river network density, polder ratio, and inflow proportion of water into Taihu Lake in each region of the Taihu Lake Basin, and generate a set of regional hydrological characteristic parameters. S14. Based on the set of regional hydrological characteristic parameters, the region with a river network density significantly higher than the average of the basin and a high proportion of water flowing into the lake is identified as the target region; from the eastern region of Taihu Lake and the Chaohu Lake region, the region with hydrological characteristic similarity that meets the preset threshold is selected as the source region.

3. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 2, is characterized in that... In step S2, the input parameter size of the deep learning base model is determined and the model parameter initialization is performed, including the following steps: S21. Screening core meteorological and hydrological features directly related to the migration and transformation of pollution sources in the western region of Taihu Lake; S22. Combining the regional hydrological characteristic parameters calculated in S13, construct a feature dimension system directly related to pollution source analysis; S23. The Pearson correlation coefficient is used to assess the linear correlation between the feature and the concentration of pollutants, and the mutual information value is used to assess the nonlinear correlation between the feature and the concentration of pollutants. Based on the assessment results, significant correlation features are retained and redundant features are removed. S24. Principal component analysis is used to reduce the dimensionality of the feature dimension system, retaining the principal components that carry the core information, and finally determining the scale of input parameters that are suitable for the performance of the deep learning basic model. S25. Using the He initialization or Xavier initialization method adapted to the deep learning model, assign values ​​to the weights and bias parameters of the deep learning base model, set the parameter value range to avoid training anomalies, and complete the parameter initialization of the deep learning base model.

4. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 3, is characterized in that... In step S2, configuring the feature differentiation processing mechanism and setting the joint optimization objective includes the following steps: S26. Based on the regional hydrological characteristic parameters generated in S13, a clustering algorithm is used to classify the hydrological characteristics of the target area in the western part of Taihu Lake, and to clarify the differences in hydrological characteristics among different regions. S27. Configure differentiated feature processing schemes for regions with different hydrological characteristics, and match the pollution migration characteristics of dense river network area, polder area and sparse river network area in western Taihu Lake in terms of normalization method selection and time series feature extraction window setting. S28. Construct an adaptive adjustment mechanism for feature processing, dynamically interpolate and adjust feature processing parameters based on the hydrological similarity of adjacent regions, and ensure the smoothness of cross-regional processing. S29. Incorporate the pollution source type classification task and the pollution load intensity regression task into the same optimization framework. Set weighting coefficients according to the importance of the pollution source type classification task and the pollution load intensity regression task to balance the loss contribution and form a joint optimization objective function of the deep learning basic model.

5. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 4, is characterized in that... In S3, physical constraint terms are constructed based on the physical conservation equations in meteorology, including the following steps: S31. Considering the pollution transmission characteristics of the rivers flowing into Taihu Lake in the western region, which are characterized by "dense river networks and significant flood retention in polder areas", the pollution load mass conservation equation and the hydrodynamic continuity equation are selected as the core constraints, and the meteorological energy conservation equation is incorporated to improve the constraint system. S32. Extract the parameters required for each conservation equation from the meteorological and hydrological data and pollution source monitoring data collected in S1, and complete the spatiotemporal alignment of the parameters based on the timestamp; S33. Using the deviation between the theoretical value of the core conservation equation and the output value of the deep learning base model as the quantification target, construct physical constraint terms. .

6. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 5, is characterized in that... In step S3, incorporating physical constraint terms into the loss function of the deep learning base model includes the following steps: S34. Define the prediction loss term of the deep learning base model. It consists of two sub-losses: pollution source type classification loss. Regression loss with pollution load intensity ,Right now for and The weighted combination, where Reflects the accuracy of type prediction. Reflects the accuracy of load quantification; S35. Use linear superposition to combine physical constraint terms. Compared with the predicted loss item Fusion, assigning physical constraint terms through initial weighting coefficients. Compared with the predicted loss item The percentage of basic contributions; S36. Regarding physical constraints Compared with the predicted loss item To address the dimensional differences, the physical constraint terms are standardized. Compared with the predicted loss item Transformed into standardized physical constraint loss components of the same order of magnitude With standardized physical constraint loss components .

7. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 6, is characterized in that... In step S3, the design of dynamically adjusting the weight ratio of meteorological sensitivity parameters and forming a comprehensive physical constraint loss function includes the following steps: S37. Using the hourly rate of change of rainfall and the hourly rate of change of wind speed collected in S1 as the core inputs, meteorological sensitivity parameters are constructed. The computational logic, The value range is limited to 0-1, and the value variation is positively correlated with the driving force of meteorological factors on pollution transmission in the western region of Taihu Lake. S38, Definition For the standardized physical constraint loss components in S36 Dynamic weights, Standardized prediction loss components in S36 The dynamic weights, and and satisfy ;based on The real-time values ​​are used to determine the weight adjustment rules: Increase the standardized physical constraint loss component when it is in the high value range The weighting percentage Increase the standardized prediction loss component when it is in the low value range The weighting percentage When the weight transition is in the intermediate range, a linear relationship is achieved. S39. Dynamic weights , With standardized loss components , Integrate and construct a comprehensive physical constraint loss function for the deep learning foundation model. .

8. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 7, is characterized in that... In step S4, the data sufficiency assessment index for the target domain and the nonlinear mapping relationship of the source domain are set, including the following steps: S41. Construct an index system for judging the sufficiency of data in the target domain. and determine the indicator system. Key evaluation metrics include the effective sample size of the target domain collected by S1. Data time continuity indicators Stability index of characteristic distribution ,for , , After configuring the quantization threshold, a weighted summation system is used to calculate the comprehensive score. ; S42, If the overall score If the target domain data in S1 is below a set threshold, it is determined that the data is insufficient to support the training of the deep learning base model. S43. From the source domain data of S1, select samples that match the meteorological conditions of the target domain, and use the kernel function method to extract the nonlinear mapping relationship between meteorological factors and pollution load. .

9. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 8, is characterized in that... In step S4, adjusting the mapping relationship based on the topological similarity of the water system and migrating it to the target domain includes the following steps: S44. Using the parameters recorded in S1 as input, the similarity evaluation model is applied. Calculate the topological similarity value of the water system structure between the source domain and the target domain. ; S45, Based on similarity value Set correction rules for nonlinear mapping relationships Adaptive adjustments are made to obtain a mapping relationship that fits the target domain. ; S46. Mapping Relationship The parameters of the feature mapping layer of the deep learning base model are migrated to the target domain and used to initialize the parameters of the feature mapping layer. The model training is supported by the "pre-training freeze-fine-tuning freeze" process.

10. The method for constructing a machine learning model for pollution source analysis of rivers flowing into Taihu Lake in the western region, as described in claim 9, is characterized in that... In step S6, model validation and result output include the following steps: S61. Conduct validation of the deep learning foundation model in three categories, including the following sub-steps: S611, Adopting quantitative indicators Calculate the deviation between the predicted value of the deep learning base model and the actual monitored value of the target domain in S1 to complete the numerical accuracy verification. S612, the physical constraint terms constructed in S3 To evaluate the fit between the output of the deep learning base model and the physical laws, and to complete the consistency verification of the physical laws; S613. Select the traditional pollution load statistical model as the reference model. Comparing the deep learning foundation model with the reference model The performance was compared and verified. S62. If all three types of verification results in S61 meet the preset judgment conditions, then the deep learning basic model is confirmed to be effective. S63. Output the types of pollution sources, pollution load intensity, and contribution ratio of each pollution source for rivers flowing into Taihu Lake in the western region.