Big data-based water body CODCr-bod5 correlation mining method and system

CN122889144APending Publication Date: 2026-10-09ANHUI XIANGAN ENVIRONMENTAL PROTECTION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610994401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]本发明目的是针对背景技术中存在的接收污水处理厂尾水的水体中,尾水惰性化学需氧量底座抬升实测CODCr而未引起BOD5等比例响应,导致现有基于统一样本的CODCr-BOD5相关性建模出现斜率塌陷、BOD5估算偏差及相关性结果解释性不足问题,提出基于大数据的水体CODCr-BOD5相关性挖掘方法及系统

Benefits of technology

本发明通过获取上游控制断面、污水处理厂尾水排口断面和下游混合断面的水质监测数据及流量数据,利用上游控制样本集建立河道本底CODCr-BOD5参考关系,再基于尾水排口样本中的实测CODCr和实测BOD5反推尾水中不能被BOD5响应解释的惰性化学需氧量浓度,并结合尾水排放流量和河道上游来水流量折算得到下游混合样本对应的尾水惰性化学需氧量底座贡献量;能够将污水处理厂尾水中可抬升实测CODCr但不引起BOD5等比例响应的部分从下游混合水体的相关性挖掘对象中识别出来,避免将不同断面、不同污染来源和不同尾水影响程度下的样本直接混合建模,导致尾水惰性化学需氧量底座被误作为BOD5可响应污染负荷的问题,解决CODCr-BOD5表观相关斜率塌陷被掩盖的问题;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122889144A_ABST
    Figure CN122889144A_ABST
Patent Text Reader

Abstract

The present application relates to the field of data intelligent processing and mining technology, in particular to a CODCr-BOD5 correlation mining method and system of water body based on big data; the method comprises the following steps: obtaining water quality monitoring data and flow data of the upstream control section, the sewage treatment plant tail water discharge section and the downstream mixing section of the target water body; establishing a river background reference relationship to identify the contribution of tail water inert chemical oxygen demand base; stripping the measured CODCr in the downstream mixed sample to generate effective paired samples in the downstream; training a machine learning correlation model with effective CODCr and base contribution as input and measured BOD5 as output, and outputting BOD5 estimation results and correlation slope collapse degree. The present application can improve the accuracy and interpretability of CODCr-BOD5 correlation mining in the tail water mixing influence area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent data processing and mining technology, specifically to a method and system for mining the correlation between CODcr and BOD5 in water bodies based on big data. Background Technology

[0002] Chemical oxygen demand (CODCr) and five-day biochemical oxygen demand (BOD5) using the dichromate method are important indicators in the assessment of organic pollution in water bodies. Among them, CODCr reflects the oxygen consumption level corresponding to reducing substances in water samples that can be oxidized by dichromate, and has the advantages of relatively short detection cycle and convenient data acquisition. BOD5 reflects the pollution load in water samples that can be degraded or oxidized by microorganisms under five-day culture conditions, and better reflects the impact of biodegradable organic pollutants in water bodies. Due to the long detection cycle of BOD5, in urban rivers, wastewater treatment plant effluent receiving water bodies, and water environment monitoring scenarios, it is usually desirable to use long-term accumulated CODCr, BOD5, hydrological flow, and cross-sectional monitoring data to explore the correlation between CODCr and BOD5, thereby assisting in BOD5 estimation, water biodegradability analysis, and pollution load change judgment.

[0003] Existing methods for analyzing the correlation between CODCr and BOD5 in water bodies typically use historical water quality data from different cross-sections, times, and pollution sources as a unified sample for correlation coefficient analysis, linear regression, or machine learning modeling. However, in urban rivers receiving wastewater treatment plant effluent, the effluent may still contain residual recalcitrant organic matter, dissolved inert organic matter, or other components that can be oxidized by dichromate but are unlikely to elicit a proportional response in BOD5 after biochemical treatment. This causes the measured CODCr at downstream mixing sections to rise in a base-like manner, while BOD5 does not rise synchronously with this portion of CODCr. If the measured CODCr and BOD5 from the downstream mixed sample are directly used for overall modeling, the inert chemical oxygen demand base of the effluent is easily mistaken for a BOD5-responsive pollution load, leading to the collapse of the CODCr-BOD5 correlation slope and resulting in BOD5 estimation bias, distorted biodegradability assessment, and insufficient interpretability of the water quality correlation mining results within the effluent mixing influence zone. Summary of the Invention

[0004] The purpose of this invention is to address the problems in the background technology where, in water bodies receiving effluent from wastewater treatment plants, the measured CODCr rises due to the inert chemical oxygen demand (CODr) base but does not elicit a proportional response in BOD5. This leads to slope collapse, BOD5 estimation bias, and insufficient interpretability of correlation results in existing CODCr-BOD5 correlation modeling based on uniform samples. The invention proposes a method and system for mining the CODCr-BOD5 correlation in water bodies based on big data.

[0005] The technical solution of this invention: a method for mining the correlation between CODcr and BOD5 in water bodies based on big data, comprising: S1. Obtain water quality monitoring data and flow data of upstream control sections, sewage treatment plant tailwater discharge outlet sections and downstream mixed sections of the target city's river, generate paired samples, and divide them into upstream control sample set, tailwater discharge outlet sample set and downstream mixed sample set. S2. Establish a river baseline reference relationship based on the upstream control sample set; S3. Based on the river baseline reference relationship, tailwater discharge outlet sample set and flow data, calculate the tailwater inert chemical oxygen demand base contribution of each downstream mixed sample in the downstream mixed sample set. S4. Based on the contribution of the inert chemical oxygen demand (COD) base in the tailwater, the measured COD of the dichromate method in the downstream mixed sample is stripped to obtain the effective COD of the dichromate method, and downstream effective paired samples are generated. S5. Using downstream effective paired samples as training samples, with the effective dichromate method chemical oxygen demand and the contribution of the tailwater inert chemical oxygen demand base as input, and the measured five-day biochemical oxygen demand as output, train the machine learning correlation model. S6. Based on the machine learning correlation model, output the five-day biochemical oxygen demand estimation results, the contribution of the tailwater inert chemical oxygen demand base, and the degree of related slope collapse.

[0006] Preferably, the water quality monitoring data includes sampling time, monitoring section identification, dichromate method chemical oxygen demand (COD) concentration, and five-day biochemical oxygen demand (BOD) concentration; the flow data includes tailwater discharge flow and upstream inflow flow; COD data and BOD data with the same sampling time or sample number are paired as paired samples; the tailwater discharge flow and upstream inflow flow have the same sampling time or the same sampling batch as the paired samples; when the detection report time of the BOD data is later than the sampling time, the sampling time is used as the time identifier of the BOD data.

[0007] Preferably, the paired samples are divided according to the monitoring section identifier, with paired samples from the upstream control section divided into the upstream control sample set, paired samples from the wastewater treatment plant effluent discharge section divided into the effluent discharge sample set, and paired samples from the downstream mixing section divided into the downstream mixing sample set.

[0008] Preferably, the dichromate method chemical oxygen demand concentration in the upstream control sample set is used as the independent variable, and the five-day biochemical oxygen demand concentration in the upstream control sample set is used as the dependent variable. The least squares method is used to fit the river channel background reference relationship, which includes the river channel background correlation slope and the river channel background intercept.

[0009] Preferably, the five-day biochemical oxygen demand (BOD) concentration from the tailwater discharge outlet sample set is substituted into the river baseline reference relationship to back-calculate the equivalent dichromate method COD concentration in the tailwater that can be explained by the five-day BOD response; the measured dichromate method COD concentration in the tailwater discharge outlet sample set is subtracted from the equivalent dichromate method COD concentration to obtain the difference; when the difference is greater than zero, the difference is determined as the tailwater inert COD concentration; when the difference is not greater than zero, the tailwater inert COD concentration is determined as zero.

[0010] Preferably, the mixing ratio of the tailwater in the downstream mixed water body is calculated based on the tailwater discharge flow rate and the upstream inflow flow rate, and the inert chemical oxygen demand (COD) concentration of the tailwater is multiplied by the mixing ratio to obtain the tailwater inert COD base contribution of the downstream mixed sample.

[0011] Preferably, the effective chemical oxygen demand (COD) concentration is obtained by subtracting the corresponding contribution of the inert COD base in the tailwater from the measured COD concentration of the downstream mixed sample; the effective COD concentration, the corresponding contribution of the inert COD base in the tailwater, and the measured five-day biochemical oxygen demand (BOD) concentration in the downstream mixed sample are correlated to generate effective paired samples for the downstream.

[0012] Preferably, the machine learning correlation model is a supervised learning regression model, and the training objective is to minimize the sum of squared residuals between the predicted five-day biochemical oxygen demand and the measured five-day biochemical oxygen demand. The supervised learning regression model is selected from support vector regression model, random forest regression model and gradient boosting tree regression model, and the model used is determined according to the cross-validation error of the training samples.

[0013] Preferably, the degree of correlation slope collapse is determined by the apparent correlation slope and the effective correlation slope; the apparent correlation slope is the slope obtained by fitting the measured dichromate method chemical oxygen demand concentration and the measured five-day biochemical oxygen demand concentration in the downstream mixed sample; the effective correlation slope is the slope obtained by fitting the effective dichromate method chemical oxygen demand concentration and the measured five-day biochemical oxygen demand concentration in the downstream effective paired sample; the ratio of the difference between the effective correlation slope and the apparent correlation slope to the effective correlation slope is determined as the degree of correlation slope collapse.

[0014] Compared with the prior art, the above-mentioned technical solution of the present invention has the following beneficial technical effects: This invention acquires water quality monitoring data and flow data from upstream control sections, wastewater treatment plant effluent discharge sections, and downstream mixed sections. It establishes a baseline CODCr-BOD5 reference relationship for the river channel using the upstream control sample set. Then, based on the measured CODCr and BOD5 in the effluent discharge samples, it infers the concentration of inert chemical oxygen demand (COD) in the effluent that cannot be explained by the BOD5 response. Finally, it calculates the contribution of the downstream mixed sample's inert COD base from the downstream mixed water body by combining the effluent discharge flow and the upstream inflow flow. This invention can identify the portion of wastewater effluent that can raise the measured CODCr but does not cause a proportional response to BOD5 from the correlation mining objects of the downstream mixed water body. It avoids the problem of directly mixing and modeling samples from different sections, pollution sources, and different degrees of effluent impact, which could lead to the inert COD base being mistakenly considered as a BOD5-responsive pollution load. This also solves the problem of the apparent correlation slope collapse of CODCr-BOD5 being masked. This invention further strips the measured CODCr from the downstream mixed sample to obtain the effective CODCr. The effective CODCr and the contribution of the tailwater inert chemical oxygen demand (COD) base are used as inputs to a machine learning correlation model, with the measured BOD5 as the output for supervised learning regression modeling. This allows the model to learn the effective response relationship between CODCr and BOD5 after base stripping, while retaining the influence information of the tailwater inert COD base on the original correlation relationship. By outputting the BOD5 estimation results, the contribution of the tailwater inert COD base, and the degree of correlation slope collapse, this invention not only improves the accuracy of BOD5 estimation and CODCr-BOD5 correlation mining within the tailwater mixing impact zone, but also provides explanations for the causes of correlation distortion, improving the interpretability of water biodegradability analysis, tailwater mixing impact assessment, and water quality big data mining results. Attached Figure Description

[0015] Figure 1 This is a flowchart of the water CODCr-BOD5 correlation mining method based on big data proposed in this invention; Figure 2 This is a schematic diagram of the mixing influence zone between the water body cross section and the tailwater proposed in this invention; Figure 3 This is a schematic diagram of the peeling off of the tailwater inert chemical oxygen demand (COD) base proposed in this invention. Detailed Implementation

[0016] Example 1, as Figure 1As shown, this embodiment provides a method for mining the correlation between CODCr and BOD5 in water bodies based on big data; the water body can be an urban river, an urban inland river, a landscape water replenishment river, a downstream receiving water body after the sewage treatment plant effluent is discharged, or a surface water body with similar effluent mixing characteristics; this embodiment takes the scenario of a target urban river receiving sewage treatment plant effluent as an example for illustration. In this embodiment, CODCr refers to the chemical oxygen demand measured by the dichromate method, and BOD5 refers to the five-day biochemical oxygen demand. CODCr reflects the oxygen consumption level of reducing substances in the water sample that can be oxidized by dichromate, while BOD5 reflects the level of substances in the water sample that can be degraded or oxidized by microorganisms under five-day biochemical culture conditions, thus consuming dissolved oxygen. Since easily degradable organic matter is usually largely removed after biochemical treatment of wastewater treatment plant effluent, but recalcitrant organic matter, dissolved inert organic matter, or other components that can be oxidized by dichromate but are difficult to elicit a proportional response from BOD5 may still remain. Therefore, after the wastewater treatment plant effluent is discharged into urban rivers, an inert chemical oxygen demand base may be formed in the CODCr of the downstream mixing section of the target urban river. This inert chemical oxygen demand base will increase the measured CODCr concentration, but will not cause the BOD5 concentration to increase proportionally, thus causing the correlation slope of the CODCr-BOD5 correlation to collapse in the effluent-affected samples. In this embodiment, the tailwater inert chemical oxygen demand (COD) base does not refer to the concentration of a specific chemical substance directly measured by a single chemical detection method, nor is it an absolute quantification of all recalcitrant organic matter in the tailwater. Rather, it is a data characteristic determined by the river background CODCr-BOD5 reference relationship, the measured CODCr concentration and the measured BOD5 concentration at the tailwater discharge section, and is used to characterize the equivalent CODCr portion in the tailwater that can be detected by the dichromate method but cannot be explained by BOD5 according to the river background CODCr-BOD5 response relationship. In this embodiment, the inert chemical oxygen demand (COD) concentration of the tailwater is used to characterize the equivalent concentration at the tailwater discharge outlet section; the tailwater inert COD base contribution is used to characterize the equivalent contribution of the tailwater inert COD concentration, after being converted by the tailwater discharge flow and the upstream inflow flow, to the measured CODCr concentration at the downstream mixing section; the two have different data sources and calculation objects, the former corresponding to the tailwater discharge outlet sample, and the latter corresponding to the downstream mixing sample.

[0017] The method described in this embodiment includes the following steps; S1. Obtain water quality monitoring data and flow data of upstream control sections, sewage treatment plant tailwater discharge outlet sections and downstream mixed sections of the target city's river, generate paired samples, and divide them into upstream control sample set, tailwater discharge outlet sample set and downstream mixed sample set. Specifically, three cross-sections are selected in the target city's river channel: an upstream control section, a wastewater treatment plant effluent discharge outlet section, and a downstream mixing section. The upstream control section is located upstream of the wastewater treatment plant effluent discharge outlet to characterize the baseline water quality of the river channel before the wastewater treatment plant effluent enters the channel. The wastewater treatment plant effluent discharge outlet section characterizes the water quality of the wastewater treatment plant effluent. The downstream mixing section is located at a position where the wastewater treatment plant effluent can form a mixing effect after entering the river channel to characterize the water quality after the upstream inflow and the wastewater treatment plant effluent are mixed. Figure 2 As shown, upstream control sections, wastewater treatment plant effluent discharge sections, and downstream mixing sections are sequentially set along the main river flow of the target water body. The upstream control sections are used to obtain an upstream control sample set unaffected by the wastewater treatment plant effluent; the wastewater treatment plant effluent discharge section is used to obtain an effluent discharge sample set; and the downstream mixing section is used to obtain a downstream mixed sample set after the effluent mixes with the upstream inflow. After the wastewater treatment plant effluent flows into the target water body from the effluent discharge outlet, a effluent mixing influence zone is formed downstream of the outlet. The downstream mixing section is set within this effluent mixing influence zone or at a representative location, so that the downstream mixed samples can reflect the CODCr-BOD5 response state after the effluent mixes with the upstream inflow. This cross-section layout provides data for establishing a river baseline reference relationship, identifying the contribution of the effluent's inert chemical oxygen demand (COD) base, and generating effective paired downstream samples.

[0018] In this embodiment, the water quality monitoring data includes sampling time, monitoring section identification, dichromate method chemical oxygen demand concentration, and five-day biochemical oxygen demand concentration; the flow data includes effluent discharge flow and upstream inflow flow; wherein, the effluent discharge flow can come from the effluent discharge flow meter of the sewage treatment plant, the discharge permit execution record, or the sewage treatment plant operation record; the upstream inflow flow can come from river hydrological monitoring data, section flow monitoring equipment, or hydrological data corresponding to the upstream control section; the above data can be organized into a historical water quality dataset according to daily, weekly, monthly, or sampling batches, or it can be obtained by aggregating data from the water quality monitoring platform, laboratory testing system, sewage treatment plant operation system, and hydrological monitoring system; In this embodiment, the historical water quality dataset refers to a collection of water quality data records and flow data records formed by multiple sampling times or multiple sampling batches. The data sources include online water quality monitoring records, laboratory test reports, wastewater treatment plant effluent discharge records, and river hydrological records. Before entering this method, data from different sources are all converted into a unified sample format that includes sampling time, monitoring section identifier, CODCr concentration, BOD5 concentration, effluent discharge flow rate, and upstream river inflow. For each water quality data record, if the record contains both CODCr and BOD5 test results, then the CODCr and BOD5 data corresponding to the same sampling time or the same sample number are paired as a paired sample. In this embodiment, the paired sample refers to a data unit formed by associating CODCr and BOD5 data with the same sampling time or the same sample number. If the BOD5 test report time is later than the sampling time, then the sampling time is used as the time identifier of the BOD5 data, so that the CODCr data, BOD5 data, and corresponding flow data are consistent under the same sampling time or the same sampling batch. Thus, the CODCr concentration, BOD5 concentration, tailwater discharge flow, and upstream inflow flow in the paired sample can correspond to the same sampling time or the same sampling batch. In this embodiment, the paired samples include at least: sampling time, monitoring section identifier, CODCr concentration, BOD5 concentration, effluent discharge flow rate, and upstream inflow flow rate; paired samples from upstream control sections are classified into an upstream control sample set; paired samples from effluent discharge sections of wastewater treatment plants are classified into an effluent discharge sample set; and paired samples from downstream mixing sections are classified into a downstream mixing sample set. In this embodiment, the upstream control sample set is used to characterize the baseline water quality of the river before the wastewater treatment plant effluent enters the target city river; the effluent discharge sample set is used to characterize the CODCr-BOD5 response state of the wastewater treatment plant effluent itself; and the downstream mixed sample set is used to characterize the CODCr-BOD5 response state after the upstream inflow and the wastewater treatment plant effluent are mixed. The three sample sets come from different monitoring sections, are not interchangeable, and are used in subsequent steps for establishing baseline relationships, identifying the inert chemical oxygen demand (COD) base of the effluent, and modeling the base stripping. Specifically, the upstream control sample set is used to establish the river baseline reference relationship; the tailwater discharge sample set is used to identify the tailwater inert chemical oxygen demand (COD) concentration; and the downstream mixed sample set is used to calculate the tailwater inert COD base contribution of each downstream mixed sample and to generate effective downstream paired samples after base stripping.

[0019] S2. Establish a river baseline reference relationship based on the upstream control sample set; Specifically, using the CODCr concentration in the upstream control sample set as the independent variable and the BOD5 concentration in the upstream control sample set as the dependent variable, a reference relationship between the river baseline CODCr and BOD5 is established. The river baseline reference relationship is used to characterize the baseline response relationship between CODCr and BOD5 in the river baseline water quality of the target city when it is not directly affected by the effluent from the target sewage treatment plant. In this embodiment, the river baseline reference relationship is not used to represent a universal conversion relationship between CODCr and BOD5 in all water bodies, but rather a local reference relationship obtained by fitting sample data from the upstream control section of the target city's river. This river baseline reference relationship is used to subsequently determine which parts of the measured CODCr concentration in the tailwater discharge outlet sample can be explained by BOD5 according to the target city's river baseline CODCr-BOD5 response relationship, and which parts cannot be explained by BOD5. In one implementation, a baseline reference relationship for the river channel is established using linear regression, expressed as follows: ; in, This indicates the CODCr concentration in the upstream control sample. This indicates the BOD5 concentration in the upstream control sample. Indicates the relative slope of the river channel background. Indicates the baseline intercept of the river channel; and The least squares method was used for fitting; the objective of the least squares method is to minimize the sum of squared residuals between the measured BOD5 concentration and the fitted BOD5 concentration in the upstream control sample; specifically, it can be expressed as: ; Where m represents the number of samples in the upstream control sample set. This represents the CODCr concentration of the j-th upstream control sample. This represents the BOD5 concentration of the j-th upstream control sample; After obtaining the river background correlation slope and river background intercept, the validity of the river background reference relationship is judged. Specifically, when the river background correlation slope is positive and there are no samples marked as invalid by the test report, quality control record or data review record in the upstream control sample set, it is determined that the river background reference relationship can be used for subsequent equivalent CODCr concentration back-inference. When the river baseline correlation slope is not positive, or when there are samples marked as invalid by testing reports, quality control records, or data review records in the upstream control sample set, the river baseline reference relationship should not be directly used for subsequent calculations. Instead, an upstream control sample time window that matches the target downstream mixed sample in terms of season, hydrological conditions, or sampling batch should be selected, and the river baseline reference relationship should be refitted. Alternatively, a robust regression method can be used to refit the river baseline reference relationship. The refitted river baseline reference relationship must still meet the condition that the river baseline correlation slope is positive before it can be used for subsequent back-calculation of the equivalent CODCr concentration in the tailwater. When multiple candidate upstream control sample time windows exist, the candidate time window with the smallest cross-validation error and a positive channel background correlation slope is selected to establish the channel background reference relationship. The cross-validation error is calculated from the sample division and fitting residual within the candidate upstream control sample time window and is used to evaluate the predictive stability of the candidate channel background reference relationship for samples not involved in the fitting. In this way, it is possible to avoid directly using obviously invalid upstream control samples or samples that cannot form a positive CODCr-BOD5 response relationship for tailwater inert chemical oxygen demand (COD) base identification.

[0020] The river baseline reference relationship obtained in this step includes the river baseline correlation slope and the river baseline intercept; this river baseline reference relationship is used in subsequent steps to back-calculate the equivalent CODCr concentration in the tailrace discharge sample that can be explained by the BOD5 response.

[0021] S3. Based on the river baseline reference relationship, tailwater discharge outlet sample set and flow data, calculate the tailwater inert chemical oxygen demand base contribution of each downstream mixed sample in the downstream mixed sample set. Specifically, for each tailwater discharge sample in the tailwater discharge sample set, the measured BOD5 concentration and measured CODCr concentration of that tailwater discharge sample are obtained; the BOD5 concentration in the tailwater discharge sample is substituted into the river background reference relationship obtained in step S2 to deduce the equivalent CODCr concentration in the tailwater that can be explained by the BOD5 response: ; in, This indicates the BOD5 concentration in the tailwater discharge sample. This represents the equivalent CODCr concentration in the effluent that can be explained by the BOD5 response. and These are the riverbed background slope and riverbed background intercept obtained in step S2, respectively. In this embodiment, the equivalent CODCr concentration that can be explained by the BOD5 response refers to the CODCr equivalent value obtained by back-calculating the BOD5 concentration in the tailwater discharge sample according to the river background reference relationship. This equivalent CODCr concentration is not a re-detection result of tailwater CODCr, but is used to distinguish the part of the measured tailwater CODCr that matches the BOD5 biochemical response and the part that does not match the BOD5 biochemical response at the data level. The measured CODCr concentration in the tailwater discharge sample is subtracted from the equivalent CODCr concentration to obtain the difference. When the difference is greater than zero, it is determined as the tailwater inert chemical oxygen demand (COD) concentration; when the difference is not greater than zero, the tailwater inert COD concentration is determined as zero. The tailwater inert COD concentration can be expressed as: ; in, This indicates the measured CODCr concentration in the tailwater discharge sample. The inert chemical oxygen demand (COD) concentration in the tailwater indicates the portion of COD in the tailwater that cannot be explained by the BOD5 response according to the baseline CODcr-BOD5 relationship.

[0022] Before calculating the mixing ratio of tailwater in the downstream mixed water body, a correspondence is established between tailwater outlet samples and downstream mixed samples. When the hydraulic transmission time between the tailwater outlet section and the downstream mixed section can be determined by existing hydrological data, river operation records, or monitoring platform records, the sampling time of the tailwater outlet sample is added to the hydraulic transmission time and then correlated with the sampling time of the downstream mixed sample. When the hydraulic transmission time cannot be obtained, the tailwater outlet samples and downstream mixed samples in the same sampling batch are correlated, and the downstream mixed section is defined as the monitoring section where the tailwater and the upstream water have formed a stable mixture. The stable mixing can be determined based on the monitoring section layout data, river hydrological data, environmental impact assessment data, or the records of downstream mixing sections in existing water quality monitoring schemes. When the above data cannot confirm that the downstream mixing section can represent the mixed water body of tailwater and upstream inflow, the sample of that section will not be used as a downstream mixing sample. Through the above correspondence, the inert chemical oxygen demand concentration of tailwater, tailwater discharge flow rate, and upstream inflow flow rate can be mapped to specific downstream mixing samples, avoiding mismatching of tailwater discharge outlet samples from different time periods to downstream mixing samples. Furthermore, based on the tailwater discharge flow rate and the upstream inflow flow rate of the paired samples with the same sampling time or the same sampling batch, the mixing ratio of tailwater in the downstream mixed water body is calculated: ; in, Indicates the tailwater discharge flow rate. Indicates the flow rate of water coming from the upper reaches of the river. This indicates the proportion of the tailwater in the downstream mixed water body; this proportion is determined based on the flow conservation relationship and is used to characterize the proportion of the tailwater's contribution to the water volume of the downstream mixed water body. In this embodiment, the mixing ratio is used to convert the inert chemical oxygen demand (COD) concentration of the tailwater identified at the tailwater discharge section into the base contribution at the downstream mixing section. This mixing ratio is not used to represent the degradation ratio of pollutants in the tailwater, nor is it used to represent the contribution ratio of all pollution sources in the river. Instead, it is only used to calculate the equivalent contribution of the wastewater treatment plant tailwater to the COD base in the downstream mixed sample under the water volume mixing relationship formed by the tailwater discharge flow and the upstream inflow flow.

[0023] Based on the mass conservation mixing relationship, the inert chemical oxygen demand (COD) concentration in the tailwater is multiplied by the mixing ratio to obtain the contribution of the tailwater inert COD base to each downstream mixed sample in the downstream mixed sample set: ; in, This represents the contribution of the inert chemical oxygen demand (COD) base in the downstream mixed sample. This contribution of the inert chemical oxygen demand base in the effluent is used to characterize the contribution of the measured CODCr in the effluent of the wastewater treatment plant that is insensitive to BOD5 but will increase the downstream mixed section. When the inert chemical oxygen demand (COD) concentration in the effluent is determined to be zero, the COD base contribution of the corresponding downstream mixed sample is also determined to be zero. When there is a lack of data records for the effluent discharge flow or the upstream inflow flow that have the same sampling time as the paired sample, if there are valid flow records in the same sampling batch, the arithmetic mean of the valid flow records in the same sampling batch is used as the flow data corresponding to the paired sample. If there are no valid flow records in the same sampling batch, the sample does not participate in the calculation of the COD base contribution. The valid flow records refer to flow records that have not been marked as invalid by flow monitoring equipment, sewage treatment plant operation records, river hydrological records, or data audit records.

[0024] In one embodiment, if there is a corresponding sampling time between the tailwater discharge outlet sample and the downstream mixed sample, the contribution of the tailwater inert chemical oxygen demand (COD) base is matched to the corresponding downstream mixed sample according to the same sampling time; if the tailwater discharge outlet sample and the downstream mixed sample are organized according to sampling batches, the contribution of the tailwater inert COD base is matched to the corresponding downstream mixed sample according to the same sampling batch. In this embodiment, the hydraulic transmission time refers to the time required for the wastewater effluent from the wastewater treatment plant to be transported from the effluent discharge section to the downstream mixing section by the water flow, which can be determined by existing hydrological data, river operation records, or monitoring platform records.

[0025] S4. Based on the contribution of the inert chemical oxygen demand (COD) base in the tailwater, the measured COD of each downstream mixed sample in the downstream mixed sample set is stripped to obtain the effective COD and generate effective paired downstream samples. Specifically, for each downstream mixed sample in the downstream mixed sample set, the measured CODCr concentration and measured BOD5 concentration of the downstream mixed sample are obtained, and the contribution of the tailwater inert chemical oxygen demand base corresponding to the downstream mixed sample obtained in step S3 is called. like Figure 3As shown, for the measured CODCr in the downstream mixed sample, the contribution of the tailwater inert chemical oxygen demand (COD) base corresponding to the downstream mixed sample is first called, and the contribution of the tailwater inert COD base is separated from the measured CODCr to obtain the effective CODCr. The effective CODCr is used to characterize the CODCr portion in the downstream mixed sample that has a stronger relationship with the biochemical response of BOD5. Further, the effective CODCr is correlated with the measured BOD5 in the downstream mixed sample to generate effective downstream paired samples, which can be used as training samples or prediction samples for subsequent machine learning correlation models. This can avoid the machine learning correlation model directly learning the apparent CODCr after being raised by the tailwater inert COD base, and improve the accuracy and interpretability of CODCr-BOD5 correlation mining. Subtract the corresponding contribution of the effluent inert chemical oxygen demand (COD) base from the measured CODCr concentration in the downstream mixed sample to obtain the stripping calculation value: ; in, This indicates the measured CODCr concentration in the downstream mixed sample. This indicates the contribution of the tailwater inert chemical oxygen demand (COD) base to the downstream mixed sample. This represents the calculated value of the stripping process; When the calculated stripping value is greater than zero, the calculated stripping value is determined as the effective CODCr concentration; when the calculated stripping value is not greater than zero, the effective CODCr concentration is determined to be zero; the effective CODCr concentration is expressed as: ; in, Indicates the effective CODCr concentration; This process avoids negative COD concentrations that lack physical significance in water quality due to flow matching errors, local water dilution, or the contribution of the tailwater inert chemical oxygen demand (COD) base being higher than the downstream measured COD concentration. Downstream effective paired samples with an effective COD concentration of zero still retain their corresponding tailwater inert COD base contribution and measured BOD5 concentration, and serve as boundary samples that can be identified by subsequent machine learning correlation models. In this embodiment, the effective CODCr concentration refers to the CODCr concentration obtained after removing the contribution of the inert chemical oxygen demand base in the tailwater from the measured CODCr concentration at the downstream mixing section; this effective CODCr concentration, compared with the original measured CODCr concentration, better reflects the CODCr portion that corresponds to the biochemical response of BOD5. In this embodiment, the effective CODCr concentration is not a new water quality testing item, nor is it the CODCr concentration obtained by retesting the water sample. Instead, it is a data feature obtained by stripping the measured CODCr concentration in the downstream mixed sample from the tailwater inert chemical oxygen demand (COD) base. The effective CODCr concentration is used as input to the machine learning correlation model, so that the machine learning correlation model learns the part of CODCr that has a stronger relationship with the BOD5 response, rather than directly learning the apparent CODCr after it is raised by the tailwater inert COD base.

[0026] The effective CODCr concentration, the corresponding contribution of the tailwater inert chemical oxygen demand (COD) base, and the measured BOD5 concentration in the downstream mixed sample are correlated to generate effective downstream paired samples. The effective downstream paired samples include at least the effective CODCr concentration, the contribution of the tailwater inert COD base, and the measured BOD5 concentration. The effective downstream paired samples are used for subsequent machine learning correlation model training. In this embodiment, the downstream effective paired sample is a training data unit formed by stripping the downstream mixed sample from the tailwater inert chemical oxygen demand (COD) base. The downstream effective paired sample retains the same sampling time or sampling batch as the downstream mixed sample, and replaces or associates the original measured COD concentration with the effective COD concentration, while retaining the corresponding tailwater inert COD base contribution and measured BOD5 concentration. Thus, the downstream effective paired sample can simultaneously characterize the effective COD response after base stripping and the influence of the tailwater inert COD base on the original COD.

[0027] S5. Using downstream effective paired samples as training samples, with the effective dichromate method chemical oxygen demand and the contribution of the tailwater inert chemical oxygen demand base as input, and the measured five-day biochemical oxygen demand as output, train the machine learning correlation model. Specifically, using downstream effective paired samples as training samples, the effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand (COD) base as model inputs, and the measured BOD5 concentration as model output, a machine learning correlation model is trained; the machine learning correlation model is used to output BOD5 estimation results based on the effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand (COD) base. In this embodiment, the machine learning correlation model is a regression model trained using supervised learning. Its inputs are the effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand (COD) base in the downstream effective paired samples, and the output is the BOD5 estimation result. This machine learning correlation model is not limited to a specific algorithm; support vector regression, random forest regression, and gradient boosting tree regression models can all be used as specific implementation methods. The key limitation of the machine learning correlation model is that the input features include the effective CODCr concentration and the contribution of the tailwater inert COD base, rather than the use of a specific machine learning algorithm. Before model training, downstream effective paired samples are converted into machine learning training data; for the i-th downstream effective paired sample, its effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand base are used to form a training sample vector: ; The measured BOD5 concentration in the downstream valid paired sample was used as the tag value: ; in, This represents the i-th training sample vector. This represents the i-th training label. This represents the effective CODCr concentration in the i-th downstream effective paired sample. This represents the contribution of the tailwater inert chemical oxygen demand (COD) base to the i-th downstream valid paired sample. Let X represent the measured BOD5 concentration in the i-th downstream valid paired sample; X is the feature matrix composed of all training sample vectors, and y is the label vector composed of all training labels. To avoid the impact of numerical scale differences among different input features on model training, the effective CODCr concentration column and the tailwater inert chemical oxygen demand (COD) base contribution column in the feature matrix X were standardized before training the machine learning correlation model. The standardization was performed using the mean and standard deviation of the training samples, as follows: ; in, This represents the original value of the k-th input feature in the i-th training sample. Let represent the mean of the k-th input feature in the training samples. This represents the standard deviation of the k-th input feature in the training samples. This represents the standardized input feature value. If the standard deviation of an input feature in the training samples is zero, the standardization result of the input feature is set to zero, and the mean and standard deviation of the input feature are recorded. After training, new downstream mixed samples are standardized using the same mean and standard deviation recorded during the training phase before being input into the machine learning correlation model.

[0028] In this embodiment, the machine learning correlation model can be represented as: ; in, This indicates the measured BOD5 concentration in the downstream mixed sample. Indicates the effective CODCr concentration. denoted by , which represents the contribution of the tailwater inert chemical oxygen demand (COD) base, and f represents the correlation mapping function obtained through machine learning training; The training objective of the machine learning correlation model is to minimize the sum of squared residuals between the predicted and measured BOD5 concentrations. ; Where n represents the number of effective downstream paired samples participating in the training. This represents the measured BOD5 concentration in the i-th downstream valid paired sample. This represents the effective CODCr concentration in the i-th downstream effective paired sample. This represents the contribution of the tailwater inert chemical oxygen demand (COD) base to the i-th downstream valid paired sample. In a preferred embodiment, the machine learning correlation model employs a gradient boosting tree regression model. During training, the mean of the training labels or a constant regressor is first used as the initial prediction function. Then, based on the residual between the current prediction result and the measured BOD5 concentration, the regression tree is trained round by round to fit the residual. The output of each round of regression tree is accumulated into the current prediction function according to the learning rate until the cross-validation error no longer decreases or reaches the corresponding iteration number in the candidate parameter set. The number of trees, learning rate, and maximum depth of a single tree in the gradient boosting tree regression model are determined through cross-validation. In another implementation, the machine learning correlation model uses a random forest regression model; during training, multiple sample subsets are formed based on downstream effective paired samples, a regression tree is trained on each sample subset, and the prediction results of multiple regression trees are averaged as the BOD5 estimation result; the number of trees and the maximum depth of a single tree in the random forest regression model are determined through cross-validation. In another implementation, the machine learning correlation model employs a support vector regression model. During training, the standardized effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand base are used as input features, and the measured BOD5 concentration is used as the label. The regression relationship between the input features and the BOD5 concentration is fitted by the support vector regression model. The kernel function, penalty coefficient, and kernel parameters of the support vector regression model are determined through cross-validation.

[0029] In this embodiment, cross-validation is used to determine the type of machine learning relevance model and its model parameters. Specifically, downstream effective paired samples are divided into non-overlapping training subsets and validation subsets according to sampling time or sampling batch, and samples from the same sampling batch do not appear in the training subset and validation subset simultaneously. For each candidate model and its candidate parameter combination, the model is trained using the training subset, and the validation error between the predicted BOD5 concentration and the measured BOD5 concentration is calculated using the validation subset. The validation error can be the mean squared error on the validation subset or the sum of squared residuals on the validation subset. The mean squared error is expressed as: ; in, Let represent the validation error, and r represent the number of samples in the validation subset. This represents the measured BOD5 concentration of the h-th sample in the validation subset. This represents the predicted BOD5 concentration output by the model for the h-th sample in the validation subset; When using multi-fold cross-validation, the validation error on each fold validation subset is calculated separately, and the average of the validation errors of each fold is used as the cross-validation error of the candidate model and its candidate parameter combination. The candidate model with the smallest cross-validation error and its candidate parameter combination are selected as the machine learning relevance model. The candidate parameter set is determined by the model's default parameters, the number of training samples, and the parameter items corresponding to the model type. The final model parameters are determined based on the principle of minimizing the cross-validation error. Before training the machine learning correlation model, the input-output integrity of the downstream effective paired samples is checked. Samples lacking any of the following data items—effective CODCr concentration, tailwater inert chemical oxygen demand base contribution, or measured BOD5 concentration—are not used as training samples for the machine learning correlation model. Samples with zero effective CODCr concentration but simultaneously having tailwater inert chemical oxygen demand base contribution and measured BOD5 concentration are retained as boundary samples in the training samples. After training, save the model type, model parameters, input feature order, mean and standard deviation used for standardization of the machine learning correlation model, as well as the sampling time range or sampling batch range corresponding to the training samples. The above information is used to ensure that new downstream mixed samples are input into the machine learning correlation model in the same data processing manner as in the training stage during prediction.

[0030] S6. Based on the machine learning correlation model, output the five-day biochemical oxygen demand estimation results, the contribution of the tailwater inert chemical oxygen demand base, and the degree of related slope collapse. Specifically, for downstream effective paired samples or new downstream mixed samples to be explored, the contribution of the tailwater inert chemical oxygen demand (COD) base corresponding to the sample is first calculated according to step S3, and then the effective COD concentration is calculated according to step S4. Subsequently, according to the input feature order saved in the training phase in step S5, the effective COD concentration and the contribution of the tailwater inert chemical oxygen demand base are combined to form a predicted sample vector. Before being input into the machine learning correlation model, the predicted sample vector is standardized using the same mean and standard deviation saved in the training phase to obtain a standardized predicted sample vector. The standardized predicted sample vector is input into the trained machine learning correlation model to output the BOD5 estimation result. This BOD5 estimation result is used to characterize the BOD5 level in the downstream mixed influence zone of the target city's river. To further characterize the weakening effect of the inert chemical oxygen demand (COD) base in wastewater treatment plant effluent on the CODCr-BOD5 correlation, this embodiment calculates the degree of correlation slope collapse. First, the apparent correlation slope is obtained by fitting the measured CODCr concentration and measured BOD5 concentration from the downstream mixed sample set. Then, the effective correlation slope is obtained by fitting the effective CODCr concentration and measured BOD5 concentration from the downstream effective paired samples. The apparent correlation slope is used to characterize the apparent relationship between CODCr and BOD5 without removing the inert COD base in the effluent. The effective correlation slope is used to characterize the relationship between effective CODCr and BOD5 after removing the inert COD base in the effluent. In this embodiment, the apparent correlation slope is the slope obtained by fitting the measured CODCr concentration and the measured BOD5 concentration in the downstream mixed sample, which reflects the CODCr-BOD5 relationship without considering the influence of the inert chemical oxygen demand (COD) base in the tailwater; the effective correlation slope is the slope obtained by fitting the effective CODCr concentration and the measured BOD5 concentration in the downstream effective paired sample, which reflects the CODCr-BOD5 relationship after removing the inert COD base in the tailwater; the difference between the two is used to characterize the weakening effect of the inert COD base in the tailwater on the CODCr-BOD5 correlation. The degree of slope collapse is expressed as follows: ; in, Indicates the degree of slope collapse. Indicates the apparent correlation slope, This represents the effective correlation slope; the formula is equivalent to determining the degree of correlation slope collapse by the ratio of the difference between the effective correlation slope and the apparent correlation slope to the effective correlation slope. Before calculating the degree of correlation slope collapse, the validity of the sample set used to calculate the degree of correlation slope collapse is judged. When the effective correlation slope is positive, the degree of correlation slope collapse is calculated in the above manner. When the effective correlation slope is not positive, it means that the sample set currently used to calculate the degree of slope collapse cannot form an interpretable positive CODCr-BOD5 response relationship. The sample set is not used to calculate the degree of numerical correlation slope collapse. Instead, downstream effective paired samples that match the target time period in terms of sampling batch, hydrological conditions, or tailwater mixing state are selected, and the effective correlation slope and apparent correlation slope are recalculated. When a positive effective correlation slope can be obtained from the reselected downstream effective paired samples, the numerical correlation slope collapse degree is output; when a positive effective correlation slope still cannot be obtained, the BOD5 estimation result and the contribution of the tailwater inert chemical oxygen demand base are output, and the correlation slope collapse degree is marked as undeterminable; the undeterminable mark indicates that the current sample set does not meet the positive response condition for the slope collapse degree calculation, and does not affect the output of the machine learning correlation model on the BOD5 estimation result; In this embodiment, the degree of correlation slope collapse is an explanatory indicator used to quantify the extent to which the apparent correlation slope is reduced relative to the effective correlation slope. This indicator is not a water quality testing item, nor is it a separate indicator used to determine whether water quality meets standards. Instead, it is used to explain whether the inert chemical oxygen demand (COD) base in the effluent of the wastewater treatment plant weakens the original CODcr-BOD5 correlation. When the degree of correlation slope collapse and the BOD5 estimation result are output together, both numerical estimation results and explanations of the causes of correlation distortion can be provided simultaneously.

[0031] Example 2: This example provides a water CODCr-BOD5 correlation mining system based on big data; the system is used to execute the method described in Example 1; the system includes a sample construction module, a baseline relationship establishment module, an inert chemical oxygen demand (COD) baseline identification module, a baseline stripping module, a machine learning modeling module, and a result output module; The sample construction module is used to acquire water quality monitoring data and flow data from upstream control sections, wastewater treatment plant effluent discharge sections, and downstream mixed sections of the target city's river, and generate paired samples. The water quality monitoring data includes sampling time, monitoring section identification, CODCr concentration, and BOD5 concentration. The flow data includes effluent discharge flow and upstream inflow flow. The sample construction module pairs CODCr and BOD5 data with the same sampling time or sample number as paired samples, and associates flow data with the same sampling time or batch number to paired samples. When the BOD5 test report time is later than the sampling time, the sample construction module uses the sampling time as the time identifier for the BOD5 data. Based on the monitoring section identification, the sample construction module divides the paired samples into an upstream control sample set, an effluent discharge sample set, and a downstream mixed sample set. The background relationship establishment module is connected to the sample construction module to receive the upstream control sample set and establish a river channel background reference relationship based on it. The background relationship establishment module uses the CODCr concentration in the upstream control sample set as the independent variable and the BOD5 concentration as the dependent variable, and obtains the river channel background correlation slope and river channel background intercept through least squares fitting, thus forming the river channel background reference relationship. After obtaining the river channel background reference relationship, the background relationship establishment module judges the river channel background correlation slope and sample validity. When the river channel background correlation slope is positive and there are no samples marked as invalid by detection reports, quality control records, or data review records in the upstream control sample set, the module outputs the river channel background reference relationship to the inert chemical oxygen demand (COD) base identification module. When there are multiple candidate upstream control sample time windows, the background relationship establishment module selects the candidate time window with the smallest cross-validation error and a positive river channel background correlation slope to establish the river channel background reference relationship. The inert chemical oxygen demand (COD) base identification module is connected to the sample construction module and the baseline relationship establishment module. It is used to receive the tailwater discharge sample set, flow data, and river baseline reference relationship. The inert COD base identification module substitutes the BOD5 concentration in the tailwater discharge sample into the river baseline reference relationship to deduce the equivalent CODCr concentration in the tailwater that can be explained by the BOD5 response. Then, it subtracts the equivalent CODCr concentration from the measured CODCr concentration in the tailwater discharge sample. When the difference is greater than zero, the difference is determined as the tailwater inert COD concentration. When the difference is not greater than zero, the tailwater inert COD concentration is determined as zero. The inert COD base identification module further calculates the mixing ratio of the tailwater in the downstream mixed water body based on the tailwater discharge flow and the upstream inflow flow. It then multiplies the tailwater inert COD concentration by the mixing ratio to obtain the tailwater inert COD base contribution of each downstream mixed sample in the downstream mixed sample set. Before calculating the contribution of the inert chemical oxygen demand (COD) base station to the tailwater, the inert COD base station identification module is also used to establish the correspondence between the tailwater discharge outlet sample and the downstream mixed sample. When the hydraulic transmission time is available, the inert COD base station identification module corresponds the tailwater discharge outlet sample to the downstream mixed sample according to the sum of the tailwater discharge outlet sample sampling time and the hydraulic transmission time. When the hydraulic transmission time is not available, the inert COD base station identification module corresponds the tailwater discharge outlet sample to the downstream mixed sample according to the same sampling batch, and limits the downstream mixed sample to a downstream mixing section where the tailwater and the upstream inflow have formed a stable mixture. The stable mixture is determined by the monitoring section layout data, river hydrological data, environmental impact assessment data, or the record of the downstream mixing section in the existing water quality monitoring scheme. When there is a lack of data records for the tailwater discharge flow or the upstream inflow flow that have the same sampling time as the paired sample, the inert chemical oxygen demand (COD) base identification module uses the arithmetic mean of the valid flow records in the same sampling batch as the flow data corresponding to the paired sample if there are valid flow records in the same sampling batch; if there are no valid flow records in the same sampling batch, the sample will not be used to calculate the contribution of the tailwater inert COD base. The base stripping module is connected to the sample construction module and the inert chemical oxygen demand (COD) base identification module. It is used to receive the downstream mixed sample set and the corresponding tailwater inert COD base contribution of each downstream mixed sample. The base stripping module subtracts the corresponding tailwater inert COD base contribution from the measured COD concentration in the downstream mixed sample to obtain the stripping calculation value. When the stripping calculation value is greater than zero, the base stripping module determines the stripping calculation value as the effective COD concentration. When the stripping calculation value is not greater than zero, the base stripping module determines the effective COD concentration as zero and associates the effective COD concentration, the tailwater inert COD base contribution, and the measured BOD5 concentration as downstream effective paired samples. The machine learning modeling module is connected to the base stripping module to receive downstream effective paired samples. The machine learning modeling module uses the downstream effective paired samples as training samples, and forms a training sample vector by combining the effective CODCr concentration and the base contribution of the tailwater inert chemical oxygen demand in each downstream effective paired sample. The measured BOD5 concentration is used as the training label, and the feature matrix is ​​formed by the training sample vector and the label vector is formed by the training label. The machine learning modeling module standardizes the effective CODCr concentration column and the tailwater inert chemical oxygen demand base contribution column in the feature matrix, and records the mean and standard deviation used in the training phase. The machine learning modeling module is used to determine the machine learning relevance model from support vector regression, random forest regression, and gradient boosting tree regression models. The module divides downstream effective paired samples into non-overlapping training and validation subsets according to sampling time or sampling batch, ensuring that samples from the same sampling batch do not appear simultaneously in the training and validation subsets. For each candidate model and its candidate parameter combination, the model is trained using the training subset, and the validation error between the predicted and measured BOD5 concentrations is calculated using the validation subset. The candidate model and its candidate parameter combination with the smallest cross-validation error are selected as the machine learning relevance model. The machine learning modeling module saves the model type, model parameters, input feature order, and mean and standard deviation used for standardization of the machine learning relevance model. The results output module is connected to the inert chemical oxygen demand (COD) base identification module, base stripping module, and machine learning modeling module. It outputs the BOD5 estimation results, the contribution of the tailwater inert COD base, and the degree of slope collapse. For a new downstream mixed sample, the results output module first calls the inert COD base identification module to calculate the contribution of the tailwater inert COD base, then calls the base stripping module to calculate the effective CODcr concentration. It constructs a predicted sample vector according to the input feature order saved by the machine learning modeling module, and standardizes the predicted sample vector using the mean and standard deviation saved during the training phase. The results output module then inputs the standardized predicted sample vector into the machine learning correlation model to obtain the BOD5 estimation results. The output module also fits the apparent correlation slope based on the measured CODCr concentration and measured BOD5 concentration in the downstream mixed sample set, and fits the effective correlation slope based on the effective CODCr concentration and measured BOD5 concentration in the downstream effective paired samples. The ratio of the difference between the effective correlation slope and the apparent correlation slope to the effective correlation slope is determined as the degree of correlation slope collapse. Before outputting the degree of correlation slope collapse, the results output module determines the effective correlation slope. When the effective correlation slope is positive, the results output module outputs the numerical degree of correlation slope collapse. When the effective correlation slope is not positive, the results output module re-selects downstream effective paired samples that meet the requirements of sampling batch, hydrological conditions, or tailwater mixing state matching for calculation. If a positive effective correlation slope still cannot be obtained, the results output module outputs the BOD5 estimation result and the contribution of the tailwater inert chemical oxygen demand base, and marks the degree of correlation slope collapse as undeterminable. In this embodiment, the sample construction module, the background relationship establishment module, the inert chemical oxygen demand (COD) base identification module, the base peeling module, the machine learning modeling module, and the result output module can be executed by a single server, or they can be executed collaboratively by a water quality monitoring platform, a wastewater treatment plant operation management platform, and a data analysis server. The above modules can be implemented by software programs, or they can be implemented by combining software programs with general-purpose computing devices.

[0032] Example 3 further illustrates the application process of the present invention in historical river data of the target city; The target city's river channel is equipped with an upstream control section, a sewage treatment plant effluent discharge section, and a downstream mixing section. The data system continuously acquires the CODCr and BOD5 concentrations at the above three sections, and simultaneously acquires the sewage treatment plant effluent discharge flow and the upstream inflow flow of the river. For data from the same sampling date or the same sampling batch, the system associates the CODCr concentration, BOD5 concentration, and flow data to form paired samples. Based on the monitoring section identifiers, the system divides the paired samples of the upstream control section into an upstream control sample set, the paired samples of the wastewater treatment plant effluent discharge section into an effluent discharge sample set, and the paired samples of the downstream mixing section into a downstream mixing sample set. The system performs least-squares fitting on the upstream control sample set to obtain the river baseline reference relationship. This river baseline reference relationship is used to describe the baseline relationship between CODCr and BOD5 in rivers that are not directly affected by the target effluent. Before using the river baseline reference relationship to back-calculate the equivalent CODCr concentration in the tailwater, the system determines whether the river baseline correlation slope in the river baseline reference relationship is positive, and whether there are any samples marked as invalid by detection reports, quality control records, or data review records in the upstream control sample set. If the river baseline correlation slope is not positive, or if there are any samples marked as invalid, the system reselects an upstream control sample time window that matches the target downstream mixed sample in terms of sampling batch, hydrological conditions, or seasonal conditions, and re-establishes the river baseline reference relationship. When there are multiple candidate upstream control sample time windows, the system selects the candidate time window with the smallest cross-validation error and a positive river baseline correlation slope to establish the river baseline reference relationship, until a river baseline reference relationship that can be used for back-calculation of the equivalent CODCr concentration is obtained. The system substitutes the BOD5 concentration in the tailrace outlet sample into the river baseline reference relationship to inversely deduce the equivalent CODcr concentration in the tailrace that can be explained by the BOD5 response. It then compares the measured CODcr concentration in the tailrace outlet sample with the equivalent CODcr concentration. If the measured CODcr concentration is greater than the equivalent CODcr concentration, the system uses the difference as the tailrace inert chemical oxygen demand (COD) concentration. If the measured CODcr concentration is not greater than the equivalent CODcr concentration, the system sets the tailrace inert COD concentration to zero. This treatment avoids artificially introducing a negative base contribution when the tailrace CODcr does not exhibit an inert base rise. The system further calculates the mixing ratio of tailwater in the downstream mixed water body based on the tailwater discharge flow and the upstream inflow flow, and converts the tailwater inert chemical oxygen demand (COD) concentration into the tailwater inert COD base contribution in the downstream mixed sample; thus, the system can obtain the tailwater inert COD base contribution for each downstream mixed sample. When the hydraulic transfer time between the tailwater discharge section and the downstream mixing section can be determined from existing data, the system correlates the tailwater discharge sample with the downstream mixed sample corrected for hydraulic transfer time. When the hydraulic transfer time cannot be obtained, the system establishes a correspondence between the tailwater discharge sample and the downstream mixed sample according to the same sampling batch, and confirms that the downstream mixed sample comes from a section where the tailwater and the upstream inflow have formed a stable mixture. Stable mixing can be determined based on the monitoring section layout data, river hydrological data, environmental impact assessment data, or the records of the downstream mixing section in the existing water quality monitoring plan. Therefore, there is a clear data correspondence between the tailwater inert chemical oxygen demand (COD) base contribution and the downstream mixed sample. When there is a lack of data records for the tailwater discharge flow or the upstream inflow flow that have the same sampling time as the paired sample, if there are valid flow records in the same sampling batch, the system will use the arithmetic mean of the valid flow records in the same sampling batch as the flow data corresponding to the paired sample; if there are no valid flow records in the same sampling batch, the system will not use the sample to calculate the contribution of the tailwater inert chemical oxygen demand base. The system subtracts the corresponding contribution of the effluent inert chemical oxygen demand (COD) base from the measured CODCr concentration of the downstream mixed sample to obtain the stripping calculation value. When the stripping calculation value is greater than zero, the system determines the stripping calculation value as the effective CODCr concentration; when the stripping calculation value is not greater than zero, the system determines the effective CODCr concentration as zero. The system associates the effective CODCr concentration, the contribution of the effluent inert chemical oxygen demand base, and the measured BOD5 concentration as effective paired samples for downstream. The system uses downstream effective paired samples as training samples. The effective CODCr concentration and the contribution of the tailwater inert chemical oxygen demand (COD) base in each downstream effective paired sample are used to form a training sample vector. The measured BOD5 concentration is used as the training label. The feature matrix is ​​formed by all training sample vectors, and the label vector is formed by all training labels. The system standardizes the effective CODCr concentration column and the tailwater inert COD base contribution column in the feature matrix and records the mean and standard deviation used in the standardization process. The system divides downstream valid paired samples into non-overlapping training and validation subsets according to sampling time or sampling batch, and ensures that samples from the same sampling batch do not appear in the training and validation subsets simultaneously. The system trains candidate models in support vector regression, random forest regression, and gradient boosting tree regression models respectively, and performs cross-validation on the candidate parameter combinations of each candidate model. The system calculates the mean squared error or residual sum of squares between the predicted BOD5 concentration and the measured BOD5 concentration on the validation subset, and uses the candidate model with the smallest cross-validation error and its candidate parameter combination as the machine learning relevance model. After the machine learning correlation model is trained, the system saves the model type, model parameters, input feature order, and mean and standard deviation used for standardization. For a new downstream mixed sample, the system first calculates the contribution of the corresponding tailwater inert chemical oxygen demand base, then calculates the effective CODCr concentration, and inputs it into the machine learning correlation model after processing with the same input feature order and standardized parameters as in the training phase to obtain the BOD5 estimation result. The system calculates the apparent correlation slope between the original downstream CODCr and BOD5, and the effective correlation slope between the effective CODCr and BOD5 after the base stripping. It then calculates the degree of correlation slope collapse based on the difference between the effective correlation slope and the apparent correlation slope. When the effective correlation slope is positive, the system outputs the numerical degree of correlation slope collapse. When the effective correlation slope is not positive, the system reselects effective paired samples from downstream that meet the requirements of sampling batch, hydrological conditions, or tailwater mixing state matching for recalculation. If a positive effective correlation slope cannot be obtained after recalculation, the system outputs the estimated BOD5 result and the contribution of the tailwater inert chemical oxygen demand base, and marks the degree of correlation slope collapse as undeterminable. The system outputs numerical results of the degree of slope collapse, and outputs these results together with the BOD5 estimation results and the contribution of the tailwater inert chemical oxygen demand (COD) base, to characterize the degree of weakening of the CODcr-BOD5 correlation by the tailwater inert COD base.

[0033] As can be seen from this embodiment, the present invention identifies and removes the inert chemical oxygen demand (COD) base brought in by wastewater treatment plant effluent before prediction, enabling the machine learning correlation model to be trained and estimated based on an effective CODCr that is closer to the biochemical response relationship of BOD5; it can improve the accuracy and interpretability of CODCr-BOD5 correlation mining in the mixed influence zone of urban river effluent.

[0034] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.

Claims

1. A method for mining the correlation between CODcr and BOD5 in water bodies based on big data, characterized in that, The CODCr is the chemical oxygen demand obtained by the dichromate method, and the BOD5 is the five-day biochemical oxygen demand. The method includes the following steps: S1. Obtain water quality monitoring data and flow data of upstream control sections, sewage treatment plant tailwater discharge outlet sections and downstream mixed sections of the target city's river, generate paired samples, and divide them into upstream control sample set, tailwater discharge outlet sample set and downstream mixed sample set. S2. Establish a river baseline reference relationship based on the upstream control sample set; S3. Based on the river baseline reference relationship, tailwater discharge outlet sample set and flow data, calculate the tailwater inert chemical oxygen demand base contribution of each downstream mixed sample in the downstream mixed sample set. S4. Based on the contribution of the inert chemical oxygen demand (COD) base in the tailwater, the measured COD of the dichromate method in the downstream mixed sample is stripped to obtain the effective COD of the dichromate method, and downstream effective paired samples are generated. S5. Using downstream effective paired samples as training samples, with the effective dichromate method chemical oxygen demand and the contribution of the tailwater inert chemical oxygen demand base as input, and the measured five-day biochemical oxygen demand as output, train the machine learning correlation model. S6. Based on the machine learning correlation model, output the five-day biochemical oxygen demand estimation results, the contribution of the tailwater inert chemical oxygen demand base, and the degree of related slope collapse.

2. The water CODCr-BOD5 correlation mining method based on big data according to claim 1, characterized in that, The water quality monitoring data includes sampling time, monitoring section identification, dichromate method chemical oxygen demand (COD) concentration, and five-day biochemical oxygen demand (BOD) concentration. The flow data includes tailwater discharge flow and upstream inflow flow. COD data and BOD data with the same sampling time or sample number are paired as paired samples. The tailwater discharge flow and upstream inflow flow have the same sampling time or the same sampling batch as the paired samples. When the detection report time of the BOD data is later than the sampling time, the sampling time is used as the time identifier of the BOD data.

3. The water CODCr-BOD5 correlation mining method based on big data according to claim 2, characterized in that, In S1, paired samples are divided according to the monitoring section identifier. Paired samples from upstream control sections are divided into upstream control sample set, paired samples from wastewater treatment plant effluent discharge outlet sections are divided into effluent discharge outlet sample set, and paired samples from downstream mixing sections are divided into downstream mixing sample set.

4. The water CODCr-BOD5 correlation mining method based on big data according to claim 1, characterized in that, In S2, the concentration of dichromate chemical oxygen demand in the upstream control sample set is used as the independent variable, and the five-day biochemical oxygen demand concentration in the upstream control sample set is used as the dependent variable. The least squares method is used to fit the river channel background reference relationship, which includes the river channel background correlation slope and the river channel background intercept.

5. The water CODCr-BOD5 correlation mining method based on big data according to claim 4, characterized in that, In S3, the five-day biochemical oxygen demand (BOD) concentration from the tailwater discharge outlet sample set is substituted into the river baseline reference relationship to back-calculate the equivalent dichromate method COD concentration in the tailwater that can be explained by the five-day BOD response. The measured dichromate method COD concentration in the tailwater discharge outlet sample set is subtracted from the equivalent dichromate method COD concentration to obtain the difference. When the difference is greater than zero, the difference is determined as the tailwater inert COD concentration; when the difference is not greater than zero, the tailwater inert COD concentration is determined as zero.

6. The water CODCr-BOD5 correlation mining method based on big data according to claim 5, characterized in that, In S3, the mixing ratio of tailwater in the downstream mixed water body is calculated based on the tailwater discharge flow and the upstream inflow flow. The inert chemical oxygen demand (COD) concentration of tailwater is multiplied by the mixing ratio to obtain the tailwater inert COD base contribution of the downstream mixed sample.

7. The water CODCr-BOD5 correlation mining method based on big data according to claim 6, characterized in that, In S4, the effective chemical oxygen demand (COD) concentration is obtained by subtracting the corresponding contribution of the inert COD base in the tailwater from the measured COD concentration of the downstream mixed sample. The effective COD concentration, the corresponding contribution of the inert COD base in the tailwater, and the measured five-day biochemical oxygen demand (BOD) concentration in the downstream mixed sample are correlated to generate effective paired samples for the downstream.

8. The water CODCr-BOD5 correlation mining method based on big data according to claim 7, characterized in that, In S5, the machine learning correlation model is a supervised learning regression model. During training, the training objective is to minimize the sum of squared residuals between the predicted five-day biochemical oxygen demand and the measured five-day biochemical oxygen demand. The supervised learning regression model is selected from support vector regression model, random forest regression model and gradient boosting tree regression model, and the model used is determined based on the cross-validation error of the training samples.

9. The water CODCr-BOD5 correlation mining method based on big data according to claim 8, characterized in that, In S6, the degree of correlation slope collapse is determined by the apparent correlation slope and the effective correlation slope; the apparent correlation slope is the slope obtained by fitting the measured dichromate chemical oxygen demand concentration in the downstream mixed sample with the measured five-day biochemical oxygen demand concentration; the effective correlation slope is the slope obtained by fitting the effective dichromate chemical oxygen demand concentration in the downstream effective paired sample with the measured five-day biochemical oxygen demand concentration; the ratio of the difference between the effective correlation slope and the apparent correlation slope to the effective correlation slope is determined as the degree of correlation slope collapse.

10. A water CODCr-BOD5 correlation mining system based on big data, used to execute the water CODCr-BOD5 correlation mining method based on big data as described in any one of claims 1-9, characterized in that, Specifically, it includes: The sample construction module is used to acquire water quality monitoring data and flow data of upstream control sections, wastewater treatment plant tailwater discharge outlet sections and downstream mixed sections of the target water body, generate paired samples, and divide them into upstream control sample set, tailwater discharge outlet sample set and downstream mixed sample set. The baseline relationship establishment module is used to establish river baseline reference relationships based on the upstream control sample set. The inert chemical oxygen demand (COD) base identification module is used to calculate the contribution of the tailwater inert COD base to each downstream mixed sample in the downstream mixed sample set based on the river baseline reference relationship, tailwater discharge sample set and flow data. The base stripping module is used to strip the measured CODCr of each downstream mixed sample in the downstream mixed sample set according to the contribution of the tailwater inert chemical oxygen demand base, to obtain the effective CODCr, and generate downstream effective paired samples. The machine learning modeling module is used to train a machine learning correlation model by using downstream effective paired samples as training samples, effective CODCr and tailwater inert chemical oxygen demand base contribution as inputs, and measured BOD5 as output. The results output module is used to output the BOD5 estimation results, the contribution of the tailwater inert chemical oxygen demand base, and the degree of related slope collapse based on the machine learning correlation model.