River nitrogen and phosphorus pollution contribution degree evaluation method and system

By constructing a water flow network model in the assessment of the contribution of nitrogen and phosphorus pollution in rivers, and using the random forest algorithm and Gini coefficient calculation, the problem of difficulty in accurately positioning river nitrogen and phosphorus pollution control in the existing technology has been solved, and efficient pollution source identification and treatment effects have been achieved. promote.

CN118798733APending Publication Date: 2024-10-18BEIJING NORMAL UNIVERSITY
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202410918857.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

The existing technology lacks a scientific and effective method to assess the contribution of nitrogen and phosphorus pollution in rivers, which makes it difficult to accurately locate pollution control and has limited control effects.

Method used

Based on the watershed base station data, a nitrogen and phosphorus pollution contribution model of the water flow network is constructed. The random forest algorithm is used to construct a direct and indirect impact model. The contribution is calculated through the Gini coefficient and the pollution source is identified.

Benefits of technology

It realizes the numerical and automated assessment of the contribution of nitrogen and phosphorus pollution in rivers, improves the efficiency of governance, avoids errors in manual judgment, has strong model transferability, is suitable for different regions, requires less training resources, and has high model accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118798733A_ABST
    Figure CN118798733A_ABST
Patent Text Reader

Abstract

The invention discloses a river nitrogen and phosphorus pollution contribution degree evaluation method and system. The method comprises the following steps: establishing a flow direction relation network between river basins; constructing a direct influence model of nitrogen and phosphorus pollution based on a random forest algorithm, and predicting the nitrogen / phosphorus concentration of an affected river node at the current moment by using the influence factor of the nitrogen / phosphorus concentration of the affected river node; calculating an average node splitting impurity variation of all influence factors belonging to the same river node based on a Gini coefficient, and obtaining a direct flow direction contribution degree of the river node; and constructing an indirect influence model of nitrogen and phosphorus pollution according to the direct flow direction contribution degree from the indirect upstream river node to the affected river node in sequence, and obtaining the indirect flow direction contribution degree of the indirect upstream river node. According to the method, the nitrogen and phosphorus pollution contribution degree model between the water flow networks is constructed according to the corresponding river index data measured by the drainage basin base stations, and efficient identification of pollution sources is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of environmental protection, and in particular to a method and system for evaluating the contribution of nitrogen and phosphorus pollution to rivers. Background Art

[0002] With the rapid development of industrialization and urbanization, the nitrogen and phosphorus pollution of rivers has become increasingly serious, posing a huge threat to the human living environment and ecosystem. At present, the governance of river pollution mainly relies on the investigation of pollution sources and the cleaning of pollutants. However, due to the lack of scientific and effective pollution contribution assessment methods, it is difficult to accurately locate the governance work and the governance effect is limited.

[0003] Most existing technologies have poor data processing capabilities and are unable to provide a comprehensive and effective algorithm model for calculating the contribution of nitrogen and phosphorus concentrations in rivers.

[0004] Therefore, how to provide an efficient method and system for evaluating the contribution of nitrogen and phosphorus pollution to rivers is a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0005] In view of the above research status and existing problems, the present invention provides a method and system for evaluating the contribution of nitrogen and phosphorus pollution in rivers. Specifically, a nitrogen and phosphorus pollution contribution model between water flow networks is constructed based on the corresponding river indicator data measured by the basin base station, which helps to efficiently identify the pollution sources.

[0006] The present invention provides a method for evaluating the contribution of nitrogen and phosphorus pollution to a river, comprising the following steps:

[0007] Establish the flow relationship network between river basins based on the water flow network;

[0008] A direct impact model of nitrogen and phosphorus pollution is constructed based on the random forest algorithm, and the impact factors of nitrogen / phosphorus concentrations of affected river nodes are determined. The impact factors are used as inputs of the direct impact model to predict the nitrogen / phosphorus concentrations of the affected river nodes at the current moment; the impact factors include: the impact factors of the directly upstream river nodes that are directly connected to the affected river nodes in the flow direction relationship network, and the impact factors of the affected river nodes;

[0009] Calculate the average node splitting impurity change of all influencing factors belonging to the same river node based on the Gini coefficient, and obtain the direct flow contribution of the river node in the direct influence model;

[0010] An indirect impact model of nitrogen and phosphorus pollution is constructed based on the direct flow contribution between the river nodes that the indirect upstream river node passes through in sequence to the affected river node, and the indirect flow contribution of the indirect upstream river node in the indirect impact model is obtained; the indirect upstream river node includes: a river node that has an indirect connectivity relationship with the affected river node.

[0011] Preferably, the influencing factors include:

[0012] The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time;

[0013] The outflow point is an upstream river node of the flow direction point that is directly connected to the flow direction point.

[0014] Preferably, the direct impact model includes:

[0015] Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change:

[0016]

[0017] Wherein, classification tree node m=1,...,n;

[0018] The Gini coefficient is calculated as follows:

[0019]

[0020] p mk represents the proportion of partition k in the mth classification tree node, k = 1, ..., K;

[0021] The importance of the influencing factor in the classification tree node m is:

[0022] VIM m =GI m -GI t -GI r ;

[0023] GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

[0024] Preferably, the importance of the influencing factor at the classification tree node m is normalized and used to calculate the direct flow contribution

[0025] Preferably, the indirect impact model includes: the product of direct flow contribution between the river nodes sequentially passed from the indirect upstream river node to the affected river node.

[0026] Preferably, the river node is a river observation point.

[0027] The present invention provides a river nitrogen and phosphorus pollution contribution assessment system according to the river nitrogen and phosphorus pollution contribution assessment method, comprising:

[0028] The flow relationship network construction module is used to establish the flow relationship network between river basins based on the water flow network;

[0029] A direct impact model construction module is used to construct a direct impact model of nitrogen and phosphorus pollution based on a random forest algorithm, determine the influencing factors of the nitrogen / phosphorus concentration of the affected river node, and use the influencing factors as inputs to the direct impact model to predict the nitrogen / phosphorus concentration of the affected river node at the current moment; the influencing factors include: the influencing factors of the directly upstream river nodes that are directly connected to the affected river node in the flow direction relationship network, and the influencing factors of the affected river node; based on the Gini coefficient, the average node splitting impurity change of all influencing factors belonging to the same river node is calculated to obtain the direct flow direction contribution of the river node in the direct impact model;

[0030] An indirect impact model construction module is used to construct an indirect impact model of nitrogen and phosphorus pollution based on the direct flow contribution between the river nodes that the indirect upstream river node passes through in sequence to the affected river node, and obtain the indirect flow contribution of the indirect upstream river node in the indirect impact model; the indirect upstream river node includes: a river node that has an indirect connectivity relationship with the affected river node.

[0031] Preferably, the influencing factors include:

[0032] The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time;

[0033] The outflow point is an upstream river node of the flow direction point that is directly connected to the flow direction point.

[0034] Preferably, the direct impact model includes:

[0035] Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change:

[0036]

[0037] Wherein, classification tree node m=1,...,n;

[0038] The Gini coefficient is calculated as follows:

[0039]

[0040] p mk represents the proportion of partition k in the mth classification tree node, k = 1, ..., K;

[0041] The importance of the influencing factor in the classification tree node m is:

[0042] VIM m =GI m -GI t -GI r ;

[0043] GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

[0044] Preferably, the indirect impact model includes: the product of direct flow contribution between the river nodes sequentially passed from the indirect upstream river node to the affected river node.

[0045] Compared with the prior art, it has the following beneficial effects:

[0046] The present invention uses corresponding statistics and machine learning models to solve the problem of basin pollution contribution, and digitizes and automates the contribution, thus avoiding the mistakes caused by manual judgment in the past and improving the efficiency of governance.

[0047] The model of the present invention has strong mobility and can be applied to watersheds in different regions, thus solving the problem of model failure caused by changes in the water flow base station network.

[0048] Compared with various complex models at the current stage, the model of the present invention requires relatively fewer training resources, has high model accuracy, and is easy to deploy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without creative work.

[0050] Figure 1 A flow chart of a method for assessing the contribution of nitrogen and phosphorus pollution to rivers provided by an embodiment of the present invention;

[0051] Figure 2 A network structure diagram of the flow direction relationship of river observation points provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of the relationship between a direct upstream river node and an indirect upstream river node provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] The first aspect of the embodiment of the present invention discloses a method for evaluating the contribution of nitrogen and phosphorus pollution in a river, the purpose of which is to construct a nitrogen and phosphorus pollution contribution model between water flow networks based on the corresponding river index data measured by the basin base station, and the observation points of the basin base station serve as the river nodes of this embodiment. Figure 1 As shown, the following steps are included:

[0055] Establish the flow relationship network between river basins based on the water flow network;

[0056] A direct impact model of nitrogen and phosphorus pollution is constructed based on the random forest algorithm to determine the influencing factors of nitrogen / phosphorus concentrations at the affected river nodes. The influencing factors are used as inputs of the direct impact model to predict the nitrogen / phosphorus concentrations at the affected river nodes at the current moment. The influencing factors include: the influencing factors of the directly upstream river nodes that are directly connected to the affected river nodes in the flow relationship network, and the influencing factors of the affected river nodes;

[0057] Based on the Gini coefficient, the average node splitting impurity change of all influencing factors belonging to the same river node is calculated to obtain the direct flow contribution of the river node in the direct impact model;

[0058] An indirect impact model of nitrogen and phosphorus pollution is constructed based on the direct flow contribution between the river nodes that the indirect upstream river nodes pass through in sequence to the affected river nodes, and the indirect flow contribution of the indirect upstream river nodes in the indirect impact model is obtained; the indirect upstream river nodes include: river nodes that have an indirect connectivity relationship with the affected river nodes.

[0059] In one embodiment, Figure 2As shown in the figure, taking the current distribution of river observation stations as an example, the corresponding spatial data is extracted and a tree diagram is used to display the relationship between points. Each river observation point is numbered in sequence, and a one-way arrow indicates the direction of water flow.

[0060] In one embodiment, the direct impact model studies the impact relationship and formation structure between directly connected observation points. The direct flow direction of the observation point can be determined according to the flow direction and flow rate, and it is assumed that each group of direct impact models is independent of each other. Figure 3 As shown in the figure, part of the data in the overall river channel observation is intercepted. Figure 3 For example, point 1 to point 3 is the simplest direct influence model, which is a 1v1 unidirectional influence mode; points 3, 4, 5 to 6 are a parallel direct influence model, which is a 3v1 unidirectional parallel influence mode.

[0061] The indirect impact model studies the impact relationship and structure formed by the linear sequential connection of two or more direct impact models. There is a one-way connection between the impact point and the impacted point, and at least one other observation point is separated. Figure 3 As shown, there is a one-way connection between point 1 and point 6, and there is one point (point 3) between them. Therefore, it is considered that point 1 has an indirect influence model on point 6, that is, it needs to go through two direct influence processes: point 1 affects point 3, and point 3 affects point 6.

[0062] In this embodiment, a contribution model is constructed based on the flow relationship network, including a direct influence model and an indirect influence model; the direct influence model is used to calculate the direct flow contribution between river nodes with direct connectivity; the indirect influence model is used to calculate the indirect flow contribution between river nodes with indirect connectivity.

[0063] In a direct impact model, the sum of the contributions is 1.

[0064] like Figure 3 As shown in the relationship, point 1 flows to point 3, and point 3 flows to point 6. Then point 1 has an indirect flow relationship with point 6, and its contribution value is equal to the contribution from point 1 to point 3 multiplied by the contribution from point 3 to point 6.

[0065] Specifically, assuming that in the direct model from point 1 to point 3, the contribution of point 3 to itself is 0.2, the contribution of point 1 to point 3 is 0.8, and in the direct model from point 3, point 4, and point 5 to point 6, the contribution of point 6 to itself is 0.1, the contribution of point 3 to point 6 is 0.2, the contribution of point 4 to point 6 is 0.3, and the contribution of point 5 to point 6 is 0.4. Then the contribution of point 1 to point 6 is calculated as 0.8×0.2=0.16.

[0066] Since each direct impact relationship has its corresponding contribution value, each direct impact relationship needs to execute the direct impact model once to obtain the direct flow contribution result.

[0067] In one embodiment, the impact factors include:

[0068] The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time;

[0069] The outflow point is the upstream river node of the flow point that has a direct connection with the flow point.

[0070] In one embodiment, the Gini coefficient GI is used to measure the splitting ability of each decision tree in the random forest model. The Gini coefficient is an indicator of feature impurity, which plays a key role in identifying which features are important for the performance of the model. The direct impact on the model includes:

[0071] Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change:

[0072]

[0073] Wherein, classification tree node m=1,...,n;

[0074] The Gini coefficient is calculated as follows:

[0075]

[0076] p mk represents the proportion of partition k in the mth classification tree node, k = 1, ..., K;

[0077] The importance of the influencing factor in the classification tree node m is:

[0078] VIM m =GI m -GI t -GI r ;

[0079] GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

[0080] In one embodiment, the importance of the influencing factor at the classification tree node m is normalized and used to calculate the direct flow contribution

[0081] In one embodiment, the indirect impact contribution is defined as the product of all direct impact contributions between the affected point and a certain influencing point, and the relevant calculation is performed. Assuming that the affected point A and the influencing point B are continuously connected, and there are s observation points between the river channel connecting A and B, the corresponding direct impact model contribution is Then the indirect impact contribution of B to A is C I The following formula can be used for calculation:

[0082]

[0083] The following is an example of the execution process of the contribution model:

[0084] Through machine learning methods, after inputting the independent variables required by the model, the model will give the contribution values ​​of different basin points to the basin. The execution process includes: data preprocessing, variable selection, and model selection.

[0085] First of all, it should be noted that this embodiment takes into account the hydrology-related knowledge and existing data, and makes the following assumptions to preliminarily simplify the model:

[0086] Assuming unidirectional runoff, only the river flow direction obtained according to the flow direction value is considered, and the influence of the reverse direction is included in the random term;

[0087] Assume that the contribution mutation caused by unexpected situations is not considered;

[0088] It is assumed that the natural generation and governance of the watershed points have some influence, so there will be a "contribution" of their own changes in the model;

[0089] It is assumed that the impact of groundwater on surface water at a basin point is included in the “contribution” of the basin’s own changes, which is similar to the previous assumption.

[0090] Secondly, the execution process specifically includes:

[0091] Data preprocessing:

[0092] Before training the model, the data was checked and verified several times to ensure the reliability of the data. At the same time, interpolation was performed for missing data, and the optimal interpolation method under the model was finally determined based on the model effect.

[0093] Variable selection:

[0094] Since there is no reference physical model for the evolution of nitrogen and phosphorus pollutants in rivers, it is believed that the influencing variables cannot be directly found in an intuitive sense, but it is more necessary to capture the important influencing variables through model results. Therefore, after filtering out variables with a large number of missing values, variables such as water temperature, total nitrogen concentration, total phosphorus concentration, conductivity, dissolved oxygen, permanganate index, ammonia nitrogen concentration, and pH value under monthly data were tried. After multiple rounds of training and calculation errors, three types of variables were selected: water temperature, total nitrogen concentration, and total phosphorus concentration.

[0095] In order to ensure the balance of variables at the watershed points, the variable design is as follows: taking the calculation of nitrogen pollution contribution from points A and B directly flowing to point C as an example, the independent variables include: the average water temperature at point A last month and this month, the average water temperature at point B last month and this month, the average water temperature at point C last month and this month, the average nitrogen concentration at point A last month and this month, the average nitrogen concentration at point B last month and this month, and the nitrogen concentration at point C last month; the dependent variable is the nitrogen concentration at point C this month, as shown in Table 1. The calculation model of phosphorus pollution contribution is consistent with that of nitrogen pollution.

[0096] Table 1 ABC model variable selection table

[0097]

[0098] Model selection:

[0099] Since this problem is a regression problem under supervision, and at the same time, it is hoped to quantify the role of the feature based on the feature importance value, and take the sum of the importance values ​​of the features corresponding to the basin point as the contribution value of the basin point. Therefore, this embodiment attempts to use the random forest regression model RFR, the support vector machine regression model SVR, and the gradient boosting decision tree XGBoost to optimize the parameters of the three models, and finally selects the RFR model by combining different variable designs and data preprocessing methods. The comparison of the results of the three models is shown in Table 2.

[0100] Table 2 Comparison of results of three types of models

[0101]

[0102]

[0103] After comparison, we found:

[0104] The model test results of random forest are good, the R-square values ​​of each direct influencing model are basically around 0.9, the mean square error of the CV validation set is relatively the lowest, and the quantified contribution values ​​are normal. Although it can be found that some of the test indicators of XGBoost are better, it can be found that there are a large number of abnormal points in the quantification results of XGBoost's contribution, that is, the contribution values ​​with a sum of 1 are evenly distributed to each point many times, and the results are of weak reference significance.

[0105] Although the results of random forests are affected by random seeds, the results given by different seeds are not much different during training. Therefore, the results based on multiple seed settings are selected and their average value is combined as the final contribution result.

[0106] In addition, the running time of RFR is relatively long, and SVR has the highest efficiency. However, the core of this model lies in the accuracy of quantification, and the time requirement is relatively loose. Therefore, after comprehensive judgment, the RFR model is selected.

[0107] It should be noted that although the model results are the predicted concentration of the flow point, since the model is only a training model, the predicted result of the flow point concentration is one of the evaluation criteria for model accuracy, and the contribution is measured by the feature importance of the influencing factors in the best performing model. The optimal model was obtained through algorithm comparison, and the model has a certain stability. The selected contribution is also based on the setting of multiple seeds and the average value is combined as the final contribution result.

[0108] An example of direct flow contribution obtained by using RFR to construct a direct impact model is as follows:

[0109] by Figure 3 The model of points 3, 4, and 5 flowing to point 6 is explained in the figure. The actual data of the four points from January to February 2021 are shown in Table 3.

[0110] Table 3 Partial original data from January to February 2021

[0111]

[0112] In the nitrogen pollution model, only the water temperature data and total nitrogen data of two consecutive months are considered, and the data processing results are shown in Table 3. In this 3v1 model, a total of 8 independent variables are selected, as shown in Table 4. The nitrogen concentration of the dependent variable can be predicted by machine learning algorithms. By comparing the predicted values ​​with the actual values ​​through previous data, the accuracy of the model can be measured.

[0113] Table 4 Variable values ​​of model 3-6

[0114]

[0115] Since only connected observation points have influence, the selected influencing factors can be divided into the influence of the outflow point - the average total nitrogen concentration before and after the outflow point (points 3, 4, and 5) and the average water temperature before and after the outflow point, and the influence of the flow point itself - the total nitrogen concentration before the flow point (point 6) and the average water temperature before and after the flow point. Therefore, the contribution of different influencing points to the affected points can be obtained by defining the importance of each influencing factor.

[0116] By normalizing the importance of the influencing factors obtained by the algorithm, the importance related to the same point is finally added up and used as the contribution of the point in this direct model, as shown in Table 5.

[0117] Table 5 Example of contribution of model 3-6

[0118]

[0119] The second aspect of the embodiment of the present invention provides a river nitrogen and phosphorus pollution contribution assessment system according to the first aspect of the embodiment, which is used to perform all the steps in the first aspect of the embodiment. It includes:

[0120] The flow relationship network construction module is used to establish the flow relationship network between river basins based on the water flow network;

[0121] The direct impact model construction module is used to construct a direct impact model of nitrogen and phosphorus pollution based on the random forest algorithm, determine the influencing factors of the nitrogen / phosphorus concentration of the affected river nodes, and use the influencing factors as the input of the direct impact model to predict the nitrogen / phosphorus concentration of the affected river nodes at the current moment; the influencing factors include: the influencing factors of the directly upstream river nodes that are directly connected to the affected river nodes in the flow relationship network, and the influencing factors of the affected river nodes; the average node splitting impurity change of all influencing factors belonging to the same river node is calculated based on the Gini coefficient to obtain the direct flow contribution of the river node in the direct impact model;

[0122] The indirect impact model construction module is used to construct an indirect impact model of nitrogen and phosphorus pollution based on the direct flow contribution between the river nodes that the indirect upstream river node passes through in sequence to the affected river node, and obtain the indirect flow contribution of the indirect upstream river node in the indirect impact model; the indirect upstream river nodes include: river nodes that have an indirect connectivity relationship with the affected river node.

[0123] In one embodiment, the impact factors include:

[0124] The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time;

[0125] The outflow point is the upstream river node of the flow point that has a direct connection with the flow point.

[0126] In one embodiment, the direct impact model includes:

[0127] Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change:

[0128]

[0129] Wherein, classification tree node m=1,...,n;

[0130] The Gini coefficient is calculated as follows:

[0131]

[0132] p mk represents the proportion of partition k in the mth classification tree node, k = 1, ..., K;

[0133] The importance of the influencing factor in the classification tree node m is:

[0134] VIM m =GI m -GI t -GI r ;

[0135] GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

[0136] In one embodiment, the indirect impact model includes: the product of direct flow contribution between the indirect upstream river node and the river nodes sequentially passed by the affected river node.

[0137] The above is a detailed introduction to a method and system for assessing the contribution of nitrogen and phosphorus pollution to rivers provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.

[0138] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method and system for assessing the contribution of nitrogen and phosphorus pollution in rivers. It is characterized in that The steps include: Establish the flow relationship network between river basins based on the water flow network; A direct impact model of nitrogen and phosphorus pollution is constructed based on the random forest algorithm to determine the influencing factors of nitrogen / phosphorus concentrations at the affected river nodes, and the influencing factors are used as inputs of the direct impact model to predict the nitrogen / phosphorus concentrations at the affected river nodes at the current moment; The influencing factors include: the influencing factors of the directly upstream river nodes that are directly connected to the affected river node in the flow direction relationship network, and the influencing factors of the affected river node; Calculate the average node splitting impurity change of all influencing factors belonging to the same river node based on the Gini coefficient, and obtain the direct flow contribution of the river node in the direct influence model; An indirect impact model of nitrogen and phosphorus pollution is constructed based on the direct flow contribution between the river nodes that the indirect upstream river node passes through in sequence to the affected river node, and the indirect flow contribution of the indirect upstream river node in the indirect impact model is obtained; the indirect upstream river node includes: a river node that has an indirect connectivity relationship with the affected river node.

2. A method for evaluating the contribution of nitrogen and phosphorus pollution to rivers according to claim 1, It is characterized in that The impact factors include: The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time; The outflow point is an upstream river node of the flow direction point that is directly connected to the flow direction point.

3. A method for evaluating the contribution of nitrogen and phosphorus pollution to rivers according to claim 1, It is characterized in that The direct impact model includes: Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change: Among them, classification tree node m=1,…,n; The Gini coefficient is calculated as follows: p mk Indicates the proportion of partition k in the mth classification tree node, k = 1,…,K; Impact Factor The importance of node m in the classification tree is: VIM m =GI m -AND t -AND r 4 GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

4. A method for evaluating the contribution of nitrogen and phosphorus pollution to rivers according to claim 3, It is characterized in that After normalizing the importance of the influencing factor at the classification tree node m, it is used to calculate the direct flow contribution 5. A method for evaluating the contribution of nitrogen and phosphorus pollution to rivers according to claim 1, It is characterized in that The indirect impact model includes: the product of direct flow contribution between the indirect upstream river node and the river nodes sequentially passed by the affected river node.

6. A method for evaluating the contribution of nitrogen and phosphorus pollution to rivers according to claim 1, It is characterized in that The river node is a river observation point.

7. A system for evaluating the contribution of nitrogen and phosphorus pollution to a river according to a method for evaluating the contribution of nitrogen and phosphorus pollution to a river according to any one of claims 1 to 6, It is characterized in that include: The flow relationship network construction module is used to establish the flow relationship network between river basins based on the water flow network; A direct impact model construction module is used to construct a direct impact model of nitrogen and phosphorus pollution based on a random forest algorithm, determine the influencing factors of the nitrogen / phosphorus concentration of the affected river nodes, and use the influencing factors as inputs of the direct impact model to predict the nitrogen / phosphorus concentration of the affected river nodes at the current moment; The influencing factors include: the influencing factors of the directly upstream river nodes that are directly connected to the affected river node in the flow direction relationship network, and the influencing factors of the affected river nodes; the average node splitting impurity change of all influencing factors belonging to the same river node is calculated based on the Gini coefficient to obtain the direct flow contribution of the river node in the direct influence model; An indirect impact model construction module is used to construct an indirect impact model of nitrogen and phosphorus pollution based on the direct flow contribution between the river nodes that the indirect upstream river node passes through in sequence to the affected river node, and obtain the indirect flow contribution of the indirect upstream river node in the indirect impact model; the indirect upstream river node includes: a river node that has an indirect connectivity relationship with the affected river node.

8. The river nitrogen and phosphorus pollution contribution assessment system according to claim 7, It is characterized in that The impact factors include: The average total nitrogen / phosphorus concentration at the outflow point at the historical time and the current time, the average water temperature at the outflow point at the historical time and the current time, the total nitrogen / phosphorus concentration at the flow direction point at the historical time, and the average water temperature at the flow direction point at the historical time and the current time; The outflow point is an upstream river node of the flow direction point that is directly connected to the flow direction point.

9. The river nitrogen and phosphorus pollution contribution assessment system according to claim 7, It is characterized in that The direct impact model includes: Direct flow contribution is all the influencing factors related to the i-th river node Average node split impurity change: Among them, classification tree node m=1,…,n; The Gini coefficient is calculated as follows: p mk Indicates the proportion of partition k in the mth classification tree node, k = 1,…,K; The importance of the influencing factor in the classification tree node m is: VIM m =GI m -AND t -AND r 4 GI t and GI r They represent the Gini coefficients of the two new nodes t and r split by the classification tree node m.

10. The river nitrogen and phosphorus pollution contribution evaluation system according to claim 7, It is characterized in that The indirect impact model includes: the product of direct flow contribution between the indirect upstream river node and the river nodes sequentially passed by the affected river node.