Simulation and prediction system for water and fertilizer loss of slope farmland based on deep reinforcement learning

By simulating water erosion and topographic changes using graph structure data based on deep reinforcement learning, this method solves the problem of water flow path fixation and deformation mechanics disconnect in existing technologies, achieving high accuracy in predicting water and fertilizer loss and supporting precise control of agricultural non-point source pollution.

CN123072533APending Publication Date: 2026-11-10SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611563287.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-10
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing water and fertilizer loss simulation technologies cannot accurately simulate the stripping of surface soil and the reorganization of water flow paths during continuous rainfall, resulting in a disconnect between simulation results and actual processes. This makes it impossible to accurately capture the amount of water and soil loss, affecting the prediction and control of agricultural non-point source pollution.

Method used

A simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning is adopted. By constructing graph structure data containing nodes and edges, the system calculates the elevation deformation gradient in real time and dynamically reconstructs the edge data to simulate the dynamic topological evolution process of water erosion, topographic change and water path reorganization.

Benefits of technology

It improves the accuracy of water and fertilizer loss prediction, avoids the disconnect between the water kinetic energy distribution in the simulation and the actual physical process, enhances the identification of local high-concentration loss areas, and supports precision fertilization and ecological prevention and control decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123072533A_ABST
    Figure CN123072533A_ABST
Patent Text Reader

Abstract

The application discloses a kind of simulation prediction systems of slope farmland water and fertilizer loss based on deep reinforcement learning, it is related to the technical field of ecological environment and agricultural engineering, including: data acquisition module, for obtaining the three-dimensional point cloud elevation data of target area, soil erosion resistance index data, rainfall time series data and initial nutrient distribution data.In the iteration of rainfall time step, the system can dynamically reconstruct the edge data of graph, so that the model can respond to the microtopographic evolution caused by the erosion process, thereby effectively avoiding the serious disconnection between the water flow kinetic energy distribution in the middle and later stages of simulation and the actual physical process, so that the cumulative error of soil stripping volume and the total amount of nutrient loss attached thereto, which is highly dependent on water flow scouring force calculation, is generated, the accuracy of the prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ecological environment and agricultural engineering technology, specifically to a simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning. Background Technology

[0002] Sloping farmland is an important resource for agricultural production, but it is highly susceptible to severe water, soil, and nutrient loss under natural rainfall, leading to soil degradation and agricultural non-point source pollution. Therefore, accurate simulation and prediction of water and fertilizer loss processes in sloping environments are of great significance for formulating soil and water conservation measures and precision fertilization strategies.

[0003] Existing water and fertilizer loss simulation technologies typically employ spatial physical process models based on fixed grid divisions. These methods primarily construct static topographic networks and combine them with macroscopic hydrodynamic equations or traditional empirical formulas to perform evolutionary calculations on surface runoff and soil erosion, thereby estimating and predicting the loss over the entire rainfall cycle.

[0004] The convergence direction and kinetic energy of surface runoff are highly dependent on the underlying topographic features. However, in real-world continuous rainfall scenarios, persistent water erosion leads to continuous stripping of surface soil or localized sediment deposition, causing dramatic dynamic changes in the micro-topography of the slope. These changes in local micro-topography directly induce deflection and reorganization of water flow paths in real nature; for example, the development of tiny gullies caused by erosion can cause previously dispersed runoff to rapidly reconverge. If the aforementioned fixed spatial grid model is used, the water flow direction in the simulation calculation will be forcibly locked to the initial state before rainfall, completely unable to respond to the micro-topographic evolution brought about by the erosion process. This results in a severe disconnect between the water kinetic energy distribution in the later stages of the simulation and the actual physical process, leading to cumulative errors in the calculation of soil stripping amount and the total amount of nutrient loss attached to it, which are highly dependent on the erosive force of the water flow. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning.

[0006] To achieve the above objectives, the technical solution of the present invention is as follows:

[0007] A simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning includes:

[0008] The data acquisition module is used to acquire three-dimensional point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area;

[0009] The initial graph construction module is used to construct an initial graph structure data containing multiple node data and edge data connecting adjacent node data based on three-dimensional point cloud elevation data and initial nutrient distribution data. The node data includes elevation data, water depth data and fertilizer concentration data, and the edge data includes flow direction data.

[0010] The time-step iteration module is used to take the initial graph structure data as the current graph structure data and perform the following steps iteratively according to the time steps for the rainfall time series data:

[0011] The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output.

[0012] Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data.

[0013] The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step.

[0014] The results prediction module is used to generate water and fertilizer loss prediction results data based on the difference between the fertilizer concentration data contained in the final current graph structure data and the initial graph structure data after the rainfall time series data has been traversed.

[0015] A simulation and prediction method for water and fertilizer loss in sloping farmland based on deep reinforcement learning includes the following steps:

[0016] Acquire three-dimensional point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area;

[0017] An initial graph structure data is constructed based on 3D point cloud elevation data and initial nutrient distribution data, which includes multiple node data and edge data connecting adjacent node data. The node data includes elevation data, water depth data, and fertilizer concentration data, and the edge data includes flow direction data.

[0018] Using the initial graph structure data as the current graph structure data, the following steps are executed iteratively step-by-step for the rainfall time series data:

[0019] The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output.

[0020] Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data.

[0021] The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step.

[0022] After traversing the rainfall time series data, the water and fertilizer loss prediction results are generated based on the difference between the fertilizer concentration data contained in the final current graph structure data and the initial graph structure data.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0024] This invention divides the target area into a graph structure containing node and edge data. During the iteration of rainfall time steps, the system can calculate the elevation deformation gradient of adjacent nodes in real time based on updated elevation data. When the elevation deformation gradient meets preset conditions, the system can dynamically reconstruct the edge data of the graph, thereby simulating the dynamic topological evolution process in real nature: "water erosion - local topographic change - water path reorganization - gully development." This allows the model to respond to the micro-topographic evolution brought about by erosion, effectively avoiding a severe disconnect between the water kinetic energy distribution in the later stages of the simulation and the actual physical process. This prevents cumulative errors in the calculation of soil stripping amount and the total loss of nutrients attached to it, which are highly dependent on water erosion force, thus improving the accuracy of the prediction results. Attached Figure Description

[0025] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:

[0026] Figure 1 This is a system diagram of the present invention;

[0027] Figure 2 This is a flowchart of the present invention. Detailed Implementation

[0028] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.

[0029] Application Overview:

[0030] In basic research on soil and water conservation and non-point source pollution control on sloping farmland, the dynamic feedback mapping of hydrodynamics and micro-topography evolution is regarded as a key indicator for measuring the accuracy of water and fertilizer loss simulation. This high-precision evolution prediction is essentially a process of continuous and adaptive evolution of spatiotemporal structure at the hydrophysical and mechanical level. That is, through the real-time game between surface runoff shear force and soil erosion resistance, the surface physical deformation is used as the direct driving force for spatial topological reorganization, and the local micro-elevation changes are mapped non-destructively to the water flow network of the entire slope, thereby reproducing the real evolution trajectory with specific dynamic characteristics in digital space.

[0031] However, existing technologies lack a dynamic response mechanism to ensure the consistency of physical evolution between the input hydrological rainfall-driven process and the output surface spatial topological reconstruction. This results in an inability to accurately capture the problems of runoff path solidification and deformation mechanics disconnect during continuous rainfall. Runoff path solidification manifests as the simulation model, while incorporating erosion kinetic equations to calculate soil erosion, actually relies on an initially set static spatial grid to provide an unchanging water flow direction. Deformation mechanics disconnect manifests as the system, when dealing with continuous scouring, lacking dynamic feedback on spatial characteristics, leading to a disconnect between elevation downcutting and flow direction deflection. This causes the flow field energy to exhibit distorted uniform dissipation during simulation, and the kinetic energy of water is consumed by the static grid. Consequently, a strict dynamic correspondence cannot be established between local surface erosion and the reorganization of water flow paths, resulting in misjudgment or ambiguous feedback of the system's response to complex terrain water convergence characteristics. This, in turn, affects the accurate assessment of water and fertilizer loss kinetics and the targeted nature of ecological prevention guidance.

[0032] For example, in the simulation of non-point source pollution in agricultural watersheds, when the system calculates water and fertilizer loss from long-duration heavy rainfall, the traditional physical process model can only capture the runoff convergence trend under the initial topography through conventional static grids, but cannot distinguish whether the continuous scouring is accompanied by the hidden water flow path reorganization caused by the development of gullies. Furthermore, when the slope is severely downcut in local micro-topography due to soil stripping, the system only records the appearance of soil and nutrient loss generated independently by each grid, and fails to monitor the abnormal fluctuations in effective catchment area and the sharp increase in water kinetic energy convergence effect driven by local elevation changes. Specifically, the system misjudges the concentrated runoff after the formation of gullies as the original thin-layer flow on the slope and gives an underestimation of shear force feedback, or misclassifies microscopic sediment deposition as unchanged topography. As a result, the simulation process continuously solidifies the incorrect static hydrological characteristics and cannot form a real erosion trajectory that conforms to the principles of fluid dynamic evolution.

[0033] If the above problems are not addressed, the simulation prediction system will continue to lose its ability to objectively extrapolate the evolution of water and fertilizer conditions on slopes. Specifically, the unbroken solidification of runoff paths will cause the model to over-rely on the initial topography before rainfall, leading to deviations in the flow energy transfer path from the principles of geomorphological evolution. This will severely weaken the destructive force of concentrated scouring during the gully erosion stage. Simultaneously, the failure to correct for the disconnect between deformation mechanics and the system will cause a complete halt in spatial grid topology updates, preventing the water and fertilizer transport process from exhibiting the nonlinear abrupt changes expected in nature. Ultimately, this will cause the prediction results to lose their ability to identify areas of high localized loss. Consequently, the distortion of simulation data will systematically hinder decision-makers from grasping the core spatiotemporal patterns of agricultural non-point source pollution diffusion, affecting the achievement of macro-level governance goals such as ecological interception and precision fertilization.

[0034] like Figure 1 and Figure 2 As shown, a simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning includes:

[0035] The data acquisition module is used to acquire 3D point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area. This module is mainly responsible for constructing the initial boundary conditions for simulation. Specifically, the system acquires 3D point cloud elevation data of the target area to characterize the initial micro-topographic undulations; simultaneously, it acquires soil erosion resistance index data, which includes a comprehensive evaluation of soil physicochemical properties, to define the physical resistance baseline of soil to water stripping at different spatial locations; it acquires rainfall time series data recorded at specific time intervals as the hydrodynamic driving input for the entire simulation process; and it acquires initial nutrient distribution data of the target area to anchor the material concentration benchmark at the start of the simulation. These four types of data are matched and aligned in a spatial coordinate system to provide basic parameters for subsequent construction of the topology network.

[0036] The initial graph construction module is used to construct an initial graph structure based on 3D point cloud elevation data and initial nutrient distribution data. This initial graph structure includes multiple node data and edge data connecting adjacent nodes. Node data includes elevation, water depth, and fertilizer concentration data, while edge data includes flow direction data. To overcome the deficiency of traditional discrete grids in representing hydrological connectivity, this module converts spatial geographic data into node- and edge-based graph structure data. Specifically, the system divides the target area into spatial grids on a 2D plane, abstracting each grid as an independent node. The corresponding 3D point cloud elevation data and initial nutrient distribution data are assigned to the elevation and fertilizer concentration data of this node, respectively, while the water depth data, representing the initial runoff, is uniformly set to zero. Based on this, the system constructs directed edges between adjacent nodes with gravitational potential energy differences by comparing the elevation differences (i.e., terrain elevation). The vector direction from a high-tide node to a low-tide node is defined as the flow direction data in the edge data. Thus, the system establishes an initial graph structure containing initial hydrological and material connectivity paths.

[0037] The time-step iteration module is used to take the initial graph structure data as the current graph structure data and perform the following steps iteratively according to the time steps for the rainfall time series data:

[0038] The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output.

[0039] Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data.

[0040] The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step.

[0041] This module is the core component for achieving deep coupling of water and soil processes. The system sets the initial graph structure data as the current graph structure data and uses the acquired rainfall time series data as the driving force to perform iterative simulations according to the set time steps.

[0042] Within a single time step's cyclic execution cycle, the system first superimposes the rainfall data corresponding to the current time step onto the water depth data of each node in the current graph structure data; then, based on the flow direction data explicitly indicated in the edge data, it simulates the physical convergence process of surface runoff, aggregating the water depth and fertilizer concentration characteristics of upstream nodes along the flow direction to downstream nodes, thereby outputting environmental state data characterizing local water catchment potential energy and material input.

[0043] Subsequently, the system synchronously inputs the aggregated environmental state data and the soil erosion resistance index data of the corresponding nodes into a pre-trained deep reinforcement learning model. This model uses a policy network to nonlinearly map water kinetic energy and soil mechanical resistance, autonomously outputting surface deformation data for each node, i.e., the specific thickness of soil stripping or sediment deposition. Based on this data, the system updates the elevation data of the corresponding nodes in real time and simultaneously deducts or maintains fertilizer concentration data proportionally, achieving synchronized updates of deformation and nutrient status.

[0044] After node updates are completed, the system enters the crucial topology reorganization phase. The system recalculates the elevation deformation gradient between adjacent nodes after the update and monitors whether this gradient meets preset conditions, such as a reversal of elevation and terrain or a downcut depth exceeding the critical threshold for gully development. Once these conditions are met, it indicates that the micro-topographic deformation at that location is sufficient to alter the original water flow path. The system immediately deletes the original edge data, re-establishes upstream and downstream connectivity and new flow direction data based on the updated elevation relationships, and generates reconstructed edge data. The system combines the node data with the reconstructed edge data to form a new graph structure data, which is then used as the current graph structure data for the next time step. This process repeats throughout the entire rainfall time series, achieving a continuous dynamic closed loop of water erosion, topographic downcutting, and flow direction reconstruction.

[0045] The results prediction module generates water and fertilizer loss prediction data based on the difference in fertilizer concentration data between the final current graph structure data and the initial graph structure data after the rainfall time series data has been traversed. When the time step iteration module completes the traversal of all rainfall time series data, the system freezes the graph structure update operation. This module extracts the final current graph structure data generated after experiencing the complete rainfall erosion process and compares it with the initial graph structure data before the simulation started, aligning each spatial node. By calculating the difference in fertilizer concentration data contained in each spatial node between the initial and final states, the net nutrient loss within the local grid is obtained. Finally, the system accumulates the concentration differences of all nodes within the spatial range of the target area to generate water and fertilizer loss prediction data with clear spatial distribution characteristics and total mass statistical attributes.

[0046] The core innovation of this invention lies in dividing the target area into graph-structured data containing node data and edge data. During the iteration of rainfall time steps, the system can calculate the elevation deformation gradient of adjacent nodes in real time based on the updated elevation data. When the elevation deformation gradient meets preset conditions, the system can dynamically reconstruct the edge data of the graph, thereby simulating the dynamic topological evolution process of "water erosion - local topographic change - water path reorganization - gully development" in real nature. This allows the model to respond to the micro-topographic evolution brought about by the erosion process, effectively avoiding a serious disconnect between the water kinetic energy distribution in the later stages of the simulation and the actual physical process. This prevents cumulative errors in the calculation of soil stripping amount and the total loss of nutrients attached to it, which are highly dependent on water erosion force, thus improving the accuracy of the prediction results.

[0047] The specific execution logic of the data acquisition module is as follows:

[0048] 3D point cloud elevation data: refers to a data set containing a large number of dense spatial coordinate points (horizontal coordinate, vertical coordinate, and elevation coordinate) on the surface of a target area, obtained through spatial scanning equipment, and is used to reconstruct the micro-topographic undulation features of a slope in digital space.

[0049] Soil erosion resistance index data: refers to a comprehensive dimensionless characteristic value generated by quantifying and weighting various physicochemical indicators (such as clay content, organic matter content, etc.) that affect the soil's resistance to erosion, and used to characterize the soil's ability to resist shearing force from water flow.

[0050] Rainfall time series data refers to a one-dimensional sequence consisting of the precipitation depth or precipitation volume values ​​recorded in each continuous time step after the entire rainfall process is discretized according to a fixed time step.

[0051] Initial nutrient distribution data: refers to the initial mass concentration data of the target fertilizer or nutrient (such as total nitrogen and total phosphorus) in the soil at various spatial coordinate locations on the surface of the target area before the occurrence of rainfall erosion and loss.

[0052] Step 1: Acquire and process the 3D point cloud elevation data of the target area:

[0053] A drone equipped with a lidar is used to fly over the target area along a planned route and scan, receiving laser pulses reflected from the ground surface. The time difference of flight is calculated to generate an initial 3D point cloud. Since the initial point cloud includes surface vegetation (such as crop residues and weeds), a spatial local extremum filtering algorithm is needed to extract the elevation data of the actual exposed surface points. The calculation formula is as follows:

[0054] ;

[0055] in, For step function, when When the value is 1, The value is 0 at that time; Characterizing the first The bare surface elevation data retained after filtering of the data points; Characterizing the first The raw elevation data obtained by scanning each data point; Characterizing the first The lowest original elevation data within the local preset grid space where each data point is located; This represents a preset vegetation height filtering threshold. The value range of this preset feature is set from 0.1 meters to 0.3 meters, and the specific value is determined based on the average height of crop residues in the field. For example, if the average height of crop residues is 0.15 meters, then the value is 0.15.

[0056] By comparing the elevation difference between the local lowest point and the current point, suspended data points with elevation differences greater than the vegetation height threshold are filtered out, thereby eliminating the interference of crops and weeds on the terrain, obtaining the true soil surface elevation, and preventing vegetation from being misjudged as terrain protrusions in subsequent water flow simulations.

[0057] Step 2: Test and calculate the soil erosion resistance index data:

[0058] Soil samples were taken from the target area according to a pre-defined grid, and the percentage of clay mass, percentage of organic matter mass, and root bulk density of the samples were tested in the laboratory. Subsequently, a multi-index weighted summation formula was used to calculate the comprehensive erosion resistance index for each sampling point. The calculation formula is as follows:

[0059] ;

[0060] in, Characterizing the first Soil erosion resistance index data from each sampling point; Characterizing the first The percentage of clay mass at each sampling point after normalization; Characterizing the first The percentage of organic matter mass at each sampling point after normalization; Characterizing the first The root volume density values ​​of each sampling point after normalization; , , The weight coefficients for the three attributes are represented respectively, and the sum of the three is 1, as shown in the table below:

[0061]

[0062] Soil's resistance to erosion is determined by a variety of physical and chemical properties, which cannot be accurately described by a single index. This formula reduces the dimensionality of multi-dimensional physical and chemical properties to a comprehensive scalar value, providing a single and quantitatively clear environmental state input variable for subsequent deep reinforcement learning models.

[0063] Step 3: Obtain and discretize the rainfall time series data:

[0064] The continuous precipitation intensity variation curve of the entire rainfall event is obtained by deploying meteorological stations or rain gauges in the target area. To adapt to the computational mechanism of the time-step iteration module, the continuous rainfall needs to be discretized by integrating and summing over the time step. The calculation formula is as follows:

[0065] ;

[0066] in, Characterizing the first Rainfall data within a time step; This characterizes the absolute start time of the rainfall event; The current time step number is represented by an integer greater than 0. This represents a preset single time step. The value range of this preset feature is set from 1 minute to 5 minutes, and the specific value is adjusted according to the intensity of the rainfall (1 minute for heavy rain and 5 minutes for showers). Characterization with continuous time The changing instantaneous rainfall intensity function.

[0067] Simulation models cannot handle continuous-time data streams. By using definite integral formulas, the continuous rainfall process is divided into discrete hydrological driving data aligned with the simulation step size, ensuring that there is a corresponding surface water depth increment input in each iteration cycle.

[0068] Step 4: Collect and interpolate to generate initial nutrient distribution data:

[0069] The nutrient concentrations obtained from the soil sampling described above represent data at discrete coordinate points. For unsampled areas, the nutrient concentrations at any continuous spatial location within the target area are calculated using an inverse distance-weighted spatial interpolation formula. The calculation formula is as follows:

[0070] ;

[0071] Among them, distance calculation is expanded as follows: ; Initial fertilizer concentration data characterizing the spatial location m to be predicted; The total number of known sampling points that actually sampled and tested nutrient concentrations; The traversal sequence number representing the known sampling points; Characterizing the first Nutrient mass concentrations measured by chemical experiments at known sampling points; Characterizing the spatial location to be predicted coordinates Coordinates of the vth sampling point The Euclidean linear distance between them; This characterizes the distance decay exponent in the inverse distance weighting formula. The preset value range for this feature is set to 1.5 to 2.5, typically 2.

[0072] Soil nutrients exhibit a gradual spatial distribution pattern, with closer locations showing more similar properties. By assigning different weights to known sampling points based on distance using this formula, the limited discrete sampling data can be smoothly extended to the entire target area, generating a continuous nutrient background distribution field covering the entire map.

[0073] The aforementioned technologies employ spatial filtering to remove non-topographical interference elements from lidar point clouds to obtain exposed elevations; multi-index weighting techniques normalize soil physicochemical properties into a comprehensive erosion resistance index; definite integral segmentation techniques discretize continuous rainfall curves into sequence data aligned with the simulation time step; and inverse distance weighted spatial interpolation techniques expand discrete chemical sampling points into a continuous background concentration field covering the entire region. This achieves spatiotemporal alignment and standardized reconstruction of multi-source heterogeneous environmental data, eliminates vegetation interference with topographic undulations, compensates for insufficient spatial coverage of chemical sampling points, and converts complex rainfall and soil physical resistance into structured numerical values ​​that the model can directly utilize. This ensures that when subsequent modules construct graph structure data, each grid node can be assigned accurate, physically consistent, and time-aligned multidimensional initial parameters.

[0074] The specific execution logic of the initial graph construction module is as follows:

[0075] An initial graph structure data, containing multiple node data and edge data connecting adjacent node data, is constructed based on 3D point cloud elevation data and initial nutrient distribution data. Specifically, this includes:

[0076] The three-dimensional point cloud elevation data is divided into a spatial grid array, each spatial grid is mapped to a node data, and the initial nutrient distribution data is assigned to the fertilizer concentration data in the corresponding node data.

[0077] Calculate the relative elevation difference between adjacent node data, construct edge data between upstream node data and downstream node data corresponding to relative elevation differences greater than zero, and take the direction from upstream node data to downstream node data as the flow direction data of edge data.

[0078] Spatial grid array: A set of regular square matrix units that divide a continuous two-dimensional geographic space according to a preset resolution.

[0079] Node data: The basic data-carrying unit in the graph structure model, corresponding to a separate spatial grid in terms of spatial location, used to store physical and chemical properties such as surface undulations, water accumulation, and substance concentration within that local space.

[0080] Edge data: In a graph structure model, the connecting line elements that link two spatially adjacent node data are used to characterize whether there is a physical topological association or material exchange channel between adjacent spatial grids.

[0081] Flow direction data: Spatial vector pointing attributes contained in the edge data, used to indicate the spatial direction of surface runoff and the nutrient transport associated with the runoff under gravity.

[0082] Relative elevation difference: The algebraic difference between the surface elevation values ​​corresponding to two adjacent node data points, reflecting the local terrain slope and gravitational potential energy difference.

[0083] Step 1: Construct a spatial grid array and map the elevation and depth data of the nodes:

[0084] Based on the preset spatial grid resolution, the previously acquired 3D point cloud elevation data is projected onto a 2D plane and divided into an orthogonal spatial grid array. Each grid in the array is mapped to a node in the graph structure. All valid point cloud elevation values ​​falling within a specific grid spatial range are extracted, and their arithmetic mean is calculated as the elevation data of that node; simultaneously, the initial water depth of all nodes is set to zero. The formula for calculating the arithmetic mean involved in this step is as follows:

[0085] ;

[0086] in: Characterizing the first Elevation data for each node; The representation falls on the The total number of point cloud data points within the three-dimensional geometric range of a spatial grid; The traversal sequence number of the point cloud data points within the grid; Characterizing the first The elevation values ​​of point clouds on the exposed ground surface. For the preset spatial grid resolution in this step, that is, the geometric side length parameter of the grid, its value is usually set to the range of 0.5 meters to 2.0 meters, and in actual operation, it is generally set to 1.0 meter.

[0087] The formula for assigning the initial water depth is as follows: ;

[0088] in: Characterizing the first Initial water depth data for each node.

[0089] The original LiDAR point cloud data is extremely large and spatially unevenly distributed, making it unsuitable for direct computation as network nodes. By using the arithmetic mean formula, the irregular point cloud is resampled into elevation features of regular grid nodes. This not only reduces the data dimensionality to decrease computational load but also smooths out localized minor invalid terrain noise. The zeroing formula establishes a physical benchmark of no water accumulation on the surface before rainfall.

[0090] Step 2: Map the fertilizer concentration characteristics of the node data:

[0091] Determine the two-dimensional coordinates of the geometric center of each of the above-described spatial grids. Extract the nutrient concentration value corresponding to that coordinate point from the initial nutrient distribution field generated earlier through interpolation, and assign it to the node data. The assignment formula is as follows:

[0092] ;

[0093] in: Characterizing the first Fertilizer concentration data contained in each node's data; Characterizing the first The lateral spatial coordinates of the geometric center of each spatial grid; Characterizing the first The longitudinal spatial coordinates of the geometric center of each spatial grid; The preceding data acquisition module uses the inverse distance weighting algorithm to generate the initial fertilizer concentration function equation in a continuous two-dimensional space.

[0094] Since nutrient data and elevation data come from different testing and calculation systems, this mapping formula forcibly binds the chemical concentrations obtained from laboratory analysis to the corresponding spatial terrain nodes, so that a single node in the graph structure simultaneously possesses both terrain and chemical attributes, providing a data foundation for simulating the co-migration of water and fertilizer after rainfall.

[0095] Step 3: Calculate the relative elevation difference between adjacent node data:

[0096] For spatial grid arrays, an eight-neighbor search algorithm is employed. Taking the currently traversed node as the center node, it retrieves the data of its eight spatially adjacent neighbor nodes in eight directions. The elevation data of the center node and its neighboring nodes are retrieved separately, and the algebraic difference between the two is calculated. The calculation formula is as follows:

[0097] ;

[0098] in: Characterizing the central node Its neighboring nodes The relative elevation difference between them; Characterizing the central node Elevation data; Characterizing adjacent nodes Elevation data; The spatial relative position number of adjacent nodes is represented by an integer from 1 to 8.

[0099] The convergence and transport of surface water are entirely governed by gravitational potential energy, and the relative elevation difference is a direct physical quantity for assessing this potential energy gradient. This formula quantifies the elevation difference between local grids, providing a rigorous quantitative criterion for the system to subsequently determine whether water flow can occur and the target direction of water collection.

[0100] Step 4: Construct edge data and establish flow direction data:

[0101] Based on the positive or negative value of the relative elevation difference, hydrological topological edges are established and assigned directions. When When the elevation of the central node is higher than that of the adjacent node, it indicates that the water flow has the physical conditions to flow from the central node to the adjacent node. In this case, the central node is marked as upstream node data, and the adjacent node is marked as downstream node data. A connecting edge is constructed between them, and the spatial vector pointing from upstream to downstream is defined as the flow direction data of this edge. The specific mapping table of adjacent node positions and flow directions is as follows:

[0102]

[0103] For the spatial grid edge length, if the relative elevation difference is not greater than 0, edge data in this direction is not constructed between the central node and its adjacent node. A positive and negative elevation difference truncation algorithm eliminates inverted or level slope connections that do not conform to gravity principles, reducing redundant topological edges. Assigning definite flow direction attributes to the edge data reconstructs the originally unrelated static grid matrix into a directed topological graph containing clearly defined water catchment paths.

[0104] In the aforementioned techniques, a dimensionality reduction mapping technique is used to fuse three-dimensional spatial point clouds and interpolated concentrations into a two-dimensional grid node data; eight-neighbor algebraic difference calculation is used to extract elevation gradient features between grids; and a gradient threshold-based unidirectional connection construction mechanism is employed to generate topological edge data containing vector pointing elements only in a single direction from high-potential-energy nodes to downward-potential-energy nodes, thus reorganizing discrete matrix data into network data with logical pointing. An initial network topology model with explicit hydrological connectivity physical significance is established. The potential transport channels of runoff under gravity field are pre-established and solidified through graph-structured edge data, eliminating the need for repeated downstream grid searches in subsequent simulations, reducing the complexity of water-fertilizer co-migration calculations, and constructing a standard input format structure for introducing graph neural networks and other methods for feature information transmission.

[0105] The specific execution logic of the time step iteration module is as follows:

[0106] Extract the initial graph structure data constructed above, assign values ​​to it, and set it as the current graph structure data. Start the time axis loop to extract the rainfall time series data in chronological order. For the rainfall time series data, perform the following steps iteratively step-by-step:

[0107] Step 1: Obtain the rainfall data at the current time step and overlay it onto the water depth data of each node in the current graph structure data.

[0108] Rainfall data: refers to the total physical amount of precipitation that falls on the surface of the target area within a specific single time step period, obtained by extracting rainfall time series data at the current time node.

[0109] Water depth data refers to the vertical depth of surface water accumulation in an independent spatial node (i.e., a single spatial grid) within a graph structure data at a specific calculation time. It is a core physical hydrological parameter for calculating the shear force of surface water flow.

[0110] Step 1: Obtain the rainfall data for the current time step and perform unit conversion:

[0111] The system's internal simulation clock advances to the current time step, retrieves the discretized rainfall time series data, and extracts the rainfall value corresponding to the current time step number. Since meteorological rainfall is typically recorded in millimeters, while 3D point cloud elevation data and the spatial grid of graph structure nodes typically use meters as the standard unit of measurement, to ensure dimensional consistency in subsequent spatial feature aggregation calculations, it is necessary to convert the acquired rainfall data to physical units for water depth increments. The calculation formula is as follows:

[0112] ;

[0113] in, Characterize the current time step The water depth increment data obtained after conversion under unified dimensions; Characterizing the first extracted from rainfall time series data Rainfall data at each time step; This formula represents a pre-defined physical unit conversion factor. For cases where rainfall is measured in millimeters and spatial elevation in meters, this factor is fixed at 1000. Multi-source heterogeneous data often presents conflicts in physical dimensions when input into simulation systems. This formula, by introducing a fixed unit conversion factor, eliminates the dimensional barriers between meteorological precipitation data and 3D spatial geographic data, ensuring that no systematic calculation bias of orders of magnitude occurs when hydrological data is input into spatial nodes.

[0114] Step 2: Overlay the water depth increments across the entire domain onto the node water depth data:

[0115] After unifying the dimensions, the system iterates through all spatial node data contained in the current graph structure data. The calculated water depth increment data is directly input as the atmospheric precipitation for the current time step, and algebraically added to the residual water depth data of each spatial node at the end of the previous time step to obtain the instantaneous total water depth of each node before the convergence. The calculation formula is as follows:

[0116] ;

[0117] in, Characterizing the first Data of each node at the current time step Water depth data after superimposing precipitation input; Characterizing the first The data of each node in the previous time step The remaining water depth data at the end of the iteration, when the system is in the first time step, At that time, this value is the water depth data initially set to zero; Characterize the current time step The transformed water depth increment data. Real rainfall events uniformly cover the entire exposed slope surface. This formula, through indiscriminate accumulation of all nodes in the graph, accurately maps the single meteorological rainfall variable that changes over time onto a complex graph structure network with spatial coordinate attributes, realistically reproducing the synchronous accumulation process of rainfall across the entire physical slope surface.

[0118] Example 1: Setting the spatial grid resolution The value is 1.0 meter, and the system is currently executing the first time step. ).

[0119] In the initial graph structure data, the target node (Assuming it's the center node of grid number 1) Initial residual water depth before the simulation starts rice.

[0120] Obtain the rainfall data corresponding to the first time step from the rainfall time series data. Millimeters. Unit conversion calculation:

[0121] Preset conversion factor ;

[0122] Water depth increment rice.

[0123] Perform node depth superposition calculation:

[0124] Water depth data after precipitation superimposed on target node 1 The updated water depth data of target node 1, 0.0025 meters, will be stored in the current graph structure data and directly used for subsequent feature aggregation operations based on flow direction data within this time step.

[0125] In the aforementioned technology, relying on a time-step loop mechanism, continuous rainfall events are divided into discrete increments aligned with the calculation cycle. At the beginning of each time step, meteorological precipitation is converted into water depth increments in absolute physical space through unit conversion. This increment is then superimposed in real-time onto the residual water depth of each spatial node in the graph structure using a global node traversal and accumulation method. This achieves precise and synchronous conversion from meteorological precipitation time-series driven data to digital spatial grid physical parameters. This enables the simulation system to respond to transient meteorological inputs, allowing water depth data at each node to dynamically accumulate as the rainfall process progresses. This provides an accurate instantaneous water volume basis for subsequent feature aggregation based on gravity gradients between adjacent nodes, improving the model's calculation sensitivity when facing complex showers or torrential rains with drastically changing meteorological conditions.

[0126] Step 2: Based on the flow direction data in the edge data, perform feature aggregation on the adjacent node data to output environmental state data, specifically including:

[0127] Based on the flow data, adjacent node data are divided into upstream node data and downstream node data;

[0128] Calculate the relative elevation difference between the elevation data in the upstream node data and the downstream node data;

[0129] Calculate the ratio of the relative elevation difference to the preset node spacing, and use it as the slope weight;

[0130] Extract water depth and fertilizer concentration data from upstream node data;

[0131] The extracted water depth data and fertilizer concentration data are fused with the slope weight and then superimposed onto the feature matrix of the downstream node data.

[0132] An activation operation is performed on the superimposed feature matrix to output environmental state data representing the current local water catchment potential energy.

[0133] Preset node spacing: refers to the actual physical horizontal geometric distance between two adjacent spatial nodes in the graph structure during the two-dimensional spatial mesh generation process, used to quantify the horizontal length of the water catchment path.

[0134] Feature matrix: refers to a mathematical multidimensional array or vector structure used to temporarily store and accumulate various physical and chemical properties (such as water depth increment, substance concentration) from various upstream nodes.

[0135] Activation operation: refers to the process of applying numerical constraints and nonlinear transformations to feature data that has undergone linear superposition and summation using nonlinear mathematical mapping functions in neural networks or feature engineering calculations.

[0136] Step 1: Node role classification based on data flow:

[0137] In the current graph structure data, the system traverses all edge data. Based on the flow direction data recorded in the edge data, it identifies spatial nodes with connectivity relationships. The spatial node corresponding to the starting point of the flow direction data vector is classified as upstream node data, and the spatial node corresponding to the ending point of the flow direction data vector is classified as downstream node data. For a specific downstream node, it may correspond to multiple incoming upstream nodes.

[0138] Step 2: Calculate the relative elevation difference:

[0139] For each pair of upstream and downstream node data points, their elevation data before surface deformation occurred at the current time step is extracted. The vertical difference in elevation between the two nodes is calculated by algebraic subtraction. The calculation formula is as follows:

[0140] ;

[0141] in, The relative elevation difference between upstream and downstream node data obtained from characterization calculations; The elevation data that remains at the end of the previous time step represents the data from the upstream node. This represents the residual elevation data of downstream nodes at the end of the previous time step. The relative elevation difference is the direct source of the potential energy difference in water flow. This formula quantifies the gravitational potential energy difference as upstream water flows downstream by calculating the absolute elevation difference, providing a fundamental variable for subsequently calculating the physical impact weights of the confluence.

[0142] Step 3: Calculate the slope weight:

[0143] Divide the calculated relative elevation difference by the preset node spacing between the two nodes to obtain the actual terrain slope along the local connecting line, and use this slope as the gradient weight for the confluence. The calculation formula is as follows:

[0144] ;

[0145] in, The slope weight represents the direction of flow from the upstream node to the downstream node; It represents the preset node spacing between upstream and downstream nodes.

[0146] The specific value of the preset node spacing is mapped based on the resolution used when defining the spatial grid array, as described earlier. The preset spatial grid side length ranges from 0.5 meters to 2.0 meters, typically set to 1.0 meter. The preset node spacing and its mapping relationship are shown in the table below:

[0147]

[0148] The scouring kinetic energy of water flow is related not only to the drop in elevation but also to the horizontal distance (i.e., the steeper the slope, the faster the flow velocity). This formula converts the pure elevation difference into a standardized slope gradient, which conforms to the hydraulic gradient calculation principle in fluid mechanics and ensures that the weighted distribution of the confluence kinetic energy conforms to the real physical topography.

[0149] Step 4: Extract upstream node features:

[0150] After determining the confluence slope weight, the system retrieves the specific state parameters from the corresponding upstream node data in the current graph structure data. It extracts the water depth data from the upstream node data after the current time step's rainfall superposition, and also extracts the fertilizer concentration data remaining at the upstream node at the end of the previous time step.

[0151] Step 5: Feature fusion calculation and matrix overlay:

[0152] The extracted upstream water depth data and fertilizer concentration data are multiplied and fused with their corresponding slope weights. If multiple upstream nodes flow into the same downstream node, the sums of all input tributaries are accumulated, and the result is merged with the downstream node's own data and stored in the feature matrix. The formula for superimposing water depth features is as follows:

[0153] ;

[0154] The formula for superimposing fertilizer characteristics is as follows:

[0155] ;

[0156] in, The summation results of the superposition of the characteristic matrix with respect to the water depth at the downstream node; Characterizes the water depth data of downstream nodes at the current time step after superimposed rainfall; It represents the total number of upstream nodes that merge into this specific downstream node; The traversal sequence number of the upstream node that merges into this downstream node; Characterizing the first The water depth data after rainfall is superimposed on the current time step of each upstream node; The summation results of fertilizer concentration at downstream nodes in the characterization feature matrix; Characterizes the fertilizer concentration data retained by the downstream node in the previous time step; Characterizing the first The fertilizer concentration data retained by upstream nodes in the previous time step. This calculation logic reflects the mass conservation and kinetic energy transfer of surface runoff. The slope weight acts as a regulating valve for water and fertilizer migration rates; the greater the slope, the higher the proportion of upstream conditions transferred downstream. This formula realizes the dynamic flow measurement of hydrology and materials along the graph structure lines within a local spatial range.

[0157] Step 6: Feature matrix activation operation:

[0158] A nonlinear activation function is applied to the superimposed feature matrix to filter out tiny negative values ​​or invalid noise points caused by computational inaccuracies, outputting the final environmental state data. The activation formula is as follows:

[0159] ;

[0160] ;

[0161] in, Characterizes the hydraulic potential energy component in the environmental state data output after the downstream node is activated; Characterizes the substance concentration feature component in the environmental state data output after the downstream node is activated.

[0162] Water depth and nutrient concentration in nature are both non-negative physicochemical quantities. By using the calculation formula of the modified linear unit activation function, theoretically unreasonable negative values ​​can be truncated to zero, ensuring the absolute physical rationality of the environmental state data input into subsequent deep reinforcement learning models.

[0163] Example 2: Continuing from the calculation example above. Assume that there are adjacent nodes 1 and 2 in the graph structure. In the initial state:

[0164] Node 1 (upstream node) elevation data rice.

[0165] Node 2 (downstream node) elevation data rice.

[0166] Node 1 is located due north of node 2, with a preset node spacing. rice.

[0167] Initial fertilizer concentration data for node 1 mg / L, Initial fertilizer concentration data at node 2 mg / L.

[0168] Based on the previous stage of superimposed rainfall calculations, the water depth data for node 1 was obtained. Meters; assuming uniform rainfall, water depth data at node 2. rice.

[0169] Calculate the relative elevation difference: rice.

[0170] Calculate slope weight: .

[0171] Extract features and perform feature matrix superposition and aggregation (assuming node 2 has only one upstream node 1):

[0172] Water depth features superimposed: rice.

[0173] Fertilizer characteristics superposition: mg / L.

[0174] Perform the activation process:

[0175] Activation of hydraulic potential energy characteristics: .

[0176] Activation of substance concentration characteristics: .

[0177] The final output contains environmental state data with two feature components, which characterize that downstream node 2 not only receives its own rainfall at the current time step, but also receives water and fertilizer from node 1 according to the slope ratio.

[0178] In the aforementioned technology, an information aggregation technique based on a graph neural network framework is employed, constructing feature transfer weights according to terrain slope. The dispersed water depth and nutrient concentration from multiple upstream sources are transformed into an information flow carrying kinetic energy parameters, which is then aggregated into the feature matrix of downstream nodes using a weighted summation method. Finally, a nonlinear activation function is used to normalize the disordered superimposed data into a standard environmental state data vector. This achieves explicit quantification and feature dimensionality reduction of the spatial water runoff process, transforming complex macroscopic hydrological runoff physics phenomena into numerical vectors that can be directly read by deep learning models. Through slope-weighted aggregation calculations, downstream nodes can accurately perceive and accumulate the kinetic energy and attached nutrients from various upstream tributaries, ensuring the continuity and logical consistency of water flow scouring force on a spatial scale in simulations.

[0179] Step 3: Input environmental status data and soil erosion resistance index data into the deep reinforcement learning model, and output the surface deformation action data corresponding to each node data, specifically including:

[0180] The environmental state data and soil erosion resistance index data are concatenated and input into the policy network of the deep reinforcement learning model. Based on the concatenated environmental state data, the water flow shear force features acting on each node data are extracted.

[0181] The strategy network maps the characteristics of water flow shear force with the spliced ​​soil erosion resistance index data to generate deformation probability distribution data;

[0182] Sampling is performed based on the deformation probability distribution data, and the surface deformation action data corresponding to each node data is output. When the surface deformation action data is a positive value, it represents the soil stripping thickness, and when it is a negative value, it represents the sediment deposition thickness.

[0183] Deep reinforcement learning model: a machine learning framework that combines deep neural networks and reinforcement learning algorithms. It uses the powerful feature extraction capabilities of neural networks to approximate the policy function, enabling it to autonomously output action decisions based on the input environment state.

[0184] Policy network: The core neural network component in deep reinforcement learning models, responsible for establishing a direct mapping relationship from the environment state space to the action space. Its output is usually the mathematical probability distribution parameters of the actions.

[0185] Water flow shear force characteristics: Abstract data features extracted from the hidden layer of a neural network to characterize the tangential physical tearing force generated by surface runoff on the underlying soil surface during its flow.

[0186] Deformation probability distribution data: Statistical distribution model parameters (such as the mean and standard deviation of a normal distribution) calculated by the policy network are used to describe the probability of terrain changes of different thicknesses occurring at this spatial node.

[0187] Step 1: Feature splicing and water flow shear force feature extraction:

[0188] The system concatenates environmental state data (including hydraulic potential energy and material concentration components) with soil erosion resistance index data obtained from the pre-processor, forming a single fused input vector, which is then input to the input layer of the policy network. Subsequently, the first hidden layer of the policy network extracts the water flow shear force characteristics acting on the current node based on the hydraulic potential energy components in the concatenated features, using linear matrix multiplication and bias terms. The calculation formula is as follows:

[0189] ;

[0190] ;

[0191] in, Characterizing the first The node at the th The concatenated feature vectors of the input policy network at each time step; Characteristic components of hydraulic potential energy in environmental state data; Characteristic components of substance concentration in environmental state data; Characterizing the first Soil erosion resistance index data for each node; The corresponding representation strategy network extracted by the network The characteristics of water flow shear force at each node; Predefined neuron weight parameters used to extract shear force in the representation strategy network; Preset neuron bias parameters used to extract shear force in the representation strategy network.

[0192] In physics, the shear force of water flow is mainly determined by water depth and topographic gradient, while These two physical quantities have been integrated. Through the linear mapping formula of the neural network, the macroscopic hydrological state vector is transformed into low-level features representing destructive forces, providing a data foundation of the same dimension for subsequent game theory calculations with soil resistance.

[0193] Step 2: Mapping calculation generates deformation probability distribution data:

[0194] The policy network enters the deep computation stage, inputting the extracted water flow shear force features and soil erosion resistance index data from the spliced ​​input into the subsequent continuous action hidden layer. Through nonlinear mapping of the fully connected layer, two key statistical parameters of a normal distribution are calculated and generated: the mean deformation and the standard deviation of deformation, thereby constructing the deformation probability distribution data. The calculation formula is as follows:

[0195] ;

[0196] ;

[0197] in, The mean parameter characterizing the probability distribution data of deformation; The neuron weights corresponding to the shear force characteristics when the mean of the mapping is calculated; The neuron weights corresponding to the soil erosion resistance index when the mean of the characterization mapping are calculated. Since soil resistance can hinder deformation, these weights usually exhibit negative values ​​after model training. Neuron bias parameters when calculating the mean of a characterization mapping; The standard deviation parameter characterizes the probability distribution data of deformation. , , These respectively characterize the corresponding neuron weights and bias parameters when calculating the standard deviation of the mapping; Characterizes the natural exponential function.

[0198] Soil erosion is a physical process influenced by a variety of microscopic random factors, making it difficult to characterize directly with deterministic numerical values. This formula maps deterministic physical characteristics into a statistically significant probability space by constructing dynamic mean and standard deviation. The standard deviation formula uses a natural exponential function to ensure that the variance of the output is always within a reasonable positive range.

[0199] Step 3: Sampling and action data output based on probability distribution:

[0200] After constructing the deformation probability distribution data, the system introduces random noise variables and uses a reparameterized sampling mechanism to extract a specific continuous real value from this normal distribution, which is then output as the surface deformation action data for the corresponding node. The calculation formula is as follows:

[0201] ;

[0202] in, The character representing the final output The node at the th Data on surface deformation at each time step; This represents a noisy numerical variable randomly sampled from a standard normal distribution. The reparameterized sampling formula removes randomness from the parameter calculation of the neural network and transforms it into an external input noise term. This allows the neural network to perform backpropagation to calculate gradients during training and enables the model to simulate the random characteristics of microscopic soil particle shedding or sediment deposition in nature during prediction.

[0203] Example 3: Continuing from the calculation example above. Currently executing the first time step ( The target node is downstream node 2 (), ).

[0204] The soil erosion resistance index data for node 2 obtained in the first step are known. .

[0205] Given the hydraulic potential energy characteristic components of the node 2 environmental state data calculated above. .

[0206] Feature splicing and extraction of shear force features:

[0207] Preset extraction weights bias .

[0208] Calculate the characteristics of water flow shear force:

[0209] .

[0210] Mapping calculation generates deformation probability distribution parameters:

[0211] Preset mean weight Resistance weight mean bias .

[0212] Calculate the mean deformation:

[0213] rice.

[0214] Assuming the deformation standard deviation is calculated using the natural index rice.

[0215] Randomly sample and output action data:

[0216] The system randomly generates standard normal noise variables. .

[0217] Calculate surface deformation data:

[0218] rice.

[0219] The final output motion data is a positive value. The characterization node 2 underwent a thickness change at this time step. Soil stripping phenomenon at the meter level. This value will be directly input into subsequent modules to update elevation and fertilizer concentration data.

[0220] In the aforementioned technology, a deep reinforcement learning strategy network is used for end-to-end data mapping. Destructive force features (environmental state) and resistance features (soil resistance) are input into the same network architecture through feature concatenation. Shear force features are extracted in the hidden layers, and network branching calculations using the mean and standard deviation are used to construct the probability distribution of the continuous action space. Finally, specific real-valued action values ​​are output through reparameterization sampling techniques incorporating standard normal noise. This achieves intelligent stochastic simulation of the mechanical mechanisms of soil erosion, breaking the rigid limitations of fixed physical equations and endowing the system with nonlinear fitting capabilities. The output real-valued action data inherently possesses physical direction attributes (positive values ​​represent stripping, negative values ​​represent deposition), enabling the system to simulate both the process of soil being torn apart and lost by water flow, and the terrain restoration process of sediment accumulation in low-lying areas when water kinetic energy weakens, all within the same computational framework.

[0221] Step 4: Update the elevation data and fertilizer concentration data of each node in the current map structure data based on the surface deformation data. This includes:

[0222] When the surface deformation data characterizes the soil stripping thickness, the difference between the elevation data and the soil stripping thickness is calculated as the updated elevation data. The ratio of the soil stripping thickness to the preset effective soil layer thickness is also calculated to generate the nutrient loss ratio. The fertilizer concentration data is updated based on the nutrient loss ratio to obtain the updated fertilizer concentration data.

[0223] When surface deformation data characterizes sediment deposition thickness, the sediment deposition thickness is superimposed on the elevation data to obtain updated elevation data, while maintaining the current fertilizer concentration data unchanged.

[0224] Soil stripping thickness: refers to the vertical geometric depth of the surface soil in the area where the target spatial node is located that is destroyed and carried away by runoff shear force within a specific time step, and is characterized by positive surface deformation action data.

[0225] Preset effective soil layer thickness: refers to the total vertical depth of the topsoil of sloping farmland containing high levels of agricultural nutrients (such as artificially applied fertilizers), and is the physical boundary benchmark for calculating nutrient loss.

[0226] Nutrient loss ratio: refers to the ratio of the thickness of soil stripped away to the total preset effective soil layer thickness, used to quantify the proportion of chemical substances lost simultaneously with soil particles.

[0227] Sediment deposition thickness: refers to the vertical height at which suspended soil particles carried upstream settle and accumulate on the surface of the current node after the water flow energy weakens, and is characterized by the absolute value of negative surface deformation data.

[0228] Step 1: Logical determination of deformation action attributes:

[0229] Extract the surface deformation data corresponding to each node in the current graph structure data and determine their numerical signs. When the value is greater than zero, it is determined that soil stripping and erosion has occurred at the current node, and the calculation branch for stripping and renewal begins; when the value is less than or equal to zero, it is determined that sediment deposition has occurred at the current node, and the calculation branch for sedimentation and renewal begins. The mapping relationship table for this logical branch is as follows:

[0230]

[0231] Step 2: Perform data update under soil stripping conditions:

[0232] When surface deformation data characterizes soil stripping thickness, the elevation data from the previous time step is extracted, and the stripping thickness is subtracted to obtain the latest surface elevation. Simultaneously, the proportion of the stripping thickness to the preset effective soil layer is calculated, and the current fertilizer concentration is subtracted from this proportion. The elevation update calculation formula is as follows:

[0233] ;

[0234] The formula for calculating the nutrient loss ratio is as follows:

[0235] ;

[0236] The formula for calculating fertilizer concentration updates is as follows:

[0237] ;

[0238] in, Characterizing the first Data of each node at the current time step Updated elevation data; Characterizing the first The elevation data retained by each node in the previous time step; The positive surface deformation action data output by the deep reinforcement learning model represents the soil stripping thickness. Characterize the proportion of nutrient loss generated by the calculation; This characterizes the preset effective soil layer thickness. The preset value ranges from 0.15 meters to 0.35 meters, but in actual implementation, it is set to 0.20 meters based on the conventional mechanical tillage layer depth of the sloping farmland in the target area. Characterizing the first The fertilizer concentration data of each node after the current time step is updated; Characterizing the first The fertilizer concentration data retained by each node in the previous time step.

[0239] Nutrients in agricultural non-point source pollution are mostly attached to topsoil particles. The elevation subtraction formula directly reflects the downcutting degradation of the terrain; the proportional deduction formula establishes a linear coupling relationship between geometric deformation and chemical concentration, ensuring strict synchronization between soil erosion calculation and non-point source pollution calculation.

[0240] Step 3: Perform data update under sediment deposition conditions:

[0241] When surface deformation data characterizes sediment deposition thickness, the absolute value of the negative value is extracted as the actual physical deposition thickness. This is then added to the elevation data from the previous time step. During this process, the chemical properties of the original grid nodes are not altered. The elevation update calculation formula is as follows:

[0242] ;

[0243] The formula for maintaining fertilizer concentration is as follows:

[0244] ;

[0245] in, The absolute value of negative surface deformation data is taken to convert it into a numerical value representing the actual physical thickness of sediment deposition. Sediment deposition causes local topographic uplift, and the additive formula accurately reflects the accumulation and burial phenomena in depressions or gentle slopes. Because the nutrient content of exogenous sediment is uncertain during migration and easily diluted by water flow, a formula that maintains a constant nutrient concentration at the original nodes is used, simplifying the calculation logic and avoiding spurious spikes in nutrient concentration in the depositional area.

[0246] Example 4: Continuing from the previous calculation example. The current execution is the first time step, with the target node being downstream node 2. The initial parameters of node 2 in the previous time step are known to be:

[0247] Elevation data rice;

[0248] Fertilizer concentration data mg / L.

[0249] Earth surface deformation action data output by deep reinforcement learning model rice.

[0250] Preset effective soil layer thickness rice.

[0251] Judgment: Due to If the value is positive, it indicates that soil stripping has occurred at this node.

[0252] Stripping state update calculation:

[0253] Calculate the difference between elevation data and soil stripping thickness:

[0254] rice.

[0255] Calculate the nutrient loss ratio:

[0256] .

[0257] Update fertilizer concentration data based on the nutrient loss rate:

[0258] mg / L.

[0259] Finally, at the end of the first time step, node 2 has an updated elevation of 9.9980 meters and an updated fertilizer concentration of 0.99 mg / L. These data will be retained in the graph structure and used in subsequent calculations of elevation deformation gradients and graph topology reconstruction.

[0260] The aforementioned technology employs a physical process classification and update mechanism based on numerical sign. For erosion and stripping areas, motion features are simultaneously used as geometric subtraction terms in elevation calculations and proportional attenuation driving terms in concentration calculations; for siltation areas, motion features are used as geometric addition terms in elevation calculations. This achieves deep spatiotemporal coordination between the physical structure and chemical composition of spatial nodes, ensuring that the elevation fluctuations of each spatial grid in the digital model accurately and synchronously lead to changes in the composition of attached materials at any time step, thus improving the accuracy of simulation and prediction of water-fertilizer co-migration processes.

[0261] Step 5: Calculate the elevation deformation gradient between adjacent node data based on the updated elevation data, and reconstruct the edge data in the current graph structure data when the elevation deformation gradient meets preset conditions to obtain new graph structure data. Specifically, this includes:

[0262] Obtain the updated elevation data from adjacent node data, calculate the current relative elevation difference between the two as the elevation deformation gradient;

[0263] Determine whether the positive or negative relationship of the elevation deformation gradient has reversed compared to the previous time step, or whether the absolute value of the elevation deformation gradient is greater than the preset ditch threshold.

[0264] When the positive and negative relationship is reversed or the absolute value is greater than the preset fine groove threshold, it is determined that the elevation deformation gradient meets the preset condition, the original edge data between adjacent node data is deleted, the new upstream node data and downstream node data are determined based on the updated elevation data, the direction of the new upstream node data pointing to the new downstream node data is taken as the new flow direction data, the reconstructed edge data is generated, and the new graph structure data is combined to form new graph structure data.

[0265] When the positive and negative relationships have not reversed and the absolute value is not greater than the preset ditch threshold, it is determined that the elevation deformation gradient does not meet the preset conditions. The original edge data is retained and combined with the updated node data to directly form new graph structure data.

[0266] Reversal of positive and negative relationships: This refers to the phenomenon that the relative elevation of two adjacent spatial nodes after the current time step is updated is reversed compared with the relative elevation at the end of the previous time step. For example, water originally flowed from node A to node B, but after deformation, the elevation of node A is lower than that of node B.

[0267] Preset gully threshold: refers to the critical relative elevation difference value that triggers a sudden change in the dynamic morphology of slope hydrodynamics. When the elevation difference between adjacent nodes reaches this value, it indicates the appearance of a significant downcutting gully on the ground surface, causing the water flow path to forcibly converge into the gully.

[0268] Reconstruction: In a digital graph structure, this refers to the process of clearing the original connectivity and flow vectors between two nodes and reassigning new connectivity directions to these two nodes based on the latest calculated physical elevation data.

[0269] Step 1: Obtain elevation data and calculate the current elevation deformation gradient:

[0270] After updating the preceding surface deformation attributes, the system traverses all pairs of spatially adjacent nodes in the current graph structure data. It extracts the latest elevation data of two adjacent nodes after their recent update, performs an algebraic subtraction calculation, and calculates the current relative elevation difference between the two. This value is the elevation deformation gradient for the current time step. The calculation formula is as follows:

[0271] ;

[0272] in, Characterizing the first Each node and its neighboring nodes At the current time step Updated elevation deformation gradient; Characterizing the first Each node at the current time step Updated elevation data; Characterizing adjacent nodes At the current time step Updated elevation data. The continuous accumulation of minute local deformations on the Earth's surface eventually manifests as differences in elevation between nodes. This formula quantifies the actual degree to which erosion or deposition affects local topographic gradients by directly calculating the updated elevation differences, providing a direct mathematical measure for subsequent assessments of whether water flow paths are obstructed or shifted.

[0273] Step 2: Perform the judgment calculation based on the preset conditions:

[0274] The system extracts the elevation deformation gradient between corresponding nodes from the previous time step and multiplies it with the newly calculated current elevation deformation gradient to determine if the positive / negative relationship has reversed. Simultaneously, it extracts the absolute value of the current elevation deformation gradient and compares it with a preset ditch threshold. The formula for determining the reversal of the positive / negative relationship is as follows:

[0275] ;

[0276] The formula for determining the fine groove threshold is as follows:

[0277] ;

[0278] in, The value of the indicator that represents the reversal of the positive and negative relationship, when When this happens, the positive / negative relationship is reversed; Characterizing the first Each node and its neighboring nodes In the previous time step Retained elevation deformation gradient; The numerical value of the criterion characterizing the fine groove features, when When the absolute value of the elevation deformation gradient is greater than the preset ditch threshold, it is determined that the elevation deformation gradient is greater than the preset ditch threshold. Characterizes the preset ditch threshold. The value of this preset feature ranges from 0.05 meters to 0.20 meters, and is usually set according to soil type. Sandy loam has weak erosion resistance and is usually set to 0.05 meters, while clay loam has strong erosion resistance and is usually set to 0.15 meters.

[0279] The multiplication formula utilizes the mathematical property of positive and negative signs to directly and efficiently filter out node pairs where terrain elevations interchange; the absolute value subtraction formula transforms continuous geometric elevation differences into explicit Boolean logic triggering conditions. This combined judgment logic enables the digital map structure to identify two typical surface physical evolution phenomena: "water flow reversal" and "water cascade incision."

[0280] Step 3: Edge data reconstruction when conditions are met:

[0281] When the system determines or When 0 is met (either of the two conditions is satisfied to trigger the preset condition), the system locates the corresponding node. With nodes First, the original edge data and flow direction data connecting the two elements are forcibly deleted from the graph structure. Then, the system re-compares... and The magnitude of the value. If If node k is set as the new upstream node and node q is set as the new downstream node, a new flow of data from k to q is generated; otherwise, data from k to q is generated. point to The new flow data is then generated. Finally, the reconstructed edge data is rebound to the nodes and combined into the new graph structure data.

[0282] Step 4: Retain edge data when conditions are not met:

[0283] When the system determines and This indicates that although the surface has deformed, the original macroscopic slope pattern has not been broken. The system will retain the original edge data between these two nodes and their internal flow direction data without any modification, directly combine them with the node data after the elevation update, encapsulate them into new graph structure data, and use them as the current graph structure data for the next time step.

[0284] Example 5: Following the previous calculation example, the first time step is now being executed.

[0285] Assuming at the initial time ( There exist adjacent nodes 3 and 4, with initial elevations of respectively. rice, rice.

[0286] Initial elevation deformation gradient rice.

[0287] Since node 4 is higher than node 3, the initial edge data flow is from node 4 to node 3.

[0288] The preset fine groove threshold is set to rice.

[0289] At the current time step ( During the deformation update phase, due to strong water erosion, node 4 in the deep reinforcement learning model was severely stripped away, resulting in a sharp drop in the updated elevation. Meters; Node 3 did not deform, and its elevation remained unchanged. rice.

[0290] Calculate the current elevation deformation gradient:

[0291] rice.

[0292] Preset condition judgment:

[0293] Reversal Judgment Indicators: .

[0294] Fine groove judgment index: .

[0295] Judgment result: Although (Not reaching the fine groove threshold), but When the positive and negative relationships are reversed, the preset conditions for reconstruction are triggered.

[0296] Edge data reconstruction:

[0297] The system deletes the existing edge data pointing from node 4 to node 3. The latest elevation is then re-compared. Node 3 becomes the new upstream node, and node 4 becomes the new downstream node. The system constructs a new edge data, generates new flow data from node 3 to node 4, and combines them into a new graph structure data to enter the next time step.

[0298] The aforementioned technology employs a dynamic graph network reconstruction technique based on deformation gradient indices. Within each time step, dual triggering conditions are established by tracking the sign flip and absolute value mutation of the relative elevation differences between nodes. Once the deformation exceeds the mechanical tolerance, the destruction and reconstruction of the graph topology edge data are immediately executed, forcing the water flow path to be reorganized according to the latest three-dimensional geometric and physical morphology. This achieves the synchronous evolution of micro-topography and confluence topology in the digital twin space, breaking the bottleneck of static mesh locking. This enables the simulation prediction system to simulate the complex nonlinear hydrodynamic feedback process of "erosion changing topography—topography reshaping flow direction—flow direction intensifying erosion" in real nature, improving the reliability of the model's evolution calculations when facing severe damage to complex terrain.

[0299] Preferably, the preset groove threshold is dynamically obtained through the following steps:

[0300] Acquire soil physical parameter data and spatial grid resolution data for the target area. The soil physical parameter data includes soil cohesion data and median particle size data.

[0301] Soil cohesion data and median particle size data are input into a preset soil erosion mechanics model to calculate the critical flow shear force data required to trigger gully erosion.

[0302] Based on the critical flow shear force data and the average slope data of the target area, the corresponding critical runoff incision depth data are calculated by reverse calculation.

[0303] The critical runoff incision depth data and spatial grid resolution data are scale-mapped to obtain the critical elevation difference between adjacent node data, and the critical elevation difference is set as the preset ditch threshold.

[0304] Soil cohesion data refers to the intrinsic binding force between soil particles against shear failure. It is usually determined by the clay content, moisture and organic matter in the soil and is obtained through geophysical experiments such as indoor direct shear tests.

[0305] Median particle size data: refers to the diameter of soil particles that account for 50% of the total mass of a soil sample. It is used to characterize the overall particle size distribution of the soil in the region and is obtained using a laser particle size analyzer.

[0306] Soil erosion mechanics model: a physical and mathematical equation constructed based on the fundamental laws of fluid mechanics and soil mechanics, used to describe the minimum mechanical conditions required for water flow to destroy soil structure and remove it from the surface.

[0307] Critical flow shear force data: refers to the instantaneous tangential frictional force threshold of surface runoff during its flow process, which is just enough to overcome the cohesion between soil particles and its own weight, thus triggering soil stripping (i.e., the initial state of gully development).

[0308] Critical runoff incision depth data: refers to the minimum vertical water depth required for surface water to generate the aforementioned critical runoff shear force under specific slope conditions.

[0309] Step 1: Obtain soil physical parameter data and spatial grid resolution data for the target area:

[0310] During the simulation system initialization phase, the spatial grid resolution data (such as the geometric side length of the grid) previously determined is retrieved. Simultaneously, representative soil samples are extracted from the target area and sent to the geotechnical laboratory. Soil cohesion data of the test samples are obtained through direct shear tests, and median particle size data are obtained through sieve analysis or laser particle size analyzers.

[0311] Step 2: Calculate the critical shear force data. Input the acquired soil cohesion data and median particle size data into the preset soil erosion mechanics model to calculate the critical physical force threshold required to trigger gully erosion. The specific calculation formula of this soil erosion mechanics model is as follows:

[0312] ;

[0313] in, Characterizing critical flow shear force data; Data characterizing soil cohesion; Characterizing the median particle size; Characterizes the preset soil particle density. The typical range of soil particle density in nature is 2600 to 2700. It usually takes a fixed value. ; Characterizes the preset water flow density. The fixed value for the density of conventional freshwater is... ; The constant representing gravitational acceleration has a fixed value. ; The first empirical fitting coefficient characterizes the contribution of cohesion to resistance to erosion. The second empirical fitting coefficient characterizes the contribution of particle gravity to resistance to erosion.

[0314] Here is a pre-defined mapping table of empirical fit coefficients:

[0315]

[0316] Soil erosion resistance is composed of both chemical bonding (cohesion) and physical gravity (particle weight). This formula integrates these two mechanical mechanisms of erosion resistance, combining experimentally measured discrete physical parameters into a unified hydrodynamic force index, thus providing a quantifiable physical and mechanical basis for setting the threshold.

[0317] Step 3: Back-calculate the critical runoff downcut depth data:

[0318] Based on the principles of open channel flow mechanics, the shear force of the water flow is determined by both water depth and slope. The system extracts topographic elevation data of the target area to calculate the global average slope data, and combines this with the critical shear force to calculate the required downcut depth of the water flow to reach that shear force using an inverse equation. The inverse calculation formula is as follows:

[0319] ;

[0320] in, Characterization of the critical runoff downcut depth data obtained from the calculation; Characterizes the critical flow shear force data obtained in the previous step; Characterizing the preset water flow density, with a value of ; The constant representing gravitational acceleration, with values... ; The average slope data representing the target area is obtained by taking the mean of the derivative of the initial elevation data. The simulation model directly monitors the elevation difference rather than the force in the spatial topology. This inverse formula transforms the "force threshold" in the mechanical dimension into a "depth threshold" in the geometric dimension, allowing subsequent steps to directly use the elevation change for logical judgment.

[0321] Step 4: Scale mapping generates preset fine groove thresholds:

[0322] Since the depth distribution of water flow is closely related to the discrete spatial grid resolution, directly using the one-dimensional incision depth for determining the elevation difference of three-dimensional grid nodes will result in scale errors. The system performs a linear scaling mapping between the critical runoff incision depth data and the spatial grid resolution data to obtain the critical elevation difference at the grid scale, and then embeds this difference as a system reconstruction parameter. The scale mapping conversion formula is as follows:

[0323] ;

[0324] in, The critical elevation difference calculated is the final preset ditch threshold. Characterizing critical runoff downcut depth data; Characterizes spatial grid resolution data, i.e., the actual side length of the grid; The reference length parameter for the scale mapping is fixed at 1.0 meter. This formula projects the theoretical deformation depth of the continuous physical space onto the grid scale of the discrete digital space. This eliminates the drift in system judgment criteria caused by different grid coarseness, ensuring a strict match between the preset fine groove threshold and the current graph structure spatial resolution of the system.

[0325] Example 6: Assuming the current target area is a sandy loam slope with relatively loose soil that is highly susceptible to erosion, the spatial grid resolution data... The setting is 1.0 meter. The system extracts the terrain elevation data of the target area and calculates the local average slope data. (i.e., a slope of 1.5 percent).

[0326] Physical parameter data: Soil cohesion data of sandy loam in this area were obtained through laboratory testing. Pascal, median particle size data rice.

[0327] Calculation of critical flow shear force data: Based on the preset relationship mapping table, the sandy loam soil corresponds to the first empirical fitting coefficient. Second empirical fitting coefficient The constant is set as: soil particle density. Water flow density Gravitational acceleration constant Substituting into the soil erosion mechanics model formula for calculation:

[0328] Pascal.

[0329] Back-derived critical runoff downcut depth data:

[0330] Substitute into the reverse calculation formula:

[0331] rice.

[0332] The preset fine groove threshold used in the scale mapping generation system is:

[0333] because Meter, scale mapping benchmark The mapping transformation is calculated as follows:

[0334] rice.

[0335] The system ultimately set the calculated value of 0.0926 meters as the preset ditch threshold specific to this sandy loam soil area.

[0336] In the iterative extrapolation of the rainfall time step, it is assumed that a pair of adjacent nodes in the region are eroded by water flow, and the absolute value of the resulting elevation deformation gradient reaches 0.12 meters.

[0337] If a traditional static fixed preset value (such as 0.15 meters in the previous example) is used: since the actual elevation difference of 0.12 is less than 0.15, the system will determine that "the fine ditch triggering condition has not been met", thus retaining the original topological edge data. At this time, although the real sandy loam has been cut into deep ditches at this slope that are sufficient to change the direction of water flow, the water flow in the digital space still incorrectly flows along the original path, causing the runoff reorganization phenomenon to be missed by the model, resulting in a systematic underestimation of the subsequent erosion measurement.

[0338] Using a dynamic preset value (0.0926 meters):

[0339] Since the actual elevation difference of 0.12 is greater than 0.0926, the system accurately identified that the deformation had exceeded the mechanical erosion resistance limit of the sandy loam at that slope. The system immediately determined that the "reconstruction conditions were met," thereby triggering the deletion of the original edge data and the generation of the new flow direction.

[0340] This comparison clearly demonstrates the necessity and scientific validity of the calculated values. The calculated threshold, derived from soil physical parameters, endows the simulated graph structure with a dynamic "soil texture perception capability." It avoids the physical distortion caused by applying a fixed threshold across the board, enabling the system to trigger the reconstruction and updating of the graph network topology at an accurate time, conforming to the laws of real natural mechanics, when facing complex terrains with different soil types and slopes.

[0341] The aforementioned technology abandons the fixed empirical threshold setting method and introduces a physical soil erosion mechanics model. Using measured soil cohesion and particle size as pre-inputs, it sequentially calculates the critical flow shear force and critical runoff incision depth. Finally, it performs scale mapping and dimensionality reduction based on the grid resolution of the digital twin model, dynamically generating reconstruction trigger judgment indicators strictly bound to the soil properties of the target area. This endows the system with site-specific adaptive capabilities, allowing the preset ditch threshold to change accordingly based on the actual soil physical properties of the target area. Higher thresholds are automatically generated in erosion-resistant soil areas to prevent misjudgments, while lower thresholds are automatically generated in easily eroded areas to improve model sensitivity, effectively enhancing the prediction accuracy of the simulation system when applied across regions.

[0342] The specific execution logic of the result prediction module is as follows:

[0343] Final fertilizer concentration data: refers to the chemical nutrient concentration values ​​retained at each spatial node in the final graph structure data after all rainfall time series data has been traversed and the simulation system has stopped time step iteration.

[0344] Concentration difference: refers to the algebraic subtraction between the initial chemical nutrient concentration before rainfall and the final chemical nutrient concentration after rainfall for a node at the same spatial location. It is used to quantify the net nutrient loss at that local location.

[0345] Water and fertilizer loss prediction results: refers to the final index output by the system after spatial integration and calculation, representing the total physical mass of nutrients flowing out of the target area after a complete rainfall cycle.

[0346] Step 1: Extract the final fertilizer concentration data:

[0347] The system monitors the execution progress of the time-step iteration module. Once the last time step in the rainfall time series data is calculated, the update mechanism for the current graph structure data is frozen. The system saves the current graph structure state as the final current graph structure data. The system traverses all nodes in the graph structure, reads and extracts the fertilizer concentration feature item from the attribute matrix corresponding to each node, and uses it as the final fertilizer concentration data for each node.

[0348] Step 2: Calculate the concentration difference at spatial nodes:

[0349] The system retrieves the initial graph structure data frozen and saved before the simulation run. For each specific node in the spatial grid array, its initial and final states are aligned, and the concentration reduction within the local grid is calculated through algebraic subtraction. The calculation formula is as follows:

[0350] ;

[0351] in, Characterizing the first Concentration difference between spatial nodes; The initial fertilizer concentration data characterizes the k-th spatial node in the initial graph structure data; This formula represents the final fertilizer concentration data of the k-th spatial node in the final current graph structure data. It transcends the complex intermediate rainfall iteration process, directly comparing the initial and final states, filtering out instantaneous fluctuations in water and fertilizer transport, and accurately quantifying the absolute net nutrient deficit of this local grid caused by soil and water stripping.

[0352] Step 3: Scale integration and summation to generate prediction results:

[0353] Since the concentration difference is a density-type state quantity, to obtain the total macroscopic mass loss, it is necessary to multiply the concentration difference at each node by its corresponding physical volume, and then sum them over the entire target area. The calculation formula is as follows:

[0354] ;

[0355] in, The final water and fertilizer loss prediction results are characterized by the total mass of regional nutrient loss. The total number of spatial nodes contained in the target region graph structure; The traversal index representing the spatial node; Characterizing the first Concentration difference between spatial nodes; The spatial grid resolution data is represented by the side length of a single grid, and its square is the actual physical area of ​​the Earth's surface covered by that single grid. The effective soil layer thickness is represented, ranging from 0.15 meters to 0.35 meters. Natural soil loss is a physical mass concept. This formula utilizes the resolution parameters of the spatial grid and the soil layer thickness parameter to transform the attribute differences of micro-nodes into mass differences under standard physical dimensions. Through global integral accumulation, a scientific transformation from micro-distributed characteristics to macro-level total quantity evaluation indicators is achieved.

[0356] The aforementioned technology employs a point-by-point aligned subtraction and spatial integral accumulation technique based on a distributed graph structure. It preserves the initial and final states of the entire graph structure simulation process, performs attribute difference calculations for each spatial node, and then combines the geometric scale of the physical grid for mass transformation and global summation. This achieves dual outputs of total nutrient loss prediction and spatial distribution tracing, accurately calculating the total mass of macroscopic nutrient loss caused by the entire rainfall event (predicted data). Furthermore, it retains the concentration difference values ​​of each specific spatial grid during the calculation process, enabling the system to output a nutrient loss intensity distribution map with high-precision spatial coordinates, accurately locating severely degraded grid areas, and improving the targeting of agricultural non-point source pollution control.

[0357] A simulation and prediction method for water and fertilizer loss in sloping farmland based on deep reinforcement learning includes the following steps:

[0358] Acquire three-dimensional point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area;

[0359] An initial graph structure data is constructed based on 3D point cloud elevation data and initial nutrient distribution data, which includes multiple node data and edge data connecting adjacent node data. The node data includes elevation data, water depth data and fertilizer concentration data, and the edge data includes flow direction data.

[0360] Using the initial graph structure data as the current graph structure data, the following steps are executed iteratively step-by-step for the rainfall time series data:

[0361] The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output.

[0362] Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data.

[0363] The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step.

[0364] After traversing the rainfall time series data, the water and fertilizer loss prediction results are generated based on the difference between the fertilizer concentration data contained in the final current graph structure data and the initial graph structure data.

[0365] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.

Claims

1. A simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning, characterized in that, include: The data acquisition module is used to acquire three-dimensional point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area; The initial graph construction module is used to construct an initial graph structure data containing multiple node data and edge data connecting adjacent node data based on three-dimensional point cloud elevation data and initial nutrient distribution data. The node data includes elevation data, water depth data and fertilizer concentration data, and the edge data includes flow direction data. The time-step iteration module is used to take the initial graph structure data as the current graph structure data and perform the following steps iteratively according to the time steps for the rainfall time series data: The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output. Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data. The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step. The results prediction module is used to generate water and fertilizer loss prediction results data based on the difference between the fertilizer concentration data contained in the final current graph structure data and the initial graph structure data after the rainfall time series data has been traversed.

2. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 1, characterized in that: Based on the flow direction data in the edge data, feature aggregation is performed on the adjacent node data to output environmental state data, specifically including: Based on the flow data, adjacent node data are divided into upstream node data and downstream node data; Calculate the relative elevation difference between the elevation data in the upstream node data and the downstream node data; Calculate the ratio of the relative elevation difference to the preset node spacing, and use it as the slope weight; Extract water depth and fertilizer concentration data from upstream node data; The extracted water depth data and fertilizer concentration data are fused with the slope weight and then superimposed onto the feature matrix of the downstream node data. An activation operation is performed on the superimposed feature matrix to output environmental state data representing the current local water catchment potential energy.

3. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 1, characterized in that: Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node, specifically including: The environmental state data and soil erosion resistance index data are concatenated and input into the policy network of the deep reinforcement learning model. Based on the concatenated environmental state data, the water flow shear force features acting on each node data are extracted. The strategy network maps the characteristics of water flow shear force with the spliced ​​soil erosion resistance index data to generate deformation probability distribution data; Sampling is performed based on the deformation probability distribution data, and the surface deformation action data corresponding to each node data is output. When the surface deformation action data is a positive value, it represents the soil stripping thickness, and when it is a negative value, it represents the sediment deposition thickness.

4. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 3, characterized in that: The elevation and fertilizer concentration data of each node in the current map structure data are updated based on surface deformation data, specifically including: When the surface deformation data characterizes the soil stripping thickness, the difference between the elevation data and the soil stripping thickness is calculated as the updated elevation data. The ratio of the soil stripping thickness to the preset effective soil layer thickness is also calculated to generate the nutrient loss ratio. The fertilizer concentration data is updated based on the nutrient loss ratio to obtain the updated fertilizer concentration data. When surface deformation data characterizes sediment deposition thickness, the sediment deposition thickness is superimposed on the elevation data to obtain updated elevation data, while maintaining the current fertilizer concentration data unchanged.

5. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 1, characterized in that: Based on the updated elevation data, the elevation deformation gradient between adjacent node data is calculated, and when the elevation deformation gradient meets preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data, specifically including: Obtain the updated elevation data from adjacent node data, calculate the current relative elevation difference between the two as the elevation deformation gradient; Determine whether the positive or negative relationship of the elevation deformation gradient has reversed compared to the previous time step, or whether the absolute value of the elevation deformation gradient is greater than the preset ditch threshold. When the positive and negative relationship is reversed or the absolute value is greater than the preset fine groove threshold, it is determined that the elevation deformation gradient meets the preset condition, the original edge data between adjacent node data is deleted, the new upstream node data and downstream node data are determined based on the updated elevation data, the direction of the new upstream node data pointing to the new downstream node data is taken as the new flow direction data, the reconstructed edge data is generated, and the new graph structure data is combined to form new graph structure data. When the positive and negative relationships have not reversed and the absolute value is not greater than the preset ditch threshold, it is determined that the elevation deformation gradient does not meet the preset conditions. The original edge data is retained and combined with the updated node data to directly form new graph structure data.

6. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 5, characterized in that: The preset groove threshold is dynamically obtained through the following steps: Acquire soil physical parameter data and spatial grid resolution data for the target area, wherein the soil physical parameter data includes soil cohesion data and median particle size data; Soil cohesion data and median particle size data are input into a preset soil erosion mechanics model to calculate the critical flow shear force data required to trigger gully erosion. Based on the critical flow shear force data and the average slope data of the target area, the corresponding critical runoff incision depth data are calculated by reverse calculation. The critical runoff incision depth data and spatial grid resolution data are scale-mapped to obtain the critical elevation difference between adjacent node data, and the critical elevation difference is set as the preset ditch threshold.

7. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 6, characterized in that: The specific calculation formula for the soil erosion mechanics model is as follows: ; in, The data characterizing the critical flow shear force; The soil cohesion data characterizes the soil cohesion. Characterizing the median particle size data of the particles; Characterizes the preset soil particle density; Characterizes the preset water flow density; Characterizing the gravitational acceleration constant; Characterizes the first empirical fit coefficient; Characterizes the second empirical fit coefficient.

8. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 1, characterized in that: An initial graph structure data, containing multiple node data and edge data connecting adjacent node data, is constructed based on 3D point cloud elevation data and initial nutrient distribution data. Specifically, this includes: The three-dimensional point cloud elevation data is divided into a spatial grid array, each spatial grid is mapped to a node data, and the initial nutrient distribution data is assigned to the fertilizer concentration data in the corresponding node data. Calculate the relative elevation difference between adjacent node data, construct edge data between upstream node data and downstream node data corresponding to relative elevation differences greater than zero, and take the direction from upstream node data to downstream node data as the flow direction data of edge data.

9. The simulation and prediction system for water and fertilizer loss in sloping farmland based on deep reinforcement learning according to claim 1, characterized in that: Based on the differences in fertilizer concentration data between the final current graph structure data and the initial graph structure data, water and fertilizer loss prediction results are generated, specifically including: Extract the final fertilizer concentration data of each node in the final current graph structure data; Calculate the concentration difference between the fertilizer concentration data in the initial graph structure data and the final fertilizer concentration data; The concentration differences of all node data are summed to generate water and fertilizer loss prediction data that characterizes the total amount of nutrient loss in the region.

10. A simulation and prediction method for water and fertilizer loss in sloping farmland based on deep reinforcement learning, characterized in that, Includes the following steps: Acquire three-dimensional point cloud elevation data, soil erosion resistance index data, rainfall time series data, and initial nutrient distribution data of the target area; An initial graph structure data is constructed based on 3D point cloud elevation data and initial nutrient distribution data, which includes multiple node data and edge data connecting adjacent node data. The node data includes elevation data, water depth data, and fertilizer concentration data, and the edge data includes flow direction data. Using the initial graph structure data as the current graph structure data, the following steps are executed iteratively step-by-step for the rainfall time series data: The rainfall data at the current time step is obtained and superimposed onto the water depth data of each node in the current graph structure data. Based on the flow direction data in the edge data, the features of adjacent node data are aggregated, and the environmental status data is output. Environmental status data and soil erosion resistance index data are input into a deep reinforcement learning model, which outputs surface deformation action data corresponding to each node data, and updates the elevation data and fertilizer concentration data of each node data in the current graph structure data based on the surface deformation action data. The elevation deformation gradient between adjacent node data is calculated based on the updated elevation data. When the elevation deformation gradient meets the preset conditions, the edge data in the current graph structure data is reconstructed to obtain new graph structure data. The new graph structure data is then used as the current graph structure data for the next time step. After traversing the rainfall time series data, the water and fertilizer loss prediction results are generated based on the difference between the fertilizer concentration data contained in the final current graph structure data and the initial graph structure data.