Multi-source data and interval estimation-based river water quality standard-exceeding grade prediction method

By using a method based on multi-source data and interval estimation to predict the impact of flood season rainfall on urban river water quality, it solves the problem of difficulty in predicting the risk of water quality exceeding standards in the existing technology, and achieves accurate prediction of river water quality and guarantee of water environment quality.

CN119338047AActive Publication Date: 2025-01-21江苏省南京环境监测中心 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411306849.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-21
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively predict the impact of rainfall during flood season on urban river water quality, resulting in the risk of water quality exceeding the standard is difficult to predict and control.

Method used

A method for predicting the level of river water quality exceeding the standard based on multi-source data and interval estimation is adopted. By collecting historical water quality and rainfall data, filtering the water quality exceeding the standard data, performing prediction interval calculation and analysis, and combining with meteorological forecasts to obtain future rainfall data, predict the level of water quality exceeding the standard.

Benefits of technology

It achieves accurate prediction of river water quality under rainfall conditions in flood season. It has the advantages of strong adaptability and easy operation, and can effectively guide the water environment quality assurance of urban rivers in rainy days.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338047A_ABST
    Figure CN119338047A_ABST
Patent Text Reader

Abstract

The invention discloses a river water quality standard-exceeding grade prediction method based on multi-source data and interval estimation. The method comprises the following steps: collecting historical water quality data and historical rainfall condition data corresponding to the historical water quality data; screening out water quality standard exceeding data in the historical water quality data, and classifying water quality levels; performing prediction interval calculation and analysis to obtain a mean value upper and lower limit range of rainfall conditions corresponding to different water quality levels under a certain guarantee level, namely a prediction interval; normalizing the rainfall condition prediction interval corresponding to each water quality level; the rainfall condition data of the next few days are obtained through weather forecast, and the prediction interval range to which the rainfall capacity and the maximum rainfall intensity belong is judged, so that the water quality standard exceeding grade corresponding to the rainfall condition under the specific guarantee level is predicted. The method is suitable for different river water conditions, the analysis and prediction result is based on actual historical water quality monitoring data and rainfall condition data, and the method has the advantages of being high in adaptability and easy to operate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of urban river water environment prevention and control during flood season, relates to river water quality prediction technology, and specifically relates to a river water quality exceeding standard level prediction method based on multi-source data and interval estimation. Background Art

[0002] In the management of urban rivers, the impact of rainfall during the flood season on water quality is an important research topic. Although the management of urban rivers in my country has achieved remarkable results and black and smelly water bodies have been basically successfully managed, rainfall during the flood season often causes a large amount of rainwater runoff to enter the river. This runoff usually carries pollutants from the urban surface, including heavy metals, pesticides, domestic garbage and oil pollution, which causes the urban rivers to turn black and smelly after the rain. Under heavy rain conditions, these pollutants will quickly enter the river system, causing a significant deterioration in water quality.

[0003] Studies have shown that rainstorm runoff is one of the main reasons for excessive water quality in urban rivers. For example, the study found that during rainfall events in Wuqing District, Tianjin, the concentration of pollutants in the river increased significantly, with the maximum drop of about 67% (Yang et al, 2021). Similarly, in a study of the Nilwala River in Sri Lanka, rainfall significantly affected the water quality index, and total alkalinity was the most affected parameter (Garusinghe & Premarathn, 2024). The increased pollution after heavy rains not only poses a threat to the ecological environment, but also poses a hidden danger to human health. Under high flow conditions, the level of microbial pollutants in river water increased significantly. Summary of the invention

[0004] Purpose of the invention: In order to overcome the shortcomings of the prior art, a method for predicting the level of river water quality exceeding the standard based on multi-source data and interval estimation is provided, which is applicable to different river water conditions. The analysis and prediction results are based on actual historical water quality monitoring data and rainfall condition data, and have the advantages of strong adaptability and easy operation. It has important guiding significance for ensuring the water environment quality of urban rivers on rainy days.

[0005] Technical solution: To achieve the above purpose, the present invention provides a method for predicting river water quality exceeding standard level based on multi-source data and interval estimation, comprising the following steps:

[0006] S1: Collect historical water quality data and historical rainfall condition data corresponding to the historical water quality data;

[0007] S2: Filter out the water quality exceeding standard data in the historical water quality data and classify the water quality level;

[0008] S3: Based on the water quality data processed in step S2 and the corresponding rainfall condition data, the prediction interval is calculated and analyzed to obtain the upper and lower limits of the mean values ​​of the rainfall conditions corresponding to different water quality levels under a certain guarantee level, i.e., the prediction interval;

[0009] S4: Standardize the rainfall condition prediction intervals corresponding to each water quality level (III-IV, IV-V and inferior V) to ensure the continuity and independence of the prediction intervals of each level;

[0010] S5: Obtain rainfall condition data for the next few days through weather forecasts, determine the forecast interval range of rainfall and maximum rainfall intensity, and thus predict the water quality exceeding standard level corresponding to the rainfall conditions under a specific guarantee level.

[0011] Furthermore, the historical water quality data in step S1 include dissolved oxygen (DO), total phosphorus (TP), ammonia nitrogen (NH3-N) and permanganate index (COD Mn ), where water quality data is the maximum or minimum value (dissolved oxygen takes the minimum value) from the beginning to the end of rainfall in the 24 hours;

[0012] Historical rainfall condition data includes rainfall amount and maximum rainfall intensity.

[0013] Furthermore, in step S2, the water quality levels are divided into Class III-IV, Class IV-V and Class V, and the dissolved oxygen, total phosphorus, ammonia nitrogen and permanganate index correspond to the range standard values ​​of Class III-IV, Class IV-V and Class V, and the classes to which the dissolved oxygen, total phosphorus, ammonia nitrogen and permanganate index belong are determined.

[0014] After filtering out the data that meets the range criteria, the monitoring data is changed to the corresponding water quality level. For example, if the ammonia nitrogen index belongs to Class III to IV and its value is 1.23, it will be modified to Class III to IV, and so on.

[0015] Furthermore, the calculation principle and method of the prediction interval in step S3 include:

[0016] Principle: When analyzing and calculating the prediction interval, the upper and lower limits of the mean in a certain prediction interval range will be given. This prediction interval range provides an estimated range for the mean, telling us the possible range of the true value of the population mean under a specific assurance level. Common assurance levels are 90%, 95%, and 99%, and the specific prediction interval range depends on the actual application requirements. Taking the 95% assurance level as an example, the prediction interval range of the mean consists of two parts: the lower limit and the upper limit. These two limits define a range, which means that the true mean of the population has a 95% probability of falling within this range.

[0017] Calculation method: The common formula for calculating the prediction interval involves the sample mean, sample standard deviation, sample size, and critical values ​​of the t distribution or z distribution, depending on the sample size and whether the population standard deviation is known. Here are the formulas for the two most common cases:

[0018] When the population standard deviation is unknown and the sample size n < 30, use the interval formula for the t distribution:

[0019]

[0020] In the formula, is the sample mean; t * is the critical value of the t distribution, which depends on the chosen assurance level (e.g. 95%) and the degree of freedom n-1; s is the sample standard deviation; n is the sample size; is the standard error (SE); PI is the prediction interval;

[0021] When the population standard deviation is known or the sample size n ≥ 30, use the interval formula for the z distribution:

[0022]

[0023] In the formula, is the sample mean; z * is the critical value of z distribution; σ is the population standard deviation; n is the sample size; is the standard error (SE), and PI is the prediction interval.

[0024] Furthermore, the critical value t of the t distribution involved in the calculation of the prediction interval in step S3 * Obtained by the following formula:

[0025] t α / 2,df =T -1 (1-α / 2,df) (3)

[0026] Among them, T -1 is the inverse cumulative distribution function of the t distribution; α is the significance level; df is the degrees of freedom;

[0027] To implement formula (3), use the following Python code to obtain the critical value t * :

[0028] import scipy.stats as st

[0029] # Guarantee Level

[0030] assurance_level = 0.95

[0031] #Degrees of freedom (sample size - 1)

[0032] degrees_of_freedom=19

[0033] #Corresponding t value

[0034] t_value=st.t.ppf((1+assurance_level) / 2,degrees_of_freedom)

[0035] print(f"For assurance level {assurance_level*100}% and degrees of freedom {degrees_of_freedom}, the t value is: {t_value:.4f}");

[0036] Among them, the assurance level assurance_level can be replaced by other values ​​(0, 1) according to usage requirements;

[0037] The critical z of the z distribution involved * Use the following formula to obtain:

[0038] z α / 2 =Φ -1 (1-α / 2) (4)

[0039] Among them, Φ -1 is the inverse cumulative distribution function of the standard normal distribution; α is the significance level; z α / 2 is the critical value of the Z distribution;

[0040] To implement formula (4), use the following Python code to obtain the critical z * :

[0041] import scipy.stats as st

[0042] # Guarantee Level

[0043] assurance_level = 0.95

[0044] #The corresponding z value

[0045] z_value=st.norm.ppf((1+assurance_level) / 2)

[0046] print(f"For assurance level {assurance_level*100}%, the z value is: {z_value:.4f}")

[0047] The assurance level assurance_level may be replaced with other values ​​(0, 1) according to usage requirements.

[0048] Furthermore, the method for normalizing the prediction interval in step S4 is:

[0049] 1) According to the prediction interval formula, three intervals (III-IV, IV-V and inferior V) are calculated. Each interval contains two numbers, indicating the starting and ending values ​​of the range;

[0050] 2) Extract all values ​​within the range and form a separate list, and adjust the prediction interval calculation results that are negative to 0;

[0051] 3) Eliminate outliers (such as 0) and sort the extracted values ​​to ensure that they are arranged from small to large;

[0052] 4) Reassign continuous and non-overlapping ranges based on the sorted points;

[0053] 5) Finally output the adjusted range, ensuring it is continuous and non-overlapping.

[0054] Furthermore, steps 3) to 5) are quickly implemented by the following Python code:

[0055] ① If there are three groups of prediction intervals to be processed, use the code:

[0056]

[0057] When running the code, [(27.8,51.7),(28.2,107.3),(0,147.0)] can be replaced with any three sets of prediction intervals required;

[0058] ②If there are only two groups of prediction intervals to be processed, use the code:

[0059]

[0060] When running the code, you can replace [(10.4,19.4),(6.8,24.0)] with any desired two sets of prediction interval ranges.

[0061] ③If there is only one set of prediction intervals to be processed, no normalization is required.

[0062] Furthermore, when predicting the water quality level according to the rainfall or maximum rainfall intensity in step S5, a search table should be prepared according to the prediction interval range obtained by analysis, and the smallest prediction interval should be selected. If the prediction interval is lower than this prediction interval, there is no risk of exceeding the standard.

[0063] Furthermore, when predicting the water quality level according to the rainfall or the maximum rainfall intensity in step S5, if the water quality levels predicted by the rainfall and the maximum rainfall intensity data are different, the predicted worse water quality level shall prevail.

[0064] Furthermore, when predicting the water quality level based on the rainfall or maximum rainfall intensity in step S5, if the rainfall or maximum rainfall intensity exceeds the upper limit of the range of all prediction intervals, the water quality warning level this time is set to the water quality warning level corresponding to the maximum rainfall or rainfall intensity in the given prediction interval.

[0065] Beneficial effects: Most of the existing water quality prediction methods focus on monitoring methods, machine learning or deep learning methods, but do not fully consider the impact of rainy days during the flood season on river water quality, and do not consider the risk of water quality exceeding the standard under predicted rainfall conditions. The present invention uses the principle of statistical analysis to combine the prediction interval calculation and analysis with historical monitoring data, and provides Python code to perform data calculation and processing, which supplements a water quality prediction method under rainfall conditions, realizes accurate prediction of water quality under rainfall conditions, and has strong adaptability and operability, and can be widely used in different types of river water quality flood season prediction work. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0067] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0068] like Figure 1 As shown, the present invention provides a method for predicting river water quality exceeding standard level based on multi-source data and interval estimation, comprising the following steps:

[0069] S1: Collect historical water quality data and historical rainfall condition data corresponding to the historical water quality data;

[0070] Historical water quality data include dissolved oxygen (DO), total phosphorus (TP), ammonia nitrogen (NH3-N) and permanganate index (COD Mn ), where water quality data is the maximum or minimum value (dissolved oxygen takes the minimum value) from the beginning to the end of rainfall in the 24 hours;

[0071] The collected water quality data and rainfall data are organized in the following format:

[0072]

[0073] S2: Filter out the water quality exceeding standard data in the historical water quality data and classify the water quality level;

[0074] Screening of dissolved oxygen (DO), total phosphorus (TP), ammonia nitrogen (NH3-N) and permanganate index (COD Mn ) in different water quality levels (III-IV, IV-V and inferior V). The screening standard refers to the surface water environmental quality standard GB3838-2002, and the standard range involved in the operation steps includes:

[0075]

[0076]

[0077] After filtering out the data that meets the range criteria, the monitoring data is changed to the corresponding water quality level. For example, if the ammonia nitrogen index belongs to Class III to IV and its value is 1.23, it will be modified to Class III to IV, and so on.

[0078] S3: Based on the water quality data processed in step S2 and the corresponding rainfall condition data, the prediction interval is calculated and analyzed to obtain the upper and lower limits of the mean values ​​of the rainfall conditions corresponding to different water quality levels under a certain guarantee level, i.e., the prediction interval;

[0079] The calculation principles and methods of the prediction interval include:

[0080] Principle: When analyzing and calculating the prediction interval, the upper and lower limits of the mean in a certain prediction interval range will be given. This prediction interval range provides an estimated range for the mean, telling the possible range of the true value of the population mean at a specific assurance level. Common assurance levels are 90%, 95%, and 99%. The specific prediction interval range depends on the actual application requirements and is determined by the user according to the actual situation. Taking the 95% assurance level as an example, the prediction interval range of the mean consists of two parts: the lower limit and the upper limit. These two limits define a range, which means that the true mean of the population has a 95% probability of falling within this range.

[0081] Calculation method: The common formula for calculating the prediction interval involves the sample mean, sample standard deviation, sample size, and critical values ​​of the t distribution or z distribution, depending on the sample size and whether the population standard deviation is known. Here are the formulas for both cases:

[0082] When the population standard deviation is unknown and the sample size n < 30, use the interval formula for the t distribution:

[0083]

[0084] In the formula, is the sample mean; t* is the critical value of the t distribution, which depends on the chosen assurance level (e.g. 95%) and the degree of freedom n-1; s is the sample standard deviation; n is the sample size; is the standard error (SE); PI is the prediction interval;

[0085] When the population standard deviation is known or the sample size n ≥ 30, use the interval formula for the z distribution:

[0086]

[0087] In the formula, is the sample mean; z * is the critical value of z distribution; σ is the population standard deviation; n is the sample size; is the standard error and PI is the prediction interval.

[0088] The critical value t of the t distribution involved in the calculation of the prediction interval * It can be obtained by the following formula:

[0089] t α / 2,df =T -1 (1-α / 2,df) (3)

[0090] Among them, T -1 It is the inverse cumulative distribution function (or PPF, Percent Point Function) of the t distribution.

[0091] α is the significance level (eg, for a 95% confidence level, α=1-0.95=0.05\α=1-0.95=0.05α=1-0.95=0.05).

[0092] df is the degrees of freedom, usually calculated as n-1, where n is the sample size.

[0093] Based on formula (3), for ease of operation, the critical value t of the t distribution involved in the calculation of the prediction interval is * It can also be obtained through the following python code:

[0094] import scipy.stats as st

[0095] # Guarantee Level

[0096] assurance_level = 0.95

[0097] #Degrees of freedom (sample size - 1)

[0098] degrees_of_freedom=19

[0099] #Corresponding t value

[0100] t_value=st.t.ppf((1+assurance_level) / 2,degrees_of_freedom)

[0101] print(f"For assurance level {assurance_level*100}% and degrees of freedom {degrees_of_freedom}, the t value is: {t_value:.4f}");

[0102] Among them, during the use of the code, the degrees of freedom need to be modified according to the sample size n. The sample size in the given example code is 20, so the degrees of freedom are 19; the assurance level assurance_level can be replaced with other values ​​(0, 1) according to usage requirements.

[0103] The critical z of the z distribution involved * Use the following formula to obtain:

[0104] z α / 2 =Φ -1 (1-α / 2) (4)

[0105] Among them, Φ -1 It is the inverse cumulative distribution function (PPF) of the standard normal distribution.

[0106] α is the significance level (eg, for a 95% confidence level, α=1-0.95=0.05\α=1-0.95=0.05α=1-0.95=0.05).

[0107] z α / 2 is the critical value of the Z distribution, used to calculate confidence intervals, etc.

[0108] Based on formula (4), for ease of operation, the critical z of the z distribution involved is * It can be obtained through the following Python code:

[0109] import scipy.stats as st

[0110] # Guarantee Level

[0111] assurance_level = 0.95

[0112] #The corresponding z value

[0113] z_value=st.norm.ppf((1+assurance_level) / 2)

[0114] print(f"For assurance level {assurance_level*100}%, the z value is: {z_value:.4f}")

[0115] The assurance level assurance_level may be replaced with other values ​​(0, 1) according to usage requirements.

[0116] S4: Standardize the rainfall condition prediction intervals corresponding to each water quality level (III-IV, IV-V and inferior V) to ensure the continuity and independence of the prediction intervals of each level, including:

[0117] 1) According to the prediction interval formula, three intervals (III-IV, IV-V and inferior V) are calculated. Each interval contains two numbers, indicating the starting and ending values ​​of the range;

[0118] 2) Extract all values ​​within the range and form a separate list, and adjust the prediction interval calculation results that are negative to 0;

[0119] 3) Eliminate outliers (such as 0) and sort the extracted values ​​to ensure that they are arranged from small to large;

[0120] 4) Reassign continuous and non-overlapping ranges based on the sorted points;

[0121] 5) Finally output the adjusted range, ensuring it is continuous and non-overlapping.

[0122] Steps 3) to 5) are quickly implemented using the following Python code:

[0123] ① If there are three groups of prediction intervals to be processed, use the code:

[0124]

[0125]

[0126] When running the code, [(27.8,51.7),(28.2,107.3),(0,147.0)] can be replaced with any three sets of prediction intervals required;

[0127] ②If there are only two groups of prediction intervals to be processed, use the code:

[0128]

[0129]

[0130] When running the code, you can replace [(10.4,19.4),(6.8,24.0)] with any desired two sets of prediction interval ranges.

[0131] ③If there is only one set of prediction intervals to be processed, no normalization is required.

[0132] S5: Obtain rainfall condition data for the next few days through weather forecasts, determine the forecast interval range of rainfall and maximum rainfall intensity, and thus predict the water quality exceeding standard level corresponding to the rainfall conditions under a specific guarantee level.

[0133] When predicting water quality levels based on rainfall or maximum rainfall intensity, a search table should be made based on the predicted range obtained through analysis, as follows:

[0134]

[0135] Select the smallest prediction interval. If the prediction interval is lower than this, there is no risk of exceeding the standard.

[0136] When predicting water quality levels based on rainfall or maximum rainfall intensity, it may be that the water quality level obtained based on rainfall data is different from that obtained based on maximum rainfall intensity data. In this case, priority should be given to the most unfavorable situation and the situation where the water quality level is worse. In short, if the water quality levels predicted by rainfall and maximum rainfall intensity data are different, the predicted worse water quality level should prevail.

[0137] When predicting the water quality level based on rainfall or maximum rainfall intensity, if the rainfall or maximum rainfall intensity exceeds the upper limit of the range of all prediction intervals, the water quality warning level will be set to the water quality warning level corresponding to the maximum rainfall or rainfall intensity in the given prediction interval.

[0138] Based on the above content, in order to verify the effectiveness and effect of the method of the present invention, the method of the present invention is applied as an example in this embodiment, which specifically includes the following steps:

[0139] Step 1: The research object of this embodiment is a national test section of a river in Nanjing. The dissolved oxygen (DO) monitoring data of the automatic monitoring station of the section from 2021.1.1 to 2023.9.1 is collected, where the dissolved oxygen (DO) is the minimum value within 24 hours from the beginning to the end of rainfall;

[0140] Step 2: Collect rainfall and maximum rainfall intensity data from January 1, 2021 to September 1, 2023 from the meteorological station and organize them together with water quality data into Table 1;

[0141] Table 1 Historical rainfall data and water quality data of national test sections

[0142]

[0143] Step 3: Data screening and processing. Screen out water quality indicators in different water quality levels (III-IV, IV-V and inferior V), and modify all dissolved oxygen (DO) monitoring values ​​to the corresponding water quality levels, see Table 2;

[0144] Table 2 Dissolved oxygen (DO) water quality level table

[0145]

[0146] Step 4: Calculate the prediction intervals corresponding to different water quality levels according to Table 2. In this case, we expect to obtain the risk level of water quality exceeding the standard with a probability of 80%. Therefore, the guarantee level is 80% during the calculation process. Calculate the upper and lower limits of the mean of rainfall conditions corresponding to different water quality levels, that is, the prediction interval. The results are summarized in Table 3.

[0147] Table 3 Prediction interval analysis Prediction interval results

[0148]

[0149] Step 5: Normalize the prediction interval. The rainfall condition prediction intervals corresponding to the water quality levels (III-IV, IV-V and inferior V) in Table 3 are normalized to ensure the continuity and independence of the prediction intervals of each level. This process is implemented using Python code, and the results are shown in Table 4.

[0150] Table 4 Normalized results of prediction intervals

[0151]

[0152] Step 6: Prediction. Obtain the rainfall condition data for the next 7 days through the weather forecast, determine the forecast range of the rainfall and the maximum rainfall intensity, and predict the level of water quality exceeding the standard under the rainfall conditions in 80% of the cases. The specific implementation is shown in Table 5. Among them, in the prediction and judgment process, Day4 is judged by rainfall, and it should be judged as Class IV to V based on Table 4. If it is judged based on the maximum rainfall intensity, it belongs to Class III to IV water quality. The most unfavorable situation is excellent, so it is comprehensively judged as Class IV to V. The judgment logic of Day5 is the same.

[0153] Table 5 Water quality prediction results

[0154]

Claims

1. A method for predicting river water quality exceeding standard level based on multi-source data and interval estimation, characterized in that: The steps include: S1: Collect historical water quality data and historical rainfall condition data corresponding to the historical water quality data; S2: Filter out the water quality exceeding standard data in the historical water quality data and classify the water quality level; S3: Based on the water quality data processed in step S2 and the corresponding rainfall condition data, the prediction interval is calculated and analyzed to obtain the upper and lower limits of the mean values ​​of the rainfall conditions corresponding to different water quality levels under a certain guarantee level, i.e., the prediction interval; S4: Normalize the rainfall condition prediction intervals corresponding to each water quality level to ensure the continuity and independence of the prediction intervals at each level; S5: Obtain rainfall condition data for the next few days through weather forecasts, determine the forecast interval range of rainfall and maximum rainfall intensity, and thus predict the water quality exceeding standard level corresponding to the rainfall conditions under a specific guarantee level.

2. A method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1, characterized in that: The historical water quality data in step S1 include dissolved oxygen, total phosphorus, ammonia nitrogen and permanganate index, wherein the water quality data is the maximum or minimum value (the dissolved oxygen takes the minimum value) from the beginning to the end of rainfall for 24 hours; Historical rainfall condition data includes rainfall amount and maximum rainfall intensity.

3. A method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 2, characterized in that: In step S2, the water quality levels are divided into Class III to Class IV, Class IV to Class V and Class V inferior, and the dissolved oxygen, total phosphorus, ammonia nitrogen and permanganate index correspond to the range standard values ​​of Class III to Class IV, Class IV to Class V and Class V inferior to determine the class to which the dissolved oxygen, total phosphorus, ammonia nitrogen and permanganate index belong.

4. The method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1 is characterized in that: The calculation method of the prediction interval in step S3 includes: When the population standard deviation is unknown and the sample size n < 30, use the interval formula for the t distribution: In the formula, is the sample mean; t * is the critical value of the t distribution; s is the sample standard deviation; n is the sample size; is the standard error; PI is the prediction interval; When the population standard deviation is known or the sample size n ≥ 30, use the interval formula for the z distribution: In the formula, is the sample mean; z * is the critical value of z distribution; σ is the population standard deviation; n is the sample size; is the standard error and PI is the prediction interval.

5. A method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 4, characterized in that: The critical value t of the t distribution involved in the calculation of the prediction interval in step S3 * Obtained by the following formula: t α / 2,df =T -1 (1-α / 2,df) (3) Among them, T -1 is the inverse cumulative distribution function of the t distribution; α is the significance level; df is the degrees of freedom; To implement formula (3), use the following Python code to obtain the critical value t * : import scipy.stats as st # Guarantee Level assurance_level = 0.95 #Degrees of freedom (sample size - 1) degrees_of_freedom=19 #Corresponding t value t_value=st.t.ppf((1+assurance_level) / 2,degrees_of_freedom) print(f"For assurance level {assurance_level*100}% and degrees of freedom {degrees_of_freedom}, the t value is: {t_value:.4f}"); Among them, the assurance level assurance_level can be replaced by other values ​​(0, 1) according to usage requirements; The critical z of the z distribution involved * Use the following formula to obtain: z α / 2 =Φ -1 (1-a / 2) (4) Among them, Φ -1 is the inverse cumulative distribution function of the standard normal distribution; α is the significance level; z α / 2 is the critical value of the Z distribution; To implement formula (4), use the following Python code to obtain the critical z * : import scipy.stats as st # Guarantee Level assurance_level = 0.95 #The corresponding z value z_value=st.norm.ppf((1+assurance_level) / 2) print(f"For assurance level {assurance_level*100}%, the z value is: {z_value:.4f}") The assurance level assurance_level may be replaced with other values ​​(0, 1) according to usage requirements.

6. The method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1 is characterized in that: The method for normalizing the prediction interval in step S4 is: 1) According to the prediction interval formula, three intervals (III-IV, IV-V, and inferior V) are calculated. Each interval contains two numbers, indicating the starting and ending values ​​of the range; 2) Extract all values ​​within the range and form a separate list, and adjust the prediction interval calculation results that are negative to 0; 3) Eliminate outliers and sort the extracted values ​​to ensure that they are arranged from small to large; 4) Reassign continuous and non-overlapping ranges based on the sorted points; 5) Finally output the adjusted range to ensure it is continuous and non-overlapping.

7. A method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 6, characterized in that: Steps 3) to 5) are quickly implemented by the following Python code: ① If there are three groups of prediction intervals to be processed, use the code: When running the code, [(27.8,51.7),(28.2,107.3),(0,147.0)] can be replaced with any three sets of prediction intervals required; ②If there are only two groups of prediction intervals to be processed, use the code: When running the code, you can replace [(10.4,19.4),(6.8,24.0)] with any desired two sets of prediction interval ranges. ③If there is only one set of prediction intervals to be processed, no normalization is required.

8. The method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1 is characterized in that: When predicting the water quality level according to the rainfall or the maximum rainfall intensity in step S5, a search table should be prepared according to the prediction interval range obtained by analysis, and the smallest prediction interval should be selected. If the prediction interval is lower than this prediction interval, there is no risk of exceeding the standard.

9. The method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1 is characterized in that: When predicting the water quality level according to the rainfall or the maximum rainfall intensity in step S5, if the water quality levels predicted by the rainfall and the maximum rainfall intensity data are different, the predicted worse water quality level shall prevail.

10. The method for predicting river water quality exceeding standard level based on multi-source data and interval estimation according to claim 1, characterized in that: When predicting the water quality level based on the rainfall or maximum rainfall intensity in step S5, if the rainfall or maximum rainfall intensity exceeds the upper limit of the range of all prediction intervals, the water quality warning level this time is set to the water quality warning level corresponding to the maximum rainfall or rainfall intensity in the given prediction interval.

Citation Information

Patent Citations

  • Water environment quality prediction system and method based on neural network

    CN110390429A

  • Urban short-term rainfall runoff pollution prediction method based on characteristic decomposition reconstruction

    CN118396152A

  • Flood season river pollution early warning system and method

    CN118587845A