Method for predicting and evaluating influence of reservoir construction on water quality

By combining the ECOLab model and fully connected neural network with the SVDD algorithm, the problem of predicting the impact of reservoir construction on water quality was solved, achieving high efficiency and accuracy in water quality prediction models and providing a basis for water quality assessment.

CN120974387AInactive Publication Date: 2025-11-18SHANDONG PROVINCIAL COAL GEOLOGICAL PLANNING EXPLORATION & RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511492842.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-20
Publication Date
2025-11-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively predict the impact of reservoir construction on water quality, leading to serious problems of environmental degradation and water quality deterioration.

Method used

A water quality model was constructed using the ECOLab model, anomaly detection was performed using the SVDD data classification algorithm, and a water quality prediction model based on a fully connected neural network was established. The prediction accuracy was improved by training and optimizing the model.

Benefits of technology

It improves the detection efficiency and accuracy of water quality prediction models, avoids model overfitting, can more accurately describe the true state of water quality, and provides a reference for water quality prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974387A_ABST
    Figure CN120974387A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of prediction, and particularly relates to a method for predicting and evaluating the influence of reservoir construction on water quality, which performs anomaly detection on output water quality index data through an SVDD data classification algorithm so as to remove abnormal water quality index data, thereby being beneficial to improving the detection efficiency and accuracy of a water quality prediction model and improving the water quality prediction accuracy. And the water quality prediction model is established based on the full-connection neural network, so that the nonlinear learning ability of the traditional neural network can be improved, the precision of fitting prediction can be improved, the over-fitting of the model can be well avoided, the real state of the water quality in the spatial dimension can be more accurately described, and a reference basis can be provided for better predicting the water quality.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of prediction, in particular to a method for predicting and evaluating the influence of reservoir construction on water quality. BACKGROUND

[0003] The coastal zone is the part of the ocean where land and sea meet, and the exchange of matter and information is frequent. It is the front line of human contact and development of the ocean, and is one of the regions with the highest productivity. In particular, human activities such as reservoir construction will gradually destroy the natural conditions, so that the environment is facing long-term, multi-type, different degree of additional pressure, and the environmental quality is significantly decreased, and the water quality is deteriorated, and the problems are becoming more and more serious.

[0004] Therefore, based on the known monitoring point data, the water quality of other positions is predicted to determine the influence of reservoir construction on water quality. SUMMARY

[0005] In order to solve the technical problems in the background art, the present application provides a method for predicting and evaluating the influence of reservoir construction on water quality, which helps to predict the water quality of other positions by known monitoring points, so as to determine the influence of reservoir construction on water quality.

[0006] In a first aspect, the present application provides a method for predicting and evaluating the influence of reservoir construction on water quality, comprising the following steps: Step one, collecting the basic information of the target reservoir, wherein the basic information includes geographic information and hydro-meteorological information; Step two, constructing a water quality model by using an ECOLab model to output water quality index data; Step three, performing anomaly detection on the output water quality index data by using an SVDD data classification algorithm to remove abnormal water quality index data; Step four, establishing a water quality prediction model based on a full connection neural network and training the water quality prediction model to obtain a trained water quality prediction model; Step five, using the trained water quality prediction model to predict the water quality index data to obtain a prediction result.

[0007] Further, the water quality model comprises: Dissolved phase water quality index data basic equation: ; Wherein, is the dissolved phase water quality mass concentration, unit: mg / L; is the transformation amount of the sediment phase to the dissolved phase under desorption, unit: mg; is the transformation amount of the dissolved phase to the sediment phase, unit: mg; is the conversion amount from the dissolved phase to the biological phase under the biological uptake effect; is the conversion amount from the biological phase to the dissolved phase under the biological death effect, in mg; B) Basic equation of water quality index data of the sediment phase: ; wherein, is the conversion amount from the biological phase to the sediment phase under the biological death and sedimentation effect, in mg; is the water quality mass concentration of the sediment phase after conversion, in mg / L; is the material loss amount caused by various chemical reactions, in mg; C) Basic equation of water quality index data of the biological phase: ; wherein, is the water quality mass concentration of the biological phase, in mg / L.

[0008] Further, the step three comprises: A: For each sample set of water quality data, denoted as wherein, is any sample in the set, is another sample in the set different from ; B: Determine the expression of Mahalanobis distance:

[0009] ; ; wherein, is the Mahalanobis distance between the vector and the vector ; S is the covariance matrix between the two vectors; C: Use the Parzen-window algorithm to obtain the relative density of the sample in the sample set, whose formula is as follows: ; ; wherein, is the dimension of the input data, is the weight; D: Based on the relative density , optimize the objective function to obtain the following formula: ; ; 1; wherein, a Lagrange multiplier; C is a penalty factor for deviating from the hypersphere data object; E: in between 0 and , the distance of the sample to the center of the hypersphere is calculated;

[0010] wherein, is a kernel function satisfying Mercer's theorem; is a sample different from ; and F: judging the relationship between the calculated distance and the radius R of the hypersphere, if greater than the radius R, the sample is determined as an outlier, otherwise, it is determined as a normal value.

[0011] Further, the step four comprises: A: arranging the removed abnormal water quality index data into a standard format, importing pandas by using python, importing the file by pandas, obtaining the original water quality index data, and dividing the original water quality index data into a test set and a training set; B: determining the basic parameters of the full connection neural network; C: converting the divided training set and test set into tensor data by the torch.tensor method in Python, and batch loading the training set converted into tensor by the DataLoader function, so as to iteratively optimize the full connection neural network, thereby constructing a full connection neural network water quality prediction model.

[0012] Further, the iteratively optimizing the full connection neural network comprises: calculating the fitting degree of the output result of the full connection neural network water quality prediction model and the monitoring value ; Then, the model prediction ability is analyzed by cross-validation result, the training set and test set data are changed, and the training is performed again, and the calculated value of the set iteration number is summed and averaged, and the average value is obtained, and the applicability of the full connection neural network water quality prediction model is analyzed.

[0013] Further, the fitting degree The calculation formula is as follows: ; Wherein, are actual value and predicted value respectively, are standard deviation of actual value and predicted value respectively, is the number of data points, is the number of independent variables, is the number of dependent variables.

[0014] In the second aspect, the present application provides a computer readable storage medium, the computer readable storage medium comprises a stored program, when the program runs, the computer readable storage medium controls the power equipment where the computer readable storage medium is located to execute the reservoir construction influence prediction and evaluation method of water quality described above.

[0015] The beneficial effects of the present application are that the present application performs anomaly detection on the output water quality index data through the SVDD data classification algorithm to remove abnormal water quality index data, which helps to improve the detection efficiency and accuracy of the water quality prediction model, and the water quality prediction model is established based on the full connection neural network, which can increase the nonlinear learning ability of the traditional neural network, improve the fitting and prediction accuracy, well avoid the overfitting of the model, and more accurately describe the real state of the water quality in the spatial dimension, so as to provide a reference basis for better prediction of water quality. BRIEF DESCRIPTION OF DRAWINGS

[0016] The drawings constituting a part of the specification of the present application are used to provide further understanding of the present application, the illustrative embodiments of the present application and the description thereof are used to explain the present application, and do not constitute improper limitation on the present application.

[0017] Figure 1 A reservoir construction influence prediction and evaluation method flow chart of the present application; Figure 2 A structure diagram of the SVDD algorithm of the present application. DETAILED DESCRIPTION

[0018] The present application will be further described below in combination with the drawings and embodiments.

[0019] It should be pointed out that the following detailed description is exemplary, and is intended to provide further description of the present application. Unless otherwise specified, each technical and scientific term used in the present embodiment has the same meaning as that generally understood by those skilled in the art to which the present application belongs.

[0020] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0021] In this invention, terms such as "upper," "lower," "left," "right," "front," "back," "vertical," "horizontal," "side," and "bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used only to facilitate the description of the structural relationships of the various components or elements of this invention and do not specifically refer to any component or element in this invention. They should not be construed as limiting the invention.

[0022] In this invention, terms such as "fixed connection," "connected," and "linked" should be interpreted broadly, indicating a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can determine the specific meaning of these terms in this invention based on the specific circumstances, and they should not be construed as limitations on the invention.

[0023] Example 1: like Figure 1 As shown in the figure, this embodiment proposes a method for predicting and assessing the impact of reservoir construction on water quality, including the following steps: S1: Collect basic data on the target reservoir.

[0024] Specifically, the basic data includes geographical data, hydrological and meteorological data, etc.

[0025] The geographic data includes reservoir location and topographic data, which uses refined elevation data and can be measured by an unmanned surface vessel measurement system equipped with a positioning system coordinate measuring machine (RTK) and an underwater topographic flow field measurement system Doppler current profiler (ADCP).

[0026] S2: Use the ECOLab model to build a water quality model and output water quality index data; Water quality models can be used for water quality simulation, water quality prediction, water environment impact assessment, water environment remediation, and water environment planning. They can also be used to describe the interactions and transformation processes of various substances in aquatic ecosystems. This particular water quality model considers the degradation, diffusion, and migration of pollutants in water bodies and includes fundamental equations for water quality migration and transformation, as well as descriptive equations for adsorption processes.

[0027] The water quality index data of the embodiment includes: chemical oxygen demand (COD), dissolved oxygen (DO), ammonia nitrogen (NH3-N), chlorophyll a (Chla), total phosphorus (TP), and total nitrogen (TN), and discharge of domestic sewage and industrial wastewater, wherein COD, DO, NH3-N, TP, and TN are dissolved phase, carbon, nitrogen, and phosphorus in sediment are sediment phase, and Chla is biological phase.

[0028] The basic equation of each water quality index data in the water quality model is as follows: A) Basic equation of dissolved phase water quality index data: ; Wherein, is the dissolved phase water quality mass concentration, and the unit is mg / L; is the conversion amount of the sediment phase to the dissolved phase under desorption, and the unit is mg; is the conversion amount of the dissolved phase to the sediment phase, and the unit is mg; is the conversion amount of the dissolved phase to the biological phase under biological intake; is the conversion amount of the biological phase to the dissolved phase under biological death, and the unit is mg; N1 is the material loss amount caused by various chemical reactions, and the unit is mg.

[0029] B) Basic equation of sediment phase water quality index data: ; Wherein, is the conversion amount of the biological phase to the sediment phase under biological death and sedimentation, and the unit is mg; is the converted sediment phase water quality mass concentration, and the unit is mg / L; is the material loss amount caused by various chemical reactions, and the unit is mg.

[0030] C) Basic equation of biological phase water quality index data: ; Wherein, is the biological phase water quality mass concentration, mg / L.

[0031] S3: Perform anomaly detection on the output water quality index data by the SVDD data classification algorithm to remove abnormal water quality index data.

[0032] Wherein, SVDD as a common data classification algorithm, its core idea is through the mapping target data to high-dimensional feature space, and then find a hypersphere, can maximize the inclusion of target data. The hypersphere with a as the center, R as the radius, in the process of continuous optimization of the hypersphere, to the structural risk as the goal, to realize the classification of unknown data as the purpose. The sample points in the hypersphere are target class, and the sample points outside the hypersphere are non-target class, then the structure diagram of SVDD algorithm is shown in Figure 2 .

[0033] Specifically includes the following steps: S3-1: for each water quality data sample set is recorded as , wherein, is any sample in the set, is another sample in the set different from . S3-2: determine the expression of Mahalanobis distance:

[0034] Wherein, ; . Wherein, is the Mahalanobis distance between the vector and the vector . S is the covariance matrix between two vectors.

[0035] S3-3: using Parzen-window algorithm to obtain the relative density of sample in the sample set, the formula is as follows: ; . Wherein, is the input data dimension, is the weight. S3-4: based on the relative density , the objective function is optimized to obtain the following formula: . . 1. Wherein, is the Lagrange multiplier; C is the penalty factor for the data object deviating from the hypersphere.

[0036] S3-5: in ​when 0 < d < R

[0037] wherein, K(x, x') satisfies Mercer's theorem; is a kernel function satisfying Mercer's theorem; is a sample different from

[0038] S3-6: judging the relationship between the calculated distance d and the radius R of the hypersphere, if greater than the radius R, the sample is determined as an outlier, otherwise, it is determined as a normal value.

[0039] S4: establishing a water quality prediction model based on a fully connected neural network and training the water quality prediction model to obtain a trained water quality prediction model; Specifically, the following steps are included: A: dividing data; First, the abnormal water quality index data is arranged into a standard format, pandas is imported by using python, the file is imported by using pandas, and the original water quality index data is obtained; and the water quality index data is divided according to the characteristics, and the water quality index data of each characteristic is divided into a test set and a training set; C: model definition; Specifically, the basic parameters of the fully connected neural network are determined; the basic parameters include: activation function, number of neurons, number of network layers, learning rate, training times, optimizer, etc.; wherein, the Relu function is used as the activation function of the fully connected neural network water quality prediction model; the root mean square error is used as the loss function; the Adam is used as the optimizer for training the model; the training of the fully connected neural network water quality prediction model adopts double-layer circulation, and the batch-size of the inner loop is set to 2; the outer loop of the network epoch-num is 2000.

[0040] The fully connected neural network water quality prediction model uses the ReLu function as the activation function, sets the number of nodes of each hidden layer for the Linear function, and introduces the Dropout to prevent the phenomenon of model overfitting, so that the final output value is a one-dimensional numerical value.

[0041] D: training data; The divided training set and test set are converted into tensor data by using the torch.tensor method in Python.

[0042] ​​​​​​The training set converted into a tensor is loaded in batches by the DataLoader function, and the batch size is set to 2; since the beginning and end of each sample are used as input for the training model, the input feature value is 2; The input feature value and the number of hidden layers are used as parameters to the model, and the returned model instance is used to train the model. The model is iteratively optimized according to the set number of iterations.

[0043] The iterative optimization according to the set number of iterations includes: Calculating the goodness of fit of the model's predicted output (predicted value) and the monitoring value (true value) (i.e., the degree of agreement between the predicted value and the true value); The model's prediction ability is analyzed by cross-validation results, i.e., changing the training set and test set data, and training again. This process is repeated for the set number of iterations to obtain the value, which is summed and averaged. The average value is used to analyze the applicability of the fully connected neural network water quality prediction model. The calculation formula is as follows: ; where, are the actual value and the predicted value, respectively, are the standard deviations of the actual value and the predicted value, respectively, is the number of data points, is the number of independent variables, is the number of dependent variables.

[0044] For example, as shown in Table 1 below, the goodness of fit of the model training: Table 1 Goodness of fit of model training

[0045] As can be seen, whether it is total phosphorus or total nitrogen, the goodness of fit obtained by the fully connected neural network water quality prediction model is , except for a few , the goodness of fit of the others is more than 0.5. The closer the absolute value of the goodness of fit is to 1, the stronger the fitting between the true value and the predicted value, and the more accurate and stable the water quality prediction model is.

[0046] S5: Using the trained water quality prediction model to predict water quality index data to obtain prediction results.

[0047] Example 2: ​The embodiment provides a computer readable storage medium, which comprises a stored program, wherein when the program is executed, the computer readable storage medium controls a power equipment to execute the method for predicting and evaluating the influence of reservoir construction on water quality.

[0048] In the specification, identical or similar parts between the embodiments can be mutually referred to. Especially, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts can be referred to the description in the method embodiment.

[0049] In several embodiments provided in the present application, it should be understood that the disclosed system and method can be implemented in other ways. For example, the system embodiment described above is only illustrative, for example, the division of the units is only a logical function division, and in actual implementation, another division mode can be used, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or systems shown or discussed can be indirect coupling or communication connection through some interfaces, and can be electrical, mechanical or other forms.

[0050] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0051] In addition, it should be noted that the flowchart in the drawing shows the method of the embodiment of the present disclosure, and in the flowchart or block diagram in the drawing, the operations or steps corresponding to different blocks can also occur in an order different from that disclosed in the description. Sometimes, there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed in parallel, and sometimes in reverse order, which can depend on the functions involved. Each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be realized by a special hardware-based system for executing the specified functions or actions, or can be realized by a combination of special hardware and computer instructions.

[0052] The above only describes the preferred embodiments of the present application and is not used to limit the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for predicting and assessing the impact of reservoir construction on water quality, characterized in that, Includes the following steps: Step 1: Collect basic data on the target reservoir, including geographical data and hydrological and meteorological data; Step 2: Use the ECOLab model to build a water quality model to output water quality index data; Step 3: Use the SVDD data classification algorithm to perform anomaly detection on the output water quality index data in order to remove abnormal water quality index data; Step 4: Establish a water quality prediction model based on a fully connected neural network and train the water quality prediction model to obtain a trained water quality prediction model. Step 5: Use the trained water quality prediction model to predict the water quality index data to obtain the prediction results.

2. The method for predicting and assessing the impact of reservoir construction on water quality according to claim 1, characterized in that, The water quality model includes: Basic equations for dissolved phase water quality index data: ; in, This refers to the mass concentration of dissolved phase water, expressed in mg / L. The amount of sediment phase converted to dissolved phase under desorption is expressed in mg. The amount of dissolved phase converted to sediment phase is expressed in mg. This represents the amount of soluble phase transformed into biological phase under biological uptake. N1 represents the amount of material lost due to various chemical reactions, in mg, representing the amount of biological phase transformed into dissolved phase during biological death. B) Basic equations for sediment phase water quality index data: ; in, The amount of biota transformed into sedimentary facies due to biological death and sedimentation is expressed in mg. The concentration of sediment water quality after conversion is expressed in mg / L. This represents the amount of substance lost due to various chemical reactions, expressed in mg. C) Basic equations for biological phase water quality index data: ; in, The concentration of biological phase water quality is expressed in mg / L.

3. The method for predicting and assessing the impact of reservoir construction on water quality according to claim 1, characterized in that, Step three includes: A: The sample set for each water quality data is denoted as... ,in, For any sample in the set, For sets that are different Another sample; B: Determine the expression for Mahalanobis distance: ; ; in, For vectors with vector Mahalanobis distance between them; S Let covariance be the matrix between the two vectors; C: Use the Parzen-window algorithm to obtain samples from the sample set. relative density The formula is as follows: ; ; in, For the input data dimensions, As weight; D: Based on relative density Optimize the objective function to obtain the following formula: ; ; 1; in, Lagrange multipliers; C This is a penalty factor for data objects that deviate from the hypersphere. E: In In 0 and Between, calculate samples Distance to the center of the sphere ; in, A kernel function that satisfies Mercer's theorem; For different ; F: Determine the calculated distance The relationship with the hypersphere radius R: if it is greater than the radius R, then the sample... If a value is found to be abnormal, it is considered an abnormal value; otherwise, it is considered a normal value.

4. The method for predicting and assessing the impact of reservoir construction on water quality according to claim 1, characterized in that, Step four includes: A: The abnormal water quality index data is organized into a standardized format, imported into pandas using Python, and the original water quality index data is obtained by importing the file into pandas. The original water quality index data is then divided into test set and training set. B: Determine the basic parameters of the fully connected neural network; C: The divided training and test sets are converted into tensor data using the torch.tensor method in Python. The converted training sets are then loaded in batches using the DataLoader function to iteratively optimize the fully connected neural network, thereby constructing a fully connected neural network water quality prediction model.

5. The method for predicting and assessing the impact of reservoir construction on water quality according to claim 4, characterized in that, The iterative optimization of the fully connected neural network includes: Calculate the goodness of fit between the output of the fully connected neural network water quality prediction model and the monitoring values. ; The model's predictive ability is then analyzed using cross-validation results. By changing the training and test set data, the model is trained again, and this process is repeated to calculate the desired number of iterations. The values ​​are summed and the mean is calculated. The applicability of the fully connected neural network water quality prediction model is then analyzed based on the mean.

6. The method for predicting and assessing the impact of reservoir construction on water quality according to claim 5, characterized in that, in, The degree of fit The calculation formula is as follows: ; in, These are the actual value and the predicted value, respectively. These are the standard deviations of the actual value and the predicted value, respectively. The number of data points, The number of independent variables, This represents the number of dependent variables.

7. A computer-readable storage medium comprising a stored program, characterized in that, When the program is running, it controls the power equipment located on the computer-readable storage medium to execute the water quality prediction and assessment method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Lake and reservoir algae density prediction method and device based on machine learning

    CN117633633A

  • Method and device for predicting water quality of lake reservoir and medium

    CN118709854A