Multi-water quality index collaborative simulation method based on physical information deep neural network
Through the collaborative simulation method of multi-water quality index based on physical information deep neural network, the problem of low accuracy and complex calculation in complex water body systems is solved, and high-precision and low-cost water quality simulation is achieved, which is suitable for a variety of water body environments.
Patent Information
- Application Number
- CN202510818717.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-18
AI Technical Summary
The existing water quality simulation model has low accuracy in complex water ecosystems, ignores the synergistic relationship of multiple water quality indicators, is complex in calculations and slow response, and deep learning methods face high data heterogeneity, difficult model training, and insufficient physical law constraints.
The collaborative simulation method of multi-water quality indicators based on physical information deep neural network is adopted. By integrating multi-source data, building multi-output models and introducing loss functions of physical constraints, and combining deep learning for model training and optimization, we realize collaborative simulation of multi-water quality indicators.
It improves the accuracy and comprehensiveness of water quality simulation, reduces calculation costs, is suitable for a variety of water environments, and has a wide range of application prospects.
Smart Images

Figure CN120338615A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water quality monitoring and water body management, and particularly relates to a multi-water quality index collaborative simulation method based on a physics-informed deep neural network. Background Technique
[0002] Water quality monitoring and early warning are crucial for ecological protection and water resource management. However, water quality is affected by multiple factors such as meteorology and hydrology, making accurate simulation and prediction a challenge. Traditional physical-chemical or statistical models for water quality simulation rely on mathematical formulas and assumptions. Simplifying conditions leads to neglecting the complex non-linear interactions of water quality indicators, resulting in low accuracy in practical applications, especially in complex water body ecosystems, and they are computationally complex and slow to respond to real-time data. With the rise of deep learning, its water quality prediction models can automatically learn data feature patterns through multi-layer networks, have strong fitting capabilities, and perform better than traditional models in dealing with big data and high-dimensional input variables.
[0003] However, existing deep learning water quality predictions mostly target single indicators, ignoring the collaborative relationships among multi-water quality indicators and not modeling their complex dependencies. Moreover, deep learning methods face problems such as high data heterogeneity, difficult model training, and insufficient physical law constraints.
[0004] Based on this, the present invention proposes a multi-water quality index collaborative simulation method based on a physics-informed deep neural network to address the deficiencies in existing water quality collaborative simulations, improve the comprehensiveness and accuracy of predictions, reduce computational costs, and provide strong technical support for water quality monitoring and environmental management. Summary of the Invention
[0005] To solve the above problems, the present invention proposes a multi-water quality index collaborative simulation method based on a physics-informed deep neural network. This method is directly applicable and easy to use. By deeply integrating physical mechanisms and deep learning, it realizes high-precision and low-computational-cost water quality simulation and ensures the physical consistency of multi-index predictions.
[0006] To achieve the above objectives, the present invention adopts the following technical solutions: A multi-water quality index collaborative simulation method based on a physics-informed deep neural network, comprising the following steps: S1. Determine the water quality indicators to be collaboratively simulated, integrate historical water quality data, meteorological data, and hydrological data, and construct a multi-source database for multi-water quality index system simulation; S2. Select a deep learning model suitable for multi-output water quality indicators, combine the migration and transformation laws of water quality simulation indicators, construct a physics-informed loss function for guiding parameter learning, and complete the construction of a physics-informed deep neural network for multi-index water quality collaborative simulation; The specific process of step S2 is as follows: S21. Multi-output model architecture: Select the Crossformer model or PatchTST model that can support multi-input features and multi-output target water quality indicators as the basic model; S22. Construct the loss function and introduce physical constraints: Combine the migration and transformation laws of water quality simulation indicators, and introduce a loss constraint term based on physical laws on top of the loss function; among them, the loss function is the mean square error or mean absolute error, and the calculation formula is: , , where is the physical information loss function; is the loss function for multi-index output; is the index synergy constraint; i is the order identifier of the index; n is the number of indicators; is the i th loss function of the fully data-driven deep learning model for the th indicator; i is the gradual change constraint for the th indicator; i is the consistency constraint for the , , are all weights of the physical loss term; S23. According to the architecture of the selected basic model, build a model framework, combine the constructed physical information loss function with the model framework to form a complete physical information deep neural network for multi-index water quality collaborative simulation, and use the physical information deep neural network as the water quality collaborative simulation model; S3. Use the k-fold cross-validation method to train the water quality collaborative simulation model and complete the parameter learning of the water quality collaborative simulation model; S4. Select evaluation indicators to evaluate the simulation effect of the water quality collaborative simulation model. If the simulation accuracy does not meet the requirements, adjust the network structure and optimize the hyperparameters to improve the simulation effect until the water quality collaborative simulation model meets the simulation accuracy requirements; S5. Based on the optimized water quality collaborative simulation model, use the deep learning model interpretation method to analyze the key driving factors for the collaborative change of multi-water quality indicators and complete the multi-index water quality collaborative simulation; The specific process of step S5 is: S51. After completing the optimization of the water quality collaborative simulation model, introduce the DeepSHAP method into the optimized Crossformer model or PatchTST model to calculate the SHAP values of each input feature for the simulation results of the collaborative change of multi-water quality indicators; S52. Identify the key driving factors based on the magnitude and distribution of the SHAP values calculated by the DeepSHAP method, analyze them, and then draw a variable importance ranking graph and a feature impact trend graph for result visualization to complete the multi-index water quality collaborative simulation.
[0007] Preferably, in step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen, and chlorophyll a concentration.
[0008] Preferably, the specific process of step S1 is as follows: S11. Determine the water quality indicators to be collaboratively simulated according to the research objectives and actual needs; S12. Collect and integrate multi-source data, including water quality historical data, meteorological data, and hydrological data; S13. Process the outliers in the collected monitoring data, and then use the Kalman filtering method to improve the accuracy of the state estimation by fusing the measurement values and the state estimation to complete the missing value filling; S14. Store and manage the data to obtain a multi-source database.
[0009] Preferably, in step S13, the outlier processing includes removing non-numerical data and duplicate data; among them, non-numerical data includes characters and null values, and removing duplicate data is to remove the data with duplicate timestamps.
[0010] Preferably, in step S13, the Kalman filtering method includes establishing a state space model to describe the concentration change process, setting the covariance matrices of the process noise and the observation noise, and realizing the dynamic interpolation of the missing values through the prediction-update cycle.
[0011] Preferably, the specific process of step S3 is as follows: S31. Cross-validation: Adopt the K-fold cross-validation method to divide the multi-source data in the multi-source database into k subsets of equal size. In each training process, select one subset as the validation set and the remaining k - 1 subsets as the training set, and repeat the training and validation process k times; S32. In each round of training, use the training set to train the water quality collaborative simulation model, and continuously adjust the parameters of the water quality collaborative simulation model through the optimization algorithm to gradually reduce the physical information loss function. As the training progresses, the model continuously learns the features and laws in the data, and the parameters are gradually optimized. After the optimization meets the requirements, stop the training; among them, the optimization algorithm adopts stochastic gradient descent or adaptive moment estimation.
[0012] Preferably, the specific process of step S4 is as follows: S41. Select a variety of representative evaluation indicators for quantitative evaluation to reflect the performance of the water quality collaborative simulation model in the collaborative prediction of multiple water quality indicators. Among them, the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient. S42. Compare the calculated evaluation indicator values with the pre-set performance standards to determine whether the accuracy of the water quality collaborative simulation model meets the requirements. S43. If the simulation accuracy of the water quality collaborative simulation model does not meet the requirements, adjust the structure and hyperparameters of the water quality collaborative simulation model to improve the simulation effect.
[0013] Preferably, the specific process of step S43 is as follows: According to the problems in the evaluation results, adjust the water quality collaborative simulation model by adjusting the network structure, adjusting hyperparameters, or searching and adjusting. Adjusting the network structure includes adjusting the depth, adjusting the width, or replacing the attention mechanism. Adjusting hyperparameters includes adjusting the learning rate, adjusting the batch size, and adjusting the Dropout rate. Searching and adjusting includes using grid search or random search to traverse or randomly sample within the value range of hyperparameters and select the optimal hyperparameter combination.
[0014] After adopting the above technical solution, the present invention has the following beneficial effects: The multi-water quality index collaborative simulation method based on the physics-informed deep neural network of the present invention is directly easy to use. In the data quality control stage, through outlier identification and missing value imputation, the impact of abnormal data on the model construction and accuracy evaluation process is reduced. In the model construction stage, by combining the physics-informed loss function with the deep learning model, the simulation accuracy of the multi-water quality index change is significantly improved. Compared with the traditional physics-based numerical model, this method has lower computational complexity, effectively reduces the computational cost, and by realizing the collaborative simulation of multiple water quality indicators, it can simultaneously consider the mutual relationship between each water quality indicator, thereby enhancing the comprehensiveness and accuracy of water quality prediction. In addition, this method is easy to operate, applicable to a variety of water body environments, and has broad application prospects and practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0016] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0017] As Figure 1 shown, the multi-water quality index collaborative simulation method based on the physics-informed deep neural network includes the following steps: S1. Determine the water quality indicators for which co-simulation is required, integrate historical water quality data, meteorological data, and hydrological data, and construct a multi-source database for multi-water quality indicator system simulation; In step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen, and chlorophyll a concentration; The specific process of step S1 is as follows: S11. According to the research objectives and actual needs, determine the water quality indicators that need to be co-simulated; S12. Collect and integrate multi-source data, where the multi-source data includes historical water quality data, meteorological data, and hydrological data; S13. Process the outliers in the collected monitoring data, and then use the Kalman filtering method to improve the accuracy of state estimation by fusing measurement values and state estimates to complete the filling of missing values; In step S13, the outlier processing includes removing non-numerical data and duplicate data; among them, non-numerical data includes characters and null values, and removing duplicate data is to remove data with repeated timestamps; In step S13, the Kalman filtering method includes establishing a state space model to describe the concentration change process, setting the covariance matrices of process noise and observation noise, and realizing the dynamic interpolation of missing values through a prediction-update cycle; S14. Store and manage the data to obtain a multi-source database; S2. Select a deep learning model suitable for multi-output water quality indicators, combine the migration and transformation laws of water quality simulation indicators, construct a physical information loss function for guiding parameter learning, and complete the construction of a physical information deep neural network for multi-indicator water quality co-simulation; The specific process of step S2 is as follows: S21. Multi-output model architecture: Select the Crossformer model or PatchTST model that can support multi-input features and multi-output target water quality indicators as the basic model; S22. Construct a loss function and introduce physical constraints: Combine the migration and transformation laws of water quality simulation indicators, and introduce a loss constraint term based on physical laws on top of the loss function; among them, the loss function is the mean square error or the mean absolute error, and the calculation formula is: , , where, is the physical information loss function; is the loss function for multi-indicator output; is the indicator co-synergy constraint; i is the order identifier of the indicator; n is the number of indicators; is the i loss function of the fully data-driven deep learning model for the is the gradual change constraint for the i th index; is the consistency constraint for the i th index; , , are all the weights of the physical loss terms; S23. According to the architecture of the selected basic model, build a model framework, combine the constructed physical information loss function with the model framework to form a complete physical information deep neural network for multi-index water quality collaborative simulation, and use the physical information deep neural network as the water quality collaborative simulation model; S3. Adopt the k-fold cross-validation method to train the water quality collaborative simulation model and complete the parameter learning of the water quality collaborative simulation model; The specific process of step S3 is as follows: S31. Cross-validation: Adopt the K-fold cross-validation method to divide the multi-source data in the multi-source database into k subsets of equal size. In each training process, select one of the subsets as the validation set and the remaining k - 1 subsets as the training set, and repeat the training and validation process k times; S32. In each round of training, use the training set to train the water quality collaborative simulation model, continuously adjust the parameters of the water quality collaborative simulation model through the optimization algorithm, so that the physical information loss function gradually decreases. As the training progresses, the model continuously learns the features and laws in the data, and the parameters are gradually optimized. After optimizing to meet the requirements, stop the training; among them, the optimization algorithm adopts stochastic gradient descent or adaptive moment estimation; S4. Select evaluation indicators to evaluate the simulation effect of the water quality collaborative simulation model. If the simulation accuracy does not meet the requirements, adjust the network structure and optimize the hyperparameters to improve the simulation effect until the water quality collaborative simulation model meets the simulation accuracy requirements; The specific process of step S4 is as follows: S41. Select a variety of representative evaluation indicators for quantitative evaluation to reflect the performance of the water quality collaborative simulation model in the collaborative prediction of multi-water quality indicators; among them, the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient; S42. Compare the calculated evaluation indicator values with the pre-set performance standards to judge whether the accuracy of the water quality collaborative simulation model meets the requirements; S43. If the simulation accuracy of the water quality collaborative simulation model does not meet the requirements, adjust the structure and hyperparameters of the water quality collaborative simulation model to improve the simulation effect; The specific process of step S43 is as follows: According to the problems in the evaluation results, adjust the water quality collaborative simulation model by adjusting the network structure, adjusting hyperparameters, or searching for adjustments; adjusting the network structure includes adjusting the depth, adjusting the width, or replacing the attention mechanism; adjusting hyperparameters includes adjusting the learning rate, adjusting the batch size, and adjusting the Dropout rate; searching for adjustments includes using grid search or random search to traverse or randomly sample within the value range of hyperparameters and select the optimal hyperparameter combination; S5. Based on the optimized water quality collaborative simulation model, use the deep learning model interpretation method to analyze the key driving factors of the co-variation of multiple water quality indicators and complete the multi-index water quality collaborative simulation; The specific process of step S5 is as follows: S51. After completing the optimization of the water quality collaborative simulation model, introduce the DeepSHAP method into the optimized Crossformer model or PatchTST model to calculate the SHAP values of each input feature for the simulation results of the co-variation of multiple water quality indicators; S52. According to the magnitude and distribution of the SHAP values calculated by the DeepSHAP method, identify and analyze the key driving factors, and then draw a variable importance ranking diagram and a feature influence trend diagram for result visualization to complete the multi-index water quality collaborative simulation.
[0018] As mentioned above, only the preferred specific embodiments of the present invention are described, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A collaborative simulation method for multiple water quality indicators based on a physics-informed deep neural network, characterized in that, It includes the following steps: S1. Determine the water quality indicators to be co - simulated, integrate the historical water quality data, meteorological data, and hydrological data, and construct a multi - source database for multi - water quality indicator system simulation; S2. Select a deep - learning model suitable for multi - output water quality indicators, combine with the migration and transformation laws of water quality simulation indicators, construct a physical - information loss function for guiding parameter learning, and complete the construction of a physical - information deep neural network for multi - indicator water quality co - simulation; The specific process of step S2 is as follows: S21. Multi - output model architecture: Select the Crossformer model or PatchTST model that can support multi - input features and multi - output target water quality indicators as the basic model; S22. Construct a loss function and introduce physical constraints: Combining the migration and transformation laws of water quality simulation indicators, a loss constraint term based on physical laws is introduced on top of the loss function. Among them, the loss function is the mean square error or the mean absolute error, and the calculation formula is: , , where is the physical information loss function; is the loss function for multi-index output; is the index synergy constraint; i is the order identifier of the index; n is the number of indices; is the i -th loss function of the fully data-driven deep learning model for the -th index; i is the gradual change constraint for the -th index; i is the consistency constraint for the , , are all weights of the physical loss term. S23. According to the architecture of the selected basic model, build a model framework, combine the constructed physical - information loss function with the model framework to form a complete physical - information deep neural network for multi - indicator water quality co - simulation, and use the physical - information deep neural network as the water quality co - simulation model; S3. Use the k - fold cross - validation method to train the water quality co - simulation model and complete the parameter learning of the water quality co - simulation model; S4. Select evaluation indicators to evaluate the simulation effect of the water quality co - simulation model. If the simulation accuracy does not meet the requirements, adjust the network structure and optimize the hyperparameters to improve the simulation effect until the water quality co - simulation model meets the simulation accuracy requirements; S5. Based on the optimized water quality co - simulation model, use the deep - learning model interpretation method to analyze the key driving factors of the co - variation of multi - water quality indicators and complete the multi - indicator water quality co - simulation; The specific process of step S5 is as follows: S51. After completing the optimization of the water quality co - simulation model, introduce the DeepSHAP method into the optimized Crossformer model or PatchTST model to calculate the SHAP values of each input feature for the simulation results of the co - variation of multi - water quality indicators; S52. According to the magnitude and distribution of the SHAP values calculated by the DeepSHAP method, identify and analyze the key driving factors, and then draw a variable importance ranking diagram and a feature influence trend diagram for result visualization to complete the multi - indicator water quality co - simulation.
2. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 1, wherein: In step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen, and chlorophyll a concentration.
3. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 1, characterized in that The specific process of step S1 is as follows: S11. According to the research objectives and actual needs, determine the water quality indicators to be co - simulated; S12. Collect and integrate multi - source data, where the multi - source data includes historical water quality data, meteorological data, and hydrological data; S13. Process the outliers in the collected monitoring data, and then use the Kalman filtering method to improve the accuracy of state estimation by fusing the measured values and state estimates to complete the missing value filling; S14. Store and manage the data to obtain a multi - source database.
4. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 3, wherein: In step S13, the outlier processing includes removing non - numerical data and duplicate data; among them, non - numerical data includes characters and null values, and removing duplicate data is to remove the data with repeated timestamps.
5. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 3, characterized in that: In step S13, the Kalman filtering method includes establishing a state space model to describe the concentration change process, setting the covariance matrices of the process noise and the observation noise, and realizing the dynamic interpolation of missing values through a prediction-update loop.
6. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 1, wherein The specific process of step S3 is as follows: S31. Cross-validation: Adopt the K-fold cross-validation method to divide the multi-source data in the multi-source database into k subsets of equal size. In each training process, select one subset as the validation set and the remaining k - 1 subsets as the training set, and repeat the training and validation process k times; S32. In each round of training, use the training set to train the water quality collaborative simulation model, and continuously adjust the parameters of the water quality collaborative simulation model through an optimization algorithm, so that the physical information loss function gradually decreases. As the training progresses, the model continuously learns the features and rules in the data, and the parameters are gradually optimized. After the optimization meets the requirements, stop the training; among them, the optimization algorithm adopts stochastic gradient descent or adaptive moment estimation.
7. The collaborative simulation method for multiple water quality indicators based on a physics-informed deep neural network according to claim 1, characterized in that The specific process of step S4 is as follows: S41. Select a variety of representative evaluation indicators for quantitative evaluation to reflect the performance of the water quality collaborative simulation model in the collaborative prediction of multiple water quality indicators; among them, the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient; S42. Compare the calculated evaluation indicator values with the pre-set performance standards to judge whether the accuracy of the water quality collaborative simulation model meets the requirements; S43. If the simulation accuracy of the water quality collaborative simulation model does not meet the requirements, adjust the structure and hyperparameters of the water quality collaborative simulation model to improve the simulation effect.
8. The collaborative simulation method for multiple water quality indicators based on the physics-informed deep neural network according to claim 7, wherein The specific process of step S43 is as follows: According to the problems in the evaluation results, adjust the water quality collaborative simulation model by adjusting the network structure, adjusting the hyperparameters, or searching and adjusting; adjusting the network structure includes adjusting the depth, adjusting the width, or replacing the attention mechanism; adjusting the hyperparameters includes adjusting the learning rate, adjusting the batch size, and adjusting the Dropout rate; searching and adjusting includes using grid search or random search to traverse or randomly sample within the value range of the hyperparameters, and select the optimal hyperparameter combination.
Citation Information
Patent Citations
Water quality prediction method of deep learning model based on physical law and process driving
CN113379029A
Water quality prediction method and system based on multi-source data fusion and deep learning
CN113723703A
Medium and long term runoff integration probability prediction method based on deep learning
CN119760557A
Physical information neural network underground water motion simulation method based on logarithmic annealing
CN119808631A
Lake and reservoir nutritive salt concentration simulation method based on coupling mechanism model and deep learning
CN119962408A
Cited By
Lake and reservoir water quality intelligent forecasting method and system based on physical constraint guidance and medium
CN121561614A