Water quality change trend rapid prediction method based on multi-source data fusion and physical constraint

Through the hydrodynamic-water quality coupling model and multi-source data fusion technology, combined with low-cost sensor networks and spectral analysis, the timeliness and cost issues of traditional COD detection are solved, and high-precision rapid prediction of water quality change trends is achieved, which is suitable for real-time monitoring of complex waters.

CN120598102AActive Publication Date: 2025-09-05HOHAI UNIV

Patent Information

Application Number
CN202510675780.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-09-05
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

Traditional COD detection methods have problems such as poor timeliness, high cost, insufficient spatial coverage, insufficient coupling of hydrodynamic and water quality models, and unoptimized environmental interference factors, making it difficult to achieve high-precision real-time monitoring of pollution events.

Method used

By constructing a hydrodynamic-water quality coupling model, combining multi-source data fusion with physical constraints, and using low-cost DO sensor networks and spectral technology, we can realize the dynamic distribution simulation of water quality parameters and quantitative analysis of optical eigenvalues. We also construct a multi-source optical eigenvalue-DO-COD dynamic relationship model, and combine random forest and long short-term memory networks to perform minute-level COD prediction.

Benefits of technology

It achieves low-cost, high-precision rapid prediction of global COD change trends, improves the timeliness and coverage of monitoring, reduces hardware deployment and operation and maintenance costs, and is suitable for water quality monitoring in large and complex water areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120598102A_ABST
    Figure CN120598102A_ABST
Patent Text Reader

Abstract

The invention relates to a water quality change trend rapid prediction method based on multi-source data fusion and physical constraint, and the method specifically comprises the following steps: 1, synchronously collecting spectral information, DO, COD, temperature, pH and other data at a key monitoring station, constructing a hydrodynamic water quality coupling equation, simulating the spatial-temporal dynamic distribution of water quality parameters, and calculating the water quality change trend; 2, outputting a water quality sensitive area through a hydrodynamic force-water quality model, screening sensor layout point positions in combination with information entropy evaluation and spatial clustering, realizing low-cost water quality sensor network deployment through a multi-objective optimization algorithm, and calculating a water body global water quality distribution diagram by adopting a spatial interpolation method, 3, synchronously collecting spectral information according to key monitoring sites, analyzing main pollution sources, and adopting a principal component analysis and attention mechanism neural network; 4, based on real-time optical characteristic value-DO data, in combination with a spatial topology network, a water quality gradient and a cross-regional covariance, capturing water quality parameter spatial correlation among different sites, and determining the water quality parameter spatial correlation among different sites; an optical characteristic value-DO-COD dynamic prediction model is constructed; a COD predicted value is corrected by combining pollution traceability and spectral characteristics, and multi-source data is assimilated by adopting ensemble Kalman filtering, so that the model precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of water environment monitoring, and specifically relates to a method for rapidly predicting the spatiotemporal distribution of chemical oxygen demand (COD) in water bodies by combining a hydrodynamic-water quality coupling model with a dissolved oxygen (DO) sensor network and cross-correlation analysis between multi-source optical characteristic values, DO, and COD data. Background Art

[0002] Chemical oxygen demand (COD) is a key indicator for measuring the degree of organic pollution in water bodies. Traditional COD detection mainly relies on laboratory chemical analysis methods, mainly including potassium dichromate method and potassium permanganate method, both of which require on-site sampling and completion in a laboratory environment. Although laboratory chemical analysis methods have high detection accuracy, they have inherent defects such as poor timeliness, high cost, and risk of human interference. They cannot meet the needs of real-time monitoring of pollution events and are difficult to promote on a large scale. In existing technologies, some studies have attempted to indirectly predict COD through a single water quality parameter (such as dissolved oxygen DO), but the following technical bottlenecks still exist:

[0003] (1) Insufficient spatial coverage of monitoring: It is difficult to capture the spatial heterogeneity of pollutants by relying solely on discrete monitoring stations, especially in sensitive areas such as river bends and tributary confluences;

[0004] (2) Insufficient coupling of hydrodynamic and water quality models: The hydrodynamic and water quality models are not combined to simulate the impact of water flow on pollutant diffusion, resulting in limited prediction accuracy;

[0005] (3) Environmental interference factors were not optimized: the dynamic effects of environmental variables such as temperature and pH on the DO-COD correlation were not effectively eliminated;

[0006] (4) Spectral technology is not quantified: Hyperspectral and multispectral technologies are mostly used for qualitative identification of pollutant types, but lack the quantitative relationship between spectral characteristic values ​​and COD concentration.

[0007] Therefore, the present invention proposes a method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints. By combining a low-cost DO sensor network with spectral technology, the shortcomings of traditional COD detection methods in temporal and spatial resolution, operating costs and anti-interference ability are addressed. Summary of the Invention

[0008] Based on the shortcomings of the above-mentioned COD prediction technology, the purpose of the present invention is to provide a method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints, which can achieve low-cost and high-precision rapid prediction of global COD change trends.

[0009] The technical solution adopted by the present invention is: a method for rapidly predicting water quality change trends based on multi-source data fusion and physical constraints, the specific steps of which include:

[0010] Step 1: Synchronously collect spectral information, DO, COD, temperature, and pH data at key monitoring sites. Build a hydrodynamic-water quality coupling model based on the shallow water equation and the convection-diffusion equation to simulate the dynamic distribution of water quality parameters (DO, COD) under the action of water flow, providing physical mechanism support for subsequent machine learning modeling of optical characteristics and COD.

[0011] S11: Use a sampler to collect water samples at key monitoring sites, measure the water temperature, pH value and dissolved oxygen (DO) content on site, and then let the water stand and take the supernatant liquid as a sample for preservation.

[0012] Furthermore, the sampler used in S11 is an automatic sampler, which can be controlled by a preset program to automatically sample; the automatic sampler collects water deep below the water surface, and takes the supernatant after standing for 30 minutes; the sample preservation method should be in accordance with the water quality sampling specifications and be divided into brown glass bottles in parallel and stored at 4°C; the water temperature (Temp), pH value and dissolved oxygen content are measured at the sampling site at the same time; after sampling, the sampler sends the collected water samples to the laboratory, and half of the samples are randomly selected to determine the chemical oxygen demand (COD) of the water, and the remaining half of the samples are used for subsequent spectral detection. The samples used for spectral detection should be filtered with a 0.45μm filter membrane before measurement to remove the interference of suspended particulate matter on the optical characteristic values.

[0013] S12: Based on the two-dimensional shallow water equation, a hydrodynamic model is constructed to simulate the flow velocity, flow direction, and water level changes of the water body. Specifically, the following control equations are included:

[0014] Continuity equation:

[0015]

[0016] Momentum equation:

[0017]

[0018] Where h is the water depth; t is time; u = u(x, y, t) and v = v(x, y, t) are the components of the water velocity in the x and y directions respectively; g is the acceleration due to gravity; H is the water surface elevation, H = h + z b , z b is the riverbed elevation; τ bx , τ by are the components of the riverbed shear stress in the x and y directions, respectively, and are calculated based on the Manning formula:

[0019] τ bx =ρghS f

[0020] Where ρ is the water density; S f is the energy slope, which is approximately equal to the water surface slope.

[0021] The finite volume method is used to discretize the equations, the numerical flux is solved based on the Roe flux difference scheme, and the time integration is performed using the third-order Runge-Kutta method to ensure the stability of the solution process.

[0022] S13: A water quality model is constructed based on the convection-diffusion equation to simulate the transport process and concentration changes of solutes in water. Specifically, it includes the following equations:

[0023] Convection-diffusion-reaction equation:

[0024]

[0025] Where C is the concentration of water quality parameters; Dx and Dy are the diffusion coefficients in the x and y directions; S(C) is the external source and sink term; and R(C) is the chemical / biological reaction term.

[0026] DO kinetic model (Streeter-Phelps modified equation):

[0027]

[0028] Among them, C DO is the DO concentration; D DO is the diffusion coefficient of dissolved oxygen molecules; DO s is the saturated dissolved oxygen concentration of the water body; K a is the atmospheric reoxygenation rate; K r is the oxygen consumption rate of respiration; K d is the oxygen consumption rate of deposition,

[0029] COD degradation model:

[0030] R(C COD )=-K COD C COD

[0031] Among them, C COD is COD concentration; K COD is the COD degradation rate constant.

[0032] S14: Determine the coupling mechanism. The data transfer process includes:

[0033] Hydrodynamic model → Water quality model: The hydrodynamic model outputs the velocity field u(x, y, t) as a convection term to drive the water quality model;

[0034] Water quality model → hydrodynamic model: Pollutant concentration gradient is fed back through the sedimentation / re-suspension process to correct the riverbed shear stress τ bx , τ by.

[0035] S15: Solve the coupled model using a partitioned iterative algorithm. The specific steps include:

[0036] S151: Initialize the hydrodynamic field u0, and the hydrodynamic model calculates h, u, v and outputs them to the water quality model;

[0037] S152: Fixed velocity field, solving COD and DO distribution of water quality model, and updating pollutant concentration;

[0038] S153: Use the new concentration field to modify the source and sink terms and re-solve the hydrodynamic equations;

[0039] S154: Repeat steps 1-2 until the residual converges, that is, the relative errors of the hydrodynamic variables and pollutant concentrations in adjacent iterations are less than 10 -2 The use of low-cost water quality sensors as monitoring equipment avoids the high cost, chemical reagents and professional maintenance problems of traditional COD monitoring equipment.

[0040] Step 2: Output water quality sensitive areas through the hydrodynamic-water quality model, combine information entropy evaluation and spatial clustering to screen sensor deployment points, implement low-cost water quality sensor network deployment through a multi-objective optimization algorithm, and use spatial interpolation methods to calculate the global water quality distribution map of the water body.

[0041] S21: Calculate the range of hydraulic sensitive areas and chemical sensitive areas based on the hydrodynamic model, and couple the two to generate the output water quality sensitive areas.

[0042] Specifically, by calculating the velocity gradient field G(x,y), the area with a G value greater than the threshold is defined as a hydraulic sensitive area, and the corresponding weight is set to w1; by simulating the diffusion of pollutants to generate the cumulative concentration field S(x,y), the area with an S value greater than the threshold is selected as a chemically sensitive area, and the corresponding weight is set to w2. The calculation formula involved is as follows:

[0043]

[0044] S22: Deploy low-cost water quality sensors based on the locations of water quality sensitive areas output by S21;

[0045] S221: Calculate the information entropy of candidate points in the sensitive area x i is the coordinate of the i-th candidate point in the sensitive area, p k is the probability distribution of historical water quality parameters in category k, where K is the total number of discretized categories; the top N points with the highest entropy values ​​are selected to cover the area with the largest spatiotemporal variation.

[0046] S222: Perform K-means clustering on the sensitive area to generate M spatial clusters; deploy one sensor in each cluster to ensure that the Voronoi diagram covers the entire area.

[0047] For each cluster C j , select points that meet the following conditions:

[0048] And H(x i )>0.5H th

[0049] Final output of the initial layout plan Among them, C j is the jth spatial cluster, c j It is cluster C j The center of mass, It is cluster C j The final selected sensing point.

[0050] S223: Establish a multi-objective optimization algorithm and perform fine-tuning.

[0051] (1) NSGA-III algorithm configuration

[0052] ①Decision variable: Define binary choice variable s i ∈{0,1} indicates whether i Deploy sensors.

[0053] ②Objective function

[0054] Maximize spatial coverage: Among them A i is the Thiessen polygon area of ​​sensor i, A 总 is the total area of ​​sensitive areas;

[0055] Minimize costs: where c i For deployment costs;

[0056] Maximize information entropy: Where H(x i ) is the information entropy of the candidate points.

[0057] ③Constraints:

[0058] Sensor spacing, and the coverage sensitive area ≥d min ;

[0059] Covering ≥95% of sensitive areas;

[0060] The candidate points must be located at the grid nodes in the sensitive area.

[0061] (2) Optimize the process

[0062] Phase 1: is the initial population and runs the NSGA-III algorithm;

[0063] Stage 2: If the optimal solution f1 < 98%, merge Re-optimization;

[0064] Termination conditions:

[0065] S224: Automation solution output

[0066] (1) Optimal solution selection

[0067] Scoring function: in

[0068] Output:

[0069] The type determination method is as follows:

[0070] Priority calculation:

[0071] (2) Effect verification and incremental optimization:

[0072] Coverage gap detection:

[0073] Calculate uncovered area A gap =A 总 -∑s i A i , if A gap =A 总 -∑s i A i , triggering incremental deployment, replenishing sensors in descending order of priority:

[0074] S23: Collect the DO data output by the DO sensor in S22 and fuse the discrete DO data using the Kriging interpolation method. The specific steps include:

[0075] S231: Filtering abnormal DO values ​​based on the IQR method;

[0076] S232: Calculate all sensor point pairs (x i ,x i +d), the semivariance γ(d) is calculated as:

[0077]

[0078] Where d is the distance between sensor pairs; N(d) is the number of pairs of points with a spacing of [d, d+Δd]; z(x i ) is the point x i DO estimated value at .

[0079] S233: Solve using the Kriging equations:

[0080]

[0081] Among them, γ ij =(‖x i -x j ‖)

[0082] S24: Generate a global DO distribution map based on the solution. This step optimizes the configuration of a low-cost water quality sensor network based on the water quality sensitive areas output by the hydrodynamic-water quality model, combining information entropy evaluation with spatial clustering and a multi-objective optimization algorithm. Furthermore, a global water quality distribution map is constructed through spatial interpolation, achieving a leap in water quality monitoring capabilities from "point observation" to "global distribution."

[0083] Step 3: Synchronously collect spectral information based on key monitoring stations, analyze the main pollution sources, use principal component analysis and attention mechanism neural network to reduce the dimension of spectral feature values ​​and assign weights to generate a comprehensive optical index.

[0084] S31: Use water samples collected at key monitoring stations to synchronously collect three-dimensional fluorescence spectral data, use remote sensing images to collect hyperspectral data and multispectral remote sensing data, realize multi-source spectral data collection, and perform data preprocessing.

[0085] Furthermore, the three technologies each offer distinct advantages in band coverage and spatiotemporal resolution, complementing each other to form a comprehensive spatiotemporal optical data system. Hyperspectral remote sensing is a technology that uses very narrow, continuous spectral channels to continuously image ground objects. Based on the HyperGlobal-450K large-scale hyperspectral image dataset, it acquires reflectance data in continuous narrow bands and extracts characteristic bands of dissolved organic matter (DOM) in water bodies through spectral differentiation. Multispectral remote sensing utilizes light from different wavelengths for remote sensing and analysis. Based on Landsat satellite remote sensing data, it selects target-sensitive bands (such as visible light and infrared) to extract and normalize the differences between spectra in different bands. The normalized water index and floating algae index are then used to identify the characteristics of water pollutants. Three-dimensional fluorescence spectroscopy systematically measures the fluorescence intensity of a sample at different excitation and emission wavelength combinations, generating a relationship between fluorescence intensity and changes in excitation wavelength (Ex) and emission wavelength (Em). Spectral matrices at specific excitation and emission wavelengths are generated by 3D fluorescence spectroscopy to analyze the source and activity of pollutants.

[0086] Specifically, the operation steps of S31 include:

[0087] S311: Collect three-dimensional fluorescence spectral data using water samples collected at key monitoring stations to construct a spectral matrix with an excitation wavelength range of Ex = 200-500 nm and an emission wavelength range of Em = 250-600 nm;

[0088] S312: Extract continuous narrow-band (5-10 nm interval) hyperspectral remote sensing features based on the HyperGlobal-450K large-scale hyperspectral image dataset; extract multispectral wide-band remote sensing data based on Landsat satellite remote sensing data, using blue / green light for detecting plankton and red / near-infrared light for characterizing algae;

[0089] S313: Preprocessing the collected multi-source spectral data.

[0090] Specifically, standard atmospheric correction tools are used to convert hyperspectral and multispectral data into surface reflectance, the Savitzky-Golay filtering algorithm is used to smooth and denoise the hyperspectral data, and the heterogeneous remote sensing data are unified into the same spatial coordinate system; the interference of Rayleigh scattering and Raman scattering is eliminated through the instrument's built-in algorithm, and the blank water sample signal in the three-dimensional fluorescence data is removed; and the parallel factor analysis method is used to analyze the fluorescence intensity of each sample point on the three-dimensional fluorescence spectrum.

[0091] S32: Extract spectral feature values ​​of hyperspectral data, multispectral remote sensing data, and three-dimensional fluorescence spectral data respectively, use principal component analysis to reduce the dimensionality of high-dimensional spectral features, and then use attention mechanism neural network to assign weights to each spectral variable to generate a comprehensive optical index. The specific steps include:

[0092] S321: Extract spectral feature values ​​of hyperspectral data, multispectral remote sensing data and three-dimensional fluorescence spectral data.

[0093] (1) Extracting hyperspectral characteristic bands based on spectral differentiation method. The specific steps include:

[0094] ①Use numerical difference processing on hyperspectral data to obtain the spectral line change trend, involving equations including:

[0095] a. The first-order derivative reflects the slope change of the spectral curve and eliminates the illumination difference:

[0096]

[0097] b. The second-order derivative identifies sudden changes in spectral curvature (such as absorption peak position) and further suppresses linear background:

[0098]

[0099] Where R is the reflectivity, λ is the wavelength, i is the band number, and Δλ is the band spacing.

[0100] ② Using the extreme point analysis method, the derivative zero point corresponds to the absorption peak boundary of the original spectrum, combined with correlation analysis to screen the differential features with strong discrimination, and realize the selection of DOM sensitive bands.

[0101] (2) Based on multispectral remote sensing data, the Normalized Difference Water Width Index (NDWI) and the Floating Algae Index (FAI) are used to identify the characteristics of water pollutants. The specific steps include:

[0102] a. Crop the pre-processed remote sensing image data to the study area to remove cloud interference;

[0103] b. Calculate NDWI and FAI separately, involving the following formulas:

[0104] NDWI calculation formula:

[0105]

[0106] FAI calculation formula:

[0107] FAI=R NIR -R′ NIR

[0108]

[0109] Among them, R Green 、R Red 、R NIR 、R SWIR is the reflectivity of the green light band, red light band, near infrared band, and short-wave infrared band, R' NIR is a linear estimate based on the red and SWIR bands, λ Red ,λ NIR ,λ SWIR The wavelengths are the red light band, near infrared band, and shortwave infrared band.

[0110] Furthermore, NDWI uses the normalized reflectance difference between the green light band and the near-infrared (NIR) band to highlight water body information and suppress vegetation and soil interference. The high and low NDWI values ​​can reflect the degree of water pollution. FAI suppresses water background noise and enhances the sensitivity of floating algae signal detection through linear fitting and residual calculation of the red light (Red), near-infrared (NIR) and short-wave infrared (SWIR) bands. The high and low FAI values ​​can quantify algae biomass.

[0111] (3) Using three-dimensional fluorescence spectroscopy to obtain a spectral matrix of specific excitation and emission wavelengths, the source of COD pollution can be distinguished. The specific steps include:

[0112] a. Calculate the fluorescence intensity matrix of the water sample within the excitation wavelength range of Ex = 200-500nm and the emission wavelength range of Em = 250-600nm. Combined with the established pollutant fluorescence fingerprint library, identify the characteristic peak positions corresponding to typical pollutants:

[0113] Humic substance-like peak (Ex=250-280nm, Em=380-480nm); protein-like peak (Ex=220-230nm, Em=320-350nm); humic acid-like peak (Ex=320-350, Em=420-480).

[0114] b. Calculate the fluorescence index (FI), humification index (HIX), and biological index (BIX) from the fluorescence matrix data for optical feature fusion. The specific calculation formulas include:

[0115] FI calculation formula:

[0116]

[0117] HIX calculation formula:

[0118]

[0119] BIX calculation formula:

[0120]

[0121] Among them, I λ It represents the fluorescence intensity value at the emission wavelength of λ nm.

[0122] c. Determine the main pollution source category based on the Mahalanobis distance between the real-time fluorescence index (FI, HIX, BIX) and the historical pattern.

[0123] S322: Using principal component analysis and attention mechanism neural network, the spectral feature values ​​are reduced in dimension and weighted to generate a comprehensive optical index. The specific steps include:

[0124] (1) To eliminate the dimensional differences between different optical characteristics (reflectance, index value, fluorescence intensity), all spectral characteristic values ​​S are standardized. The formulas involved include:

[0125]

[0126] (2) Use principal component analysis to reduce the dimensionality of the spectral eigenvalues. The specific steps include:

[0127] a. Calculate the covariance matrix ∑ of the high-dimensional feature matrix X X :

[0128]

[0129] Among them, X T represents the transpose of matrix X, and n is the number of samples.

[0130] b. Covariance matrix ∑ X Perform eigenvalue decomposition to obtain eigenvalues ​​and eigenvectors.

[0131] c. Select the first k principal components V(V1, V2, ..., V k ), generate low-dimensional features.

[0132] (3) The attention mechanism neural network weighting assigns weights to the spectral feature values. The attention weight calculation formula is as follows:

[0133]

[0134] Among them, α i is the weight corresponding to each spectral eigenvalue; Sim is the weight coefficient of different spectral eigenvalues; i, j are the i-th and j-th spectral eigenvalues; L is the number of spectral eigenvalues.

[0135] (4) Calculate the comprehensive optical index F according to the corresponding weights of each spectral characteristic value.

[0136]

[0137] Among them, V i represents the corresponding dimensionality-reduced spectral eigenvalue in the direction of the i-th principal component. This step integrates multi-source data into a multidimensional dataset, enhancing the expressive power of pollution identification and model input. It also constructs a dynamic relationship model between multi-source optical eigenvalues, DO, and COD. Compared to traditional methods that rely on chemical modules, this method improves accuracy and timeliness without relying on expensive instrumentation.

[0138] Step 4: Based on real-time optical eigenvalue-DO data, combined with spatial topological networks, water quality gradients, and cross-regional covariance, the spatial correlation of water quality parameters between different points is captured, and an optical eigenvalue-DO-COD dynamic prediction model is constructed. The COD prediction value is corrected by combining pollution source tracing and spectral characteristics, and an ensemble Kalman filter is used to assimilate multi-source data to improve model accuracy.

[0139] S41: Analyze the degradation kinetics differences of COD from different sources in step S321, introduce the pollution source weight factor β into the coupling model, and correct the COD degradation rate. The formula involved is as follows:

[0140]

[0141] Among them, m is the pollution source category number, M is the total number of pollution source categories, β m is the contribution weight of the mth type of pollution source (∑β m =1), K COD,m is the COD degradation rate constant corresponding to the pollution source,

[0142] S42: Invert the concentration of specific pollutants by combining the hyperspectral characteristic bands, and dynamically correct the COD concentration based on this. The specific steps include:

[0143] S421: Based on the hyperspectral characteristic bands extracted in step 4, a partial least squares regression model (PLSR) is constructed to invert the concentration of specific pollutants. The formula involved is as follows:

[0144]

[0145] Among them, w i is the PLSR model weight coefficient, The wavelength is λ i The band reflectivity, b is the intercept term, C spec is the concentration of the pollutant obtained by inversion.

[0146] S422: Calculate the correction term ΔCOD based on the laboratory-calibrated pollutant-COD conversion coefficient α. The formula involved is as follows:

[0147] ΔCOD=α·C spec

[0148] S423: Superimpose ΔCOD on the COD concentration field output by the water quality model in step 2 to obtain the corrected COD concentration C′ COD , the formula involved is as follows:

[0149] C′ COD =C COD +ΔCOD

[0150] S43: Introducing a time lag factor, integrating the spatial correlation characteristics of monitoring points, analyzing the hysteresis response of optical eigenvalues ​​and DO concentration changes to COD concentration, and constructing an optical eigenvalue-DO-COD dynamic relationship model based on a collaborative modeling system (RF-LSTM) of random forest (RF) and long short-term memory network (LSTM) to achieve minute-level COD prediction. The specific steps include:

[0151] S431: Capturing the spatial correlation between water quality factors and monitoring points:

[0152] (1) Construct a topological map of monitoring points and establish the connection relationship between adjacent points based on Delaunay triangulation;

[0153] (2) Calculate the gradient characteristics of water quality parameters between adjacent points:

[0154]

[0155] Among them, C i ,C j Respectively represent the concentration of water quality factors (DO, temperature, pH, etc.) at monitoring points i and j, and x i ,x j is the spatial coordinate of the point, and N(i) is the Delaunay adjacent point set of point i.

[0156] (3) Extract the cross-region covariance matrix:

[0157] Σ cross =cov(C core ,C sensor )

[0158] Among them, C core is the water quality parameter of the key monitoring point in step 1, C sensor This is the sensor point data in step 2.

[0159] S432: Obtain DO sensor network data and optical eigenvalues ​​F in real time through the IoT terminal to construct a dynamic input matrix X t_real =[F t ,ΔF t ,DO t ,ΔDO t ,Temp t ,pH t ,G adj (x i ),Σ cross ],

[0160] S433: Introduce the data of the first τ time step to capture the lag effect and obtain the characteristic matrix with lag factor

[0161] S434: RF-LSTM collaborative modeling is used to screen key features and establish spatiotemporal dependencies of COD.

[0162] (1) Random forest feature screening: defining spatial weight factors:

[0163]

[0164] Among them, ‖x i -x j ‖ is the Euclidean distance between points i and j.

[0165] Expand the matrix X t′ Input the random forest model for importance screening and extract the top K key variables to form the subset X t_selected ,

[0166] (2) Using a sliding time window (length w), X t_selected Input LSTM model and output real-time COD prediction value C t_pred ,

[0167] S44: C t_pred As the boundary condition of the water quality model, the coupled model recalculation is triggered, and the Newton iteration method is introduced to accelerate the model convergence to ensure minute-level response. The formula involved is as follows:

[0168]

[0169] in, is the model operator, is the Jacobian matrix, and m is the number of iterations.

[0170] S45: To further improve the COD simulation accuracy, an ensemble Kalman filter is used to assimilate multi-source data to improve model accuracy. The specific steps include:

[0171] S451: By perturbing the hydrodynamic parameters (diffusion coefficient Dx / y), degradation rate K COD and initial concentration field, generating N = 100 model state sets Xi.

[0172] S452: Run the coupled model to the current moment and obtain the prediction set Xi f .

[0173] S453: Calculate the Kalman gain, involving the following formula:

[0174]

[0175] Among them, P f is the forecast error covariance matrix, is the observation operator (mapping the model grid to the sensor point), C obs is the observation error covariance.

[0176] S454: Fuse the real-time DO observation concentration Z and the optical characteristic value F to update the state set. The formula involved is as follows:

[0177]

[0178] S455: Take The mean of is taken as the optimal estimation state and fed back to the coupling model for further calculation.

[0179] S46: Outputs a revised spatiotemporal distribution map of COD, identifies high-pollution risk areas, and generates a pollution source contribution report. This solution incorporates dynamic data assimilation and time-series learning mechanisms, enabling continuous model updates and real-time prediction and adaptive evolution. This approach, combined with hyperspectral remote sensing time-series data, elevates single-point monitoring to global evolution analysis.

[0180] A device for rapidly predicting water quality change trends based on multi-source data fusion and physical constraints includes: a dynamic coupling modeling module, which obtains parameters such as DO, COD, temperature and pH data of key sites, builds a coupling model based on hydrodynamic equations, simulates the spatiotemporal dynamic distribution of DO and COD, and identifies water quality sensitive areas; a sensor optimization mapping module, which deploys low-cost DO sensors according to sensitive areas, deploys a low-cost DO sensor network using information entropy evaluation, spatial clustering and multi-objective optimization algorithms, and reconstructs a high-resolution water quality distribution map by fusing discrete monitoring data with Kriging interpolation; a pollution source analysis module, which generates a comprehensive optical pollution index by performing principal component dimensionality reduction weighting based on spectral data, and realizes pollution source tracking by combining surface pollution discharge data; a multi-source collaborative prediction module, which integrates optical eigenvalues, water quality time series data and point spatial correlation features, builds an RF-LSTM hybrid model to predict COD concentration, introduces an ensemble Kalman filter to assimilate multi-source observation data, dynamically corrects the predicted value and outputs a pollution risk map.

[0181] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for rapidly predicting water quality change trends based on multi-source data fusion and physical constraints is implemented.

[0182] A computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the method for rapidly predicting water quality change trends based on multi-source data fusion and physical constraints.

[0183] Compared with the prior art, the advantages of the present invention are as follows:

[0184] This invention innovatively replaces traditional high-frequency COD online monitoring equipment with a low-cost sensor network. This, combined with multi-source data collaborative sensing equipment to achieve indirect COD inversion, results in a low-cost, high-coverage water quality monitoring method, system, and device. Compared to traditional water quality monitoring methods that rely on precision spectrometers or chemical analysis modules, low-cost water quality sensors effectively avoid the high cost of single-point equipment, the need for regular reagent replacement, and specialized maintenance, significantly reducing hardware deployment and long-term operation and maintenance costs.

[0185] Traditional methods are limited by the deployment of discrete sites and insufficient spatial coverage density, making it difficult to accurately characterize pollutant distribution patterns. This invention integrates hydrodynamic simulation with multi-scale sensing technology. Based on the water quality sensitive areas output by the hydrodynamic-water quality model, it combines information entropy evaluation, spatial clustering, and a multi-objective optimization algorithm (NSGA-III) to achieve efficient deployment of low-cost sensor networks. It also calculates the global water quality distribution map of the water body through spatial interpolation technology, achieving an upgrade in water quality monitoring capabilities from point observations to global distribution. This method has a good cost-effectiveness ratio and scalability, making it particularly suitable for long-term deployment in large areas with complex water environments.

[0186] The present invention integrates multi-source data such as three-dimensional fluorescence, hyperspectral, multispectral, and water quality parameters, innovatively introduces the spatiotemporal correlation characteristics of water quality parameters and monitoring points, and constructs a multi-source optical characteristic value-DO-COD dynamic relationship model to achieve indirect and high-precision estimation of COD concentration. The model combines multivariate data and physical models, and specifically introduces pollution source tracing information and spectral feature correction mechanisms, breaking through the limitation that single spectral data is difficult to reflect complex water quality changes, and effectively enhancing the adaptability to COD fluctuations in complex polluted environments. Compared with traditional methods, this method significantly improves the accuracy and timeliness of COD estimation without relying on expensive chemical analysis modules.

[0187] The present invention adopts a dynamic data assimilation and real-time prediction framework to achieve rapid response to water quality changes. Traditional monitoring relies on fixed-cycle laboratory analysis or offline sampling, which makes it difficult to capture sudden pollution events. The present invention obtains water quality parameters, optical indices and environmental parameters in real time through the Internet of Things terminal, combines the spatiotemporal correlation characteristics of water quality parameters and sensor layout points, dynamically identifies the main pollution factors through the random forest algorithm, and combines the long and short-term memory network to achieve minute-level dynamic prediction of COD. Through spatiotemporal modeling and online learning algorithms, the model can continuously update input data and dynamically optimize parameters, significantly shortening the monitoring response delay and improving monitoring accuracy and real-time self-update capabilities.

[0188] In addition, the present invention also introduces hyperspectral remote sensing inversion technology to realize spatial correlation mapping of optical characteristics and chemical parameters. Combined with the spatiotemporal modeling method, it can effectively predict the long-term evolution trend of water quality, and provide high-resolution, full-time domain water quality evolution trend prediction for complex water areas, further improving the accuracy and predictability of water quality monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0189] Figure 1 This is a flowchart of a method for rapid prediction of water quality trends based on multi-source data fusion and physical constraints;

[0190] Figure 2 The structure diagram of the device for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints;

[0191] Figure 3 The figure is a schematic diagram of the physical structure of an electronic device. DETAILED DESCRIPTION

[0192] The technical solutions of the present invention are described clearly and completely below in conjunction with specific embodiments. Obviously, the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are also within the scope of protection of the present invention.

[0193] Example: The technical solution adopted by the present invention is: a method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints, which realizes rapid prediction of COD spatiotemporal distribution changes, mainly including the following steps:

[0194] Step 1: Long-term water data such as spectral information, DO, COD, temperature, and pH were collected at five key monitoring stations on the river. The flow velocity, flow direction, and water level changes were simulated based on the shallow water equation. The spatiotemporal distribution of COD and DO was simulated using the convection-diffusion equation. The two were coupled to construct a hydrodynamic-water quality coupling model to simulate the dynamic relationship between COD and DO as the water flow moved.

[0195] S11: Use a sampler to collect water samples at key monitoring sites, measure the water temperature, pH value and dissolved oxygen (DO) content on site, and then let the water stand and take the supernatant liquid as a sample for preservation.

[0196] Furthermore, the sampler used in S11 is an automatic sampler, which can be controlled by a preset program to automatically sample; the automatic sampler collects water deep below the water surface, and takes the upper clear liquid after standing for 30 minutes; the sample preservation method should be in accordance with the water quality sampling specifications and be divided into brown glass bottles in parallel and stored at 4°C; the water temperature (Temp), pH value and dissolved oxygen content are measured at the sampling site at the same time; after sampling, the sampler sends the collected water samples to the laboratory, randomly selects half of the samples to determine the chemical oxygen demand (COD) of the water, and the remaining half of the samples are used for subsequent spectral detection. The samples used for spectral detection should be filtered with a 0.45μm filter membrane before measurement to remove the interference of suspended particulate matter on the optical characteristic values.

[0197] S12: Based on the two-dimensional shallow water equation, a hydrodynamic model is constructed to simulate the flow velocity, flow direction, and water level changes of the water body. Specifically, the following control equations are included:

[0198] Continuity equation:

[0199]

[0200] Momentum equation:

[0201]

[0202] Where h is the water depth; t is time; u = u(x, y, t) and v = v(x, y, t) are the components of the water velocity in the x and y directions respectively; g is the acceleration due to gravity; H is the water surface elevation, H = h + z b , z b is the riverbed elevation; τ bx , τ by are the riverbed shear stress, calculated based on Manning's formula:

[0203] τ bx =ρghS f

[0204] Where ρ is the water density; S f is the energy slope, which is approximately equal to the water surface slope.

[0205] The finite volume method is used to discretize the equations and solve the numerical flux based on the Roe flux difference scheme, and the third-order Runge-Kutta method is used for time integration to ensure the stability of the solution process.

[0206] S13: A water quality model is constructed based on the convection-diffusion equation to simulate the transport process and concentration changes of water solutes such as COD and DO. Specifically, the following equations are included:

[0207] Convection-diffusion-reaction equation:

[0208]

[0209] Where C is the pollutant concentration (i.e., COD or DO concentration); Dx and Dy are the diffusion coefficients in the x and y directions; S(C) is the external source and sink term; and R(C) is the chemical / biological reaction term.

[0210] DO kinetic model (Streeter-Phelps modified equation):

[0211]

[0212] Among them, C DO is the DO concentration; D DO is the diffusion coefficient of dissolved oxygen molecules; DO s is the saturated dissolved oxygen concentration of the water body; K a is the atmospheric reoxygenation rate; K r is the oxygen consumption rate of respiration; K d is the oxygen consumption rate due to deposition.

[0213] COD degradation model:

[0214] R(CCOD )=-K COD C COD

[0215] Among them, C COD is COD concentration; K COD is the COD degradation rate constant.

[0216] S14: Determine the coupling mechanism. The data transfer process includes:

[0217] Hydrodynamic model → Water quality model: The hydrodynamic model outputs the velocity field u(x, y, t) as a convection term to drive the water quality model;

[0218] Water quality model → hydrodynamic model: Pollutant concentration gradient is fed back through the sedimentation / re-suspension process to correct the riverbed shear stress τ bx , τ by .

[0219] S15: Solve the coupled model using a partitioned iterative algorithm. The specific steps include:

[0220] S151: Initialize the hydrodynamic field u0, and the hydrodynamic model calculates h, u, v and outputs them to the water quality model;

[0221] S152: Fixed velocity field, solving COD and DO distribution of water quality model, and updating pollutant concentration;

[0222] S153: Use the new concentration field to modify the source and sink terms and re-solve the hydrodynamic equations;

[0223] S154: Repeat steps 1-2 until the residual converges, that is, the relative errors of the hydrodynamic variables and pollutant concentrations in adjacent iterations are less than 10 -2 .

[0224] Step 2: Output the water quality sensitive areas through the hydrodynamic model and deploy low-cost DO sensors in the corresponding areas, and use the spatial interpolation method to calculate the global water quality distribution map of the water body.

[0225] S21: Calculate the range of hydraulic sensitive areas and chemical sensitive areas based on the hydrodynamic model, and couple the two to generate the output water quality sensitive areas.

[0226] Specifically, by calculating the velocity gradient field G(x,y), the area with a G value greater than the threshold is defined as a hydraulic sensitive area, and the corresponding weight is set to w1; by simulating the diffusion of pollutants to generate the cumulative concentration field S(x,y), the area with an S value greater than the threshold is selected as a chemically sensitive area, and the corresponding weight is set to w2. The calculation formula involved is as follows:

[0227]

[0228] Set the threshold G th=0.2s -1 , weight w1=0.6.

[0229]

[0230] Set the threshold value and weight w2 = 0.4.

[0231] S22: Sensor layout optimization and automation solution:

[0232] S221: Candidate point screening based on information entropy

[0233] (1) Calculate the information entropy of grid nodes in sensitive areas:

[0234]

[0235] Among them, x i is the coordinate of the i-th candidate point in the sensitive area, p k is the probability distribution of historical water quality parameters in category k, K is the total number of discretized categories; historical DO data are classified into K = 3 (low / medium / high), and the candidate points with N = 30 entropy values ​​are selected (H th =1.2).

[0236] S222: Perform K-means clustering on the sensitive area to generate 8 spatial clusters; deploy one sensor in each cluster to ensure that the Voronoi diagram covers the entire area.

[0237] For each cluster C j , select points that meet the following conditions:

[0238] And H(x i )>0.6

[0239] Final output of the initial layout plan Among them C j is the jth spatial cluster, c j It is cluster C j The center of mass, It is cluster C j The final selected sensing point.

[0240] S223: Establish a multi-objective optimization algorithm and perform fine-tuning.

[0241] (1) NSGA-III algorithm configuration

[0242] ①Decision variable: Define binary choice variable s i ∈{0,1} indicates whether i Deploy sensors (30 candidate points).

[0243] ②Objective function

[0244] Maximize spatial coverage: Among them A i is the Thiessen polygon area of ​​sensor i, A 总 The total area of ​​the sensitive area is 12.5km 2 ;

[0245] Minimize costs: where c i For deployment costs;

[0246] Maximize information entropy: Where H(x i ) is the information entropy of the candidate points.

[0247] ③Constraints:

[0248] The sensor spacing and coverage sensitive area should be ≥200m;

[0249] Covering sensitive area ≥ 95% A 总 ;

[0250] The candidate points must be located at the grid nodes in the sensitive area.

[0251] (2) Optimize the process

[0252] Phase 1: is the initial population and runs the NSGA-III algorithm;

[0253] Stage 2: If the optimal solution f1 < 98%, merge Re-optimization;

[0254] Termination conditions:

[0255] (3) Optimization results: The optimal solution is N = 10 sensors, coverage f1 = 97.5%, triggering incremental deployment N add =2.

[0256] S224: Automation solution output

[0257] Scoring function: in

[0258] Type determination: Core monitoring point: H(x i )>1.08, 6 in total; auxiliary monitoring points: the remaining 4.

[0259] Priority calculation:

[0260] Final deployment plan: 10 sensors (including 5 new ones).

[0261] S23: Collect the DO data output by the DO sensor in S32 and fuse the discrete DO data using the Kriging interpolation method. The specific steps include:

[0262] S231: Abnormal DO values ​​were filtered based on the IQR method, and the abnormal DO values ​​accounted for 2.3%;

[0263] S232: Calculate all sensor point pairs (x i ,x i +d), the semivariance γ(d) is calculated as:

[0264]

[0265] Where d is the distance between sensor pairs; N(d) is the number of pairs of points with a spacing of [d, d+Δd]; z(x i ) is the point x i DO estimated value at .

[0266] During the calculation process, Δd = 50m, and finally we get:

[0267] S233: Solve using the Kriging equations, weight λ i The mean is 0.08, μ = 2.1:

[0268]

[0269] Among them, γ ij =(‖x i -x j ‖)

[0270] S24: Generate a global DO distribution map based on the solution results.

[0271] Step 3: Synchronously collect spectral information based on key monitoring stations, analyze the main pollution sources, use principal component analysis and attention mechanism neural network to reduce the dimension of spectral feature values ​​and assign weights to generate a comprehensive optical index.

[0272] S31: Use water samples collected from five key monitoring stations to synchronously collect three-dimensional fluorescence spectral data, use remote sensing images to collect hyperspectral data and multispectral remote sensing data, realize multi-source spectral data collection, and perform data preprocessing.

[0273] Furthermore, the three technologies, each with distinct advantages in band coverage and spatiotemporal resolution, complement each other to form a comprehensive spatiotemporal optical data system. Hyperspectral remote sensing is a technology that uses very narrow, continuous spectral channels to continuously image ground objects. Based on the large-scale HyperGlobal-450K hyperspectral image dataset, it acquires reflectance data in continuous narrow bands and extracts characteristic bands of dissolved organic matter (DOM) in water bodies through spectral differentiation. Multispectral remote sensing utilizes light from different wavelengths for remote sensing and analysis. Based on Landsat satellite remote sensing data, it selects target-sensitive bands (such as visible light and infrared) to extract and normalize the differences between spectra in different bands. The normalized water index and floating algae index are then used to identify the characteristics of water pollutants. Three-dimensional fluorescence spectroscopy systematically measures the fluorescence intensity of samples at different excitation and emission wavelength combinations, generating a relationship between fluorescence intensity and changes in excitation wavelength (Ex) and emission wavelength (Em). Spectral matrices at specific excitation and emission wavelengths are then generated by 3D fluorescence spectroscopy to analyze the source and activity of DOM.

[0274] Specifically, the operation steps of S31 include:

[0275] S311: Collect three-dimensional fluorescence spectral data using water samples collected at key monitoring stations to construct a spectral matrix with an excitation wavelength range of Ex = 200-500 nm and an emission wavelength range of Em = 250-600 nm;

[0276] S312: Extract continuous narrow-band (5-10 nm interval) hyperspectral remote sensing features based on the HyperGlobal-450K large-scale hyperspectral image dataset; extract multispectral wide-band remote sensing data based on Landsat satellite remote sensing data, using blue / green light for detecting plankton and red / near-infrared light for characterizing algae;

[0277] S313: Preprocessing the collected multi-source spectral data.

[0278] Specifically, standard atmospheric correction tools are used to convert hyperspectral and multispectral data into surface reflectance, the Savitzky-Golay filtering algorithm is used to smooth and denoise the hyperspectral data, and the heterogeneous remote sensing data are unified into the same spatial coordinate system; the interference of Rayleigh scattering and Raman scattering is eliminated through the built-in algorithm of the instrument, and the blank water sample signal in the three-dimensional fluorescence data is removed; the parallel factor analysis method is used to analyze the fluorescence intensity of each sample point on the three-dimensional fluorescence spectrum.

[0279] S32: Extract spectral feature values ​​of hyperspectral data, multispectral remote sensing data, and three-dimensional fluorescence spectral data respectively, use principal component analysis to reduce the dimensionality of high-dimensional spectral features, and then use attention mechanism neural network to assign weights to each spectral variable to generate a comprehensive optical index. The specific steps include:

[0280] S321: Extract spectral feature values ​​of hyperspectral data, multispectral remote sensing data and three-dimensional fluorescence spectral data.

[0281] (1) Extracting hyperspectral characteristic bands based on spectral differentiation method. The specific steps include:

[0282] ①Use numerical difference processing on hyperspectral data to obtain the spectral line change trend, involving equations including:

[0283] a. The first-order derivative reflects the slope change of the spectral curve and eliminates the illumination difference:

[0284]

[0285] b. The second-order derivative identifies sudden changes in spectral curvature (such as absorption peak position) and further suppresses linear background:

[0286]

[0287] Where R is the reflectivity, λ is the wavelength, i is the band number, and Δλ is the band spacing.

[0288] ②Using the extreme point analysis method, the derivative zero point corresponds to the absorption peak boundary of the original spectrum, combined with correlation analysis to screen the differential features with strong discrimination, and select the DOM sensitive band:

[0289] The first-order derivative characteristic band is 265nm, 340nm; the second-order derivative characteristic band is 270mm, 355mm.

[0290] (2) Based on multispectral remote sensing data, the Normalized Difference Water Width Index (NDWI) and the Floating Algae Index (FAI) are used to identify the characteristics of water pollutants. The specific steps include:

[0291] a. Crop the pre-processed remote sensing image data to the study area to remove cloud interference;

[0292] b. Calculate NDWI and FAI separately, involving the following formulas:

[0293] NDWI calculation formula:

[0294]

[0295] FAI calculation formula:

[0296] FAI=R NIR-R′ NIR

[0297]

[0298] Among them, R Green 、R Red 、R NIR 、R SWIR is the reflectivity of the green light band, red light band, near infrared band, and short-wave infrared band, R' NIR is a linear estimate based on the red and SWIR bands, λ Red ,λ NIR ,λ SWIR The wavelengths are the red light band, near infrared band, and shortwave infrared band.

[0299] Furthermore, NDWI uses the normalized reflectance difference between the green light band and the near-infrared (NIR) band to highlight water body information and suppress vegetation and soil interference. The high and low NDWI values ​​can reflect the degree of water pollution. FAI suppresses water background noise and enhances the sensitivity of floating algae signal detection through linear fitting and residual calculation of the red light (Red), near-infrared (NIR) and short-wave infrared (SWIR) bands. The high and low FAI values ​​can quantify algae biomass.

[0300] c. Set NDWI thresholds: clean water (>0.2), slightly polluted (0-0.2), and heavily polluted (<0);

[0301] Set the FAI threshold and algae-rich area (FAI>0.01-0.05).

[0302] d. Overlay the NDWI and FAI results to generate a pollution type zoning map:

[0303] High FAI + low NDWI: algae pollution; low FAI + low NDWI: inorganic suspended matter pollution; high NDWI + low FAI: clean water.

[0304] (3) Differentiate the sources of COD pollution based on the pre-processed three-dimensional fluorescence spectrum data, including:

[0305] a. Identify the characteristic peak position based on the comparison of three-dimensional fluorescence spectrum data with the historical fingerprint library:

[0306] Humic substance peak: Ex = 270 nm, Em = 420 nm (matching domestic sewage fingerprint library, similarity 92%);

[0307] Protein-like peak: Ex = 225 nm, Em = 330 nm (matching agricultural runoff fingerprint library, similarity 85%);

[0308] Determine the contribution weights of pollution sources: domestic sewage (β1=0.6) and agricultural runoff (β2=0.4).

[0309] b. Calculate the Mahalanobis distance between the real-time fluorescence index (FI, HIX, BIX) and the historical pattern to determine the main pollution source category.

[0310] Fluorescence Index (FI):

[0311]

[0312] HIX calculation formula:

[0313]

[0314] BIX calculation formula:

[0315]

[0316] Among them, I λ It represents the fluorescence intensity value at the emission wavelength of λ nm.

[0317] Output results: FI=1.85, HIX=8.7, BIX=0.88.

[0318] c. The Mahalanobis distance between the fluorescence index and the historical pollution source pattern (domestic sewage: FI = 1.8 ± 0.1, HIX = 9.0 ± 0.5, BIX = 0.9 ± 0.05) is:

[0319]

[0320] Calculate the threshold D M <1.5, it is determined to be mainly polluted by domestic sewage.

[0321] S322: Using principal component analysis and attention mechanism neural network, the spectral feature values ​​are reduced in dimension and weighted to generate a comprehensive optical index. The specific steps include:

[0322] (1) To eliminate the dimensional differences between different optical characteristics (reflectance, index value, fluorescence intensity), all spectral characteristic values ​​S are standardized. The formulas involved include:

[0323]

[0324] (2) Use principal component analysis to reduce the dimensionality of the spectral eigenvalues. The specific steps include:

[0325] a. Calculate the covariance matrix ∑ of the high-dimensional feature matrix X X :

[0326]

[0327] Among them, X T represents the transpose of matrix X, and n is the number of samples.

[0328] b. Covariance matrix ∑ X Perform eigenvalue decomposition to obtain eigenvalues ​​and eigenvectors.

[0329] c. Select the first k principal components V(V1, V2, ..., V k ), generate low-dimensional features.

[0330] (3) The attention mechanism neural network weighting assigns weights to the spectral feature values. The attention weight calculation formula is as follows:

[0331]

[0332] Among them, α i is the weight corresponding to each spectral eigenvalue; Sim is the weight coefficient of different spectral eigenvalues; i, j are the i-th and j-th spectral eigenvalues; L is the number of spectral eigenvalues.

[0333] (4) Calculate the comprehensive optical index F according to the corresponding weights of each spectral characteristic value.

[0334]

[0335] Among them, V i Represents the eigenvalue of the dimensionality reduction spectrum corresponding to the direction of the i-th principal component.

[0336] Step 4: Based on real-time optical eigenvalue-DO data, combined with spatial topological networks, water quality gradients, and cross-regional covariance, the spatial correlation of water quality parameters between different points is captured, and an optical eigenvalue-DO-COD dynamic prediction model is constructed. The COD prediction value is corrected by combining pollution source tracing and spectral characteristics, and an ensemble Kalman filter is used to assimilate multi-source data to improve model accuracy.

[0337] S41: Analyze the degradation kinetics differences of COD from different sources in step S321, introduce the pollution source weight factor β into the coupling model, and correct the COD degradation rate. The formula involved is as follows:

[0338]

[0339] Among them, m is the pollution source category number, M is the total number of pollution source categories, β m is the contribution weight of the mth type of pollution source (∑β m =1), K COD,m is the COD degradation rate constant corresponding to the pollution source.

[0340] Specifically, according to the contribution ratio of fluorescence characteristics, the weights β1 = 0.7 (domestic sewage), β2 = 0.2 (agricultural runoff), and β3 = 0.1 (industrial wastewater) are set, and the degradation rate K′ is corrected according to the pollution source weight. COD .

[0341] K′ COD =0.7×0.12day -1 +0.2×0.08day -1 +0.1×0.05day -1 =0.105day -1

[0342] Thus, the COD degradation rate is increased from the default value of 0.12 days -1 Adjusted to 0.105day -1 , which is closer to the actual characteristics of pollution sources.

[0343] S42: Invert the concentration of specific pollutants based on the hyperspectral characteristic bands, and dynamically correct the COD concentration based on this. The specific steps include:

[0344] S421: Based on the hyperspectral characteristic bands extracted in step 3, a partial least squares regression model (PLSR) is constructed to invert the concentration of specific pollutants. The formula involved is as follows:

[0345]

[0346] Among them, w i is the PLSR model weight coefficient, The wavelength is λ i The band reflectivity, b is the intercept term, C spec is the concentration of the pollutant obtained by inversion.

[0347] Specifically, based on the hyperspectral characteristic bands (265nm, 355nm reflectance) and laboratory calibration ammonia nitrogen concentration data (100 groups), a PLSR model was constructed to invert the ammonia nitrogen concentration:

[0348]

[0349] The model performance is: R 2 =0.89,RMSE=0.23.

[0350] S422: Calculate the correction term ΔCOD based on the laboratory-calibrated pollutant-COD conversion coefficient α. The formula involved is as follows:

[0351] ΔCOD=α·C spec

[0352] Specifically, the ammonia nitrogen-COD relationship was fitted through historical data to determine the conversion coefficient α = 1.2; the correction term ΔCOD = 1.2 × 2.1 = 2.52 mg / L was calculated.

[0353] S423: Superimpose ΔCOD on the COD concentration field output by the water quality model in step 2 to obtain the corrected COD concentration C′ COD , the formula involved is as follows:

[0354] C′ COD =C COD +ΔCOD

[0355] Specifically, the COD concentration was corrected within the inversion area (coordinates X=1200-1500 m, Y=500-800 m).

[0356] C′ COD (x,y)=C COD (x,y)+2.52×δ(x,y)

[0357] After correction, the local COD concentration increased by 12%-15%, and the consistency with the on-site sampling data was improved.

[0358] S43: Introducing a time lag factor, integrating the spatial correlation characteristics of monitoring points, analyzing the hysteresis response of optical eigenvalues ​​and DO concentration changes to COD concentration, and constructing an optical eigenvalue-DO-COD dynamic relationship model based on a collaborative modeling system (RF-LSTM) of random forest (RF) and long short-term memory network (LSTM) to achieve minute-level COD prediction. The specific steps include:

[0359] S431: Capturing the spatial correlation between water quality factors and monitoring points:

[0360] (1) Delaunay triangulation: Connect 10 sensors to generate a topological network with a maximum distance of 800 m between adjacent points;

[0361] (2) Calculate the gradient characteristics of water quality parameters between adjacent points:

[0362]

[0363] Among them, C i ,C j Respectively represent the concentration of water quality factors (DO, temperature, pH, etc.) at monitoring points i and j, and x i ,x j is the spatial coordinate of the point, and N(i) is the Delaunay adjacent point set of point i.

[0364] The average gradient at the core monitoring points was 0.15 mg / L / m.

[0365] (3) Extract the cross-region covariance matrix:

[0366]

[0367] S432: Obtain DO sensor network data and optical eigenvalues ​​F in real time through the IoT terminal and construct a dynamic input matrix.

[0368] Specifically, the data sources are as follows:

[0369] Optical characteristic value F t =0.68 (10-min average), ΔF t =0.05;

[0370] DO sensor network data: Based on the original 5 monitoring points, 5 new monitoring points are added in the water quality sensitive areas determined in step 3 to detect real-time data: DO t =5.2mg / L, ΔDO t =DO t -DO t-1 =-0.3mg / L.

[0371] Water temperature Temp t =18.5℃,pH=7.3.

[0372] Expanded matrix: X t_real =[0.68,0.05,5.2,-0.3,18.5,7.3,0.15,0.45],

[0373] S433: Introduce the data of the first τ time step to capture the lag effect, take the lag window τ = 6 (i.e. 1 hour of historical data), and expand the feature matrix as follows:

[0374]

[0375] S434: RF-LSTM collaborative modeling is used to screen key features and establish the temporal dependency of COD.

[0376] (1) Input X′ into the random forest model and output the top 5 features in terms of importance

[0377] (2) Using the sliding time window mechanism (w = 6, i.e. the sliding window length is 60 minutes), X t_selected Input LSTM model and output real-time COD prediction value C t_pred =24.7mg / L.

[0378] The predicted value was compared with the laboratory measured value, and the error was ±1.5 mg / L (95% confidence level).

[0379] S44: C t_pred As the boundary condition of the water quality model, it triggers the recalculation of the coupled model and updates the global COD distribution field. The Newton iteration method is used to accelerate the model convergence and ensure minute-level response. The formula involved is as follows:

[0380]

[0381] in, is the model operator, is the Jacobian matrix, and m is the number of iterations.

[0382] Specifically, the initial residual is accelerated by the Newton iteration method. After 3 iterations, the error converged to 0.08 mg / L. The COD concentration in the downstream area (X=2000-2200 m) was corrected from 26.1 mg / L to 24.9 mg / L, with an error reduction of 8.2%.

[0383] S45: To further improve the COD simulation accuracy, an ensemble Kalman filter is used to assimilate multi-source data to improve model accuracy. The specific steps include:

[0384] S451: By perturbing the hydrodynamic parameters (diffusion coefficient Dx / Dy), degradation rate K COD and initial concentration field, generating N = 100 model state sets Xi.

[0385] Specifically, the Dx / Dy perturbation range is set to 10%, and the perturbation interval is [2.25, 2.75]; K COD The perturbation range is set to 15%, and the interval after perturbation is [0.089, 0.121].

[0386] S452: Run the coupled model to the current moment and obtain the prediction set Xi f .

[0387] S453: Calculate the Kalman gain, involving the following formula:

[0388]

[0389] Among them, P f is the forecast error covariance matrix, is the observation operator (mapping the model grid to the sensor point), C obs is the observation error covariance.

[0390] Specifically, the calculation results Among them, the main diagonal is the weight of DO and F.

[0391] S454: Fuse the real-time DO observation value Z with the optical characteristic value F and update the state set. The formula involved is as follows:

[0392]

[0393] After the update, the collective mean COD concentration was revised from 24.7 mg / L to 23.9 mg / L.

[0394] S455: Take The mean of is used as the optimal estimate and fed back to the coupling model for further calculation.

[0395] Specifically, the RMSE before assimilation was 2.8 mg / L, and after assimilation, the RMSE was 2.1 mg / L, with an improvement of 25%. The maximum error of a single point was reduced from 4.5 mg / L to 2.7 mg / L.

[0396] S46: Output the corrected COD spatiotemporal distribution map, mark the high pollution risk areas (COD>25mg / L), and generate a pollution source contribution report.

[0397] Figure 2 The structure diagram of the water quality change trend rapid prediction device based on multi-source data fusion and physical constraints provided by the embodiment of the present invention is as follows: Figure 2 As shown, the prediction device includes: a dynamic coupling modeling module 201, a sensor optimization mapping module 202, a pollution source analysis module 203, and a multi-source collaborative prediction module 204. The dynamic coupling modeling module 201 is used to obtain multi-parameter water quality data from key sites, construct a dynamic coupling model based on the hydrodynamic equation, simulate the spatiotemporal distribution characteristics of DO and COD, and identify water quality sensitive areas. The sensor optimization mapping module 202 is used to deploy low-cost sensors in sensitive areas, deploy a low-cost water quality sensor network using information entropy evaluation, spatial clustering, and multi-objective optimization algorithms, and fuse sensor data based on a spatial interpolation algorithm to generate a global distribution map of water quality. The pollution source analysis module 203 is used to analyze the principal component dimensionality reduction features of spectral data, weightedly generate a comprehensive optical pollution index, and achieve reverse tracking of pollution sources by combining it with pollution discharge data. The multi-source collaborative prediction module 204 is used to construct an RF-LSTM hybrid model to correlate optical features, water quality time series data, and point spatial correlation features, calibrate prediction deviations through pollution source tracing, and optimize COD prediction values ​​by assimilating time series data using an ensemble Kalman filter.

[0398] The device embodiments provided in the embodiments of the present invention are intended to implement the above-mentioned method embodiments. For specific processes and detailed contents, please refer to the above-mentioned method embodiments, which will not be repeated here.

[0399] Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 3As shown, the electronic device may include: a processor 301, a communications interface 302, a memory 303, and a bus 304, wherein the processor 301, the communications interface 302, and the memory 303 communicate with each other via the bus 304. The communications interface 302 may be used for information transmission in the electronic device. The processor 301 can call the logic instructions in the memory 303 to execute the following methods: constructing a hydrodynamic-water quality coupling model based on the shallow water equation and the convection-diffusion equation to simulate the spatiotemporal dynamic distribution of water quality parameters (DO, COD) under the influence of water flow dynamics; outputting water quality sensitive areas through the hydrodynamic-water quality model, deploying low-cost water quality sensors using information entropy evaluation, spatial clustering and multi-objective optimization algorithms, and calculating the global DO distribution map of the water body using spatial interpolation methods; performing principal component analysis (PCA) dimensionality reduction on the spectral information of key monitoring stations, generating a comprehensive optical pollution index through weighted attention mechanism network, and tracking pollution sources in combination with surface / outlet distribution data; constructing a dynamic prediction model based on real-time optical eigenvalues, water quality time series data and point spatial correlation characteristics, correcting the COD prediction value in combination with pollution source tracing results and spectral characteristics, and using ensemble Kalman filtering to assimilate multi-source data to improve model accuracy.

[0400] In addition, the logic instructions in the above-mentioned memory 303 can be implemented in the form of software function modules and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this, the technical solution of the present invention can be embodied as a computer software product comprising the following functions: executing a complete process such as hydrodynamic model construction, spectral data dimension reduction and weighting, dynamic prediction model training and multi-source data assimilation through instruction-driven equipment. The computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the above-mentioned method embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

[0401] On the other hand, an embodiment of the present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored, and the computer program is used by a processor to execute the operations provided by the above embodiments, such as: synchronously collecting spectral, DO, COD, temperature and pH data, constructing a hydrodynamic-water quality coupling model and simulating the spatiotemporal distribution of water quality parameters; deploying a sensor network according to the model output, and generating a global DO distribution map through spatial interpolation; performing PCA dimensionality reduction and attention mechanism weighting on the spectral data, and tracking the pollution path in combination with the pollution source distribution data; establishing an optical eigenvalue-DO-COD dynamic prediction model, and using ensemble Kalman filtering to fuse multi-source observation data to optimize the COD prediction results.

[0402] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0403] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.

[0404] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention, and equivalent changes or substitutions made on the basis of the above technical solutions fall within the scope of protection of the claims of the present invention.

Claims

1. A method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints, characterized by: The method comprises the following steps: Step 1: Synchronously collect spectral information, DO, COD, temperature and pH data at key monitoring sites, build a hydrodynamic-water quality coupling model based on the shallow water equation and convection-diffusion equation, and simulate the spatiotemporal dynamic distribution of water quality parameters under the influence of hydrodynamics. Step 2: Output water quality sensitive areas through the hydrodynamic-water quality model, combine information entropy evaluation and spatial clustering to screen sensor deployment points, implement low-cost water quality sensor network deployment through multi-objective optimization algorithm, and use spatial interpolation method to calculate the global water quality distribution map of the water body. Step 3: Synchronously collect spectral information from key monitoring stations, first use principal component analysis (PCA) to reduce the dimension, then weight the principal components through the attention mechanism network to combine the comprehensive optical pollution index; at the same time, combine the surface / sewage outlet distribution data to track the pollution source, Step 4: Based on real-time optical eigenvalue-DO data, combined with spatial topological networks, water quality gradients, and cross-regional covariance, the spatial correlation of water quality parameters between different points is captured, and an optical eigenvalue-DO-COD dynamic prediction model is constructed. The COD prediction value is corrected by combining pollution source tracing and spectral characteristics, and an ensemble Kalman filter is used to assimilate multi-source data to improve model accuracy.

2. The method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints according to claim 1 is characterized in that: Step 1 is as follows: S11: Use a sampler to collect water samples at key monitoring sites, measure water temperature, pH value and dissolved oxygen (DO) content on site, then let the water stand and take the supernatant liquid as a sample for preservation. S12: Based on the two-dimensional shallow water equation, a hydrodynamic model is constructed to simulate the flow velocity, flow direction, and water level changes of the water body. Specifically, the following control equations are included: Continuity equation: Momentum equation: Where h is the water depth; t is time; u = u(x, y, t) and v = v(x, y, t) are the components of the water velocity in the x and y directions respectively; g is the acceleration due to gravity; H is the water surface elevation, H = h + z b , z b is the riverbed elevation; τ bx , τ by are the components of the riverbed shear stress in the x and y directions, respectively, and are calculated based on the Manning formula: t bx =ρghS f Where ρ is the water density; S f is the energy slope, which is approximately equal to the water surface slope, The finite volume method is used to discretize the equations, the numerical flux is solved based on the Roe flux difference scheme, and the time integration is performed using the third-order Runge-Kutta method to ensure the stability of the solution process. S13: A water quality model is constructed based on the convection-diffusion equation to simulate the transport process and concentration changes of solutes in water. Specifically, it includes the following equations: Convection-diffusion-reaction equation: Where C is the concentration of water quality parameters; Dx and Dy are the diffusion coefficients in the x and y directions; S(C) is the external source and sink term; R(C) is the chemical / biological reaction term. DO kinetic model (Streeter-Phelps modified equation): Among them, C DO is the DO concentration; D DO is the diffusion coefficient of dissolved oxygen molecules; DO s is the saturated dissolved oxygen concentration of the water body; K a is the atmospheric reoxygenation rate; K r is the oxygen consumption rate of respiration; K d is the oxygen consumption rate of deposition, COD degradation model: R(C COD )=-K COD C COD Among them, C COD is COD concentration; K COD is the COD degradation rate constant, S14: Determine the coupling mechanism. The data transfer process includes: Hydrodynamic model → Water quality model: The hydrodynamic model outputs the velocity field u(x, y, t) as a convection term to drive the water quality model; Water quality model → hydrodynamic model: Pollutant concentration gradient is fed back through the sedimentation / re-suspension process to correct the riverbed shear stress τ bx , τ by , S15: Solve the coupled model using a partitioned iterative algorithm. The specific steps include: S151: Initialize the hydrodynamic field u0, and the hydrodynamic model calculates h, u, v and outputs them to the water quality model; S152: Fixed velocity field, solving the water quality model COD, DO water quality parameter distribution, and updating pollutant concentration; S153: Use the new concentration field to modify the source and sink terms and re-solve the hydrodynamic equations; S154: Repeat steps S151-S153 until the residual converges, that is, the relative errors of the hydrodynamic variables and pollutant concentrations in adjacent iteration steps are less than 10 -2 .

3. The method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints according to claim 2 is characterized in that: Step 2 is as follows: S21: Calculate the range of hydraulic sensitive areas and chemical sensitive areas based on the hydrodynamic model, and couple the two to generate the output water quality sensitive areas. By calculating the velocity gradient field G(x,y), the area where the G value is greater than the threshold is defined as the hydraulic sensitive area, and the corresponding weight is set to w1. By simulating the diffusion of pollutants to generate the cumulative concentration field S(x,y), the area where the S value is greater than the threshold is selected as the chemical sensitive area, and the corresponding weight is set to w2. The calculation formula is as follows: S22: Deploy low-cost water quality sensors based on the locations of water quality sensitive areas output by S21; S221: Calculate the information entropy of candidate points in the sensitive area Among them, x i is the coordinate of the i-th candidate point in the sensitive area, p k is the probability distribution of historical water quality parameters in category k, where K is the total number of discretized categories; the top N points with the highest entropy values ​​are selected to cover the area with the largest spatiotemporal variation. S222: Perform K-means clustering on the sensitive area to generate M spatial clusters; deploy one sensor in each cluster to ensure that the Voronoi Diagram covers the entire area. For each cluster C j , select points that meet the following conditions: Final output of the initial layout plan Among them, C j is the jth spatial cluster, c j It is cluster C j The center of mass, It is cluster C j The final selected sensing point, S223: Establish a multi-objective optimization algorithm and perform fine control, (1) NSGA-III algorithm configuration ①Decision variable: Define binary choice variable s i ∈{0,1} indicates whether i Deploy sensors, ②Objective function Maximize spatial coverage: Among them A i is the Thiessen polygon area of ​​sensor i, A 总 is the total area of ​​sensitive areas; Minimize costs: where c i For deployment costs; Maximize information entropy: Where H(x i ) is the information entropy of the candidate points, ③Constraints: Sensor spacing, and the coverage sensitive area ≥d min ; Covering ≥95% of sensitive areas; The candidate point must be located at the grid node in the sensitive area. (2) Optimize the process Phase 1: is the initial population and runs the NSGA-III algorithm; Stage 2: If the optimal solution f1 < 98%, merge Re-optimization; Termination conditions: S224: Automation solution output, (1) Optimal solution selection Scoring function: in Output: The type determination method is as follows: Priority calculation: (2) Effect verification and incremental optimization: Coverage gap detection: Calculate uncovered area A gap =A 总 -∑s i A i , if A gap =A 总 -∑s i A i , triggering incremental deployment, replenishing sensors in descending order of priority: S23: Collect the water quality data output by the sensor in S22 and fuse the discrete water quality data using Kriging interpolation. The specific steps include: S231: Filtering abnormal DO values ​​based on the IQR method; S232: Calculate all sensor point pairs (x i ,x i +d), the semivariance γ(d) is calculated as: Where d is the distance between sensor pairs; N(d) is the number of pairs of points with a spacing of [d, d+Δd]; z(x i ) is the point x i The estimated DO value at S233: Solve using the Kriging equations: Among them, γ ij =(‖x i -x j ‖) S24: Generate a global DO distribution map based on the solution results.

4. The method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints according to claim 3 is characterized in that: Step 3 is as follows: S31: Use water samples collected at key monitoring stations to synchronously collect three-dimensional fluorescence spectrum data, use remote sensing images to collect hyperspectral data and multispectral remote sensing data, realize multi-source spectral data collection, and perform data preprocessing. The steps of S31 are as follows: S311: Collect three-dimensional fluorescence spectral data using water samples collected at key monitoring stations to construct a spectral matrix with an excitation wavelength range of Ex = 200-500 nm and an emission wavelength range of Em = 250-600 nm; S312: Extract continuous narrow-band (5-10 nm interval) hyperspectral remote sensing features based on the HyperGlobal-450K large-scale hyperspectral image dataset; extract multispectral wide-band remote sensing data based on Landsat satellite remote sensing data, using blue / green light for detecting plankton and red / near-infrared light for characterizing algae; S313: Preprocess the collected multi-source spectral data. Specifically, the standard atmospheric correction tool is used to convert hyperspectral and multispectral data into surface reflectance, the Savitzky-Golay filtering algorithm is used to smooth and denoise the hyperspectral data, and the heterogeneous remote sensing data are unified into the same spatial coordinate system; the built-in algorithm of the instrument is used to eliminate the interference of Rayleigh scattering and Raman scattering, and remove the blank water sample signal in the three-dimensional fluorescence data; the parallel factor analysis method is used to analyze the fluorescence intensity of each sample point on the three-dimensional fluorescence spectrum. S32: Extract the spectral feature values ​​of hyperspectral data, multispectral remote sensing data and three-dimensional fluorescence spectral data respectively, use principal component analysis to reduce the dimensionality of high-dimensional spectral features, and then use attention mechanism neural network to assign weights to each spectral variable to generate a comprehensive optical index. The specific steps of S32 include: S321: Extracting spectral characteristic values ​​of hyperspectral data, multispectral remote sensing data, and three-dimensional fluorescence spectral data. (1) Extracting hyperspectral characteristic bands based on spectral differentiation method. The specific steps include: ①Use numerical difference processing on hyperspectral data to obtain the spectral line change trend, involving equations including: a. The first-order derivative reflects the slope change of the spectral curve and eliminates the illumination difference: b. The second-order derivative identifies sudden changes in spectral curvature (such as absorption peak position) and further suppresses linear background: Where R is the reflectivity, λ is the wavelength, i is the band number, Δλ is the band spacing, ②Using extreme point analysis method, the derivative zero point corresponds to the absorption peak boundary of the original spectrum, combined with correlation analysis to screen the differential features with strong discrimination, and realize the selection of DOM sensitive bands. (2) Based on multispectral remote sensing data, the Normalized Difference Water Width Index (NDWI) and the Floating Algae Index (FAI) are used to identify the characteristics of water pollutants. The specific steps include: a. Crop the pre-processed remote sensing image data to the study area to remove cloud interference; b. Calculate NDWI and FAI separately, involving the following formulas: NDWI calculation formula: FAI calculation formula: FAI=R NIR -R′ NIR Among them, R Green 、R Red 、R NIR 、R SWIR is the reflectivity of the green light band, red light band, near infrared band, and short-wave infrared band, R' NIR is a linear estimate based on the red and SWIR bands, λ Red ,λ NIR ,λ SWIR is the wavelength of the red light band, near infrared band, and short-wave infrared band, NDWI normalizes the reflectance difference between the green and near-infrared (NIR) bands to highlight water information and suppress vegetation and soil interference. The NDWI value can reflect the degree of water pollution. FAI suppresses water background noise and enhances the sensitivity of floating algae signal detection through linear fitting and residual calculation of the red, near-infrared (NIR), and short-wave infrared (SWIR) bands. The high or low FAI value quantifies the algal biomass. (3) Using three-dimensional fluorescence spectroscopy to obtain a spectral matrix of specific excitation and emission wavelengths, the source of COD pollution can be distinguished. The specific steps include: a. Calculate the fluorescence intensity matrix of the water sample within the excitation wavelength range of Ex = 200-500nm and the emission wavelength range of Em = 250-600nm. Combined with the established pollutant fluorescence fingerprint library, identify the characteristic peak positions corresponding to typical pollutants: Humic substance-like peak (Ex = 250-280 nm, Em = 380-480 nm); protein-like peak (Ex = 220-230 nm, Em = 320-350 nm); humic acid-like peak (Ex = 320-350, Em = 420-480); b. Calculate the fluorescence index (FI), humification index (HIX), and biological index (BIX) from the fluorescence matrix data for optical feature fusion. The specific calculation formulas include: FI calculation formula: HIX calculation formula: BIX calculation formula: Among them, I λ represents the fluorescence intensity value at the emission wavelength of λnm, c. Determine the main pollution source category based on the Mahalanobis distance between the real-time fluorescence index (FI, HIX, BIX) and the historical pattern; S322: Using principal component analysis and attention mechanism neural network, the spectral feature values ​​are reduced in dimension and weighted to generate a comprehensive optical index. The specific steps include: (1) In order to eliminate the dimensional differences between different optical characteristics (reflectance, index value, fluorescence intensity), all spectral characteristic values ​​S are standardized. The formula involved includes: (2) Use principal component analysis to reduce the dimensionality of the spectral eigenvalues. The specific steps include: a. Calculate the covariance matrix ∑ of the high-dimensional feature matrix X X , Among them, X T represents the transpose of matrix X, n is the number of samples, b. Covariance matrix ∑ X Perform eigenvalue decomposition to obtain eigenvalues ​​and eigenvectors. c. Select the first k principal components V(V1, V2, ..., V k ), generate low-dimensional features, (3) The attention mechanism neural network weighting assigns weights to the spectral feature values. The attention weight calculation formula is as follows: Among them, α i is the weight corresponding to each spectral eigenvalue; Sim is the weight coefficient of different spectral eigenvalues; i, j are the i-th and j-th spectral eigenvalues; L is the number of spectral eigenvalues, (4) Calculate the comprehensive optical index F according to the corresponding weights of each spectral characteristic value, Among them, V i Represents the eigenvalue of the dimensionality reduction spectrum corresponding to the direction of the i-th principal component.

5. The method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints according to claim 4 is characterized in that: Step 4 is as follows: S41: Analyze the degradation kinetics differences of COD from different sources in step S321, introduce the pollution source weight factor β into the coupling model, and correct the COD degradation rate. The formula involved is as follows: Among them, m is the pollution source category number, M is the total number of pollution source categories, β m is the contribution weight of the mth type of pollution source (∑β m =1), K COD,m is the COD degradation rate constant corresponding to the pollution source, S42: Invert the concentration of specific pollutants by combining the hyperspectral characteristic bands, and dynamically correct the COD concentration based on this. The specific steps include: S421: Based on the hyperspectral characteristic bands extracted in step 4, a partial least squares regression model (PLSR) is constructed to invert the concentration of specific pollutants. The formula involved is as follows: Among them, w i is the PLSR model weight coefficient, The wavelength is λ i The band reflectivity, b is the intercept term, C spec is the concentration of the pollutant obtained by inversion, S422: Calculate the correction term ΔCOD based on the laboratory-calibrated pollutant-COD conversion coefficient α. The formula involved is as follows: ΔCOD=α·C spec S423: Superimpose ΔCOD on the COD concentration field output by the water quality model in step 2 to obtain the corrected COD concentration C′ COD , the formula involved is as follows: C′ COD =C COD +ΔCOD S43: Introducing a time lag factor, integrating the spatial correlation characteristics of monitoring points, analyzing the hysteresis response of optical eigenvalues ​​and DO concentration changes to COD concentration, and constructing an optical eigenvalue-DO-COD dynamic relationship model based on a collaborative modeling system (RF-LSTM) of random forest (RF) and long short-term memory network (LSTM) to achieve minute-level COD prediction. The specific steps include: S431: Capturing the spatial correlation between water quality factors and monitoring points: (1) Construct a topological map of monitoring points and establish the connection relationship between adjacent points based on Delaunay triangulation; (2) Calculate the gradient characteristics of water quality parameters between adjacent points: Among them, C i ,C j Respectively represent the concentration of water quality factors (DO, temperature, pH, etc.) at monitoring points i and j, and x i ,x j is the spatial coordinate of the point, N(i) is the Delaunay adjacent point set of point i, (3) Extract the cross-region covariance matrix: Σ cross =cov(C core ,C sensor ) Among them, C core is the water quality parameter of the key monitoring point in step 1, C sensor The sensor point data for step 2, S432: Obtain DO sensor network data and optical eigenvalues ​​F in real time through the IoT terminal to construct a dynamic input matrix X t_real =[F t ,ΔF t ,DO t ,ΔDO t ,Temp t ,pH t ,G adj (x i ),Σ cross ], S433: Introduce the data of the first τ time step to capture the lag effect and obtain the characteristic matrix with lag factor S434: RF-LSTM collaborative modeling is used to screen key features and establish spatiotemporal dependencies of COD. (1) Random forest feature screening: defining spatial weight factors: Among them, ‖x i -x j ‖ is the Euclidean distance between points i and j, Expand the matrix X t ′ Input the random forest model for importance screening and extract the top K key variables to form the subset X t_selected , (2) Using a sliding time window (length w), X t_selected Input LSTM model and output real-time COD prediction value C t_pred , S44: C t_pred As the boundary condition of the water quality model, the coupled model recalculation is triggered, and the Newton iteration method is introduced to accelerate the model convergence to ensure minute-level response. The formula involved is as follows: in, is the model operator, is the Jacobian matrix, m is the number of iterations, S45: To further improve the COD simulation accuracy, an ensemble Kalman filter is used to assimilate multi-source data. The specific steps include: S451: By perturbing the hydrodynamic parameters (diffusion coefficient Dx / y), degradation rate K COD and initial concentration field, generating N=100 model state sets Xi, S452: Run the coupled model to the current moment and obtain the prediction set Xi f , S453: Calculate the Kalman gain, involving the following formula: Among them, P f is the forecast error covariance matrix, is the observation operator (mapping the model grid to the sensor point), C obs is the observation error covariance, S454: Fuse the real-time DO observation concentration Z and the optical characteristic value F to update the state set. The formula involved is as follows: S455: Take The mean of is taken as the optimal estimation state and fed back to the coupling model to continue the calculation. S46: Output the corrected COD spatiotemporal distribution map, mark the high pollution risk areas, and generate a pollution source contribution report.

6. A device for rapidly predicting water quality trends based on multi-source data fusion and physical constraints, comprising: Dynamic coupling modeling module, which obtains parameters such as DO, COD, temperature and pH data of key sites, builds a coupling model based on the hydrodynamic equation, simulates the spatiotemporal dynamic distribution of DO and COD, and identifies water quality sensitive areas; The sensor optimization mapping module deploys low-cost DO sensors according to sensitive areas, uses information entropy evaluation, spatial clustering and multi-objective optimization algorithms to deploy low-cost DO sensor networks, and combines Kriging interpolation to fuse discrete monitoring data to reconstruct high-resolution water quality distribution maps; The pollution source analysis module generates a comprehensive optical pollution index based on the principal component dimension reduction and weighting of spectral data, and combines it with surface pollution data to track pollution sources. The multi-source collaborative prediction module integrates optical eigenvalues, water quality time series data and point spatial correlation features, constructs an RF-LSTM hybrid model to predict COD concentration, introduces an ensemble Kalman filter to assimilate multi-source observation data, dynamically corrects the predicted value and outputs a pollution risk map.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a method for rapidly predicting water quality change trends based on multi-source data fusion and physical constraints as described in any one of claims 1 to 5 above is implemented.

8. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by the processor, the method for rapid prediction of water quality change trends based on multi-source data fusion and physical constraints as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Multi-topological-node hyperspectral water quality parameter joint inversion method and related equipment

    CN116754499A

  • Hyperspectral water quality parameter estimation method of LBFGS optimization acceleration multilayer sensing network

    CN118552851A

  • Pollution traceability system and method based on water quality and water quantity monitoring and analysis of drainage system

    CN119959494A

  • Method and system for optical and microwave synergistic retrieval of aboveground biomass

    US20200225075A1

  • In-line early warning system of water contamination with organic matter

    US20240248040A1

Cited By

  • Intelligent regulation and control method and system for sewage treatment and program product

    CN120781306A

  • Hydraulic pump station dynamic cooling method based on intelligent algorithm

    CN120946559A

  • Aquaculture environment analysis method based on image analysis

    CN121030137A

  • Image analysis-based aquaculture environment analysis method

    CN121030137B

  • Water pollution traceability and emergency decision linkage method and system

    CN121090489A