A coupled model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics

By combining the agricultural seasonal decomposition characteristics of SWAT hydrological model and the multivariate deep learning model RABA, the SDA-SWAT-RABA coupled model is constructed, which solves the problem of low nitrogen and phosphorus simulation accuracy, and realizes high-precision nitrogen and phosphorus simulation in the basin, improving the interpretability of the model and the reliability of data requirements.

CN120197519BActive Publication Date: 2025-08-08HUAZHONG NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510678182.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-08
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

The prior art has problems with low accuracy in nitrogen and phosphorus simulation, especially the uncertainty of traditional hydrological models and insufficient interpretability of machine learning models, making it difficult to perform high-precision long-term simulation on the basin scale.

Method used

Using a coupled model based on agricultural seasonal decomposition characteristics, combined with SWAT hydrological model and multivariate deep learning model RABA, a agricultural seasonal decomposition model is classified, a multivariate deep learning model is constructed, and coupled to form a SDA-SWAT-RABA coupling model to improve the accuracy of nitrogen and phosphorus simulation.

Benefits of technology

The accuracy and robustness of nitrogen and phosphorus simulation were improved. The Nash coefficient NSE both exceeded 0.94, and the relative error was less than 1%. The Pearson correlation coefficient PCC and Nash coefficient NSE increased by 33% and 34% respectively during the verification period, and the percentage deviation was reduced by 4.44% and 6.55%, which significantly improved the simulation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120197519B_ABST
    Figure CN120197519B_ABST
Patent Text Reader

Abstract

The present invention discloses a coupled model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics, proposes an agricultural seasonal decomposition model SDA, and combines a hydrological model and a multivariate deep learning model to simulate the total nitrogen flux and total phosphorus flux of a watershed. The present invention not only follows the hydrological cycle process of the watershed, takes into account the migration and transformation of nitrogen and phosphorus under hydrological processes such as precipitation, infiltration, and evaporation, and has a solid hydrophysical process, but also can deeply explore the complex relationship between nitrogen and phosphorus and the factors affecting their migration and transformation, and can efficiently extract and fuse features in time series data. It can not only improve the interpretability of machine learning, but also reduce the data requirements and parameter uncertainty of traditional hydrological models, thereby improving the accuracy and robustness of total nitrogen flux and total phosphorus flux predictions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of water environment, and in particular relates to a coupling model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics. Background Art

[0002] Eutrophication refers to the phenomenon in which water bodies such as rivers, reservoirs, and lakes gradually shift from a low-productivity oligotrophic state to a high-productivity eutrophic state due to excessive intake of nutrients such as nitrogen and phosphorus, driven by both natural factors and human activities. In the process of industrial and agricultural development, along with human activities such as the application of pesticides and fertilizers, livestock and poultry farming, and factory wastewater discharge, pollutants such as nitrogen and phosphorus enter the hydrological cycle with precipitation, ultimately accumulating and concentrating in rivers and lakes.

[0003] Currently, spatiotemporal simulation of nitrogen and phosphorus is primarily achieved through field measurements and model simulation. While field observation data offers high accuracy, they are limited by their spatiotemporal scale, making them difficult to simulate at the basin scale and over long time series. Model simulations fall into two main categories: hydrological models based on physical processes, such as the SWAT hydrological model, the HSPF hydrological model, and the NTT-Watershed hydrological model. The SWAT hydrological model is the most widely used. However, the accuracy of hydrological models is closely related to the accuracy of meteorological data and the sensitivity of hydrological parameters, resulting in high uncertainty. Data-driven models, such as linear and nonlinear regression models, have recently shown promising applicability for nitrogen and phosphorus simulations. However, because they are black-box models, their application requires a trade-off between model performance and interpretability, often compromising simulation accuracy. Summary of the Invention

[0004] Aiming at the problem of low precision in nitrogen and phosphorus simulation in the prior art, the present invention proposes a nitrogen and phosphorus simulation method based on a coupling model of agricultural seasonal decomposition characteristics.

[0005] The above technical problems of the present invention are mainly solved by the following technical solutions:

[0006] A coupled model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics includes the following steps:

[0007] Step 1: Prepare a training set, which includes spatial data sequences, meteorological data sequences, and hydrological and water quality data sequences corresponding to each region in the watershed; the spatial data sequences include spatial data at different time points, and the spatial data include land use information; the meteorological data sequences include meteorological data at different time points; and the hydrological and water quality data sequences include measured phosphorus flux and measured nitrogen flux at different time points;

[0008] Step 2: Establish a hydrological model and calibrate the hydrological model using the training set to obtain a calibrated hydrological model; input the spatial data sequence and meteorological data sequence of the training set into the calibrated hydrological model to obtain a preliminary simulated total nitrogen flux sequence and a preliminary simulated total phosphorus flux sequence of the watershed; the preliminary simulated total nitrogen flux sequence includes preliminary simulated total nitrogen fluxes at different time points, and the preliminary simulated total phosphorus flux sequence includes preliminary simulated total phosphorus fluxes at different time points;

[0009] Step 3: The meteorological data corresponding to a region of the entire watershed at a time point in the training set is used as a regional meteorological data sample point; an agricultural seasonal decomposition model (SDA) is constructed. The agricultural seasonal decomposition model (SDA) classifies the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the training set based on land use information. Each classification corresponds to the nitrogen influence period, phosphorus influence period, and nitrogen and phosphorus weak influence period, respectively.

[0010] Step 4: Build a multivariate deep learning model and train the multivariate deep learning model using the regional meteorological data sample points corresponding to the training set, the preliminary simulated total nitrogen flux, and the preliminary simulated total phosphorus flux classified by the agricultural season decomposition model (SDA) to obtain a trained multivariate deep learning model.

[0011] Step 5: Couple the calibrated hydrological model, agricultural seasonal decomposition model SDA, and trained multivariate deep learning model to obtain a coupled model; input the spatial data sequence, meteorological data sequence, and hydrological and water quality data sequence of the samples to be processed into the coupled model to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence.

[0012] The above step 3 specifically includes the following steps:

[0013] Step 3.1. The meteorological data corresponding to a region of the entire watershed at a time point in the training set is used as a regional meteorological data sample point. The land use information corresponding to the regional meteorological data sample point at the time point is used as a basic attribute of the regional meteorological data sample point. The land use information includes the land type of the region at the corresponding time point. The land type is divided into crop land type and non-crop land type. The crop land type is further divided into nitrogen crop land type, phosphorus crop land type, and non-nitrogen and phosphorus crop land type based on the type of crop fertilizer and pesticide application. The land use information corresponding to the crop land type also includes the cultivated land time feature, which is the pesticide and fertilizer application period or the non-pesticide and fertilizer application period.

[0014] Step 3.2: Classify the regional meteorological data sample points corresponding to the nitrogen crop land type and the cultivated land time characteristic as the pesticide and fertilization period as the first characteristic sample sequence set, and classify the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period of the nitrogen crop land type as the first characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the same time point in the first characteristic sample sequence set are used as an agricultural season decomposition sample point in the first characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the first characteristic sample sequence set, and the first characteristic sample sequence set corresponds to the nitrogen impact period;

[0015] The regional meteorological data sample points corresponding to the pesticide and fertilization period for land types that are phosphorus crop land types and whose cultivated land time characteristics are the pesticide and fertilization period are classified as the second characteristic sample sequence set, and the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period for phosphorus crop land types are also classified as the second characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the same time point in the second characteristic sample sequence set are taken as an agricultural season decomposition sample point in the second characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence in the second characteristic sample sequence set, and the second characteristic sample sequence set corresponds to the phosphorus impact period;

[0016] The regional meteorological data sample points of non-crop land, non-nitrogen and phosphorus crop land, and the regional meteorological data sample points with the time characteristic of cultivated land being non-pesticide and fertilization period are classified as the third characteristic sample sequence set, and all preliminary simulated total nitrogen fluxes and preliminary simulated total phosphorus fluxes are also classified as the third characteristic sample sequence set. The regional meteorological data sample points, preliminary simulated total nitrogen fluxes, and preliminary simulated total phosphorus fluxes corresponding to the same time point in the third characteristic sample sequence set are taken as an agricultural season decomposition sample point in the third characteristic sample sequence set. The agricultural season decomposition sample points with consecutive time points in the third characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the third characteristic sample sequence set. The third characteristic sample sequence set corresponds to the weak influence period of nitrogen and phosphorus.

[0017] Step 3 as described above also includes the following steps:

[0018] Step 3.3: The data in the first feature sample sequence set are grouped according to the elements, and the data corresponding to each element are respectively subjected to min-max normalization and standardized conversion in sequence to obtain the first cleaned feature sample sequence set; the data in the second feature sample sequence set are grouped according to the elements, and the data corresponding to each element are respectively subjected to min-max normalization and standardized conversion in sequence to obtain the second cleaned feature sample sequence set; the data in the third feature sample sequence set are grouped according to the elements, and the data corresponding to each element are respectively subjected to min-max normalization and standardized conversion in sequence to obtain the third cleaned feature sample sequence set;

[0019] The elements corresponding to the data in the first characteristic sample sequence set, the second characteristic sample sequence set, and the third characteristic sample sequence set include precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, wind speed, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux.

[0020] Training the multivariate deep learning model in step 4 above includes the following steps:

[0021] Extracting the measured total phosphorus flux sequence and the measured total nitrogen flux sequence of the entire watershed based on the measured phosphorus flux and the measured nitrogen flux at each time point in the hydrological and water quality data series corresponding to each area of the watershed, wherein the measured total phosphorus flux series includes the measured total phosphorus flux at each time point, and the measured total nitrogen flux series includes the measured total nitrogen flux at each time point;

[0022] The agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning are used as reference targets for model training to obtain the first trained multivariate deep learning model; the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning are used as reference targets for model training to obtain the second trained multivariate deep learning model; the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning are used as reference targets for model training to obtain the third trained multivariate deep learning model.

[0023] In step 5 above, the spatial data sequence, meteorological data sequence, and hydrological and water quality data sequence of the sample to be processed are input into the coupling model to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence, which specifically includes the following steps:

[0024] The spatial data sequence, meteorological data sequence and hydrological and water quality data sequence in the samples to be processed are input into the calibrated hydrological model to obtain the corresponding preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence. The meteorological data in the meteorological data sequence, the preliminary simulated total nitrogen flux in the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux in the preliminary simulated total phosphorus flux sequence of the samples to be processed are divided into the corresponding first characteristic sample sequence set, second characteristic sample sequence set and third characteristic sample sequence set through the agricultural season decomposition model SDA;

[0025] The data in the first feature sample sequence set are grouped according to the elements, and the data of each element are respectively subjected to min-max normalization and standardized conversion, and then input together into the first trained multivariate deep learning model to obtain the corresponding second-simulation first total nitrogen flux sequence and the second-simulation first total phosphorus flux sequence;

[0026] The data in the second feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the second trained multivariate deep learning model together to obtain the corresponding second secondary simulated total nitrogen flux sequence and the second secondary simulated total phosphorus flux sequence;

[0027] The data in the third feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the third trained multivariate deep learning model together to obtain the corresponding second-time simulated third total nitrogen flux sequence and the second-time simulated third total phosphorus flux sequence;

[0028] In the final simulated total nitrogen flux sequence, for each time point during the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the second-simulated first total nitrogen flux at the same time point in the second-simulated first total nitrogen flux sequence;

[0029] In the final simulated total nitrogen flux sequence, for each time point that is not in the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the average of the second simulated total nitrogen flux in the second simulated total nitrogen flux sequence and the third simulated total nitrogen flux in the third simulated total nitrogen flux sequence at the same time point;

[0030] In the final simulated total phosphorus flux sequence, for each time point during the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the second total phosphorus flux of the secondary simulation at the same time point in the second total phosphorus flux sequence of the secondary simulation;

[0031] In the final simulated total phosphorus flux sequence, for each time point that is not in the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the average of the secondarily simulated first total phosphorus flux in the secondarily simulated first total phosphorus flux sequence and the secondarily simulated third total phosphorus flux in the secondarily simulated third total phosphorus flux sequence at the same time point.

[0032] As mentioned above, the multivariate deep learning model in step 4 is a RABA model, which includes a residual feature perception module RA and a bidirectional attention prediction module BA in sequence; the residual feature perception module RA includes a CNN input layer, a convolution layer, a pooling layer, and a CNN output layer in sequence; the bidirectional attention prediction module BA includes a BILSTM input layer, an LSTM layer, an attention layer, an activation layer, and a BILSTM output layer in sequence; the input data of the CNN input layer is added to the output data of the CNN output layer through a jump connection and then input into the BILSTM input layer.

[0033] As mentioned above, the attention layer adopts the channel attention mechanism module SE.

[0034] As mentioned above, the hydrological model is the SWAT hydrological model.

[0035] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements steps 1-5 of any one of the above-mentioned nitrogen-phosphorus simulation methods when executing the computer program.

[0036] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the computer program implements steps 1-5 of any one of the nitrogen-phosphorus simulation methods described above.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] In response to the problem of low accuracy in nitrogen and phosphorus simulation, the present invention proposes an agricultural seasonal decomposition model SDA, and combines the SWAT model and the RABA model to simulate nitrogen and phosphorus. The present invention can not only follow the hydrological cycle process of the watershed, but also take into account the migration and transformation of nitrogen and phosphorus under hydrological processes such as precipitation, infiltration, and evaporation, and has a solid hydrophysical process, but also deeply explore the complex relationship between nitrogen and phosphorus and the factors affecting their migration and transformation, and can efficiently extract and fuse features in time series data. It can not only improve the interpretability of machine learning, but also reduce the data requirements and parameter uncertainty of traditional hydrological models, thereby improving the accuracy and robustness of total nitrogen flux and total phosphorus flux predictions. The agricultural seasonal decomposition model SDA can judge the correlation between nitrogen and phosphorus based on the characteristics of the input time series data to form a multi-feature input data set.

[0039] Compared with other methods, the Nash coefficient NSE of the nitrogen and phosphorus simulation method proposed in the present invention exceeds 0.94, and the relative error between the simulated value and the measured value is less than 1%.

[0040] The SDA-SWAT-RABA coupling model proposed in this paper achieved better results in simulating total nitrogen flux. Compared with the SWAT hydrological model and the SWAT-RABA model, the Pearson correlation coefficient (PCC) of the SDA-SWAT-RABA coupling model during the validation period increased by 33% and 4%, respectively, the Nash coefficient (NSE) increased by 34% and 3%, respectively, and the percentage deviation decreased by 4.44% and 0.31%.

[0041] The SDA-SWAT-RABA coupling model proposed in this invention also achieved better results in simulating total phosphorus flux. Compared with the SWAT hydrological model and the SWAT-RABA model, the Pearson correlation coefficient PCC of the SDA-SWAT-RABA coupling model increased by 31% and 3% respectively during the validation period, the Nash coefficient NSE increased by 32% and 4% respectively, and the percentage deviation decreased by 6.55% and 4.54%. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of the present invention.

[0043] Figure 2 This is a comparison diagram of the fitting effects between the SDA-SWAT-RABA coupling model proposed in the present invention and the SWAT hydrological model, as well as the total nitrogen flux simulated by the SWAT-RABA model and the measured total nitrogen flux. (a) is a comparison diagram of the fitting effects between the total nitrogen flux simulated in the rate period and the measured total nitrogen flux, (b) is a comparison diagram of the fitting effects between the total nitrogen flux simulated in the validation period and the measured total nitrogen flux; the colors represent different models, black is the fitting comparison between the total nitrogen flux simulated by the SWAT hydrological model and the measured total nitrogen flux, green is the fitting comparison between the total nitrogen flux simulated by the SWAT-RABA model and the measured total nitrogen flux, red is the fitting comparison between the total nitrogen flux simulated by the SDA-SWAT-RABA coupling model and the measured total nitrogen flux, R 2 represents the coefficient of determination.

[0044] Figure 3This is a comparison diagram of the fitting effects between the SDA-SWAT-RABA coupling model proposed in the present invention and the SWAT hydrological model, as well as the total phosphorus flux simulated by the SWAT-RABA model and the measured total phosphorus flux. (a) is a comparison diagram of the fitting effects between the total phosphorus flux simulated in the rate period and the measured total phosphorus flux, (b) is a comparison diagram of the fitting effects between the total phosphorus flux simulated in the validation period and the measured total phosphorus flux. The colors represent different models. Black is the fitting comparison between the total phosphorus flux simulated by the SWAT hydrological model and the measured phosphorus flux, green is the fitting comparison between the total phosphorus flux simulated by the SWAT-RABA model and the measured total phosphorus flux, and red is the fitting comparison between the total phosphorus flux simulated by the SDA-SWAT-RABA coupling model and the measured total phosphorus flux. 2 represents the coefficient of determination.

[0045] Figure 4 This is a comparison chart of the monthly total nitrogen flux results from 2019 to 2022 simulated by the SDA-SWAT-RABA coupling model, SWAT hydrological model, and SWAT-RABA model proposed in this invention. (a) represents the monthly total nitrogen flux results comparison chart for the rate period, and (b) represents the monthly total nitrogen flux results comparison chart for the validation period; the colors represent different models, black is the measured total nitrogen flux, green is the total nitrogen flux simulated by the SWAT hydrological model, orange is the total nitrogen flux simulated by the SWAT-RABA model, and red is the total nitrogen flux simulated by the SDA-SWAT-RABA coupling model.

[0046] Figure 5 This is a comparison chart of the monthly total phosphorus flux results from 2019 to 2022 simulated by the SDA-SWAT-RABA coupling model, SWAT hydrological model, and SWAT-RABA model proposed in this invention. (a) represents the monthly total phosphorus flux results during the validation period, and (b) represents the monthly total phosphorus flux results during the validation period. The colors represent different models: black represents the measured total phosphorus flux, green represents the total phosphorus flux simulated by the SWAT hydrological model, orange represents the total phosphorus flux simulated by the SWAT-RABA model, and red represents the total phosphorus flux simulated by the SDA-SWAT-RABA coupling model.

[0047] Figure 6 The following is the structure diagram of the RABA model; the RA module represents the residual feature perception module RA, the BA module represents the bidirectional attention prediction module BA, n represents the number of time points corresponding to the agricultural season decomposition sample sequence; LSTM represents the long short-term memory network; Attention represents the attention layer; Sigmoid represents the Sigmoid activation function used in the activation layer.

[0048] Figure 7 This is the structure diagram of the residual module.

[0049] Figure 8 Schematic diagram of the coupling of the hydrological model, the agricultural seasonal decomposition model SDA and the multivariate deep learning model. SDA represents the agricultural seasonal decomposition model SDA. DETAILED DESCRIPTION

[0050] In order to facilitate ordinary technicians in this field to understand and implement the present invention, the present invention is further described in detail below in conjunction with implementation examples. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.

[0051] Example 1

[0052] A coupled model nitrogen and phosphorus simulation method based on the characteristics of agricultural seasonal decomposition simulates the total nitrogen flux and total phosphorus flux of the basin based on the agricultural seasonal decomposition coupled hydrological model and the multivariate deep learning model. It includes establishing a hydrological model, constructing an agricultural seasonal decomposition model (SDA), building and training a multivariate deep learning model, and coupling the hydrological model, agricultural seasonal decomposition model SDA, and the multivariate deep learning model. The overall solution is as follows Figure 1 The specific implementation steps are as follows:

[0053] Step 1: Prepare a training set, which includes spatial data sequences, meteorological data sequences, and hydrological and water quality data sequences corresponding to each region in the basin.

[0054] The spatial data series, meteorological data series, and hydrological and water quality data series mentioned above are all time series data. Spatial data series include spatial data at different points in time. Each spatial data set includes a digital elevation model, land use information, and soil type. Spatial data processing requires the use of the ArcGis platform. Land use information includes the land classification of the region at the corresponding point in time. Land classification is divided into crop land and non-crop land. Crop land is further divided into nitrogen crop land, phosphorus crop land, and non-nitrogen and phosphorus crop land based on the type of crop fertilizer and pesticide application. For crop land, the corresponding land use information also includes cultivated land temporal characteristics, which are defined as the period of pesticide and fertilizer application or the period of non-pesticide and fertilizer application. The cultivated land temporal characteristics indicate whether the region was in the period of pesticide and fertilizer application at the corresponding point in time. The meteorological data series includes meteorological data at different points in time. Meteorological data is primarily stored in text and table formats. Elements of meteorological data include precipitation, maximum and minimum temperatures, solar radiation, relative humidity, and wind speed. Meteorological data is stored in an Access database platform. The hydrological and water quality data series includes measured phosphorus flux and nitrogen flux at different points in time.

[0055] The time points of the above-mentioned spatial data, meteorological data and hydrological and water quality data correspond to each other.

[0056] Based on the temporal distribution range of the time points of the spatial data, meteorological data, and hydrological and water quality data, the temporal distribution range is divided into a rate period and a validation period. The spatial data, meteorological data, and hydrological and water quality data of the rate period are classified as a training set and used to calibrate the hydrological model and train the coupled model obtained by coupling the agricultural seasonal decomposition model (SDA) and the multivariate deep learning model. The spatial data, meteorological data, and hydrological and water quality data of the validation period are classified as a validation set to verify and evaluate the simulation accuracy of the hydrological model and the simulation accuracy of the coupled model. In this embodiment, the time points in the first 75% of the temporal distribution range are classified as the rate period, and the time points in the last 25% of the temporal distribution range are classified as the validation period.

[0057] Step 2: Establish a hydrological model and calibrate the hydrological model using the spatial data sequence, meteorological data sequence and hydrological and water quality data sequence of the training set to obtain a calibrated hydrological model; input the spatial data sequence and meteorological data sequence of the training set into the calibrated hydrological model to obtain a preliminary simulated total nitrogen flux sequence and a preliminary simulated total phosphorus flux sequence of the basin, wherein the preliminary simulated total nitrogen flux sequence includes preliminary simulated total nitrogen fluxes at different time points, and the preliminary simulated total phosphorus flux sequence includes preliminary simulated total phosphorus fluxes at different time points.

[0058] The hydrological model inputs a spatial data sequence, a meteorological data sequence, and a hydrological and water quality data sequence; it outputs a preliminary simulated total nitrogen flux sequence and a preliminary simulated total phosphorus flux sequence. The hydrological model used in this embodiment is the Soil and Water Assessment Tool (SWAT hydrological model). The SWAT hydrological model relies on the Hydrological Response Unit (HRU) to estimate the preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence for the watershed. The HRU is the smallest unit of calculation in the SWAT hydrological model. In this embodiment, the specific process of step 2 is as follows:

[0059] Step 2.1: Establish a hydrological model. In this embodiment, a SWAT hydrological model is constructed.

[0060] The ArcSWAT tool on the ArcGIS platform was used to establish the SWAT hydrological model. The watershed to be simulated was divided into 79 sub-basins and 1578 hydrological response units (HRUs). Each HRU included corresponding spatial data, meteorological data, and hydrological and water quality data.

[0061] Step 2.2: Conduct sensitivity analysis and calibration on the parameters of the hydrological model. Input the spatial data and meteorological data of the training set into the calibrated hydrological model to obtain the preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence of the basin.

[0062] The SWAT hydrological model has many parameters, and it is difficult to manually adjust the range of parameters of each SWAT hydrological model. Therefore, through parameter sensitivity analysis, the parameters that have a greater impact on the simulation results of the SWAT hydrological model are selected, and then the parameters of these SWAT hydrological models are adjusted in detail to improve work efficiency. This embodiment calls the SWAT-CUP (SWATCalibration and Uncertainty Programs) software to perform parameter sensitivity analysis, calibration and verification. The SWAT-CUP software has five algorithms embedded in it, among which the SUFI-2 algorithm has high computational efficiency because it uses the Latin hypercube sampling method to obtain the main parameter values. This embodiment finally screened out 16 parameters of the SWAT hydrological model with high sensitivity, as shown in Table 1.

[0063] The specific process of parameter sensitivity analysis and calibration is as follows: first, the default value range of the parameters of the SWAT hydrological model is set, and then the SWAT-CUP software is called to perform multiple rounds of parameter sampling simulation iterations. After each round of parameter sampling simulation iteration, the SWAT-CUP software will give a recommended value range for the parameters of the SWAT hydrological model in the next round of parameter sampling simulation iteration. The parameters of the SWAT hydrological model are adjusted according to the recommended value range until the simulation accuracy of the SWAT hydrological model can no longer be improved. In this embodiment, the number of parameter sampling simulations in each round of parameter sampling simulation iteration of the SWAT hydrological model is set to 1500, and the number of iterations is 14 rounds.

[0064] Among them, the following methods are used to evaluate the simulation accuracy of the SWAT hydrological model:

[0065] This paper selects three evaluation indicators to evaluate the simulation accuracy of the SWAT hydrological model, namely the Pearson correlation coefficient PCC, the Nash coefficient NSE, and the percentage bias Pbias (unit: %). The formula is as follows:

[0066] (1)

[0067] In the formula is the measured flux in month i, is the flux simulated in month i; the month number i∈{1,2,…,n}, n is the total number of months; is the measured average value of the flux over n months; It is the simulated average value of the flux for n months; the fluxes are the total nitrogen flux and the total phosphorus flux in turn, that is, the preliminary simulated total nitrogen flux and the preliminary simulated total phosphorus flux output by the SWAT hydrological model simulation are evaluated by the Pearson correlation coefficient PCC respectively. The closer the evaluation index of the Pearson correlation coefficient PCC is to 1, the better.

[0068] (2)

[0069] (3)

[0070] It represents the Nash coefficient NSE. The closer the Nash coefficient NSE is to 1, the better the performance of the SWAT hydrological model is. Indicates the percentage deviation Pbias, which represents the error between the measured value and the simulated value. It is usually set in the range of [-15, 15]%. The closer the percentage deviation Pbias is to 0, the better.

[0071] Table 1 Parameters of the SWAT hydrological model

[0072] (T score represents the degree of sensitivity. The larger the absolute value of the T score, the more sensitive it is. The P value represents the significance. The closer the P value is to 0, the more significant the sensitivity is.)

[0073]

[0074] Step 3: Construct the agricultural season decomposition model SDA.

[0075] The meteorological data corresponding to an area of the entire watershed at a time point in the training set is used as a regional meteorological data sample point; an agricultural seasonal decomposition model SDA is constructed. The agricultural seasonal decomposition model SDA classifies the regional meteorological data sample points, preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux based on land use information. Each classification corresponds to the nitrogen influence period, phosphorus influence period and nitrogen and phosphorus weak shadow period, respectively.

[0076] In order to compare the preliminary simulated total nitrogen flux output by the hydrological model with the final simulated total nitrogen flux output by the subsequently constructed multivariate deep learning model, and to compare the preliminary simulated total phosphorus flux output by the hydrological model with the final simulated total phosphorus flux output by the subsequently constructed multivariate deep learning model, the elements corresponding to the meteorological data input to the multivariate deep learning model are consistent with the elements corresponding to the meteorological data input to the hydrological model. Therefore, the elements corresponding to the meteorological data input to the multivariate deep learning model include precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, and wind speed. The elements corresponding to the input data of the multivariate deep learning model also include preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux.

[0077] Nitrogen and phosphorus loads mainly come from two forms: point source pollution and non-point source pollution. Point source pollution refers to pollution from factories, etc. Currently, point source pollution has been effectively controlled, while non-point source pollution is the main source of nitrogen and phosphorus load pollution due to its unknown source and large diffusion area. Non-point source pollution mainly comes from agricultural economic activities (fertilization, pesticide application, etc.). Usually, the law of agricultural activities is: different types of crops have different sowing, fertilization, pesticide application and harvesting time nodes, and the amount of fertilizer and pesticide application is determined according to the crop planting area. Therefore, in order to better simulate the impact of non-point source pollution on total nitrogen flux and total phosphorus flux, this paper proposes a new agricultural seasonal decomposition model (SDA, Seasonal Decomposition of Agriculture) based on the law of agricultural activities, so as to pre-process the data input to the RABA model:

[0078] Step 3.1: The meteorological data corresponding to a region of the entire watershed in the training set at a time point is used as a regional meteorological data sample point, and the land use information corresponding to the regional meteorological data sample point at the time point is used as a basic attribute of the regional meteorological data sample point. The land use information of each region in the watershed obtained in step 1 includes the land type of the region at the corresponding time point. The land type is divided into crop land type and non-crop land type. The crop land type is further divided into nitrogen crop land type, phosphorus crop land type, and non-nitrogen and phosphorus crop land type based on the type of crop fertilizer and pesticide application. The land use information corresponding to the crop land type also includes the cultivated land time feature. The cultivated land time feature is the pesticide and fertilization period or the non-pesticide and fertilization period. The cultivated land time feature indicates whether the region is in the pesticide and fertilization period at the corresponding time point. One region corresponds to one land type and one cultivated land time feature at one time point. The elements corresponding to the regional meteorological data sample point include: precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, and wind speed. In this embodiment, the time point is selected in days.

[0079] Step 3.2: Classify the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux according to the land type and cultivated land time characteristics in the land use information corresponding to the regional meteorological data sample points:

[0080] The regional meteorological data sample points corresponding to the nitrogen crop land type and the cultivated land time characteristic of the pesticide and fertilization period are classified as the first characteristic sample sequence set, and the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period of the nitrogen crop land type are also classified as the first characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the same time point in the first characteristic sample sequence set are used as an agricultural season decomposition sample point in the first characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the first characteristic sample sequence set, and the first characteristic sample sequence set corresponds to the nitrogen impact period;

[0081] The regional meteorological data sample points corresponding to the pesticide and fertilization period for land types that are phosphorus crop land types and whose cultivated land time characteristics are the pesticide and fertilization period are classified as the second characteristic sample sequence set, and the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period for phosphorus crop land types are also classified as the second characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the same time point in the second characteristic sample sequence set are taken as an agricultural season decomposition sample point in the second characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence in the second characteristic sample sequence set, and the second characteristic sample sequence set corresponds to the phosphorus impact period;

[0082] The regional meteorological data sample points of non-crop land, non-nitrogen and phosphorus crop land, and the regional meteorological data sample points with the time characteristic of cultivated land being non-pesticide and fertilization period are classified as the third characteristic sample sequence set, and all preliminary simulated total nitrogen fluxes and preliminary simulated total phosphorus fluxes are also classified as the third characteristic sample sequence set. The regional meteorological data sample points, preliminary simulated total nitrogen fluxes, and preliminary simulated total phosphorus fluxes corresponding to the same time point in the third characteristic sample sequence set are taken as an agricultural season decomposition sample point in the third characteristic sample sequence set. The agricultural season decomposition sample points with consecutive time points in the third characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the third characteristic sample sequence set. The third characteristic sample sequence set corresponds to the weak influence period of nitrogen and phosphorus.

[0083] In this embodiment, the process of dividing the regional meteorological data sample points is as follows: Figure 8 As shown, specifically:

[0084] If the land type is non-crop land type, the corresponding regional meteorological data sample points are classified as the third characteristic sample sequence set; if the land type is crop land type, the crop land type in the region is further judged based on the crop fertilizer and pesticide type to see whether it belongs to the nitrogen crop land type. If it is not a nitrogen crop land type, it is further judged whether it belongs to the phosphorus crop land type. If the crop land type is non-nitrogen and phosphorus crop land type, that is, the crop land type neither belongs to the nitrogen crop land type nor the phosphorus crop land type, the corresponding regional meteorological data sample points are classified as the third characteristic sample sequence set; if the crop land type belongs to the nitrogen crop land type (such as the corresponding crops are rice and wheat), the cultivated land time characteristics of the regional meteorological data sample points are judged. If the cultivated land type is non-nitrogen and phosphorus crop land type, that is, the crop land type neither belongs to the nitrogen crop land type nor the phosphorus crop land type, the corresponding regional meteorological data sample points are classified as the third characteristic sample sequence set. If the time characteristic of the land is the pesticide and fertilization period (for example, rice is generally fertilized in the seedling and tillering stages), the corresponding regional meteorological data sample points are classified as the first characteristic sample sequence set. Similarly, if the crop land type belongs to the phosphorus crop land type and the time characteristic of the cultivated land is the pesticide and fertilization period, the corresponding regional meteorological data sample points are classified as the second characteristic sample sequence set; if the crop land type belongs to the nitrogen crop land type but the time characteristic of the cultivated land is not the pesticide and fertilization period, the corresponding regional meteorological data sample points are classified as the third characteristic sample sequence set; if the crop land type belongs to the phosphorus crop land type but the time characteristic of the cultivated land is not the pesticide and fertilization period, the corresponding regional meteorological data sample points are classified as the third characteristic sample sequence set.

[0085] The agricultural seasonal decomposition model (SDA) performs seasonal decomposition of regional meteorological data sample points, preliminary simulated total nitrogen fluxes, and preliminary simulated total phosphorus fluxes based on land use information and cultivated land temporal characteristics, thereby obtaining time series data that are more relevant to the total nitrogen flux and total phosphorus flux that need to be simulated. The data have more significant characteristics and are easier to be captured by the subsequently constructed multivariate deep learning model.

[0086] Furthermore, since the data sizes corresponding to the various elements in the regional meteorological data sample points differ significantly in magnitude, step 3 also includes step 3.3 for data cleaning. The specific operations are as follows:

[0087] Before the data in the first feature sample sequence set, the second feature sample sequence set, and the third feature sample sequence set are input into the subsequently constructed multivariate deep learning model, the data in the first feature sample sequence set are grouped according to factors and the data corresponding to each factor are respectively subjected to min-max normalization and standardized conversion in turn to obtain the first feature sample sequence set after cleaning; the data in the second feature sample sequence set are grouped according to factors and the data corresponding to each factor are respectively subjected to min-max normalization and standardized conversion in turn to obtain the second feature sample sequence set after cleaning; the data in the third feature sample sequence set are grouped according to factors and the data corresponding to each factor are respectively subjected to min-max normalization and standardized conversion in turn to obtain the third feature sample sequence set after cleaning. The factors corresponding to the data in the first feature sample sequence set, the second feature sample sequence set, and the third feature sample sequence set all include precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, wind speed, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux, among which precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, and wind speed are all meteorological data.

[0088] During the data cleaning process, min-max normalization was performed so that the values of the data corresponding to each element were all within the interval [0,1]. However, due to differences in the data variation ranges of different elements, such as the variations in maximum temperature, minimum temperature and wind speed, which were smaller than the variations in solar radiation, preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux, the maximum temperature, minimum temperature and wind speed were more evenly distributed in the interval [0,1] after min-max normalization. This difference in distribution needed to be standardized and converted to make the data distribution corresponding to each element more consistent with the normal distribution. Since precipitation and wind speed data had a special value of 0 (representing no rain and no wind), the data corresponding to precipitation and wind speed were standardized and converted using the mean, and other elements (i.e., maximum temperature, minimum temperature, solar radiation, relative humidity, preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux) were standardized and converted using the median.

[0089] Step 4: Build and train a multivariate deep learning model.

[0090] Step 4.1: Build a multi-dimensional deep learning model:

[0091] The multi-dimensional deep learning model built in this embodiment is the RABA (Residual-Aware Bidirectional Attention) model proposed based on the CNN-BILSTM model. Figure 6As shown in the figure, the RABA model includes a residual feature perception module RA and a bidirectional attention prediction module BA in sequence; the residual feature perception module RA includes a CNN input layer, a convolution layer, a pooling layer, and a CNN output layer in sequence; the bidirectional attention prediction module BA includes a BILSTM input layer, an LSTM layer, an attention layer, an activation layer, and a BILSTM output layer in sequence; the input data of the CNN input layer is added to the output data of the CNN output layer through a jump connection and then input into the BILSTM input layer.

[0092] In this embodiment, the input data of the CNN input layer is the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning, or the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning, or the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning; when the input data of the CNN input layer is the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning, the output of the RABA model is the corresponding secondary simulation first total nitrogen flux sequence and the secondary simulation first total phosphorus flux sequence; when the input data of the CNN input layer is the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning, the output of the RABA model is the corresponding secondary simulation second total nitrogen flux sequence and the secondary simulation second total phosphorus flux sequence; when the input data of the CNN input layer includes the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning, the output of the RABA model is the corresponding secondary simulation third total nitrogen flux sequence and the secondary simulation third total phosphorus flux sequence.

[0093] In the RABA model, the residual feature perception module RA is based on the CNN model, and the bidirectional attention prediction module BA is based on the BILSTM model. That is, the LSTM layer uses the BILSTM model. The CNN model can extract the local features of the input data and input the local features into the BILSTM model. However, in order to avoid network degradation problems when the depth of the CNN model increases, a residual module (such as Figure 7 As shown in Figure 2, the input data from the CNN input layer is added to the output data from the CNN output layer via a skip connection before being input to the BILSTM input layer. Although the BILSTM model can simultaneously consider the context of input data (time series data), thereby better capturing temporal dependencies, it introduces too many invalid features during the skip connections of features. Therefore, the bidirectional attention prediction module BA of the present invention embeds an attention layer on top of the BILSTM model. This attention layer utilizes a channel attention mechanism module (SE), which ensures that the final prediction results focus more on the important parts of the features reconstructed by the CNN model. The channel attention mechanism module (SE) calculates the influence of different feature factors on the classification results and selects important feature information with higher weights to improve the model's predictive capabilities.

[0094] The RABA model was built using the MATLAB 2024b Deep Network Designer. In the residual feature perception module (RA), the convolution kernel size was (3, 1), the maximum pooling window was set to (448, 1), and the number of channels was 64. In the channel attention mechanism module (SE), the number of attention heads was 2 (two-dimensional channels in time and space), and the activation layer used a sigmoid activation function.

[0095] Step 4.2: Train the multivariate deep learning model:

[0096] Based on the measured phosphorus flux and nitrogen flux at each time point in the hydrological and water quality data series corresponding to each area of the basin, the measured total phosphorus flux series and the measured total nitrogen flux series of the entire basin are extracted. The measured total phosphorus flux series includes the measured total phosphorus flux at each time point, and the measured total nitrogen flux series includes the measured total nitrogen flux at each time point.

[0097] The agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning are used as reference targets for model training to obtain a first trained multivariate deep learning model; the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning are used as reference targets for model training to obtain a second trained multivariate deep learning model; the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning are used as reference targets for model training to obtain a third trained multivariate deep learning model; that is, the trained multivariate deep learning model includes the first trained multivariate deep learning model, the second trained multivariate deep learning model and the third trained multivariate deep learning model.

[0098] In this embodiment, the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning is input into the RABA model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence are used as reference targets for model training to obtain the first trained RABA model; the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning is input into the RABA model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence are used as reference targets for model training to obtain the second trained RABA model; the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning is input into the RABA model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence are used as reference targets for model training to obtain the third trained RABA model.

[0099] During the model training process, the adaptive model optimizer Adam function is used for training, the loss function is the mean square error loss function MSE Loss, the learning rate is set to 0.0001, and the iteration round is set to 600.

[0100] Step 5: Couple the calibrated hydrological model, agricultural seasonal decomposition model SDA and the trained multivariate deep learning model to obtain a coupled model, and input the spatial data sequence, meteorological data sequence and hydrological and water quality data sequence in the sample to be processed into the coupled model to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence.

[0101] The spatial data sequence, meteorological data sequence and hydrological and water quality data sequence in the samples to be processed are input into the calibrated hydrological model to obtain the corresponding preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence. The meteorological data in the meteorological data sequence, the preliminary simulated total nitrogen flux in the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux in the preliminary simulated total phosphorus flux sequence of the samples to be processed are divided into the corresponding first characteristic sample sequence set, second characteristic sample sequence set and third characteristic sample sequence set through the agricultural season decomposition model SDA;

[0102] The data in the first feature sample sequence set are grouped according to the elements, and the data of each element are respectively subjected to min-max normalization and standardized conversion, and then input together into the first trained multivariate deep learning model to obtain the corresponding second-simulation first total nitrogen flux sequence and the second-simulation first total phosphorus flux sequence;

[0103] The data in the second feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the second trained multivariate deep learning model together to obtain the corresponding second secondary simulated total nitrogen flux sequence and the second secondary simulated total phosphorus flux sequence;

[0104] The data in the third feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the third trained multivariate deep learning model together to obtain the corresponding second-time simulated third total nitrogen flux sequence and the second-time simulated third total phosphorus flux sequence;

[0105] In the final simulated total nitrogen flux sequence, for each time point during the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the second-simulated first total nitrogen flux at the same time point in the second-simulated first total nitrogen flux sequence;

[0106] In the final simulated total nitrogen flux sequence, for each time point that is not in the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the average of the second simulated total nitrogen flux in the second simulated total nitrogen flux sequence and the third simulated total nitrogen flux in the third simulated total nitrogen flux sequence at the same time point;

[0107] In the final simulated total phosphorus flux sequence, for each time point during the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the second total phosphorus flux of the secondary simulation at the same time point in the second total phosphorus flux sequence of the secondary simulation;

[0108] In the final simulated total phosphorus flux sequence, for each time point that is not in the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the average of the secondarily simulated first total phosphorus flux in the secondarily simulated first total phosphorus flux sequence and the secondarily simulated third total phosphorus flux in the secondarily simulated third total phosphorus flux sequence at the same time point.

[0109] In this embodiment, the coupling model obtained by coupling the calibrated SWAT hydrological model, the agricultural seasonal decomposition model SDA and the trained RABA model is the SDA-SWAT-RABA coupling model. The trained RABA model includes a first trained RABA model, a second trained RABA model and a third trained RABA model. The spatial data sequence, meteorological data sequence and hydrological and water quality data sequence to be processed are input into the calibrated SWAT hydrological model to obtain the corresponding preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence. The meteorological data in the meteorological data sequence of the sample to be processed, the preliminary simulated total nitrogen flux in the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux in the preliminary simulated total phosphorus flux sequence are divided into the corresponding first feature sample sequence set, the second feature sample sequence set and the third feature sample sequence set by the agricultural seasonal decomposition model SDA. The data of each element in the first feature sample sequence set are respectively subjected to min-max normalization and standard folding. After calculation, they are input into the first trained RABA model together to obtain the corresponding first total nitrogen flux sequence of the secondary simulation and the first total phosphorus flux sequence of the secondary simulation; the data of each element in the second characteristic sample sequence set are respectively input into the second trained RABA model after min-max normalization and standardized conversion, to obtain the corresponding second total nitrogen flux sequence of the secondary simulation and the second total phosphorus flux sequence of the secondary simulation; the data of each element in the third characteristic sample sequence set are respectively input into the third trained RABA model after min-max normalization and standardized conversion, to obtain the corresponding third total nitrogen flux sequence of the secondary simulation and the third total phosphorus flux sequence of the secondary simulation.

[0110] Step 6: Evaluate the coupling model.

[0111] The evaluation indicators used for the coupled model and the SWAT hydrological model are consistent, namely, the Pearson correlation coefficient (PCC), the Nash coefficient (NSE), and the percentage bias (Pbias) (the unit of percentage bias is %).

[0112] This example compares the simulation accuracy of total nitrogen flux and total phosphorus flux of the SDA-SWAT-RABA coupled model with that of the SWAT hydrological model and the SWAT-RABA model. Figure 2 and Figure 3 This is a fitting effect diagram of the SDA-SWAT-RABA coupling model proposed in the present invention, the SWAT hydrological model, and the SWAT-RABA model in the simulation of total nitrogen flux and total phosphorus flux. Table 2 and Table 3 are the comparison results of various evaluation indicators of total nitrogen flux and total phosphorus flux simulation, respectively. Figure 4 and Figure 5 This is a comparison chart of the simulation results of the SDA-SWAT-RABA coupling model proposed in the present invention, the SWAT hydrological model, and the SWAT-RABA model in simulating total nitrogen flux and total phosphorus flux.

[0113] For the SWAT-RABA model, the spatial data sequence, meteorological data sequence and hydrological and water quality data sequence in the samples to be processed are input into the calibrated SWAT hydrological model to obtain the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux sequence; the meteorological data sequence, the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux sequence in the samples to be processed are input into the trained RABA model after min-max normalization and standardization conversion to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence; the RABA model training method in the SWAT-RABA model is: the meteorological data sequence, the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux sequence of the training set in step 1 are input into the RABA model, and the model training is performed with the corresponding measured total phosphorus flux sequence and the measured total nitrogen flux sequence as the target.

[0114] Table 2 Comparison of simulation results of the model on total nitrogen flux

[0115]

[0116] From the data in Table 2, it can be seen that the SDA-SWAT-RABA coupling model proposed in the present invention achieved better results in simulating total nitrogen flux. Compared with the SWAT hydrological model and the SWAT-RABA model, the Pearson correlation coefficient PCC of the SDA-SWAT-RABA coupling model increased by 33% and 4% during the validation period, the Nash coefficient NSE increased by 34% and 3%, and the percentage bias Pbias decreased by 4.44% and 0.31%.

[0117] Table 3 Comparison of simulation results of the models on total phosphorus flux

[0118]

[0119] From the data in Table 3, it can be seen that the SDA-SWAT-RABA coupling model proposed in the present invention also achieved better results in simulating total phosphorus flux. Compared with the SWAT hydrological model and the SWAT-RABA model, the Pearson correlation coefficient (PCC) of the SDA-SWAT-RABA coupling model increased by 31% and 3% during the validation period, the Nash coefficient (NSE) increased by 32% and 4%, and the percentage bias (Pbias) decreased by 6.55% and 4.54%.

[0120] In summary, compared with other methods, the Nash coefficient NSE of the nitrogen and phosphorus simulation method proposed in the present invention exceeds 0.94, and the relative error between the simulated value and the measured value is less than 1%.

[0121] Example 2

[0122] A coupled model nitrogen and phosphorus simulation device based on agricultural seasonal decomposition characteristics, which implements the coupled model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics described in Example 1, comprising:

[0123] A hydrological model construction module, used to implement step 2 described in Example 1;

[0124] The construction module of the agricultural seasonal decomposition model SDA is used to implement step 3 described in Example 1;

[0125] A multivariate deep learning model construction and training module for implementing step 4 of Example 1;

[0126] The model coupling module is used to implement step 5 described in Example 1.

[0127] Example 3

[0128] A computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements steps 1-5 in the above embodiment 1 when executing the computer program.

[0129] Example 4

[0130] A computer-readable storage medium stores a computer program, which implements steps 1-5 in the above embodiment 1 when executed by a processor.

[0131] Example 5

[0132] A computer program product includes a computer program, which implements steps 1-5 in the above embodiment 1 when executed by a processor.

[0133] The specific embodiments described herein are merely illustrative of the spirit of the present invention. Persons skilled in the art may make various modifications, additions, or substitutions to the described specific embodiments without departing from the spirit of the present invention or exceeding the scope of the appended claims.

Claims

1. A coupled model nitrogen and phosphorus simulation method based on agricultural seasonal decomposition characteristics, characterized in that: The steps include: Step 1: Prepare a training set, which includes spatial data sequences, meteorological data sequences, and hydrological and water quality data sequences corresponding to each region in the watershed; the spatial data sequences include spatial data at different time points, and the spatial data include land use information; the meteorological data sequences include meteorological data at different time points; and the hydrological and water quality data sequences include measured phosphorus flux and measured nitrogen flux at different time points; Step 2: Establish a hydrological model and calibrate the hydrological model using the training set to obtain a calibrated hydrological model; input the spatial data sequence and meteorological data sequence of the training set into the calibrated hydrological model to obtain a preliminary simulated total nitrogen flux sequence and a preliminary simulated total phosphorus flux sequence of the watershed; the preliminary simulated total nitrogen flux sequence includes preliminary simulated total nitrogen fluxes at different time points, and the preliminary simulated total phosphorus flux sequence includes preliminary simulated total phosphorus fluxes at different time points; Step 3: The meteorological data corresponding to a region of the entire watershed at a time point in the training set is used as a regional meteorological data sample point; an agricultural seasonal decomposition model (SDA) is constructed. The agricultural seasonal decomposition model (SDA) classifies the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the training set based on land use information. Each classification corresponds to the nitrogen influence period, phosphorus influence period, and nitrogen and phosphorus weak influence period, respectively. Step 4: Build a multivariate deep learning model and train the multivariate deep learning model using the regional meteorological data sample points corresponding to the training set, the preliminary simulated total nitrogen flux, and the preliminary simulated total phosphorus flux classified by the agricultural season decomposition model (SDA) to obtain a trained multivariate deep learning model. Step 5: Couple the calibrated hydrological model, agricultural seasonal decomposition model SDA, and trained multivariate deep learning model to obtain a coupled model; input the spatial data sequence, meteorological data sequence, and hydrological and water quality data sequence of the samples to be processed into the coupled model to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence.

2. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 1, characterized in that: The step 3 specifically includes the following steps: Step 3.

1. The meteorological data corresponding to a region of the entire watershed at a time point in the training set is used as a regional meteorological data sample point. The land use information corresponding to the regional meteorological data sample point at the time point is used as a basic attribute of the regional meteorological data sample point. The land use information includes the land type of the region at the corresponding time point. The land type is divided into crop land type and non-crop land type. The crop land type is further divided into nitrogen crop land type, phosphorus crop land type, and non-nitrogen and phosphorus crop land type based on the type of crop fertilizer and pesticide application. The land use information corresponding to the crop land type also includes the cultivated land time feature, which is the pesticide and fertilizer application period or the non-pesticide and fertilizer application period. Step 3.2: Classify the regional meteorological data sample points corresponding to the nitrogen crop land type and the cultivated land time characteristic as the pesticide and fertilization period as the first characteristic sample sequence set, and classify the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period of the nitrogen crop land type as the first characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the same time point in the first characteristic sample sequence set are used as an agricultural season decomposition sample point in the first characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the first characteristic sample sequence set, and the first characteristic sample sequence set corresponds to the nitrogen impact period; The regional meteorological data sample points corresponding to the pesticide and fertilization period for land types that are phosphorus crop land types and whose cultivated land time characteristics are the pesticide and fertilization period are classified as the second characteristic sample sequence set, and the preliminary simulated total nitrogen flux and preliminary simulated total phosphorus flux corresponding to the pesticide and fertilization period for phosphorus crop land types are also classified as the second characteristic sample sequence set; the regional meteorological data sample points, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux corresponding to the same time point in the second characteristic sample sequence set are taken as an agricultural season decomposition sample point in the second characteristic sample sequence set, and the agricultural season decomposition sample points with consecutive time points in the first characteristic sample sequence set constitute an agricultural season decomposition sample sequence in the second characteristic sample sequence set, and the second characteristic sample sequence set corresponds to the phosphorus impact period; The regional meteorological data sample points of non-crop land, non-nitrogen and phosphorus crop land, and the regional meteorological data sample points with the time characteristic of cultivated land being non-pesticide and fertilization period are classified as the third characteristic sample sequence set, and all preliminary simulated total nitrogen fluxes and preliminary simulated total phosphorus fluxes are also classified as the third characteristic sample sequence set. The regional meteorological data sample points, preliminary simulated total nitrogen fluxes, and preliminary simulated total phosphorus fluxes corresponding to the same time point in the third characteristic sample sequence set are taken as an agricultural season decomposition sample point in the third characteristic sample sequence set. The agricultural season decomposition sample points with consecutive time points in the third characteristic sample sequence set constitute an agricultural season decomposition sample sequence of the third characteristic sample sequence set. The third characteristic sample sequence set corresponds to the weak influence period of nitrogen and phosphorus.

3. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 2, characterized in that: The step 3 further comprises the following steps: Step 3.3: The data in the first feature sample sequence set are grouped according to elements, and the data corresponding to each element are subjected to min-max normalization and standardization conversion in turn to obtain the cleaned first feature sample sequence set; The data in the second feature sample sequence set are grouped according to elements, and the data corresponding to each element are respectively subjected to min-max normalization and standardized conversion in turn to obtain the cleaned second feature sample sequence set; The data in the third feature sample sequence set are grouped according to elements, and the data corresponding to each element are respectively subjected to min-max normalization and standardized conversion in turn to obtain a cleaned third feature sample sequence set; The elements corresponding to the data in the first characteristic sample sequence set, the second characteristic sample sequence set, and the third characteristic sample sequence set include precipitation, maximum temperature, minimum temperature, solar radiation, relative humidity, wind speed, preliminary simulated total nitrogen flux, and preliminary simulated total phosphorus flux.

4. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 3, characterized in that: The training of the multivariate deep learning model in step 4 includes the following steps: Extracting the measured total phosphorus flux sequence and the measured total nitrogen flux sequence of the entire watershed based on the measured phosphorus flux and the measured nitrogen flux at each time point in the hydrological and water quality data series corresponding to each area of the watershed, wherein the measured total phosphorus flux series includes the measured total phosphorus flux at each time point, and the measured total nitrogen flux series includes the measured total nitrogen flux at each time point; The agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the first feature sample sequence set after cleaning are used as reference targets for model training to obtain the first trained multivariate deep learning model; the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the second feature sample sequence set after cleaning are used as reference targets for model training to obtain the second trained multivariate deep learning model; the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning is input into the multivariate deep learning model, and the measured total phosphorus flux and the measured total nitrogen flux corresponding to the time point sequence of the agricultural season decomposition sample sequence in the third feature sample sequence set after cleaning are used as reference targets for model training to obtain the third trained multivariate deep learning model.

5. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 4, characterized in that: In step 5, the spatial data sequence, meteorological data sequence, and hydrological and water quality data sequence of the sample to be processed are input into the coupling model to obtain the corresponding final simulated total nitrogen flux sequence and the final simulated total phosphorus flux sequence, which specifically includes the following steps: The spatial data sequence, meteorological data sequence and hydrological and water quality data sequence in the samples to be processed are input into the calibrated hydrological model to obtain the corresponding preliminary simulated total nitrogen flux sequence and preliminary simulated total phosphorus flux sequence. The meteorological data in the meteorological data sequence, the preliminary simulated total nitrogen flux in the preliminary simulated total nitrogen flux sequence and the preliminary simulated total phosphorus flux in the preliminary simulated total phosphorus flux sequence of the samples to be processed are divided into the corresponding first characteristic sample sequence set, second characteristic sample sequence set and third characteristic sample sequence set through the agricultural season decomposition model SDA; The data in the first feature sample sequence set are grouped according to the elements, and the data of each element are respectively subjected to min-max normalization and standardized conversion, and then input together into the first trained multivariate deep learning model to obtain the corresponding second-simulation first total nitrogen flux sequence and the second-simulation first total phosphorus flux sequence; The data in the second feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the second trained multivariate deep learning model together to obtain the corresponding second secondary simulated total nitrogen flux sequence and the second secondary simulated total phosphorus flux sequence; The data in the third feature sample sequence set are grouped according to the elements, and the data of each element are respectively min-max normalized and standardized and converted, and then input into the third trained multivariate deep learning model together to obtain the corresponding second-time simulated third total nitrogen flux sequence and the second-time simulated third total phosphorus flux sequence; In the final simulated total nitrogen flux sequence, for each time point during the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the second-simulated first total nitrogen flux at the same time point in the second-simulated first total nitrogen flux sequence; In the final simulated total nitrogen flux sequence, for each time point that is not in the pesticide and fertilization period of the nitrogen crop, the corresponding final simulated total nitrogen flux is equal to the average of the second simulated total nitrogen flux in the second simulated total nitrogen flux sequence and the third simulated total nitrogen flux in the third simulated total nitrogen flux sequence at the same time point; In the final simulated total phosphorus flux sequence, for each time point during the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the second total phosphorus flux of the secondary simulation at the same time point in the second total phosphorus flux sequence of the secondary simulation; In the final simulated total phosphorus flux sequence, for each time point that is not in the pesticide and fertilization period of phosphorus crops, the corresponding final simulated total phosphorus flux is equal to the average of the secondarily simulated first total phosphorus flux in the secondarily simulated first total phosphorus flux sequence and the secondarily simulated third total phosphorus flux in the secondarily simulated third total phosphorus flux sequence at the same time point.

6. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 5, characterized in that: The multivariate deep learning model in step 4 is a RABA model, which includes a residual feature perception module RA and a bidirectional attention prediction module BA in sequence; the residual feature perception module RA includes a CNN input layer, a convolution layer, a pooling layer and a CNN output layer in sequence; the bidirectional attention prediction module BA includes a BILSTM input layer, an LSTM layer, an attention layer, an activation layer and a BILSTM output layer in sequence; the input data of the CNN input layer is added to the output data of the CNN output layer through a jump connection and then input into the BILSTM input layer.

7. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to claim 6, characterized in that: The attention layer adopts the channel attention mechanism module SE.

8. The method for simulating nitrogen and phosphorus using a coupled model based on agricultural seasonal decomposition characteristics according to any one of claims 1 to 7, characterized in that: The hydrological model is the SWAT hydrological model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, steps 1 to 5 of the nitrogen and phosphorus simulation method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, steps 1 to 5 of the nitrogen and phosphorus simulation method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Simulation experiment device for measuring and calculating farmland phosphorus migration and transformation proportion and method

    CN113607921A

  • Accessing agriculture productivity and sustainability

    US20220061236A1