Collaborative simulation method of multiple water quality indicators based on physical information deep neural network
Through the multi-water quality index collaborative simulation method based on physical information deep neural network, the accuracy and computational complexity problems of traditional water quality simulation models in the coordinated relationship processing of multi-water quality indexes are solved, and high-precision and low-cost water quality simulation and prediction are achieved.
Patent Information
- Application Number
- CN202510818717.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-06-18
AI Technical Summary
The existing water quality simulation model has problems such as low accuracy, complex calculations and slow real-time response when dealing with the synergistic relationship of multiple water quality indicators, and deep learning methods fail to effectively consider physical laws and data heterogeneity.
The collaborative simulation method of multi-water quality index based on physical information deep neural network is adopted. By building a multi-source database, combining the loss function of physical laws and deep learning model, the collaborative simulation of multi-output water quality index is realized. The Crossformer or PatchTST model is used and the deep SHAP method is introduced to analyze key driver factors.
It improves the accuracy and comprehensiveness of multi-water quality indicator simulation, reduces the computational complexity, enhances the accuracy and applicability of water quality prediction, and is suitable for a variety of water environments.
Smart Images

Figure CN120338615B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of water quality monitoring and water body management, and specifically relates to a collaborative simulation method of multiple water quality indicators based on a physical information deep neural network. Background Art
[0002] Water quality monitoring and early warning are crucial for ecological protection and water resource management. However, water quality is influenced by multiple factors, including meteorology and hydrology, making accurate simulation and prediction a challenge. Traditional physicochemical or statistical models for water quality simulation rely on mathematical formulas and assumptions, simplifying conditions and ignoring the complex nonlinear interactions of water quality indicators. These models have low practical accuracy, especially in complex aquatic ecosystems. They are computationally complex and slow to respond to real-time data. With the rise of deep learning, its water quality prediction models rely on multi-layer networks to automatically learn data feature patterns, resulting in strong fitting capabilities and outperforming traditional models in processing large data sets and high-dimensional input variables.
[0003] However, existing deep learning water quality prediction methods often focus on a single indicator, ignoring the synergistic relationships among multiple water quality indicators and failing to model their complex dependencies. Furthermore, deep learning methods face challenges such as high data heterogeneity, difficulty in model training, and insufficient constraints imposed by physical laws.
[0004] Based on this, the present invention proposes a collaborative simulation method of multiple water quality indicators based on physical information deep neural network to solve the shortcomings of existing water quality collaborative simulation, improve the comprehensiveness and accuracy of prediction, reduce computing 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 collaborative simulation method for multiple water quality indicators based on a physical information deep neural network. This method is direct and easy to use. By deeply integrating physical mechanisms and deep learning, it can achieve high-precision and low-computational cost water quality simulation and ensure the physical consistency of multi-indicator predictions.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] The multi-water quality index collaborative simulation method based on physical information deep neural network includes the following steps:
[0008] S1. Determine the water quality indicators that need to be collaboratively simulated, integrate historical water quality data, meteorological data, and hydrological data, and build a multi-source database for multi-water quality indicator system simulation;
[0009] S2. Select a deep learning model suitable for multiple output water quality indicators. Combined with the migration and transformation rules of water quality simulation indicators, construct a physical information loss function to guide parameter learning, and complete the construction of a physical information deep neural network for multi-indicator water quality collaborative simulation.
[0010] The specific process of step S2 is:
[0011] S21. Multi-output model architecture: Select the Crossformer model or PatchTST model that can support multiple input features and multiple output target water quality indicators as the basic model;
[0012] S22. Construct a loss function and introduce physical constraints: Based on the migration and transformation laws of water quality simulation indicators, a loss constraint based on physical laws is introduced on top of the loss function. The loss function is the mean square error or mean absolute error, and the calculation formula is: , ,in, is the physical information loss function; It is a loss function with multiple indicators output; It is the indicator coordination constraint; i is the order identifier of the indicator; n is the number of indicators; For the i The loss function of a fully data-driven deep learning model with metric; For the i Gradual change constraints on indicators; For the i Consistency constraints of indicators; 、 、 Both are weights of physical loss items;
[0013] S23. Based on the architecture of the selected basic model, a model framework is constructed, and the constructed physical information loss function is combined with the model framework to form a complete physical information deep neural network for multi-indicator water quality collaborative simulation, and the physical information deep neural network is used as the water quality collaborative simulation model;
[0014] S3. Using 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;
[0015] 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, improve the simulation effect by adjusting the network structure and optimizing the hyperparameters until the water quality collaborative simulation model meets the simulation accuracy requirements;
[0016] S5. Based on the optimized water quality collaborative simulation model, a deep learning model interpretation method is used to analyze the key driving factors of the coordinated changes of multiple water quality indicators and complete the multi-indicator water quality collaborative simulation;
[0017] The specific process of step S5 is:
[0018] S51. After completing the optimization of the water quality collaborative simulation model, the DeepSHAP method is introduced into the optimized Crossformer model or PatchTST model to calculate the SHAP value of the simulation results of the collaborative changes of multiple water quality indicators for each input feature;
[0019] S52. Based on the size and distribution of SHAP values calculated by the DeepSHAP method, key driving factors are identified and analyzed. Then, variable importance ranking diagrams and feature impact trend diagrams are drawn to visualize the results and complete the multi-indicator water quality collaborative simulation.
[0020] Preferably, in step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen and chlorophyll a concentration.
[0021] Preferably, the specific process of step S1 is:
[0022] S11. Determine the water quality indicators that require collaborative simulation based on research objectives and actual needs;
[0023] S12. Collect and integrate multi-source data, including historical water quality data, meteorological data, and hydrological data;
[0024] S13, processing outliers on the collected monitoring data, and then using the Kalman filter method to improve the accuracy of the state estimation by fusing the measurement value and the state estimation, and completing the missing value filling;
[0025] S14. Store and manage data to obtain a multi-source database.
[0026] Preferably, in step S13, the abnormal value processing includes removing non-numeric data and removing duplicate data; wherein, non-numeric data includes characters and null values, and removing duplicate data is removing data with duplicate timestamps.
[0027] Preferably, in step S13, the Kalman filtering method includes establishing a state space model to describe the concentration change process, setting the covariance matrix of process noise and observation noise, and realizing dynamic interpolation of missing values through a prediction-update cycle.
[0028] Preferably, the specific process of step S3 is:
[0029] S31. Cross-validation: Use 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, one of the subsets is selected as the validation set, and the remaining k-1 subsets are used as the training set. The training and validation process is repeated k times.
[0030] S32. In each round of training, the water quality collaborative simulation model is trained using the training set. The parameters of the water quality collaborative simulation model are continuously adjusted through the optimization algorithm, so that the physical information loss function gradually decreases. As the training progresses, the model continuously learns the characteristics and laws in the data, and the parameters are gradually optimized. After the optimization meets the requirements, the training is stopped. Among them, the optimization algorithm adopts stochastic gradient descent or adaptive moment estimation.
[0031] Preferably, the specific process of step S4 is:
[0032] 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; the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient;
[0033] S42, comparing the calculated evaluation index value with the pre-set performance standard to determine whether the accuracy of the water quality collaborative simulation model meets the requirements;
[0034] 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.
[0035] Preferably, the specific process of step S43 is: according to the problems in the evaluation results, the water quality collaborative simulation model is adjusted 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 to select the optimal hyperparameter combination.
[0036] After adopting the above technical solution, the present invention has the following beneficial effects: the collaborative simulation method of multiple water quality indicators based on the physical information deep neural network of the present invention is direct and easy to use. In the data quality control stage, the impact of abnormal data on the model construction and accuracy assessment process is reduced by identifying outliers and interpolating missing values; in the model construction stage, by combining the physical information loss function with the deep learning model, the simulation accuracy of the changes in multiple water quality indicators is significantly improved. Compared with traditional numerical models based on physical processes, 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 relationship between each water quality indicator, thereby enhancing the comprehensiveness and accuracy of water quality prediction. In addition, the method is easy to operate, applicable to a variety of water environments, and has broad application prospects and practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] like Figure 1 As shown in FIG, the collaborative simulation method of multiple water quality indicators based on physical information deep neural network includes the following steps:
[0040] S1. Determine the water quality indicators that need to be collaboratively simulated, integrate historical water quality data, meteorological data, and hydrological data, and build a multi-source database for multi-water quality indicator system simulation;
[0041] In step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen and chlorophyll a concentration;
[0042] The specific process of step S1 is:
[0043] S11. Determine the water quality indicators that require collaborative simulation based on research objectives and actual needs;
[0044] S12. Collect and integrate multi-source data, including historical water quality data, meteorological data, and hydrological data;
[0045] S13, processing outliers on the collected monitoring data, and then using the Kalman filter method to improve the accuracy of the state estimation by fusing the measurement value and the state estimation, and completing the missing value filling;
[0046] In step S13, the abnormal value processing includes removing non-numeric data and removing duplicate data; wherein, non-numeric data includes characters and null values, and removing duplicate data means removing data with duplicate timestamps;
[0047] In step S13, the Kalman filter method includes establishing a state space model to describe the concentration change process, setting the covariance matrix of process noise and observation noise, and realizing dynamic interpolation of missing values through a prediction-update cycle;
[0048] S14, store and manage data, and obtain a multi-source database;
[0049] S2. Select a deep learning model suitable for multiple output water quality indicators. Combined with the migration and transformation rules of water quality simulation indicators, construct a physical information loss function to guide parameter learning, and complete the construction of a physical information deep neural network for multi-indicator water quality collaborative simulation.
[0050] The specific process of step S2 is:
[0051] S21. Multi-output model architecture: Select the Crossformer model or PatchTST model that can support multiple input features and multiple output target water quality indicators as the basic model;
[0052] S22. Construct a loss function and introduce physical constraints: Based on the migration and transformation laws of water quality simulation indicators, a loss constraint based on physical laws is introduced on top of the loss function. The loss function is the mean square error or mean absolute error, and the calculation formula is: , ,in, is the physical information loss function; It is a loss function with multiple indicators output; It is the indicator coordination constraint; i is the order identifier of the indicator; n is the number of indicators; For the i The loss function of a fully data-driven deep learning model with metric; For the i Gradual change constraints on indicators; For the i Consistency constraints of indicators; 、 、 Both are weights of physical loss items;
[0053] S23. Based on the architecture of the selected basic model, a model framework is constructed, and the constructed physical information loss function is combined with the model framework to form a complete physical information deep neural network for multi-indicator water quality collaborative simulation, and the physical information deep neural network is used as the water quality collaborative simulation model;
[0054] S3. Using 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;
[0055] The specific process of step S3 is:
[0056] S31. Cross-validation: Use 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, one of the subsets is selected as the validation set, and the remaining k-1 subsets are used as the training set. The training and validation process is repeated k times.
[0057] S32. In each round of training, the water quality collaborative simulation model is trained using the training set. The parameters of the water quality collaborative simulation model are continuously adjusted through the optimization algorithm so that the physical information loss function is gradually reduced. As the training progresses, the model continuously learns the characteristics and patterns in the data, and the parameters are gradually optimized. After the optimization meets the requirements, the training is stopped. The optimization algorithm adopts stochastic gradient descent or adaptive moment estimation.
[0058] 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, improve the simulation effect by adjusting the network structure and optimizing the hyperparameters until the water quality collaborative simulation model meets the simulation accuracy requirements;
[0059] The specific process of step S4 is:
[0060] 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; the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient;
[0061] S42, comparing the calculated evaluation index value with the pre-set performance standard to determine whether the accuracy of the water quality collaborative simulation model meets the requirements;
[0062] 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;
[0063] The specific process of step S43 is as follows: according to the problems in the evaluation results, the water quality collaborative simulation model is adjusted 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 range of hyperparameter values to select the optimal hyperparameter combination;
[0064] S5. Based on the optimized water quality collaborative simulation model, a deep learning model interpretation method is used to analyze the key driving factors of the coordinated changes of multiple water quality indicators and complete the multi-indicator water quality collaborative simulation;
[0065] The specific process of step S5 is:
[0066] S51. After completing the optimization of the water quality collaborative simulation model, the DeepSHAP method is introduced into the optimized Crossformer model or PatchTST model to calculate the SHAP value of the simulation results of the collaborative changes of multiple water quality indicators for each input feature;
[0067] S52. Based on the size and distribution of SHAP values calculated by the DeepSHAP method, key driving factors are identified and analyzed. Then, variable importance ranking diagrams and feature impact trend diagrams are drawn to visualize the results and complete the multi-indicator water quality collaborative simulation.
[0068] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A collaborative simulation method of multiple water quality indicators based on physical information deep neural network, characterized by: The following steps are involved: S1. Determine the water quality indicators that need to be collaboratively simulated, integrate historical water quality data, meteorological data, and hydrological data, and build a multi-source database for multi-water quality indicator system simulation; S2. Select a deep learning model suitable for multiple output water quality indicators. Combined with the migration and transformation rules of water quality simulation indicators, construct a physical information loss function to guide parameter learning, and complete the construction of a physical information deep neural network for multi-indicator water quality collaborative simulation. The specific process of step S2 is: S21. Multi-output model architecture: Select the Crossformer model or PatchTST model that can support multiple input features and multiple output target water quality indicators as the basic model; S22. Construct a loss function and introduce physical constraints: Based on the migration and transformation laws of water quality simulation indicators, a loss constraint based on physical laws is introduced on top of the loss function. The loss function is the mean square error or mean absolute error, and the calculation formula is: , ,in, is the physical information loss function; It is a loss function with multiple indicators output; It is the indicator coordination constraint; i is the order identifier of the indicator; n is the number of indicators; For the i The loss function of a fully data-driven deep learning model with metric; For the i Gradual change constraints on indicators; For the i Consistency constraints of indicators; 、 、 Both are weights of physical loss items; S23. Based on the architecture of the selected basic model, a model framework is constructed, and the constructed physical information loss function is combined with the model framework to form a complete physical information deep neural network for multi-indicator water quality collaborative simulation, and the physical information deep neural network is used as the water quality collaborative simulation model; S3. Using 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, improve the simulation effect by adjusting the network structure and optimizing the hyperparameters until the water quality collaborative simulation model meets the simulation accuracy requirements; S5. Based on the optimized water quality collaborative simulation model, a deep learning model interpretation method is used to analyze the key driving factors of the coordinated changes of multiple water quality indicators and complete the multi-indicator water quality collaborative simulation; The specific process of step S5 is: S51. After completing the optimization of the water quality collaborative simulation model, the DeepSHAP method is introduced into the optimized Crossformer model or PatchTST model to calculate the SHAP value of the simulation results of the collaborative changes of multiple water quality indicators for each input feature; S52. Based on the size and distribution of SHAP values calculated by the DeepSHAP method, key driving factors are identified and analyzed. Then, variable importance ranking diagrams and feature impact trend diagrams are drawn to visualize the results and complete the multi-indicator water quality collaborative simulation.
2. The method for collaborative simulation of multiple water quality indicators based on a physical information deep neural network according to claim 1, characterized in that: In step S1, the water quality indicators include dissolved oxygen, permanganate index, ammonia nitrogen, total phosphorus, total nitrogen and chlorophyll a concentration.
3. The multi-water quality index collaborative simulation method based on physical information deep neural network according to claim 1 is characterized in that: The specific process of step S1 is: S11. Determine the water quality indicators that require collaborative simulation based on research objectives and actual needs; S12. Collect and integrate multi-source data, including historical water quality data, meteorological data, and hydrological data; S13, processing outliers on the collected monitoring data, and then using the Kalman filter method to improve the accuracy of the state estimation by fusing the measurement value and the state estimation, and completing the missing value filling; S14. Store and manage data to obtain a multi-source database.
4. The method for collaborative simulation of multiple water quality indicators based on a physical information deep neural network according to claim 3, characterized in that: In step S13, the abnormal value processing includes removing non-numeric data and removing duplicate data; wherein, non-numeric data includes characters and null values, and removing duplicate data is removing data with duplicate timestamps.
5. The method for collaborative simulation of multiple water quality indicators based on a physical information deep neural network according to claim 3, characterized in that: In step S13, the Kalman filter method includes establishing a state space model to describe the concentration change process, setting the covariance matrix of process noise and observation noise, and realizing dynamic interpolation of missing values through a prediction-update cycle.
6. The method for collaborative simulation of multiple water quality indicators based on a physical information deep neural network according to claim 1, characterized in that: The specific process of step S3 is: S31. Cross-validation: Use 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, one of the subsets is selected as the validation set, and the remaining k-1 subsets are used as the training set. The training and validation process is repeated k times. S32. In each round of training, the water quality collaborative simulation model is trained using the training set. The parameters of the water quality collaborative simulation model are continuously adjusted through the optimization algorithm, so that the physical information loss function gradually decreases. As the training progresses, the model continuously learns the characteristics and laws in the data, and the parameters are gradually optimized. After the optimization meets the requirements, the training is stopped. Among them, the optimization algorithm adopts stochastic gradient descent or adaptive moment estimation.
7. The method for collaborative simulation of multiple water quality indicators based on a physical information deep neural network according to claim 1, characterized in that: The specific process of step S4 is: 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; the evaluation indicators include root mean square error, mean absolute error, correlation coefficient, and Nash efficiency coefficient; S42, comparing the calculated evaluation index value with the pre-set performance standard 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.
8. The method for collaborative simulation of multiple water quality indicators based on physical information deep neural network according to claim 7, characterized in that: The specific process of step S43 is: according to the problems in the evaluation results, the water quality collaborative simulation model is adjusted 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 range of hyperparameter values to 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
Cited By
Industrial wastewater abnormal discharge identification method based on multi-parameter collaborative analysis
CN121980460A