Nutrient flux simulation method and related device based on residual prediction

By combining the mechanism-driven model SWAT and the data-driven model LSTM, the nutrient flux residual sequence is predicted, which solves the problem of insufficient accuracy on the basin scale of the traditional water quality simulation model, and achieves higher precision nutrient flux prediction.

CN118446115BActive Publication Date: 2024-11-12DALIAN UNIV OF TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410674735.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-11-12
Estimated Expiration
2044-05-27

AI Technical Summary

Technical Problem

Traditional water quality simulation models are difficult to accurately characterize the changes in nutrient flux at the basin scale, especially in the multi-underlay landscape, where simulation uncertainty and error exist, while data-driven models have overfitting and lack of physical mechanisms. question.

Method used

Using a residual prediction method, combined with the mechanism-driven model SWAT and the data-driven model LSTM, the simulation value is compensated by predicting the residual sequence of nutrient flux to improve the accuracy of the nutrient flux sequence.

Benefits of technology

The accuracy of nutrient flux simulation is significantly improved, and compared with the use of mechanism-driven or data-driven models alone, combining the advantages of both, it can more accurately predict runoff and nutrient flux values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118446115B_ABST
    Figure CN118446115B_ABST
Patent Text Reader

Abstract

The present invention discloses a nutrient flux simulation method and related devices based on residual prediction, which relate to the field of water environment simulation and management technology, and include the following steps: first predicting a relatively accurate simulated runoff sequence and a simulated nutrient flux sequence according to an input data sequence by using a mechanism-driven model SWAT, and then predicting the runoff residual and the nutrient flux residual by using a data-driven model LSTM, and based on the predicted residual sequence, compensating the sequence predicted by the mechanism-driven model to obtain a more accurate nutrient flux sequence. Compared with the traditional technology that only uses a mechanism-driven model or a data-driven model to predict runoff and nutrient flux, the present invention combines the above-mentioned scheme of the mechanism-driven model SWAT and the data-driven model LSTM, and can more accurately predict the runoff and nutrient flux values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of water environment simulation and management, and in particular to a nutrient flux simulation method based on residual prediction and a related device. Background Art

[0002] Economic and social development has led to an increase in the discharge of nutrients such as nitrogen and phosphorus from traditional industrial enterprises, agriculture, aquaculture and urban life. After entering rivers, they have led to ecological and environmental problems such as water quality deterioration and eutrophication, which has restricted the coordinated and sustainable development of the economy, society and the ecological environment. Accurately describing the flux changes of nutrients in the process of terrestrial output and river evolution is a prerequisite for diagnosing water environment problems and carrying out pollution control.

[0003] The water quality mechanism-driven model can mathematically express the migration and transformation of nutrients over time and space, and is considered to be one of the most effective tools for describing flux changes. Typical representative models include AGNPS, HSPF, and SWAT. This type of mechanism-driven model is usually based on the description of small-scale microscopic processes. When applied to large watershed scales, there are general and effective assumptions about parameters and model structures, which brings uncertainty to the simulation. Especially in watersheds with multiple underlying surface landscapes and coupled effects of natural and human activities, it is difficult for traditional mechanism-driven models to fully and truly describe the macroscopic process mechanism affected by multiple complex driving forces, and there is often a certain error between the simulated value and the real value. With the development of information technology, data-driven models (such as LSTM, SVR, and BP) can effectively establish the influence path between multiple complex driving forces and nutrient fluxes by identifying the hidden patterns of historical data; however, data-driven models also have problems such as overfitting, weak generalization ability, and lack of physical mechanisms.

[0004] Therefore, how to improve and enhance the simulation accuracy of nutrient flux at the watershed scale is a technical problem that needs to be urgently solved in this field. Summary of the invention

[0005] The purpose of the present invention is to provide a nutrient flux simulation method and related devices based on residual prediction, which can significantly improve the accuracy of nutrient flux sequence simulation by predicting a simulated nutrient flux sequence through a mechanism-driven model and compensating it by predicting a predicted nutrient flux residual sequence using an LSTM model.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] In one aspect, the present invention provides a method for simulating nutrient flux based on residual prediction, comprising the following steps:

[0008] Obtain an input data sequence set; the input data sequence set includes a river basin meteorological data sequence, a river basin reservoir discharge data sequence, and a river basin pollution source data sequence.

[0009] The basin's meteorological data sequence and reservoir discharge data sequence are input into the basin mechanism-driven model to obtain the basin's simulated runoff sequence; the basin mechanism-driven model is a SWAT mechanism-driven model calibrated based on the basin's spatial data, meteorological data sequence, reservoir discharge data sequence, pollution source data and observation data sequence.

[0010] The simulated runoff series and pollution source data of the basin are input into the basin mechanism-driven model to obtain the simulated nutrient flux series of the basin.

[0011] The meteorological data sequence and reservoir discharge data sequence of the basin are input into the runoff residual prediction model to obtain the predicted runoff residual sequence of the basin; the runoff residual prediction model is an LSTM model trained based on the meteorological data sequence, reservoir discharge data sequence and runoff residual sequence of the basin.

[0012] The basin's meteorological data sequence, reservoir discharge data sequence, pollution source data of the basin and predicted runoff residual sequence of the basin are input into the nutrient flux residual prediction model to obtain the predicted nutrient flux residual sequence of the basin; the nutrient flux residual prediction model is an LSTM model trained based on the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and runoff residual sequence.

[0013] According to the simulated nutrient flux sequence and predicted nutrient flux residual sequence of the basin, the compensatory nutrient flux sequence of the basin is obtained.

[0014] Optionally, the observation data sequence includes an observation runoff sequence and an observation nutrient flux sequence; the watershed mechanism driven model is obtained by the following steps:

[0015] Obtain the basin's spatial data, meteorological data series, reservoir discharge data series and pollution source data.

[0016] Based on the basin's spatial data, meteorological data series, reservoir discharge data series and pollution source data, an initial basin mechanism-driven model was constructed.

[0017] Obtain the observed runoff series and observed nutrient flux series of the basin.

[0018] The observed runoff series of the basin was used to calibrate and verify the parameters of the initial basin mechanism-driven model, and the intermediate basin mechanism-driven model was obtained.

[0019] The observed nutrient flux series of the basin were used to calibrate and verify the parameters of the intermediate basin mechanism-driven model, and the basin mechanism-driven model was obtained.

[0020] Optionally, the observed runoff series of the basin is used to calibrate and verify the parameters of the initial basin mechanism-driven model to obtain the intermediate basin mechanism-driven model, which specifically includes the following steps:

[0021] The observed runoff series, meteorological data series and reservoir discharge data series of the basin are divided into the first calibration set and the first validation set.

[0022] Taking the meteorological data sequence and reservoir discharge data sequence in the first rate set as input and the observed runoff sequence in the first rate set as target output, the runoff sensitive parameters of the initial watershed mechanism driven model are optimized to obtain the runoff optimized watershed mechanism driven model.

[0023] Taking the meteorological data sequence and reservoir discharge data sequence in the first verification set as input and the observed runoff sequence in the first verification set as the target output, it is verified whether the accuracy of the runoff optimization basin mechanism driving model is greater than the preset accuracy to obtain the first judgment result.

[0024] If the first judgment result is yes, the runoff optimization watershed mechanism driving model is used as the intermediate watershed mechanism driving model.

[0025] If the first judgment result is no, jump to step: divide the observed runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a first calibration set and a first verification set.

[0026] Optionally, the observed nutrient flux sequence of the watershed is used to calibrate and verify the parameters of the intermediate watershed mechanism-driven model to obtain the watershed mechanism-driven model, which specifically includes the following steps:

[0027] Inputting the meteorological data sequence and the reservoir discharge data sequence of the basin into the intermediate basin mechanism driven model to obtain the simulated runoff sequence;

[0028] The observed nutrient flux series, simulated runoff series, meteorological data series and reservoir discharge data series of the basin are divided into the second calibration set and the second validation set.

[0029] Taking the simulated runoff series, meteorological data series and reservoir discharge data series in the second calibration set as input and the observed nutrient flux series in the second calibration set as target output, the nutrient flux sensitive parameters of the intermediate watershed mechanism driven model are optimized to obtain the nutrient flux optimized watershed mechanism driven model.

[0030] Taking the simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence in the second verification set as input and the observed nutrient flux sequence in the second verification set as target output, it is verified whether the accuracy of the nutrient flux optimization watershed mechanism driven model is greater than the preset accuracy to obtain the second judgment result.

[0031] If the second judgment result is yes, the nutrient flux optimization watershed mechanism driving model is used as the watershed mechanism driving model.

[0032] If the second judgment result is no, jump to step: divide the observed nutrient flux sequence, simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a second calibration set and a second validation set.

[0033] Optionally, the runoff residual prediction model is obtained by the following steps:

[0034] Obtain the basin's meteorological data series, reservoir discharge data series, and observed runoff series.

[0035] Taking the basin's meteorological data series and reservoir discharge data series as input, the model is driven by the basin mechanism to predict the basin's simulated runoff series.

[0036] The runoff residual sequence is determined based on the simulated runoff sequence and the observed runoff sequence.

[0037] The basin's meteorological data sequence and reservoir discharge data sequence are used as input, and the runoff residual sequence is used as the target output, and a runoff residual prediction model is trained.

[0038] Optionally, the nutrient flux residual prediction model is obtained by the following steps:

[0039] Obtain the basin's meteorological data series, reservoir discharge data series, pollution source data, observed runoff series, and observed nutrient flux series.

[0040] Taking the basin's meteorological data series and reservoir discharge data series as input, the model is driven by the basin mechanism to predict the basin's simulated runoff series.

[0041] The pollution source data and simulated runoff series of the basin are used as input, and the model is driven by the basin mechanism to predict the simulated nutrient flux series of the basin.

[0042] The nutrient flux residual sequence is determined based on the simulated nutrient flux sequence and the observed nutrient flux sequence.

[0043] The meteorological data sequence of the basin and the reservoir discharge data sequence are input into the runoff residual prediction model to obtain the predicted runoff residual sequence of the basin.

[0044] The basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence are used as input, and the nutrient flux residual sequence is used as the target output to train a nutrient flux residual prediction model.

[0045] Optionally, before taking the meteorological data sequence of the basin and the reservoir discharge data sequence as input and taking the runoff residual sequence as the target output, the following steps are also included:

[0046] Based on the runoff residual sequence, the correlation coefficients of the meteorological data series and the reservoir discharge data series are calculated respectively.

[0047] According to the sorting of correlation coefficients, a first set of input factors with strong correlation is selected from the meteorological data series and the reservoir discharge data series.

[0048] Before taking the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence as input and the nutrient flux residual sequence as target output, the following steps are also included:

[0049] Based on the residual sequence of nutrient flux, the correlation coefficients of meteorological data series, reservoir discharge data series, pollution source data and predicted runoff residual series were calculated respectively.

[0050] According to the order of correlation coefficients, a strongly correlated second input factor set is selected from the meteorological data series, the reservoir discharge data series, the pollution source data and the predicted runoff residual series.

[0051] Optionally, the meteorological data sequence and the reservoir discharge data sequence of the basin are used as input, and the runoff residual sequence is used as the target output, and the runoff residual prediction model is trained, which specifically includes the following steps:

[0052] The first input factor set is used as input and the runoff residual sequence is used as the target output to train the runoff residual prediction model.

[0053] Taking the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence as input, and the nutrient flux residual sequence as the target output, the nutrient flux residual prediction model is trained, which specifically includes the following steps:

[0054] The second input factor set is used as input and the nutrient flux residual sequence is used as the target output to train a nutrient flux residual prediction model.

[0055] On the other hand, the present invention provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a nutrient flux simulation method based on residual prediction as described above.

[0056] On the other hand, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for simulating nutrient flux based on residual prediction.

[0057] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0058] The present invention provides a nutrient flux simulation method based on residual prediction and related devices, the method comprising the following steps: inputting a meteorological data sequence and a reservoir discharge data sequence of a watershed into a watershed mechanism-driven model to obtain a simulated runoff sequence of the watershed; then inputting the simulated runoff sequence of the watershed and the pollution source data of the watershed into the watershed mechanism-driven model to obtain a simulated nutrient flux sequence of the watershed; using a runoff residual prediction model to obtain a predicted runoff residual sequence of the watershed; then inputting the meteorological data sequence, the reservoir discharge data sequence, the pollution source data of the watershed and the predicted runoff residual sequence of the watershed into a nutrient flux residual prediction model to obtain a predicted nutrient flux residual sequence; according to the simulated nutrient flux sequence of the watershed and the predicted nutrient flux residual sequence, an accurate compensation nutrient flux sequence can be obtained. The present invention first predicts a relatively accurate simulated runoff sequence and a simulated nutrient flux sequence according to an input data sequence through a mechanism-driven model SWAT, and then uses a data-driven model LSTM to predict the runoff residual and the nutrient flux residual. Based on the predicted residual sequence, the sequence predicted by the mechanism-driven model can be compensated to obtain a nutrient flux sequence with higher accuracy. Compared with the traditional technology that only uses a mechanism-driven model or a data-driven model to predict runoff and nutrient flux, the present invention combines the above-mentioned scheme of the mechanism-driven model SWAT and the data-driven model LSTM, and can more accurately predict the runoff and nutrient flux values. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0060] Figure 1A flow chart of a nutrient flux simulation method based on residual prediction provided in Example 1 of the present invention;

[0061] Figure 2 This is a diagram of the internal structure of a computer device provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] The purpose of the present invention is to provide a nutrient flux simulation method and related devices based on residual prediction, aiming to obtain a simulated nutrient flux sequence through mechanism-driven model prediction, and use LSTM model to predict the predicted nutrient flux residual sequence to compensate for it, so as to improve the accuracy of nutrient flux sequence simulation.

[0064] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0065] Example 1

[0066] like Figure 1 As shown, a nutrient flux simulation method based on residual prediction in this embodiment includes the following steps:

[0067] S1. Obtain a set of input data sequences; the set of input data sequences includes the meteorological data sequence of the basin, the reservoir discharge data sequence of the basin, and the pollution source data of the basin. Meteorological data include rainfall, air pressure, temperature, wind speed, and relative humidity; pollution source data include agricultural fertilization, livestock and poultry breeding, and sewage treatment plant discharge. In addition, in order to construct the mechanism-driven model of the basin, it is also necessary to obtain spatial data, including digital elevation model DEM, land use, and soil type; in addition, in order to calibrate the runoff and water quality simulation parameters of the mechanism-driven model and verify the runoff and water quality simulation accuracy of the model, it is also necessary to obtain the observed runoff sequence and the observed nutrient flux sequence. Among them, spatial data does not change with time, and pollution source data usually obtains annual scale data; while the meteorological data sequence, reservoir discharge data sequence, observed runoff sequence, and observed nutrient flux sequence are daily scale data of no less than 5 years, which determines the total duration and time step of the model simulation and constitutes the simulation data sequence (such as 5 years of daily scale data, a total of about 1826 sets of data).

[0068] S2. Input the meteorological data sequence and reservoir discharge data sequence of the basin into the basin mechanism-driven model to obtain the simulated runoff sequence of the basin; the basin mechanism-driven model is a SWAT mechanism-driven model calibrated based on the basin's spatial data, meteorological data sequence, reservoir discharge data sequence, pollution source data and observation data sequence. The observation data sequence includes the observed runoff sequence and the observed nutrient flux sequence.

[0069] S3, inputting the simulated runoff sequence of the watershed and the pollution source data of the watershed into the watershed mechanism-driven model to obtain the simulated nutrient flux sequence of the watershed. Specifically, in this embodiment, the watershed mechanism-driven model is obtained by the following steps:

[0070] A1. Obtain the spatial data of the river basin, meteorological data series, reservoir discharge data series and pollution source data.

[0071] A2. Based on the spatial data, meteorological data sequence, reservoir discharge data sequence and pollution source data of the watershed, the initial watershed mechanism-driven model is constructed. The specific steps are as follows: first load the spatial data, load the watershed DEM and actual river network data, set the threshold area of ​​the river channel and divide the sub-basin at the watershed outlet, load the land use and soil type data and the corresponding index table, set the slope type for reclassification, and then define the minimum area ratio threshold of each land use / soil type / slope in the sub-basin to the sub-basin area to generate the hydrological response unit; input the meteorological data sequence as the driving force for the mechanism model simulation; load the reservoir discharge data sequence, considering the impact of reservoir discharge behavior on river runoff and nutrient flux; finally load the pollution source related data to reflect the impact of terrestrial agricultural fertilization, livestock and poultry breeding, and sewage treatment plant discharge on river nutrients.

[0072] A3. Obtain the observed runoff sequence and observed nutrient flux sequence of the basin.

[0073] A4. Using the observed runoff sequence of the basin, the initial basin mechanism-driven model is calibrated and verified to obtain the intermediate basin mechanism-driven model. Step A4 specifically includes the following steps:

[0074] A41. Divide the observed runoff series, meteorological data series and reservoir discharge data series of the basin into the first calibration set and the first validation set.

[0075] A42. Taking the meteorological data sequence and reservoir discharge data sequence in the first calibration set as input and the observed runoff sequence in the first calibration set as target output, the runoff sensitive parameters of the initial watershed mechanism driven model are optimized to obtain the runoff optimized watershed mechanism driven model.

[0076] A43. Using the meteorological data sequence and reservoir discharge data sequence in the first verification set as input and the observed runoff sequence in the first verification set as target output, verify whether the accuracy of the runoff optimization basin mechanism driving model is greater than the preset accuracy, and obtain the first judgment result.

[0077] If the first judgment result is yes, execute step A44: use the runoff optimization watershed mechanism driving model as the intermediate watershed mechanism driving model.

[0078] If the first judgment result is no, jump to step A41: divide the observed runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a first calibration set and a first validation set.

[0079] A5. Parameter calibration and verification of the intermediate basin mechanism-driven model are performed using the observed nutrient flux sequence of the basin to obtain the basin mechanism-driven model. In this embodiment, step A5 specifically includes the following steps:

[0080] A51. Input the basin's meteorological data sequence and reservoir discharge data sequence into the intermediate basin mechanism-driven model to obtain the simulated runoff sequence.

[0081] A52. Divide the observed nutrient flux sequence, simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into the second calibration set and the second validation set.

[0082] A53. Using the simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence in the second calibration set as input and the observed nutrient flux sequence in the second calibration set as target output, the nutrient flux sensitive parameters of the intermediate watershed mechanism driven model are optimized to obtain the nutrient flux optimized watershed mechanism driven model.

[0083] A54. Using the simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence in the second verification set as input and the observed nutrient flux sequence in the second verification set as target output, verify whether the accuracy of the nutrient flux optimization watershed mechanism driving model is greater than the preset accuracy, and obtain the second judgment result.

[0084] If the second judgment result is yes, execute step A55: use the nutrient flux optimization watershed mechanism driving model as the watershed mechanism driving model.

[0085] If the second judgment result is no, jump to step A52: divide the observed nutrient flux sequence, simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a second calibration set and a second validation set.

[0086] In the above steps, the first 60% of the simulated data sequence is used for model parameter calibration, and the last 40% is used for model parameter verification. First, a sensitivity analysis of the model parameters is performed, and the more sensitive parameters are selected. These parameters are calibrated in the model calibration. The simulation results are calibrated using the SUFI-2 algorithm in the SWAT-CUP software. The calibration idea is to "simulate runoff first and then simulate nutrients". The data obtained above is input into the model and the model is run. First, the runoff sensitive parameters are calibrated and adjusted. This process uses the observed runoff sequence as the target output of the model to optimize the SWAT model runoff parameters so that the simulated runoff and the observed runoff meet the fitting accuracy requirements. On the basis of completing the runoff parameter calibration, the nutrient flux parameters are calibrated with the observed nutrient flux as the target output of the model. Finally, the model can be used to obtain the simulated runoff sequence Q s (t) and simulated nutrient flux sequence L s (t), Q represents runoff series, L: nutrient flux series, subscript s represents simulation value, and t represents time.

[0087] The specific steps of calibration and verification are as follows: set the initial range of parameters, and according to the calibration results, SWAT-CUP software will give the recommended range of parameters for the next time, and modify the parameter range through multiple iterations (each iteration is set to 500 times) until the simulated value and the measured value reach a qualified fitting accuracy (NSE>0.7, R 2 >0.7), the recommended parameter values ​​are modified according to the corresponding modification method and the model is re-run, and the model parameter verification process is performed again. During the verification process, the parameters are kept unchanged to determine whether the verification period accuracy reaches NSE>0.7, R 2 >0.7; otherwise, re-calibrate the parameters.

[0088] S4. Input the meteorological data sequence and reservoir discharge data sequence of the basin into the runoff residual prediction model to obtain the predicted runoff residual sequence of the basin; the runoff residual prediction model is an LSTM model trained based on the meteorological data sequence, reservoir discharge data sequence and runoff residual sequence of the basin. Because the runoff determines the size of the nutrient flux, the predicted runoff residual sequence is first predicted using the LSTM (Long Short-Term Memory networks) machine learning model; then based on the predicted runoff residual sequence as input, the LSTM model is used to continue predicting the nutrient flux residual sequence. In this embodiment, the runoff residual prediction model is obtained by the following steps:

[0089] C1. Obtain the basin’s meteorological data series, reservoir discharge data series, and observed runoff series.

[0090] C2. Using the basin’s meteorological data sequence and reservoir discharge data sequence as input, the basin mechanism is used to drive the model and predict the basin’s simulated runoff sequence.

[0091] C3. Determine the runoff residual sequence based on the simulated runoff sequence and the observed runoff sequence. o (t) and simulated runoff series Q s (t) subtract to get the runoff residual sequence r o (t). The subscript o represents the observation value.

[0092] C4. Using the basin's meteorological data sequence and reservoir discharge data sequence as input and the runoff residual sequence as the target output, a runoff residual prediction model is trained.

[0093] In order to reduce the complexity of the LSTM model, strong correlation is selected in the input data sequence through correlation analysis, that is, before step C4, the following steps are also included:

[0094] Based on the runoff residual sequence, the correlation coefficients of the meteorological data sequence and the reservoir discharge data sequence are calculated respectively. For the meteorological data sequence (rainfall, air pressure, temperature, wind speed, relative humidity data) and the reservoir discharge data sequence, each factor is correlated with the runoff residual sequence r o (t) Correlation analysis was performed to screen out the key driving factors affecting the runoff residual series. The Pearson correlation analysis method was selected as shown in formula (1). The correlation coefficient function in the descriptive statistics of the Origin software can be used in specific applications.

[0095]

[0096] In the formula: x and y represent two sets of data sequences, are the means of the sequences x and y respectively; i ,y i is the i-th observation value of the sequence x, y.

[0097] According to the order of correlation coefficients, a strongly correlated first input factor set is selected from the meteorological data sequence and the reservoir discharge data sequence. In this embodiment, an input data sequence whose Person correlation coefficient is ranked in the top 80% is selected as the input sequence of the LSTM model, that is, the first input factor set.

[0098] After selecting the strongly correlated first input factor set, step C4 specifically includes the following steps: using the first input factor set as input and the runoff residual sequence as the target output, and training to obtain a runoff residual prediction model.

[0099] The LSTM model structure includes input layer, hidden layer and output layer, where the hidden layer module is composed of multiple neural units. Each neural unit is composed of three parts: forget gate, input gate and output gate. The model predicts the current value based on the input data of the past 20 days. An effective model is obtained by adjusting the number of hidden layers, the number of neurons in the hidden layer and the learning rate. The parameter settings are as follows: the number of hidden layers is 1 or 2, and the number of neurons in the hidden layer is 16, 32, 64, 128 and 256 respectively. The learning rate is 0.001, 0.003 and 0.005 respectively. The grid search algorithm is used in the LSTM model parameter setting, that is, within the specified parameter range, the parameters are adjusted in sequence according to the step size, and the parameter combination with the highest accuracy on the test set is found from all the parameters to find the optimal solution of the neural network. Other parameter settings are: the number of iterations (epoch) is set to 300, the model loss function selects RMSE, the model uses the Adam optimizer, and the input data is normalized.

[0100] In this embodiment, 75% of the input sequence of the LSTM model is used as a training set and 25% is used as a test set to obtain the residual sequence r of the runoff prediction during the training period and the test period. cs (t) and r vs (t), and the residual sequence l of the predicted nutrient flux during the training and test periods cs (t) and l vs (t), the subscript c represents the training period, and v represents the testing period; until the fitting accuracy of the simulated and measured values ​​of runoff and flux in the training and testing periods reaches R 2 >0.8, NSE>0.8. Thus r cs (t) and r vs (t) Get the predicted runoff residual sequence r s (t), and according to l cs (t) and l vs (t) Predict nutrient flux residual series l s (t).

[0101] S5. Input the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data of the basin and predicted runoff residual sequence of the basin into the nutrient flux residual prediction model to obtain the predicted nutrient flux residual sequence of the basin; the nutrient flux residual prediction model is an LSTM model trained based on the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and runoff residual sequence.

[0102] In this embodiment, the nutrient flux residual prediction model is obtained by the following steps:

[0103] D1. Obtain the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data, observed runoff sequence, and observed nutrient flux sequence.

[0104] D2. Using the basin’s meteorological data sequence and reservoir discharge data sequence as input, the basin mechanism-driven model is used to predict the basin’s simulated runoff sequence.

[0105] D3. Using the pollution source data and simulated runoff sequence of the basin as input, the model is driven by the basin mechanism to predict the simulated nutrient flux sequence of the basin.

[0106] D4. Determine the residual sequence of nutrient flux based on the simulated nutrient flux sequence and the observed nutrient flux sequence. o (t) and simulated nutrient flux sequence L s (t) Subtract to get the nutrient flux residual sequence l o (t).

[0107] D5. Input the basin's meteorological data sequence and reservoir discharge data sequence into the runoff residual prediction model to obtain the basin's predicted runoff residual sequence.

[0108] D6. Using the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence as input, and the nutrient flux residual sequence as the target output, a nutrient flux residual prediction model is trained.

[0109] Similar to the above step C4, in order to reduce the complexity of LSTM model training, strong correlation is selected in the input data sequence through correlation analysis, that is, before step D6, the following steps are also included:

[0110] Based on the residual sequence of nutrient flux, the correlation coefficients of meteorological data series, reservoir discharge data series, pollution source data and predicted runoff residual series were calculated respectively.

[0111] According to the order of correlation coefficients, a strongly correlated second input factor set is selected from the meteorological data series, reservoir discharge data series, pollution source data and predicted runoff residual series. Since the pollutant flux is a function of runoff volume and concentration, the predicted runoff residual series r s (t) will be used as input data to simulate the residual series of nutrient flux l o (t); The other input data screening steps are similar to the above-mentioned runoff residual sequence prediction. First, based on Person correlation analysis, meteorological data (rainfall, air pressure, temperature, wind speed, relative humidity data), reservoir discharge data series, and pollution source data (agricultural fertilization, livestock and poultry breeding, sewage treatment plant discharge data) and nutrient flux residual series l o(t) and select the input data sequence whose Person correlation coefficient ranks in the top 80% as the LSTM prediction flux residual l o (t), that is, the second input factor set.

[0112] After selecting the strongly correlated second input factor set, step D6 specifically includes the following steps: using the second input factor set as input and the nutrient flux residual sequence as the target output, training to obtain a nutrient flux residual prediction model.

[0113] S6. According to the simulated nutrient flux sequence and the predicted nutrient flux residual sequence of the watershed, the compensated nutrient flux sequence of the watershed is obtained. Similarly, according to the simulated runoff sequence and the predicted runoff residual sequence of the watershed, the compensated runoff sequence of the watershed is obtained. In this embodiment, the compensated runoff sequence and the compensated nutrient flux sequence of the watershed are calculated respectively by formula (2) and formula (3):

[0114] Q' s (t) = Q s (t)+r s (t) (2).

[0115] L' s (t) = L s (t)+l s (t) (3).

[0116] A nutrient flux simulation method based on residual prediction is provided in this embodiment. The mechanism-driven model SWAT is used to first predict a relatively accurate simulated runoff sequence and a simulated nutrient flux sequence according to the input data sequence, and then the data-driven model LSTM is used to predict the runoff residual and the nutrient flux residual. Based on the predicted residual sequence, the sequence predicted by the mechanism-driven model can be compensated to obtain a nutrient flux sequence with higher accuracy. Compared with the traditional technology that only uses the mechanism-driven model or the data-driven model to predict runoff and nutrient flux, the above-mentioned scheme of the embodiment combining the mechanism-driven model SWAT and the data-driven model LSTM can more accurately predict the runoff and nutrient flux values. The coupling method of the two models can be used in this basin for a long time after being constructed and trained, which means that in the future, high-precision runoff and flux prediction data can be obtained by relying only on meteorological and pollution source input data, breaking through the limitation of traditional prediction relying only on mechanism-driven model and insufficient accuracy.

[0117] Example 2

[0118] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a nutrient flux simulation method based on residual prediction in Example 1.

[0119] Example 3

[0120] A computer program product includes a computer program, which, when executed by a processor, implements the steps of a nutrient flux simulation method based on residual prediction in Example 1.

[0121] Example 4

[0122] A computer device, which may be a database, may have an internal structure as shown in Figure 2 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Wherein, the processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. Wherein, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a nutrient flux simulation method based on residual prediction in Example 1 is implemented.

[0123] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0125] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A nutrient flux simulation method based on residual prediction, characterized in that: include: Acquire an input data sequence set; the input data sequence set includes a meteorological data sequence of the river basin, a reservoir discharge data sequence of the river basin, and pollution source data of the river basin; The meteorological data sequence and the reservoir discharge data sequence of the basin are input into the basin mechanism driven model to obtain the simulated runoff sequence of the basin; the basin mechanism driven model is a SWAT mechanism driven model obtained by calibration based on the spatial data, meteorological data sequence, reservoir discharge data sequence, pollution source data and observation data sequence of the basin; Inputting the simulated runoff sequence of the watershed and the pollution source data of the watershed into the watershed mechanism-driven model to obtain the simulated nutrient flux sequence of the watershed; Inputting the meteorological data sequence of the basin and the reservoir discharge data sequence into the runoff residual prediction model to obtain the predicted runoff residual sequence of the basin; the runoff residual prediction model is an LSTM model trained based on the meteorological data sequence of the basin, the reservoir discharge data sequence and the runoff residual sequence; The meteorological data sequence of the basin, the reservoir discharge data sequence, the pollution source data of the basin and the predicted runoff residual sequence of the basin are input into the nutrient flux residual prediction model to obtain the predicted nutrient flux residual sequence of the basin; the nutrient flux residual prediction model is an LSTM model trained based on the meteorological data sequence of the basin, the reservoir discharge data sequence, the pollution source data and the runoff residual sequence; According to the simulated nutrient flux sequence of the watershed and the predicted nutrient flux residual sequence, a compensation nutrient flux sequence of the watershed is obtained.

2. A nutrient flux simulation method based on residual prediction according to claim 1, characterized in that: The observation data sequence includes an observation runoff sequence and an observation nutrient flux sequence; The watershed mechanism driven model is obtained through the following steps: Obtain the basin's spatial data, meteorological data series, reservoir discharge data series and pollution source data; Based on the spatial data, meteorological data series, reservoir discharge data series and pollution source data of the basin, an initial basin mechanism-driven model is constructed; Obtain the observed runoff series and observed nutrient flux series of the basin; Using the observed runoff series of the watershed, the parameters of the initial watershed mechanism-driven model are calibrated and verified to obtain the intermediate watershed mechanism-driven model; The observed nutrient flux sequence of the watershed is used to calibrate and verify the parameters of the intermediate watershed mechanism-driven model to obtain the watershed mechanism-driven model.

3. A nutrient flux simulation method based on residual prediction according to claim 2, characterized in that: Using the observed runoff series of the basin, the parameters of the initial basin mechanism-driven model are calibrated and verified to obtain the intermediate basin mechanism-driven model, which specifically includes: The observed runoff series, meteorological data series and reservoir discharge data series of the basin are divided into the first calibration set and the first validation set; Taking the meteorological data sequence and the reservoir discharge data sequence in the first calibration set as input and the observed runoff sequence in the first calibration set as target output, the runoff sensitive parameters of the initial watershed mechanism driven model are optimized to obtain a runoff optimized watershed mechanism driven model; Taking the meteorological data sequence and the reservoir discharge data sequence in the first verification set as input and the observed runoff sequence in the first verification set as target output, verify whether the accuracy of the runoff optimization watershed mechanism driving model is greater than the preset accuracy, and obtain a first judgment result; If the first judgment result is yes, the runoff optimization watershed mechanism driving model is used as the intermediate watershed mechanism driving model; If the first judgment result is no, jump to step: divide the observed runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a first calibration set and a first verification set.

4. A nutrient flux simulation method based on residual prediction according to claim 2, characterized in that: Using the observed nutrient flux sequence of the basin, the parameters of the intermediate basin mechanism-driven model are calibrated and verified to obtain the basin mechanism-driven model, which specifically includes: Inputting the meteorological data sequence and the reservoir discharge data sequence of the basin into the intermediate basin mechanism driven model to obtain the simulated runoff sequence; The observed nutrient flux sequence, simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin are divided into the second calibration set and the second validation set; Taking the simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence in the second calibration set as input and the observed nutrient flux sequence in the second calibration set as target output, optimizing the nutrient flux sensitive parameters of the intermediate watershed mechanism driven model, and obtaining the nutrient flux optimized watershed mechanism driven model; Taking the simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence in the second validation set as input, and taking the observed nutrient flux sequence in the second validation set as target output, verify whether the accuracy of the nutrient flux optimization watershed mechanism driving model is greater than the preset accuracy, and obtain a second judgment result; If the second judgment result is yes, the nutrient flux optimization watershed mechanism driving model is used as the watershed mechanism driving model; If the second judgment result is no, jump to step: divide the observed nutrient flux sequence, simulated runoff sequence, meteorological data sequence and reservoir discharge data sequence of the basin into a second calibration set and a second validation set.

5. The method for simulating nutrient flux based on residual prediction according to claim 1, characterized in that: The runoff residual prediction model is obtained through the following steps: Obtain the basin's meteorological data series, reservoir discharge data series and observed runoff series; Taking the meteorological data sequence and the reservoir discharge data sequence of the basin as input, the model is driven by the basin mechanism to predict the simulated runoff sequence of the basin; Determining a runoff residual sequence according to the simulated runoff sequence and the observed runoff sequence; The basin's meteorological data sequence and reservoir discharge data sequence are used as input, and the runoff residual sequence is used as the target output, and a runoff residual prediction model is trained.

6. A nutrient flux simulation method based on residual prediction according to claim 5, characterized in that: The nutrient flux residual prediction model is obtained through the following steps: Obtain the basin's meteorological data series, reservoir discharge data series, pollution source data, observed runoff series, and observed nutrient flux series; Taking the meteorological data sequence and the reservoir discharge data sequence of the basin as input, the model is driven by the basin mechanism to predict the simulated runoff sequence of the basin; Taking the pollution source data and simulated runoff sequence of the watershed as input, the simulated nutrient flux sequence of the watershed is predicted by using the watershed mechanism-driven model; Determining a nutrient flux residual sequence according to the simulated nutrient flux sequence and the observed nutrient flux sequence; Input the meteorological data sequence of the basin and the reservoir discharge data sequence into the runoff residual prediction model to obtain the predicted runoff residual sequence of the basin; The basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence are used as input, and the nutrient flux residual sequence is used as the target output to train a nutrient flux residual prediction model.

7. A nutrient flux simulation method based on residual prediction according to claim 6, characterized in that: Before taking the basin's meteorological data sequence and reservoir discharge data sequence as input and the runoff residual sequence as the target output, it also includes: Based on the runoff residual sequence, respectively calculating the correlation coefficients of the meteorological data sequence and the reservoir discharge data sequence; According to the sorting of correlation coefficients, a first set of input factors with strong correlation is selected from the meteorological data series and the reservoir discharge data series; Before taking the basin's meteorological data sequence, reservoir discharge data sequence, pollution source data and predicted runoff residual sequence as input and the nutrient flux residual sequence as the target output, it also includes: Based on the nutrient flux residual sequence, the correlation coefficients of the meteorological data sequence, the reservoir discharge data sequence, the pollution source data and the predicted runoff residual sequence are calculated respectively; According to the order of correlation coefficients, a strongly correlated second input factor set is selected from the meteorological data series, the reservoir discharge data series, the pollution source data and the predicted runoff residual series.

8. A nutrient flux simulation method based on residual prediction according to claim 7, characterized in that: The runoff residual prediction model is trained by taking the basin's meteorological data sequence and the reservoir discharge data sequence as input and the runoff residual sequence as the target output, which includes: Taking the first input factor set as input and the runoff residual sequence as target output, training to obtain a runoff residual prediction model; Taking the basin's meteorological data series, reservoir discharge data series, pollution source data and predicted runoff residual series as input, and the nutrient flux residual series as the target output, the nutrient flux residual prediction model is trained, which specifically includes: The second input factor set is used as input, and the nutrient flux residual sequence is used as the target output, and a nutrient flux residual prediction model is obtained through training.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of a nutrient flux simulation method based on residual prediction as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of a nutrient flux simulation method based on residual prediction described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • LSTM-based medium and long term runoff forecasting intelligent method

    CN115115111A

  • Method for predicting drainage basin runoff and power generation change under influence of climate change

    CN117807886A

  • Method for simulating regional runoff by coupling SWAT model with LSTM model based on remote sensing data optimization

    CN117973221A

  • Method and system for calculating turbulent mixing intensity, computer device and storage medium

    US11898842B1

  • Method of projecting future flood risks under changing hydrological cycles

    US20230400603A1