Water and fertilizer integrated simulation method based on edge computing
By acquiring water and fertilizer sensor data in real time through edge computing nodes, a non-uniform discrete topology structure is generated, which solves the problem of local water and fertilizer distribution simulation distortion in edge computing and realizes high-resolution water and fertilizer transport simulation and global prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN HAIZHUO BIOTECHNOLOGY CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-07-31
AI Technical Summary
In existing edge computing solutions, due to limitations in processor computing power and memory capacity, it is impossible to uniformly divide the physical space of the soil using high-density grids. This results in local water and fertilizer distribution simulations deviating from the actual physical transport process, leading to local simulation distortions.
Real-time water and fertilizer sensor data is acquired through edge computing nodes, physical parameter gradients are calculated and local mesh refinement is triggered to generate a non-uniform discrete topology. A finite difference discrete algebraic equation system is established by combining central difference and one-sided difference schemes, and the flux data of the fine mesh boundary is extracted and uploaded to the cloud for global prediction.
This approach aims to improve local spatial resolution under limited computing resources, eliminate simulation distortion, achieve high-resolution solutions for regions with drastic changes in physical parameters, and reduce data transmission burden.
Smart Images

Figure CN122490924A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of edge computing technology, and more specifically to a water and fertilizer integration simulation method based on edge computing. Background Technology
[0002] In the field of fertigation simulation, to obtain the transport and distribution of water and fertilizer in soil, a common approach is to establish partial differential equations for water and fertilizer transport and solve them numerically. In conventional edge computing implementations, edge nodes use moisture content and conductivity data collected by sensors as the initial and boundary conditions for the equations. A fixed grid is used to uniformly partition the entire three-dimensional soil physical space, and then the discrete algebraic equations are iteratively solved at fixed spatial and time steps. However, limited by the processor's computing power and memory capacity, this approach can only use a low grid density when dividing the fixed grid to avoid memory overflow or iteration timeouts, thus sacrificing spatial resolution for computational efficiency.
[0003] In the conventional scheme of simulating water and fertilizer transport using a fixed grid on the edge side, the water and fertilizer infiltration process exhibits drastic changes in physical parameters near the drip irrigation point and at the interface of different soil textures, while the physical parameters change gradually in areas far from the infiltration point. Because the edge nodes can only use a low-density fixed uniform grid to indiscriminately partition the entire space, the grid size cannot adapt to the spatial variation characteristics of local physical parameters. This causes the discretization process to fail to capture the drastic changes in local areas such as the drip irrigation point, resulting in the local water and fertilizer distribution simulation results output by the edge nodes deviating from the actual physical transport process and producing local simulation distortion. Summary of the Invention
[0004] The purpose of this invention is to provide a water and fertilizer integration simulation method based on edge computing, which can effectively solve the problems in the background art mentioned above.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The water and fertilizer integration simulation method based on edge computing includes: edge computing nodes acquiring water content and conductivity data collected by water and fertilizer sensors deployed at different depths in the soil in real time, and calculating the physical parameter gradient between adjacent water and fertilizer sensors; When the gradient of the physical parameter is greater than the preset mutation threshold, the numerical solution engine built into the edge computing node triggers a local mesh refinement operation in the corresponding physical space region to generate a non-uniform discrete topology structure containing fine and coarse meshes. The edge computing nodes establish a finite difference discrete algebraic equation system of water and fertilizer transport dynamics equations based on the non-uniform discrete topology, and obtain the local water and fertilizer distribution field by iterative solution. Edge computing nodes extract boundary flux data of fine-grid regions in the non-uniform discrete topology, and upload the boundary flux data as initial conditions to the cloud server. The cloud server performs macroscopic water and fertilizer migration trend prediction on the global uniform grid based on the boundary flux data.
[0006] Preferably, the step of calculating the physical parameter gradient between adjacent water and fertilizer sensors includes: edge computing nodes extracting the coordinate positions and measurement values of water and fertilizer sensors at different soil depths at the same sampling time at a preset sampling frequency, and constructing a spatial sampling point sequence; The edge computing node calculates the spatial physical parameter gradient vector based on the difference between the three-dimensional coordinates and the difference between the measured values of two adjacent water and fertilizer sensors in the spatial sampling point sequence. The edge computing node performs a difference operation between the current spatial physical parameter gradient vector and the spatial physical parameter gradient vector at a historical time to generate a gradient change rate vector, which is used as the basis for determining whether to trigger the local mesh densification operation.
[0007] Preferably, the step of triggering the local mesh refinement operation to generate a non-uniform discrete topology structure containing fine and coarse meshes includes: the edge computing node divides the initial soil physical space into multiple basic coarse meshes, and when the physical parameter gradient inside the basic coarse mesh is detected to be greater than a preset variation threshold, the basic coarse mesh is divided into 8 fine meshes with the center point of the basic coarse mesh as the subdivision origin. The edge computing node establishes a topological adjacency table between the fine mesh and the adjacent basic coarse mesh, and records the connectivity between each face of the fine mesh and the corresponding face of the adjacent basic coarse mesh in the topological adjacency table, thereby generating the non-uniform discrete topology structure.
[0008] Preferably, the step of establishing a finite difference discrete algebraic equation system of water and fertilizer transport dynamics equations based on the non-uniform discrete topology includes: the edge computing node traverses each grid node in the non-uniform discrete topology, and for nodes located inside the fine grid, the spatial second derivative terms in the water and fertilizer transport dynamics equations are discretized using the central difference scheme. For nodes located at the boundary between fine and coarse grids, the edge computing node obtains the coordinates of the adjacent nodes on the coarse grid side of the boundary node, discretizes the spatial second derivative terms using a one-sided difference scheme, and arranges the discretized equations according to the grid node numbers to assemble the finite difference discrete algebraic equation system.
[0009] Preferably, the step of extracting the boundary flux data of the fine mesh region in the non-uniform discrete topology includes: locating the set of boundary surfaces where the fine mesh and coarse mesh intersect in the non-uniform discrete topology using edge computing nodes; For each boundary surface in the set of boundary surfaces, the edge computing node extracts the water content and water potential gradient values of the nodes on both sides of the boundary surface, and calculates the water flow and solute flux through each boundary surface according to Darcy's law formula. The edge computing node arranges the calculated water flux and solute flux according to the coordinate order of the boundary surface in three-dimensional space to generate a boundary flux matrix, and encapsulates the boundary flux matrix into a network transmission data packet and uploads it to the cloud server.
[0010] Preferably, the step of the cloud server performing macroscopic water and fertilizer transport trend prediction on a global uniform grid based on the boundary flux data includes: the cloud server constructing a global uniform grid covering the entire farmland area in its local memory; the cloud server parsing the received boundary flux data; and mapping the boundary flux data to the local grid boundary corresponding to the physical region of the edge computing node in the global uniform grid. The cloud server substitutes the flux values on the mapped local grid boundary as the third type of boundary condition into the global water and fertilizer transport dynamics equation, and performs time-step iteration on the global uniform grid using an implicit difference scheme, outputting a global water and fertilizer distribution prediction matrix that includes the physical region of the edge computing node and its surrounding region.
[0011] Preferably, the step of constructing the spatial sampling point sequence further includes: the edge computing node extracts the measurement values of multiple consecutive sampling cycles within the time sliding window corresponding to the preset sampling frequency, and calculates the measurement variance of each water and fertilizer sensor within the time sliding window; The edge computing node marks the measurement values whose measurement variance is greater than a preset variance threshold as abnormal data points, removes the abnormal data points from the spatial sampling point sequence, and uses the remaining measurement values to fill the removed positions with cubic spline interpolation to generate a spatial sampling point sequence after removing abnormal data points.
[0012] Preferably, the step of dividing the basic coarse grid into 8 fine grids with the center point of the basic coarse grid as the subdivision origin further includes: setting the maximum subdivision level parameter for the edge computing node, querying the historical subdivision level record of the current basic coarse grid before each subdivision operation, and stopping the subdivision operation on the current basic coarse grid if the historical subdivision level record reaches the maximum subdivision level parameter. Edge computing nodes use Morton coding rules to perform one-dimensional linear coding on all generated fine meshes and basic coarse meshes, and store the one-dimensional linear coding as an index key value in the topological adjacency table.
[0013] Preferably, the step of discretizing the spatial second derivative term using a one-sided difference scheme further includes: setting virtual nodes on the coarse grid side at the boundary between the fine and coarse grids, wherein the distance between the virtual nodes and the boundary nodes is equal to the grid step size of the fine grid; The edge computing node uses the known physical quantity values of the fine mesh nodes around the boundary node to calculate the physical quantity values of the virtual node through linear extrapolation. The physical quantity values of the virtual node are then substituted into the one-sided difference scheme to replace the physical quantity values of the original coarse mesh adjacent nodes, generating the corrected discrete equation.
[0014] Preferably, the step of generating the boundary flux matrix further includes: the edge computing node traverses all flux values in the boundary flux matrix, sets flux values with absolute values lower than a preset flux truncation threshold to 0, and retains non-zero flux values with absolute values greater than or equal to the preset flux truncation threshold and their row and column index numbers in the boundary flux matrix. The edge computing node converts the non-zero throughput value into a floating-point binary sequence, converts the row and column index numbers into an integer binary sequence, concatenates the floating-point binary sequence and the integer binary sequence in an interleaved manner to form a compact binary data stream, and fills the compact binary data stream into the data payload field of the network transmission data packet.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention acquires the physical parameter gradients of adjacent depth sensors and triggers a mesh refinement operation in local regions where the gradient exceeds a variation threshold to generate a non-uniform discrete topology. This allows computational resources to be concentrated in areas where physical parameters change drastically. Under this non-uniform discrete topology, boundary nodes use a one-sided difference scheme while internal nodes use a central difference scheme to establish a finite difference discrete algebraic equation system, improving local spatial resolution while maintaining a controlled overall mesh size. Edge nodes solve for the local water and fertilizer distribution field based on this structure and extract flux data from the fine mesh boundaries, uploading it to a cloud server as the initial condition for global uniform mesh prediction. This invention directly correlates mesh density with the spatial rate of change of physical parameters, achieving mesh refinement solutions for drastically changing local regions under limited computational power at edge nodes. This eliminates simulation distortion caused by the inability of fixed low-density meshes to characterize local water and fertilizer transport details.
[0016] 2. Before calculating the gradient of physical parameters, this invention removes outlier data points based on the measurement variance within a time sliding window and performs cubic spline interpolation to fill the gaps. This eliminates the interference of abnormal sensor fluctuations on gradient calculation and ensures the reliability of triggering local mesh refinement operations. During mesh refinement, a maximum subdivision level parameter is set, and one-dimensional linear encoding is performed using the Morton coding rule. This limits the memory overflow risk caused by infinite mesh subdivision and improves the traversal and retrieval efficiency of non-uniform discrete topologies. Virtual nodes are set at the boundary between fine and coarse meshes, and their physical quantity values are calculated using linear extrapolation. This eliminates the difference truncation error caused by inconsistent mesh step sizes on both sides and ensures the mathematical continuity of the discrete algebraic equations in the mesh transition region. When extracting boundary flux data, fluxes below the truncation threshold are set to zero, and non-zero fluxes and their row and column indices are converted into compact binary data streams for encapsulation. This reduces the data load uploaded by edge nodes to the cloud server and lowers the data transmission burden of the communication link. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the overall implementation of the edge computing-based integrated water and fertilizer simulation of the present invention. Figure 2 This is a flowchart of the physical parameter gradient calculation and abnormal data processing of the present invention; Figure 3 This is a flowchart illustrating the local mesh refinement and non-uniform topology generation process of the present invention. Figure 4 This is a flowchart of the differential discretization and virtual node correction of the water and fertilizer kinetic equations of the present invention; Figure 5 This is a flowchart of the fine-mesh boundary flux calculation and data compression encapsulation process of the present invention; Figure 6 This is a flowchart of the cloud-based global water and fertilizer transport trend prediction execution process of the present invention. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Please refer to Figure 1This embodiment provides a water and fertilizer integration simulation method based on edge computing. Edge computing nodes are deployed in a field control cabinet within an irrigated farmland area, establishing wired or wireless communication connections with multiple water and fertilizer sensors deployed at different soil depths. The measurement parameters of the water and fertilizer sensors include soil volumetric water content and soil solution conductivity, where conductivity data characterizes the concentration level of solutes in the soil. The edge computing nodes acquire water content and conductivity data collected by each water and fertilizer sensor in real time at a preset sampling frequency. The acquired raw measurement data undergoes timestamp alignment to ensure that all sensor data at the same sampling time have a consistent time reference. Based on the timestamp-aligned measurement data, the edge computing nodes calculate the physical parameter gradients between adjacent water and fertilizer sensors. These physical parameter gradients include water content gradients and conductivity gradients, corresponding to the spatial variation characteristics of water transport and solute transport, respectively.
[0020] Specifically, the edge computing node sorts all water and fertilizer sensor data at the same sampling time according to the three-dimensional spatial coordinates of the sensor deployment, extracts the coordinate information and measurement values of two adjacent sensors, calculates the difference between the spatial distance and the measurement value between the two sensors, and calculates the spatial gradient vector of the physical parameters based on the spatial distance and measurement difference. The edge computing node has preset variation thresholds for the physical parameters, including water content variation thresholds and conductivity variation thresholds. The edge computing node compares the magnitude of the calculated physical parameter gradient with the corresponding variation threshold. When the magnitude of the physical parameter gradient is greater than the preset variation threshold, it is determined that there is a drastic change in the physical parameters in the physical space region where the adjacent sensor is located. The numerical solution engine built into the edge computing node triggers a local mesh refinement operation in the corresponding physical space region.
[0021] Before triggering the local mesh refinement operation, the edge computing node has already divided the three-dimensional physical space of the soil to be simulated into an initial basic coarse mesh. The basic coarse mesh is a uniform hexahedral mesh, and each basic coarse mesh corresponds to a fixed three-dimensional physical space range. All basic coarse meshes constitute an initial uniform discrete topology. When the physical parameter gradient inside a basic coarse mesh is detected to be greater than a preset mutation threshold, the numerical solution engine uses the geometric center point of the basic coarse mesh as the subdivision origin and bisects the basic coarse mesh along the three coordinate axes of the three-dimensional space to generate eight fine meshes of the same size. The spatial step size of each fine mesh is half of the spatial step size of the original basic coarse mesh. The edge computing node assigns a unique mesh identifier to each generated fine mesh, records the three-dimensional spatial coordinate range of each fine mesh, the identifier information of adjacent meshes, and establishes a topological adjacency table between the fine mesh and adjacent basic coarse meshes. The topological adjacency table records the identifiers of all adjacent meshes, the position of adjacent faces, and the connectivity status of each mesh. Based on the information of all coarse and fine meshes and the topological adjacency table, a non-uniform discrete topology containing fine and coarse meshes is generated.
[0022] Furthermore, based on the generated non-uniform discrete topology, the edge computing nodes establish a finite difference discrete algebraic equation system for water and fertilizer transport mechanics. This system includes the Richards equation for soil water transport and the convection-dispersion equation for soil solute transport; these two equations together constitute the coupled governing equation system for water and fertilizer transport. The Richards equation for soil water transport is expressed as follows:
[0023] in, Soil volumetric water content is denoted as , which is matric potential. The function; It is a time variable; The unsaturated hydraulic conductivity of the soil is the matrix potential. The function; These are vertical spatial coordinates, with upward being positive; This is the root water uptake measure, in units of... ; The Hamiltonian operator represents the spatial gradient operation.
[0024] The convective dispersion equation for soil solute transport is expressed as follows:
[0025] in, The mass concentration of the solute in the soil solution, in units of ; The hydrodynamic dispersion coefficient tensor, in units of ; This is a vector representing soil water flux density, in units of... This is determined by Darcy's law; This refers to the solute source and sink, including processes such as root absorption, adsorption, desorption, and degradation, with units of [unit missing]. .
[0026] The edge computing node traverses every grid node in the non-uniform discrete topology, assigning a unique node number to each grid node, which is associated with the grid's topological adjacency table. For nodes located inside the fine grid, the edge computing node uses a central difference scheme to discretize the spatial second derivative terms in the water-fertilizer transport dynamics equations. The truncation error of the central difference scheme is second-order accurate, ensuring the accuracy of physical quantity discretization within the fine grid. For nodes located at the boundary between the fine and coarse grids, the edge computing node obtains the coordinates and physical quantity values of the adjacent nodes on the fine grid side of the boundary node, and uses a one-sided difference scheme to discretize the spatial second derivative terms. The one-sided difference scheme only uses node data from the fine grid side for discretization, avoiding discretization errors caused by the difference in step size between the coarse and fine grids. The edge computing node arranges the discretized equations of all grid nodes in order of node number, assembling them into a sparse finite difference discrete algebraic equation system. The unknowns in the equation system are the matrix potential and solute concentration of each grid node.
[0027] Edge computing nodes employ pre-defined iterative algorithms to solve finite difference discrete algebraic equations. These algorithms include numerical methods suitable for solving sparse equations, such as the Gauss-Seidel iterative algorithm and the conjugate gradient algorithm. During the iterative process, the edge computing nodes use the moisture content and conductivity data collected by sensors at the current sampling time as initial conditions, and the atmospheric boundary of the soil surface and the impermeable boundary of the soil subsurface as fixed boundary conditions. Iterative calculations are performed until the iterative residual is less than a preset convergence threshold. The nodes then output the matrix potential, moisture content, and solute concentration values for each grid node, forming a local water and fertilizer distribution field for the corresponding physical space region.
[0028] Further, refer to Figure 5 The edge computing nodes extract boundary flux data for fine-grid regions in a non-uniform discrete topology based on the solved local water and fertilizer distribution field. First, the edge computing nodes locate all boundary surfaces where fine and coarse grids intersect in the non-uniform discrete topology, forming a boundary surface set. Each boundary surface is a hexahedral surface shared by the fine grid and its adjacent coarse grid. The position and three-dimensional coordinate range of the boundary surfaces are recorded in a topological adjacency table. For each boundary surface in the boundary surface set, the edge computing nodes extract the water content and water potential gradient values of the grid nodes on both sides of the boundary surface. Based on Darcy's law, they calculate the water flux and solute flux through the boundary surface. The expression for Darcy's law is:
[0029] The parameter definitions are consistent with the aforementioned Richards equations. Water flux is the volume of water passing through a unit area boundary surface per unit time, and solute flux is the mass of solute passing through a unit area boundary surface per unit time. Edge computing nodes arrange the calculated water flux and solute flux of all boundary surfaces according to their coordinates in three-dimensional space, generating a two-dimensional boundary flux matrix. The rows of the boundary flux matrix correspond to the spatial coordinate numbers of the boundary surfaces, and the columns correspond to the numerical values of the water flux and solute flux. The edge computing nodes encapsulate the boundary flux matrix into data packets conforming to network transmission protocols and upload them to the cloud server via a wireless communication network.
[0030] refer to Figure 6 The cloud server receives data packets uploaded by edge computing nodes, parses them to obtain boundary flux data, and constructs a global uniform grid covering the entire farmland area in its local memory. The spatial step size of the global uniform grid is consistent with the spatial step size of the basic coarse grid of the edge computing nodes. The physical spatial range of the global uniform grid includes the local physical spatial regions corresponding to all edge computing nodes. The cloud server maps the parsed boundary flux data to the local grid boundary corresponding to the physical region of the edge computing node in the global uniform grid. During the mapping process, the three-dimensional coordinates of the boundary surface are matched one-to-one with the coordinate range of the global grid to ensure that the spatial position of the boundary flux data corresponds completely to the position of the global grid. The cloud server uses the flux values on the mapped local grid boundary as the third type of boundary condition and substitutes them into the global water and fertilizer transport dynamics equations. It then performs time-step iterative calculations on the global uniform grid using an implicit difference scheme. The time step of the implicit difference scheme is larger than the time step of the local solution at the edge computing nodes. After the iterative calculation is completed, the global water and fertilizer distribution prediction matrix, which includes the physical regions of all edge computing nodes and their surrounding regions, is output. The global water and fertilizer distribution prediction matrix contains the predicted values of water content and solute concentration for each global grid node in the entire farmland area.
[0031] In this embodiment, the mesh parameters of the non-uniform discrete topology are shown in Table 1. Table 1 records the spatial step size, applicable region and discrete format type of different types of meshes, and clarifies the parameter differences and application scenarios of coarse and fine meshes.
[0032] Table 1. Parameters of Non-Uniform Discrete Topological Structure Mesh Basic coarse mesh 0.5×0.5×0.2 A flat region where the physical parameter gradient is less than the mutation threshold Central difference scheme 6 First-level fine mesh 0.25×0.25×0.1 Regions of drastic change where the physical parameter gradient is greater than the mutation threshold Central difference scheme (internal nodes), one-sided difference scheme (boundary nodes) 6 Global uniform grid 0.5×0.5×0.2 The entire farmland area is predicted globally by the cloud server. Implicit central difference scheme 6 Explanation of Table 1: This table clarifies the core parameters of different grid types in this embodiment. The basic coarse grid constitutes the initial discrete topology, the first-level fine grid is the grid after the basic coarse grid is subdivided once, and the global uniform grid has the same step size as the basic coarse grid to ensure that the flux data of the edge side boundary can be mapped to the global grid in the cloud without deviation, avoiding the mapping error caused by spatial step size mismatch.
[0033] In this embodiment, local mesh refinement is triggered by physical parameter gradients to generate a non-uniform discrete topology structure that adapts to the spatial variation characteristics of physical parameters. Under the constraints of limited computing power and memory resources of edge computing nodes, high-resolution discrete solutions for regions with drastic changes in physical parameters are achieved. At the same time, through the uploading and mapping of boundary flux data, collaborative computing of local fine-grained solutions on the edge side and global trend prediction on the cloud side is realized, eliminating the simulation distortion problem caused by the inability of fixed uniform meshes to capture local water and fertilizer transport details.
[0034] In a preferred embodiment, reference Figure 2 When edge computing nodes calculate the physical parameter gradient between adjacent water and fertilizer sensors, they first extract the coordinate positions and measurement values of water and fertilizer sensors at different soil depths at the same sampling time using a preset sampling frequency, thus constructing a spatial sampling point sequence. The preset sampling frequency ranges from 1 time / minute to 1 time / 10 minutes and can be adjusted according to the stage of farmland irrigation. A higher sampling frequency is used during the infiltration stage after irrigation begins, and a lower sampling frequency is used during the steady infiltration stage after irrigation stops.
[0035] Specifically, each edge computing node assigns a unique device identifier to each water and fertilizer sensor. This device identifier corresponds to the sensor's 3D spatial coordinates and is stored in the edge computing node's local memory. At the end of each sampling period, the edge computing node sends a data acquisition command to all water and fertilizer sensors, receives the measurement values and corresponding device identifiers returned by each sensor, matches the corresponding 3D spatial coordinates based on the device identifier, adds a timestamp of the current sampling time to each set of measurement values, and generates a sampling data set for a single sampling period. The edge computing node sorts all the sampling data within a single sampling period in ascending order according to the vertical depth of the sensor's 3D spatial coordinates. For sensors at the same vertical depth, they are sorted sequentially according to their x-axis and y-axis coordinates in the horizontal plane, generating an ordered sequence of spatial sampling points. Each element in the spatial sampling point sequence contains the sensor's device identifier, 3D spatial coordinates, measurement value, and timestamp information.
[0036] Furthermore, when constructing the spatial sampling point sequence, the edge computing node extracts measurement values from multiple consecutive sampling periods within a time sliding window corresponding to a preset sampling frequency, and calculates the measurement variance of each water and fertilizer sensor within that time sliding window. The length of the time sliding window is the preset number of sampling periods, ranging from 3 to 10 consecutive sampling periods. The time sliding window is updated as the sampling period progresses; when a new sampling period arrives, the window removes the earliest sampling period data and adds the latest sampling period data. For each water and fertilizer sensor, the edge computing node extracts measurement values from all sampling periods within the time sliding window, calculates the average value of this set of measurement values, and calculates the measurement variance of the sensor within the current time sliding window based on the difference between the average value and each measurement value. The formula for calculating the measurement variance is:
[0037] in, For the first The measurement variance of a water and fertilizer sensor within a time sliding window; This represents the total number of sampling periods within the time sliding window; For the first The sensor at the first The measured values for each sampling period; For the first The average measurement value of each sensor within a time sliding window.
[0038] Edge computing nodes are preset with a variance threshold, which is set according to the measurement accuracy parameters of the sensors. When the measurement variance of a certain sensor is greater than the preset variance threshold, it is determined that the measurement value of the sensor in the time sliding window has abnormal fluctuations, and the measurement value of the sensor in the current sampling period is marked as an abnormal data point.
[0039] Edge computing nodes remove all elements marked as outliers from the spatial sampling point sequence. For the gaps left after removing outliers, cubic spline interpolation is performed using the measurement values of the remaining valid sampling points. Specifically, the edge computing nodes arrange the remaining valid sampling points according to their three-dimensional spatial coordinates, using spatial coordinates as the independent variable and the measurement values as the dependent variable, to construct a cubic spline interpolation function. The expression for the cubic spline interpolation function is:
[0040] in, It is a cubic spline interpolation function; , The spatial coordinates of two adjacent valid sampling points; , , , For the first The spline coefficients of each interpolation interval are obtained by solving the boundary conditions of continuous function values, continuous first derivatives, and continuous second derivatives at the interpolation nodes.
[0041] Edge computing nodes use a constructed cubic spline interpolation function to calculate the interpolated values of the spatial coordinates of outlier data points. The interpolated values are then filled into the corresponding empty positions in the spatial sampling point sequence to generate a spatial sampling point sequence after removing outlier data points.
[0042] Furthermore, the edge computing node calculates the physical parameter gradient between adjacent water and fertilizer sensors based on the processed spatial sampling point sequence. The edge computing node traverses each adjacent element in the spatial sampling point sequence, extracting the difference between the three-dimensional coordinates and the difference between the measured values of the water and fertilizer sensors corresponding to those elements. The three-dimensional coordinate difference is the difference between the three-dimensional coordinate vectors of the two sensors, and the measured value difference is the difference between the measured values of water content or conductivity of the two sensors. The edge computing node calculates the spatial straight-line distance between the two sensors based on the three-dimensional coordinate difference. Based on the ratio of the measured value difference to the spatial straight-line distance, it calculates the magnitude of the physical parameter gradient. Combining this with the direction of the three-dimensional coordinate difference, it generates a spatial physical parameter gradient vector. The formula for calculating the spatial physical parameter gradient vector is:
[0043] in, For two adjacent water and fertilizer sensors and The spatial physical parameter gradient vector between them; For sensors The measured values, including moisture content or conductivity ; For sensors The three-dimensional spatial coordinate vector, in units of ; It is the L2 norm, used to calculate the spatial straight-line distance between two sensors.
[0044] Edge computing nodes perform a difference operation between the spatial physical parameter gradient vector calculated at the current moment and the spatial physical parameter gradient vectors at historical moments to generate a gradient rate of change vector. Specifically, the local memory of the edge computing node stores a preset number of spatial physical parameter gradient vectors from historical sampling moments, each with corresponding timestamp information. The edge computing node extracts the spatial physical parameter gradient vector from the previous sampling moment adjacent to the current sampling moment, calculates the difference between the current gradient vector and the previous gradient vector, and divides the difference by the time interval between the two sampling moments to obtain the gradient rate of change vector. The formula for calculating the gradient rate of change vector is:
[0045] in, for The gradient rate of change vector at time step; for The gradient vector of spatial physical parameters at time step; The previous sampling time The gradient vector of spatial physical parameters; The time interval between adjacent sampling times, in units of .
[0046] The gradient rate of change vector represents the rate of change of the physical parameter gradient over time. Edge computing nodes use the generated gradient rate of change vector as the basis for determining whether to trigger the local mesh refinement operation. There is a preset gradient rate of change threshold. When the magnitude of the gradient rate of change vector is greater than the preset gradient rate of change threshold, even if the magnitude of the physical parameter gradient at the current moment does not exceed the variation threshold, the local mesh refinement operation of the corresponding physical space region is triggered, so as to realize the early response to the drastic changes in water and fertilizer transport.
[0047] In this embodiment, the parameters for the time sliding window and abnormal data processing are shown in Table 2. Table 2 records the sliding window length, sampling frequency, variance threshold and interpolation method corresponding to different irrigation stages, clarifying the parameter configuration rules under different scenarios.
[0048] Table 2. Parameters for Abnormal Data Processing and Gradient Calculation Irrigation infiltration stage 1 5 0.02 0.1 cubic spline interpolation Irrigation and seepage stabilization stage 0.2 8 0.01 0.05 cubic spline interpolation Non-irrigation stage 0.1 10 0.005 0.02 cubic spline interpolation Explanation of Table 2: This table clarifies the core parameter configurations for different irrigation stages in this embodiment. During the irrigation infiltration stage, water and fertilizer parameters change rapidly, so a higher sampling frequency and a shorter sliding window are used to achieve rapid identification of abnormal data and real-time gradient calculation. During the non-irrigation stage, water and fertilizer parameters change gradually, so a lower sampling frequency and a longer sliding window are used to improve the accuracy of abnormal data identification and avoid misjudgments caused by random fluctuations in the sensor.
[0049] In this embodiment, abnormal data points are identified and removed by measuring variance within a time sliding window, and cubic spline interpolation is used for data filling. This eliminates the interference of abnormal sensor fluctuations on the calculation of physical parameter gradients and improves the accuracy of gradient calculation results. By calculating the gradient rate of change vector, the temporal change characteristics of the gradient are incorporated into the triggering judgment criteria for grid densification, enabling an early response to drastic changes in water and fertilizer transport processes, and further ensuring the accuracy of local water and fertilizer distribution simulation results.
[0050] In another preferred embodiment, reference Figure 3When an edge computing node triggers a local mesh refinement operation to generate a non-uniform discrete topology containing both fine and coarse meshes, it first divides the initial soil physical space into multiple basic coarse meshes. These basic coarse meshes are hexahedral structures with consistent 3D spatial step sizes. Adjacent basic coarse meshes share faces and nodes without overlap or gaps, forming an initial uniform discrete topology covering the entire physical space to be simulated. Each edge computing node assigns a unique mesh identifier to each basic coarse mesh and records its 3D spatial coordinate range, center point coordinates, and the identifiers of adjacent meshes, storing these information in its local mesh information database.
[0051] Edge computing nodes monitor the physical parameter gradients within each basic coarse grid in real time. Specifically, the edge computing nodes match the measurement values of all water and fertilizer sensors deployed within the basic coarse grid with the spatial coordinate range of the basic coarse grid. When the physical parameter gradient of at least one set of adjacent sensors within a basic coarse grid exceeds a preset variation threshold, the basic coarse grid is determined to be a grid to be subdivided, triggering a grid subdivision operation. The edge computing nodes use the center point of the basic coarse grid to be subdivided as the subdivision origin, and bisect along the x-axis, y-axis, and z-axis directions, dividing the three-dimensional spatial range of the original basic coarse grid into eight identical fine grids. Each fine grid has a regular hexahedral structure, and the step size of each coordinate axis direction of the fine grid is half the step size of the corresponding direction of the original basic coarse grid. The sum of the spatial ranges of the eight fine grids is completely consistent with the spatial range of the original basic coarse grid, with no overlap or gaps.
[0052] Furthermore, the edge computing nodes are configured with a maximum subdivision level parameter, ranging from 2 to 4 levels. Before each subdivision operation, the edge computing node queries the historical subdivision level records of the current base coarse mesh to be subdivided. These historical subdivision level records are stored in the mesh information database. The initial subdivision level of the base coarse mesh is 0. After each subdivision operation, the subdivision level of the generated fine mesh is the original mesh subdivision level plus 1. If the historical subdivision level records of the current mesh to be subdivided reach the preset maximum subdivision level parameter, the subdivision operation on the current base coarse mesh is stopped, avoiding the problems of mesh number explosion, excessive memory consumption, and excessive computation time caused by infinite mesh subdivision.
[0053] Edge computing nodes employ Morton coding rules to perform one-dimensional linear coding on all generated fine meshes and the base coarse mesh. Morton coding, also known as Z-order coding, maps three-dimensional spatial coordinates to one-dimensional integer codes, and spatially adjacent meshes also exhibit adjacent Morton codes. The formula for calculating Morton coding is:
[0054] in, Morton-coded values for a 3D mesh; The maximum number of bits for encoding; , , The three-dimensional coordinates of the mesh nodes are respectively the first Bit value in binary format; This is the left shift operator; This is the bitwise OR operator.
[0055] Edge computing nodes extract the 3D coordinates of the center point of each grid, convert the x, y, and z components of the 3D coordinates into binary values, and then interleave the bits of the three binary values according to the order of z, y, and x to form a new binary value. This binary value is then converted into a decimal integer, which is the Morton code value of that grid. The edge computing nodes store the generated Morton code as an index key in the topological adjacency table. The topological adjacency table uses the Morton code as an index and stores the spatial coordinate range, subdivision level, Morton codes of adjacent grids, and connectivity information of adjacent faces for each grid. Based on the Morton code-based index structure, it enables fast retrieval and traversal of grid information, improving the efficiency of topological adjacency query.
[0056] When establishing the finite-difference discrete algebraic equation system of the water and fertilizer transport dynamics equations based on the generated non-uniform discrete topology, the edge computing node traverses every grid node in the non-uniform discrete topology, assigning a unique node number to each grid node. This node number is associated with the Morton code of its respective grid. For nodes located within fine grids, the edge computing node uses a central difference scheme to discretize the spatial second derivative terms in the water and fertilizer transport dynamics equations. The expression for the central difference scheme is:
[0057] in, For physical quantities to be discretized, including matrix potential or solute concentration ; The three-dimensional number of the grid node; The grid step size in the x-direction, in units of This format is a second-order precision central difference format, suitable for node discretization within fine meshes.
[0058] The central difference scheme uses the physical quantity values of two adjacent nodes equidistant on both sides of a node for discretization. For the three directions x, y, and z in three-dimensional space, the corresponding central difference scheme is used for discretization to generate the second derivative discrete terms for the corresponding directions. The discrete terms of the three directions are combined to obtain the discrete result of the Laplace operator.
[0059] refer to Figure 4 For nodes located at the boundary between the fine and coarse meshes, the edge computing nodes obtain the coordinates of their adjacent nodes on the coarse mesh side and use a one-sided difference scheme to discretize the second-order derivative terms of the space. Specifically, the boundary node is a node shared by both the fine and coarse meshes. The distance between the adjacent node on the fine mesh side and the boundary node is the step size of the fine mesh, and the distance between the adjacent node on the coarse mesh side and the boundary node is the step size of the coarse mesh. Since the step sizes are inconsistent, using a central difference scheme would lead to increased truncation errors. The edge computing nodes use a one-sided difference scheme, using only the physical quantity values of the adjacent nodes on the fine mesh side for discretization. The expression for the one-sided difference scheme is:
[0060] This scheme is a second-order precision backward one-sided difference scheme, suitable for nodes at the boundary between fine and coarse meshes. , This avoids the truncation error caused by the large step size on the coarse grid side, as the adjacent nodes are located on the fine grid side.
[0061] Furthermore, when discretizing the second-order derivative terms of the space using a one-sided difference scheme, virtual nodes are set on the coarse grid side at the boundary between the fine and coarse grids. The distance between the virtual node and the boundary node is equal to the grid step size of the fine grid. The spatial coordinates of the virtual node lie within the physical space of the coarse grid, and the direction of the line connecting it to the boundary node is consistent with the direction of the corresponding coordinate axis. The edge computing node uses the known physical quantity values of the fine grid nodes surrounding the boundary node to calculate the physical quantity values of the virtual node through linear extrapolation. The formula for linear extrapolation is:
[0062] in, The physical quantity values of the virtual nodes on the coarse grid side; The physical quantity values at the boundary nodes between the fine and coarse grids; This represents the physical quantity values of nodes adjacent to the boundary nodes within the fine mesh; this extrapolation scheme ensures the continuity of the first derivative of the physical quantities at the boundary locations.
[0063] The edge computing node substitutes the physical quantity values of the virtual nodes obtained from the calculation into the one-sided difference scheme, replaces the physical quantity values of the adjacent nodes of the original coarse grid, and generates the corrected discrete equation. The corrected discrete equation uses the virtual node values with the same step size as the fine grid, which eliminates the difference truncation error caused by the inconsistent step size of the grids on both sides, and ensures the mathematical continuity of the discrete equation in the grid transition region.
[0064] The edge computing node arranges the equations of all the grid nodes in the order of the node numbers and assembles them into a finite difference discrete algebraic equation system. The coefficient matrix of the equation system is a sparse matrix. The non-zero elements of the sparse matrix correspond to the coupling relationship between adjacent nodes. The edge computing node uses a sparse matrix storage format to store the coefficient matrix, only recording the value and position of the non-zero elements to reduce memory usage.
[0065] In this embodiment, the parameters of the mesh subdivision level and the differential format are shown in Table 3. Table 3 records the mesh step size, maximum subdivision level limit, discrete format and virtual node setting rules for different subdivision levels, clarifying the parameter configuration for different subdivision levels.
[0066] Table 3 Mesh Subdivision and Differential Discretization Parameters
[0067] Explanation of Table 3: This table clarifies the core parameters of different subdivision levels of the mesh in this embodiment. The maximum subdivision level is set to 3 to avoid infinite subdivision of the mesh. The boundary nodes of the fine meshes at different levels all adopt a one-sided difference format and set virtual nodes that match the step size of the fine mesh, which ensures the consistency and mathematical continuity of the discrete format between different levels of meshes and eliminates the discrete error caused by the step size difference.
[0068] In this embodiment, by setting a maximum subdivision level parameter, the infinite subdivision of the mesh is limited, avoiding excessive consumption of computing resources; Morton coding is used to implement a one-dimensional linear index of the three-dimensional mesh, improving the efficiency of retrieval and traversal of mesh topology information; by setting virtual nodes at the mesh boundaries and performing linear extrapolation correction, the difference truncation error caused by inconsistent mesh step sizes is eliminated, ensuring the mathematical continuity of the discrete algebraic equation system and improving the solution accuracy of the local water and fertilizer distribution field.
[0069] In another preferred embodiment, when the edge computing node extracts boundary flux data of a fine-grid region in a non-uniform discrete topology, it first locates the set of boundary surfaces where fine and coarse grids intersect in the non-uniform discrete topology. The edge computing node traverses all fine grids in the topological adjacency table, queries all adjacent grids of each fine grid, and when the subdivision level of an adjacent grid is lower than that of the current fine grid, it determines that the surface shared by the current fine grid and that adjacent grid is the boundary surface of the fine grid region, and adds the boundary surface to the boundary surface set. The edge computing node assigns a unique surface identifier to each boundary surface in the boundary surface set, records the three-dimensional spatial coordinate range of each boundary surface, the identifier of the fine grid to which it belongs, the identifier of the adjacent coarse grid, and the normal vector direction of the surface, and stores them in local memory.
[0070] For each boundary surface in the boundary surface set, the edge computing node extracts the water content and water potential gradient values of the nodes on both sides of the boundary surface, and calculates the water flux and solute flux through each boundary surface according to Darcy's law. Specifically, the normal vector of the boundary surface points from the interior of the fine grid to the interior of the coarse grid. The edge computing node extracts the matrix potential values of the nodes adjacent to the boundary surface within the fine grid to calculate the water potential gradient at the boundary surface location. The direction of the water potential gradient is consistent with the normal vector direction of the boundary surface. Based on the matrix potential values at the boundary surface location, the edge computing node calculates the corresponding unsaturated hydraulic conductivity and volumetric water content through the soil moisture characteristic curve, and calculates the water flux density perpendicular to the boundary surface direction according to Darcy's law. Multiplying the water flux density by the area of the boundary surface yields the total water flux through that boundary surface.
[0071] For solute flux, edge computing nodes extract solute concentration values from nodes on both sides of the boundary surface, calculate the solute concentration gradient at the boundary surface location, and combine this with the water flux density and hydrodynamic dispersion coefficient to calculate the solute flux density corresponding to the convection and dispersion terms. Multiplying the solute flux density by the area of the boundary surface yields the total solute flux passing through that boundary surface. Edge computing nodes add corresponding surface identifiers and spatial coordinate information to the water flux and solute flux at each boundary surface to ensure that the flux data corresponds to the spatial location of the boundary surface.
[0072] Furthermore, the edge computing nodes arrange the calculated water flux and solute flux according to the coordinate order of the boundary surfaces in three-dimensional space to generate a boundary flux matrix. Specifically, the edge computing nodes sort all boundary surfaces in the boundary surface set in ascending order of their three-dimensional coordinates (x-axis, y-axis, z-axis). The sorted boundary surface order serves as the row number of the boundary flux matrix. The first column of the boundary flux matrix stores the water flux values of the boundary surfaces, the second column stores the solute flux values, and each element of the matrix corresponds to a certain type of flux value for a boundary surface, generating a two-dimensional boundary flux matrix.
[0073] After generating the boundary flux matrix, the edge computing node compresses it to reduce data transmission volume. Specifically, the edge computing node iterates through all flux values in the boundary flux matrix. A preset flux truncation threshold is set based on the sensor's measurement accuracy and the numerical solution's convergence threshold. Flux values with absolute values below the preset threshold are set to 0, while non-zero flux values with absolute values greater than or equal to the threshold are retained. The node also records the row and column indices of these non-zero flux values in the boundary flux matrix. The edge computing node converts the retained non-zero flux values into 32-bit floating-point binary sequences and the corresponding row and column indices into 16-bit integer binary sequences. These floating-point and integer binary sequences are then concatenated using an alternating "index-value" arrangement to generate a compact binary data stream. This compact binary data stream contains only the index and value information of non-zero flux values, eliminating the storage space occupied by a large amount of zero-value data. Edge computing nodes fill the data payload field of network transmission data packets with compact binary data streams, add checksum and address information to the packet header, and upload them to the cloud server via wireless communication network.
[0074] The cloud server receives network transmission data packets uploaded by edge computing nodes. First, it verifies the data packets. After the verification is successful, it parses the compact binary data stream in the data payload field. According to the alternating arrangement rule of "index number-value", it splits the non-zero flux values to obtain the row and column index numbers and floating-point values. Based on the row and column index numbers, the non-zero flux values are filled into the corresponding boundary flux matrix positions, and zero values are directly filled with zeros. The complete boundary flux matrix is then restored, and the water flux and solute flux data, as well as the corresponding boundary surface spatial coordinate information, are extracted from the matrix.
[0075] The cloud server constructs a globally uniform grid covering the entire farmland area in its local memory. The 3D spatial step size of the globally uniform grid is completely consistent with the 3D spatial step size of the basic coarse grid of the edge computing nodes. The physical spatial range of the globally uniform grid covers all irrigated and non-irrigated areas of the farmland. The cloud server assigns a unique identifier to each grid and node in the globally uniform grid, recording the spatial coordinate range and adjacency relationships of each grid. The cloud server parses the received boundary flux data and maps it to the local grid boundary in the globally uniform grid corresponding to the physical region of the edge computing nodes. Specifically, based on the 3D coordinates of the boundary surface corresponding to the boundary flux data, the cloud server locates the grid boundary surface in the globally uniform grid whose coordinate range completely matches, and assigns the flux value of this boundary surface to the corresponding boundary surface of the global grid, completing the spatial mapping of the boundary flux data. During the mapping process, it ensures that the spatial position and physical meaning of the flux value are completely consistent, without scaling or offset.
[0076] Furthermore, the cloud server uses the flux values on the mapped local grid boundary as a third type of boundary condition, also known as the Robin boundary condition, and substitutes it into the global water and fertilizer transport dynamics equations. This third type of boundary condition describes the relationship between the flux and boundary physical quantities, accurately characterizing the water and fertilizer exchange process between the local solution domain of the edge computing node and the surrounding global domain. The cloud server employs an implicit difference scheme for time-step iteration on the global uniform grid. This implicit difference scheme is unconditionally stable and can use a larger time step than the local solution of the edge computing node, reducing the number of global iterations. The discrete equation expression of the global implicit difference scheme is:
[0077] in, The coefficient matrix is obtained by discretization using a difference scheme of a globally uniform grid; This is the coefficient matrix of physical quantities at historical moments; for The column vector of global physical quantities at time t, including the matrix potential. and solute concentration ; for The column vector of global physical quantities at time t; This is a column vector consisting of source and sink terms and boundary conditions, which contains the boundary throughput data uploaded by the edge computing nodes.
[0078] Within each time step, the cloud server constructs an implicit discrete algebraic equation system of global water and fertilizer transport dynamics equations, and solves it using a large sparse equation system solving algorithm. After the solution is completed, the global water and fertilizer distribution data of the current time step is obtained, and the iterative calculation of the next time step is continued until the preset prediction time length is reached. The output is a global water and fertilizer distribution prediction matrix containing the physical region of the edge computing node and its surrounding region. Each element of the global water and fertilizer distribution prediction matrix corresponds to the predicted values of water content and solute concentration of a node in the global uniform grid.
[0079] In this embodiment, the parameters for boundary flux data compression and transmission are shown in Table 4. Table 4 records the compression ratio, data transmission volume, and prediction error corresponding to different flux truncation thresholds, clarifying the configuration rules for compression parameters.
[0080] Table 4 Boundary Flux Data Compression and Transmission Parameters
[0081] Table 4 Explanation: This table clarifies the compression effect and prediction accuracy corresponding to different flux cutoff thresholds in this embodiment. The value of the flux cutoff threshold needs to balance the data compression rate and the global prediction accuracy. In the case of conventional farmland irrigation, the following is adopted: Water flow cutoff threshold in m³ / s and A solute flux cutoff threshold of kg / s can achieve a data compression rate of more than 5 times while ensuring that the global prediction error is less than 0.5%, thereby reducing the data load uploaded by edge computing nodes to the cloud server and reducing the transmission burden of communication links.
[0082] In this embodiment, the water flux and solute flux at the fine grid boundary are accurately calculated using Darcy's law, ensuring the consistency of boundary conditions between the edge side and the cloud side. Invalid low-flux data are removed by using a flux truncation threshold, and compact binary data streams are used for encapsulation, significantly reducing data transmission volume and lowering the burden on the communication link. By substituting the boundary flux data as a third type of boundary condition into the global water and fertilizer transport equation, and using an implicit difference scheme for global time step iteration, global water and fertilizer transport trend prediction based on the local fine solution results at the edge side is realized, ensuring the accuracy of the global prediction results.
Claims
1. A water and fertilizer integration simulation method based on edge computing, characterized in that, include: Edge computing nodes acquire in real time the moisture content and conductivity data collected by water and fertilizer sensors deployed at different depths in the soil, and calculate the physical parameter gradient between adjacent water and fertilizer sensors; When the gradient of the physical parameter is greater than the preset mutation threshold, the numerical solution engine built into the edge computing node triggers a local mesh refinement operation in the corresponding physical space region to generate a non-uniform discrete topology structure containing fine and coarse meshes. The edge computing nodes establish a finite difference discrete algebraic equation system of water and fertilizer transport dynamics equations based on the non-uniform discrete topology, and obtain the local water and fertilizer distribution field by iterative solution. Edge computing nodes extract boundary flux data of fine-grid regions in the non-uniform discrete topology, and upload the boundary flux data as initial conditions to the cloud server. The cloud server performs macroscopic water and fertilizer migration trend prediction on the global uniform grid based on the boundary flux data.
2. The water and fertilizer integration simulation method based on edge computing according to claim 1, characterized in that, The steps for calculating the physical parameter gradient between adjacent water and fertilizer sensors include: edge computing nodes extracting the coordinate positions and measurement values of water and fertilizer sensors at different soil depths at the same sampling time at a preset sampling frequency, and constructing a spatial sampling point sequence; The edge computing node calculates the spatial physical parameter gradient vector based on the difference between the three-dimensional coordinates and the difference between the measured values of two adjacent water and fertilizer sensors in the spatial sampling point sequence. The edge computing node performs a difference operation between the current spatial physical parameter gradient vector and the spatial physical parameter gradient vector at a historical time to generate a gradient change rate vector, which is used as the basis for determining whether to trigger the local mesh densification operation.
3. The water and fertilizer integration simulation method based on edge computing according to claim 1, characterized in that, The steps for triggering local mesh refinement to generate a non-uniform discrete topology structure containing fine and coarse meshes include: the edge computing node divides the initial soil physical space into multiple basic coarse meshes; when the physical parameter gradient inside the basic coarse mesh is detected to be greater than a preset variation threshold, the basic coarse mesh is divided into 8 fine meshes with the center point of the basic coarse mesh as the subdivision origin. The edge computing node establishes a topological adjacency table between the fine mesh and the adjacent basic coarse mesh, and records the connectivity between each face of the fine mesh and the corresponding face of the adjacent basic coarse mesh in the topological adjacency table, thereby generating the non-uniform discrete topology structure.
4. The water and fertilizer integration simulation method based on edge computing according to claim 1, characterized in that, The steps for establishing a finite difference discrete algebraic equation system of water and fertilizer transport dynamics equations based on the non-uniform discrete topology include: edge computing nodes traversing each grid node in the non-uniform discrete topology; for nodes located inside the fine grid, the spatial second derivative terms in the water and fertilizer transport dynamics equations are discretized using the central difference scheme. For nodes located at the boundary between fine and coarse grids, the edge computing node obtains the coordinates of the adjacent nodes on the coarse grid side of the boundary node, discretizes the spatial second derivative terms using a one-sided difference scheme, and arranges the discretized equations according to the grid node numbers to assemble the finite difference discrete algebraic equation system.
5. The water and fertilizer integration simulation method based on edge computing according to claim 1, characterized in that, The steps for extracting boundary flux data of the fine mesh region in the non-uniform discrete topology include: locating the set of boundary surfaces where the fine mesh and coarse mesh intersect in the non-uniform discrete topology using edge computing nodes; For each boundary surface in the set of boundary surfaces, the edge computing node extracts the water content and water potential gradient values of the nodes on both sides of the boundary surface, and calculates the water flow and solute flux through each boundary surface according to Darcy's law formula. The edge computing node arranges the calculated water flux and solute flux according to the coordinate order of the boundary surface in three-dimensional space to generate a boundary flux matrix, and encapsulates the boundary flux matrix into a network transmission data packet and uploads it to the cloud server.
6. The water and fertilizer integration simulation method based on edge computing according to claim 1, characterized in that, The steps of the cloud server performing macroscopic water and fertilizer transport trend prediction on a global uniform grid based on the boundary flux data include: the cloud server constructing a global uniform grid covering the entire farmland area in its local memory; the cloud server parsing the received boundary flux data; and mapping the boundary flux data to the local grid boundary corresponding to the physical region of the edge computing node in the global uniform grid. The cloud server substitutes the flux values on the mapped local grid boundary as the third type of boundary condition into the global water and fertilizer transport dynamics equation, and performs time-step iteration on the global uniform grid using an implicit difference scheme, outputting a global water and fertilizer distribution prediction matrix that includes the physical region of the edge computing node and its surrounding region.
7. The water and fertilizer integration simulation method based on edge computing according to claim 2, characterized in that, The steps of constructing a spatial sampling point sequence also include: edge computing nodes extracting measurement values of multiple consecutive sampling cycles within a time sliding window corresponding to the preset sampling frequency, and calculating the measurement variance of each water and fertilizer sensor within the time sliding window; The edge computing node marks the measurement values whose measurement variance is greater than a preset variance threshold as abnormal data points, removes the abnormal data points from the spatial sampling point sequence, and uses the remaining measurement values to fill the removed positions with cubic spline interpolation to generate a spatial sampling point sequence after removing abnormal data points.
8. The water and fertilizer integration simulation method based on edge computing according to claim 3, characterized in that, The step of dividing the basic coarse grid into 8 fine grids with the center point of the basic coarse grid as the subdivision origin also includes: setting the maximum subdivision level parameter for the edge computing node; querying the historical subdivision level record of the current basic coarse grid before each subdivision operation; if the historical subdivision level record reaches the maximum subdivision level parameter, then stopping the subdivision operation on the current basic coarse grid. Edge computing nodes use Morton coding rules to perform one-dimensional linear coding on all generated fine meshes and basic coarse meshes, and store the one-dimensional linear coding as an index key value in the topological adjacency table.
9. The water and fertilizer integration simulation method based on edge computing according to claim 4, characterized in that, The step of discretizing the spatial second derivative term using a one-sided difference scheme further includes: setting virtual nodes on the coarse grid side at the boundary between the fine and coarse grids, wherein the distance between the virtual nodes and the boundary nodes is equal to the grid step size of the fine grid; The edge computing node uses the known physical quantity values of the fine mesh nodes around the boundary node to calculate the physical quantity values of the virtual node through linear extrapolation. The physical quantity values of the virtual node are then substituted into the one-sided difference scheme to replace the physical quantity values of the original coarse mesh adjacent nodes, generating the corrected discrete equation.
10. The water and fertilizer integration simulation method based on edge computing according to claim 5, characterized in that, The step of generating the boundary flux matrix further includes: the edge computing node traverses all flux values in the boundary flux matrix, sets flux values with absolute values lower than a preset flux truncation threshold to 0, and retains non-zero flux values with absolute values greater than or equal to the preset flux truncation threshold and their row and column index numbers in the boundary flux matrix. The edge computing node converts the non-zero throughput value into a floating-point binary sequence, converts the row and column index numbers into an integer binary sequence, concatenates the floating-point binary sequence and the integer binary sequence in an interleaved manner to form a compact binary data stream, and fills the compact binary data stream into the data payload field of the network transmission data packet.