Machine learning-based farmland drainage channel optimization layout method
Through the improved ConvNeXt network and Cuckoo search algorithm, the problem of accurate identification and optimization of micro-topography data in the design of farmland drainage channels was solved, efficient channel network layout was achieved, and drainage capacity and agricultural machinery accessibility were improved.
Patent Information
- Application Number
- CN202510727803.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing farmland drainage channel design methods lack in-depth quantitative analysis of micro-scale terrain data, making it difficult to accurately identify micro-depressions, water convergence paths and slope information in large-scale, highly heterogeneous farmland scenes. This leads to insufficient drainage capacity, mismatch between channel lines and terrain, obstructed passage of agricultural machinery, and a lack of efficient automated optimization mechanisms.
An improved ConvNeXt network is used for multimodal feature extraction. The adaptive feature enhancement module and the cross-scale aspect perception attention module are combined to generate micro-topography feature results. A structured evaluation index dataset is constructed, and a multi-objective optimization model is established. The improved Cuckoo search algorithm is used to perform a global search for canal network layout parameters and output the optimal canal network layout parameters.
It has achieved high-precision extraction of micro-topography information and precise positioning of channel directions, optimized the channel network layout, improved drainage efficiency, reduced earthwork volume and agricultural machinery accessibility, and broken through the limitations of traditional design methods.
Smart Images

Figure CN120654356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of farmland technology, and in particular to a method for optimizing the layout of farmland drainage channels based on machine learning. Background Art
[0002] With the continuous advancement of precision agriculture and smart farmland construction, the scientific planning and intelligent layout of farmland drainage systems are increasingly becoming key links in improving agricultural production efficiency and ensuring stable crop yields and incomes. In areas with complex farmland microtopography conditions and significant differences in natural water collection characteristics, reasonable planning of drainage channel networks is of great significance for reducing water stagnation in cultivated land, optimizing soil moisture distribution, and improving the accessibility of agricultural machinery operations. However, there are still many limitations in the current mainstream farmland drainage channel design methods.
[0003] At present, most drainage channel layout methods still rely on planning methods dominated by manual experience. Designers usually layout channels, divide channels and set cross-section parameters based on topographic maps, field survey data and past experience. They lack in-depth quantitative analysis of micro-scale terrain data. Although they have certain operability, when faced with large-scale and highly heterogeneous farmland scenes, their ability to accurately identify micro-depressions, infer water flow convergence paths and express slope information is relatively weak. As a result, drainage channel layout plans often have problems such as insufficient drainage capacity, mismatch between channel lines and terrain, and obstruction of agricultural machinery access in actual operation.
[0004] On the other hand, some studies have attempted to introduce remote sensing data and geographic information systems for auxiliary analysis, but most methods are still based on low-resolution elevation data or a single data source, lacking the ability to jointly model multimodal information. In addition, existing methods generally lack efficient automated optimization mechanisms, and the setting of channel network parameters mostly adopts exhaustive or fixed rules, without global search and dynamic adaptability. It is difficult to balance the minimization of earthwork volume and the convenience of agricultural machinery operations while ensuring drainage effects.
[0005] Therefore, there is an urgent need for a drainage channel layout method that integrates high-precision micro-topography information perception, deep feature extraction and intelligent optimization algorithm to break through the bottleneck of current technology. Summary of the Invention
[0006] One purpose of the present invention is to propose a method for optimizing the layout of farmland drainage channels based on machine learning. The present invention focuses on areas that are sensitive to changes in terrain slope, thereby more accurately locating potential trend areas for channel lines.
[0007] A method for optimizing the layout of farmland drainage channels based on machine learning according to an embodiment of the present invention includes the following steps:
[0008] S1. Collect raw farmland microtopography data and process it using an improved ConvNeXt network multimodal feature extraction model to generate microtopography feature results, including micro-depression mask maps, slope aspect raster maps, and surface roughness maps.
[0009] S2. Construct a structured evaluation index dataset based on the microtopography feature results. The structured evaluation index dataset includes a water flow convergence index layer, a local slope layer, and a tillage resistance assessment layer.
[0010] S3. Develop a multi-objective optimization model for farmland drainage channels based on a structured evaluation indicator dataset. The model's objectives are to minimize the depth and duration of stagnant water in the field, minimize the amount of excavation and fill, and maximize accessibility for agricultural machinery.
[0011] S4. Set the canal line angle, canal segment length, canal cross-section width and depth, and canal segment node locations as canal network layout parameters. Use an improved Cuckoo search algorithm to perform a global search for these canal network layout parameters within a multi-objective optimization model for farmland drainage channels. The improved Cuckoo search algorithm utilizes a Lévy flight mechanism, adaptive discovery probability, and a dynamic nest replacement strategy for iterative updates, ultimately outputting the optimal canal network layout parameters.
[0012] S5. Generate a canal line vector dataset based on the optimal canal network layout parameters. The canal line vector dataset includes canal line vectors, canal node catchment areas, and canal cross-sectional parameters. Import the canal line vector dataset into the farmland geographic information management platform to generate drainage canal construction drawings and earthwork quantity lists.
[0013] Optionally, the S1 includes the following steps:
[0014] S11. Obtain original farmland microtopography data with centimeter-level resolution, including UAV multispectral image data. rgb and LiDAR 3D digital elevation data D dem , the original farmland microtopography data is spatially registered and pixel-level uniformly resampled to construct a unified scale input tensor T input , where I rgb = {I(x,y)}, which represents the multispectral reflectance value at the geographical location (x,y), D dem ={z(x,y)}, which represents the surface elevation at the geographic location (x,y);
[0015] S12. An adaptive feature enhancement module for farmland micro-topography drainage channel layout is embedded in the initial downsampling stage of the improved ConvNeXt network. The adaptive feature enhancement module uses the local variance of elevation and the inter-spectral NDWI index to guide feature selection and fusion, and obtains the enhanced feature tensor F for farmland drainage channel optimization. enhanced ;
[0016] Local variance of elevation V local (x,y) is used to highlight microscale depressions and ridges using the following calculation:
[0017]
[0018] Among them, z i (x,y) is the elevation value of the local neighborhood around the geographic location (x,y), is the average elevation of the local neighborhood, and N is the total number of pixels in the neighborhood;
[0019] Interspectral NDWI index W ndwi (x,y) is used to enhance the characteristic expression of waterlogged areas:
[0020]
[0021] Among them, I green (x,y) represents the green band reflectance at the geographic location (x,y), I nir (x,y) represents the near-infrared band reflectance at the geographical location (x,y);
[0022] S13. Add a cross-scale slope-aware attention module to the middle layer of the ConvNeXt network. The cross-scale slope-aware attention module constructs a spatial weight matrix A according to the terrain slope change. aspect (x,y), optimize the expression of convolution perception area convergence trend and drainage channel layout sensitive areas at different scales:
[0023]
[0024] Among them, θ j (x, y) is the slope angle of each pixel in the j-th scale window, θ mean (x, y) is the average value of the slope aspect in the multi-scale window, M is the total number of pixels in the scale window, and σ(·) is the normalization function;
[0025] S14. Enhanced feature tensor F enhanced Perform multi-scale decoding and output the micro-topography feature results after combined training and optimization of the micro-topography depression recognition loss function and the slope prediction loss function, including the micro-bottom mask map M depression , Slope raster map G aspect and surface roughness map R roughness ,in:
[0026] Micro-depression mask map M depression Used to identify micro-scale depressions within agricultural fields that may cause water stagnation;
[0027] Aspect raster map Gaspect Used to characterize the direction of runoff on micro-scale slopes of farmland and clarify the distribution trend of potential channels;
[0028] Surface roughness map R roughness Used to quantitatively describe the flatness of the ground and the selection of auxiliary channel layout locations.
[0029] Optionally, the S14 includes the following steps:
[0030] S141. Enhance the feature tensor F enhanced Input multi-scale decoding module, which includes multiple parallel branches of decoding convolutional layers. Each branch corresponds to a different receptive field scale, which is used to decouple the scale characteristics of terrain undulation, extract multi-scale spatial structure information, and form a primary decoding feature tensor set. Where s is the scale number and S is the total number of scale branches;
[0031] S142. Decoding feature tensors at each scale in the primary decoding feature tensor set Perform channel attention reweighting and inter-scale fusion to obtain the fused feature tensor F fused , channel attention weight α c (s) Calculated based on channel response values:
[0032]
[0033] Where (x, y) is the pixel position, c is the channel index, represents the weighting coefficient of the cth channel under scale s;
[0034] S143. Constructing a joint loss function For the fused feature tensor F fused Perform joint supervised training for micro-topography depression identification and slope angle prediction. The joint loss function includes the micro-depression identification loss function. And the aspect prediction loss function
[0035]
[0036] Among them, λ1 and λ2 are task weight coefficients, satisfying λ1+λ2=1;
[0037] S144. Micro-depression identification loss function Based on the binary cross entropy definition, the micro-depression mask map M generated for supervision is depression :
[0038]
[0039] Among them, mi is the true label of pixel i, is the corresponding predicted probability value;
[0040] S145. Slope prediction loss function The aspect raster map G is used to supervise the generation of aspect , using the periodic cosine angle error definition:
[0041]
[0042] Among them, θ i represents the true aspect angle at geographical location i, is the model-predicted slope aspect, both units are in degrees and the range is [0,360);
[0043] S146. The micro-depression mask map M in the output result after the joint loss function training optimization is obtained. depression ={m(x,y)|m(x,y)∈{0,1}}, slope grid map G aspect ={θ(x,y)} and surface roughness map R roughness ={r(x,y)} is extracted as the final micro-topography feature result.
[0044] Optionally, the S2 includes the following steps:
[0045] S21. Construct the basic raster layer input of the structured evaluation index dataset based on the micro-depression mask map, aspect raster map, and surface roughness map;
[0046] S22. Calculate the slope value s(x,y) at each geographic location to construct a local slope layer. The slope value is used to measure the intensity of horizontal changes in surface elevation. The slope value is obtained by calculating the rate of change of elevation in the east-west and north-south directions of the geographic location, and then squared and summing the square roots of the two rates of change. This value is used to characterize the micro-scale undulation of the surface:
[0047]
[0048] in, and are the east-west and north-south elevation change rates of the DEM at the geographical location (x, y);
[0049] S23. Calculate the water flow convergence index f(x,y) at each geographic location to construct a water flow convergence index layer. The water flow convergence index measures the intensity of surface water flowing into a location from upstream. The water flow convergence index is obtained by summing the areas represented by all upstream grids flowing to the location and performing a numerical transformation to compress the dynamic range. A larger convergence index value indicates that water is more likely to converge at that location:
[0050]
[0051] Among them, A i represents the area of all pixels that sink to the geographic location (x, y), N(x, y) is the total number of sinking units, and log(·) is used to adjust the scale range of the sink index;
[0052] S24. Constructing tillage resistance assessment layer C based on surface roughness map and slope map traffic = {c(x,y)}. The tillage resistance assessment value is used to measure the degree of terrain obstruction encountered by agricultural machinery when passing through the location. The tillage resistance assessment value is obtained by combining the surface roughness value r(x,y) and the slope value s(x,y) according to a fixed weighting coefficient. The roughness value reflects the impact of surface unevenness on the passage of machinery, and the slope value reflects the challenge of the slope angle to the climbing ability of agricultural machinery.
[0053] S25. The obtained water flow convergence index layer F flow , local slope layer S slope and tillage resistance assessment layer C traffic Raster encoding is performed according to spatial coordinate consistency and fused into a structured evaluation index dataset D struct ={f(x,y),s(x,y),c(x,y)}.
[0054] Optionally, S3 includes the following steps:
[0055] S31. Input the structured evaluation index dataset into the farmland drainage channel multi-objective optimization modeling module. Based on the coupling relationship between the micro-scale landform's ability to concentrate water flow, surface slope changes, and agricultural machinery accessibility, a multi-objective form of the optimization objective function is established.
[0056] S32. Define the objective function F for evaluating the depth of stagnant water depth , characterizes the effectiveness of drainage channel layout in reducing farmland waterlogging, and calculates the maximum water stagnation depth index Δh based on the interaction area of the convergence index value f(x,y) and the micro-depression mask map max :
[0057]
[0058] Among them, f(x,y) is the water flow convergence index value of the geographical location (x,y), and m(x,y)∈0,1 indicates whether it is a micro-depression area;
[0059] S33. Define the objective function F for earthwork engineering evaluation earth , with the goal of minimizing the volume of terrain transformation involved in canal network design, the surface elevation z(x i ,y i) and target channel bottom elevation z target The volume deviation of the earthwork excavation and filling volume V is calculated by accumulating the volume deviation of the earthwork excavation cut :
[0060]
[0061] Among them, K is the total number of canal sections, A c is the unit cross-sectional area of a single channel section, z target To design the channel bottom elevation;
[0062] S34. Define the objective function F for evaluating the accessibility of agricultural machinery traffic The accessibility of farmland operations is assessed based on the structured tillage resistance layer, and the access penalty C is calculated based on the cumulative resistance in the intersection area between the canal network layout and the agricultural machinery operation path. traffic , which is used to represent the mean difficulty of the entire path:
[0063]
[0064] Among them, P is the preset passage area of agricultural machinery, L path is the total length of the path, c(x,y) is the tillage resistance value of the geographical location (x,y), C traffic The unit is a dimensionless rating value;
[0065] S35. Constructing the multi-objective optimization objective function F for integrated farmland drainage channels total , in order to jointly optimize the evaluation objective function of stagnant water depth, earthwork engineering and agricultural machinery accessibility:
[0066] F total =w1·F depth +w2·F earth +w3·F traffic ;
[0067] Among them, w1, w2, and w3 are the weighted coefficients of the three objective items, and are flexibly set according to agricultural production needs to comprehensively balance drainage capacity, land transformation costs, and agricultural machinery operation efficiency.
[0068] Optionally, the S4 includes the following steps:
[0069] S41. Represent the spatial structure of the canal network as a set of optimizable variables and define the canal network layout parameter vector as:
[0070]
[0071] Among them, θ i represents the strike angle of channel section i, l i Indicates the length of the channel section, w i and d iare the channel width and depth respectively, (u i ,v i ) is the starting position of the canal section node in the geographic coordinate system, and K is the total number of canal sections;
[0072] S42. Initialize the candidate solution set with a population size of N The channel network layout parameters of each solution are input into the multi-objective optimization objective function of the farmland drainage channel for fitness evaluation, and the total evaluation value corresponding to each candidate solution is obtained.
[0073] S43. In each iteration, according to the nest replacement mechanism of the Cuckoo search algorithm, several candidate solutions with the worst current fitness are selected for replacement to construct a new solution x (j+1) , the improved Lévy flight search strategy is used to perform global jump perturbations, and the new solution update formula is:
[0074] x (j+1) =x (j) +α·Lévy(λ);
[0075] Where α is the step size adjustment coefficient, Lévy(λ) is the jump step size that obeys the Lévy distribution;
[0076] S44. Introducing an adaptive discovery probability p related to farmland terrain complexity in the jump step control a , the adaptive discovery probability is used to decide whether to accept the newly generated candidate solution:
[0077]
[0078] Among them, γ is the regulating factor, is the fitness of the current solution, F best With F max are the optimal and worst fitness values of the current population, respectively, and ε is a small positive number to prevent the denominator from being zero;
[0079] S45. Execute the nest replacement strategy in each iteration. If the fitness of the new solution Better fitness than the original solution Then keep the new solution, otherwise with probability 1-p a Replace; update the current optimal solution x at the same time best ;
[0080] S46. Introduce the micro-scale agricultural constraint embedding mechanism in the iterative process, and for each candidate solution, the strike angle θ of the canal section i Angle φ with tillage direction i Limitations are imposed to meet the requirements of turning radius and sowing row spacing for agricultural machinery operations:
[0081] |θ i-φ i |≤θ limit ;
[0082] Among them, θ limit is the maximum allowable deviation angle;
[0083] S47. Repeat steps S43 to S46 until the preset termination conditions are met, including the maximum number of iterations or the fitness convergence threshold, and output the optimal channel network layout parameters x best .
[0084] Optionally, the channel line vector dataset is used to express the direction characteristics of the channel section in two-dimensional space. The channel line vector dataset is generated by combining the geographic coordinates of the starting point and end point of each channel section, the direction angle and length information, and is expressed and stored in a spatial vector data structure.
[0085] Optionally, the drainage ditch construction drawing and earthwork quantity list L earthwork The output is in standard engineering file format, including PDF, DWG, Excel and GIS supported formats. The output content is used for construction scheduling, project filing and intelligent agricultural machinery import.
[0086] The beneficial effects of the present invention are:
[0087] (1) The present invention makes structural improvements to the traditional ConvNeXt network and introduces an adaptive feature enhancement module and a cross-scale aspect perception attention mechanism, which significantly improves the accuracy and discrimination of micro-topography information extraction. Specifically, the adaptive feature enhancement module guides feature fusion based on the local variance of elevation and the inter-spectral NDWI index, which can effectively highlight the spatial distribution characteristics of micro-scale depressions and waterlogged areas; while the cross-scale aspect perception attention module models the aspect angle difference under multi-scale windows, focusing on areas sensitive to terrain aspect changes, thereby more accurately locating potential trend areas of channel direction.
[0088] (2) The present invention establishes a canal network layout optimization model that integrates multi-objective constraints, while considering three heterogeneous objectives: water retention depth, earthwork volume, and agricultural machinery accessibility. A weighted objective function is constructed and the farmland operation path is explicitly introduced as an accessibility constraint. On this basis, the canal network parameter space is defined as a continuous optimization variable with the canal section angle, length, cross-sectional dimensions, and spatial nodes as dimensions. This breaks through the traditional fixed canal layout method based on rule templates or empirical logic, and achieves a highly flexible and site-specific optimization capability.
[0089] (3) This paper proposes an improved Cuckoo search strategy, which combines the Lévy flight mechanism, the adaptive discovery probability mechanism and the micro-scale agricultural constraint embedding strategy to effectively enhance the global search capability and local convergence speed of the canal network parameter space. Specifically, the jump step size is dynamically adjusted and coupled with the terrain complexity to avoid falling into the local optimum; the discovery probability is dynamically adjusted according to the fitness difference between the current solution and the global optimal solution; and the canal section angle restriction in the agricultural operation direction further improves the practicality and operation friendliness of the solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0091] Figure 1 This is a flow chart of a method for optimizing the layout of farmland drainage channels based on machine learning proposed in the present invention. DETAILED DESCRIPTION
[0092] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0093] refer to Figure 1 A method for optimizing the layout of farmland drainage channels based on machine learning includes the following steps:
[0094] S1. Collect raw farmland microtopography data and process it using an improved ConvNeXt network multimodal feature extraction model to generate microtopography feature results, including micro-depression mask maps, slope aspect raster maps, and surface roughness maps.
[0095] S2. Construct a structured evaluation index dataset based on the microtopography feature results. The structured evaluation index dataset includes a water flow convergence index layer, a local slope layer, and a tillage resistance assessment layer.
[0096] S3. Develop a multi-objective optimization model for farmland drainage channels based on a structured evaluation indicator dataset. The model's objectives are to minimize the depth and duration of stagnant water in the field, minimize the amount of excavation and fill, and maximize accessibility for agricultural machinery.
[0097] S4. Set the canal line angle, canal segment length, canal cross-section width and depth, and canal segment node locations as canal network layout parameters. Use an improved Cuckoo search algorithm to perform a global search for these canal network layout parameters within a multi-objective optimization model for farmland drainage channels. The improved Cuckoo search algorithm utilizes a Lévy flight mechanism, adaptive discovery probability, and a dynamic nest replacement strategy for iterative updates, ultimately outputting the optimal canal network layout parameters.
[0098] S5. Generate a canal line vector dataset based on the optimal canal network layout parameters. The canal line vector dataset includes canal line vectors, canal node catchment areas, and canal cross-sectional parameters. Import the canal line vector dataset into the farmland geographic information management platform to generate drainage canal construction drawings and earthwork quantity lists.
[0099] In this embodiment, S1 includes the following steps:
[0100] S11. Obtain original farmland microtopography data with centimeter-level resolution, including UAV multispectral image data. rgb and LiDAR 3D digital elevation data D dem , the original farmland microtopography data is spatially registered and pixel-level uniformly resampled to construct a unified scale input tensor T input , where I rgb = {I(x,y)}, which represents the multispectral reflectance value at the geographical location (x,y), D dem ={z(x,y)}, which represents the surface elevation at the geographic location (x,y);
[0101] S12. An adaptive feature enhancement module for farmland micro-topography drainage channel layout is embedded in the initial downsampling stage of the improved ConvNeXt network. The adaptive feature enhancement module uses the local variance of elevation and the inter-spectral NDWI index to guide feature selection and fusion, and obtains the enhanced feature tensor F for farmland drainage channel optimization. enhanced ;
[0102] Local variance of elevation V local (x,y) is used to highlight microscale depressions and ridges using the following calculation:
[0103]
[0104] Among them, z i (x,y) is the elevation value of the local neighborhood around the geographic location (x,y), is the average elevation of the local neighborhood, and N is the total number of pixels in the neighborhood;
[0105] Interspectral NDWI index W ndwi (x,y) is used to enhance the characteristic expression of waterlogged areas:
[0106]
[0107] Among them, I green (x,y) represents the green band reflectance at the geographic location (x,y), I nir (x,y) represents the near-infrared band reflectance at the geographical location (x,y);
[0108] The calculation of the enhanced feature tensor is achieved through the guidance mechanism, channel weighting + spatial attention fusion, and the adaptive feature enhancement module embeds the elevation local variance and inter-spectral NDWI index into the network training and inference process, and guides deep feature learning in the following two ways:
[0109] Channel selection guide: V local (x,y) and W ndwi (x, y) is mapped to the convolution feature channel dimension, which is used to adjust the attention intensity of different channels (such as edge extraction, texture recognition, and spatial gradient) on the current area, thereby highlighting the semantics that are strongly related to drainage channel selection;
[0110] Spatial attention guidance: The local elevation variance and the inter-spectral NDWI index are fused to generate a spatial attention map. A significance weight is set for each pixel position to suppress the residual area and enhance the response of the potential catchment path and the target area at the edge of the depression, making the network more consistent with the drainage planning logic in the expression of local features.
[0111] Output: Enhanced feature tensor for optimized drainage channel distribution
[0112] Through structural guidance, the enhanced feature tensor output by the ConvNeXt network not only has the expressive ability of traditional image-elevation joint features, but also explicitly encodes the spatial distribution and intensity of depressions, confluences, ground roughness and wetness features. The enhanced features are used in the subsequent micro-topography feature map construction process (i.e., generating micro-depression mask maps, slope aspect raster maps, and surface roughness maps), forming the basis of the structured evaluation index dataset, and providing high-resolution and highly semantic input support for multi-objective optimization of the canal network.
[0113] S13. Add a cross-scale slope-aware attention module to the middle layer of the ConvNeXt network. The cross-scale slope-aware attention module constructs a spatial weight matrix A according to the terrain slope change. aspect (x,y), optimize the expression of convolution perception area convergence trend and drainage channel layout sensitive areas at different scales:
[0114]
[0115] Among them, θ j (x, y) is the slope angle of each pixel in the j-th scale window, θ mean(x, y) is the average value of the slope aspect in the multi-scale window, M is the total number of pixels in the scale window, and σ(·) is the normalization function;
[0116] S14. Enhanced feature tensor F enhanced Perform multi-scale decoding and output the micro-topography feature results after combined training and optimization of the micro-topography depression recognition loss function and the slope prediction loss function, including the micro-bottom mask map M depression , Slope raster map G aspect and surface roughness map R roughness ,in:
[0117] Micro-depression mask map M depression Used to identify micro-scale depressions within agricultural fields that may cause water stagnation;
[0118] Aspect raster map G aspect Used to characterize the direction of runoff on micro-scale slopes of farmland and clarify the distribution trend of potential channels;
[0119] Surface roughness map R roughness Used to quantitatively describe the flatness of the ground and the selection of auxiliary channel layout locations.
[0120] In this embodiment, S14 includes the following steps:
[0121] S141. Enhance the feature tensor F enhanced Input multi-scale decoding module, which includes multiple parallel branches of decoding convolutional layers. Each branch corresponds to a different receptive field scale, which is used to decouple the scale characteristics of terrain undulation, extract multi-scale spatial structure information, and form a primary decoding feature tensor set. Where s is the scale number and S is the total number of scale branches;
[0122] S142. Decoding feature tensors at each scale in the primary decoding feature tensor set Perform channel attention reweighting and inter-scale fusion to obtain the fused feature tensor F fused , channel attention weight Calculated based on channel response values:
[0123]
[0124] Where (x, y) is the pixel position, c is the channel index, represents the weighting coefficient of the cth channel under scale s;
[0125] S143. Constructing a joint loss function For the fused feature tensor F fused Perform joint supervised training for micro-topography depression identification and slope angle prediction. The joint loss function includes the micro-depression identification loss function. And the aspect prediction loss function
[0126]
[0127] Among them, λ1 and λ2 are task weight coefficients, satisfying λ1+λ2=1;
[0128] S144. Micro-depression identification loss function Based on the binary cross entropy definition, the micro-depression mask map M generated for supervision is depression :
[0129]
[0130] Among them, m i is the true label of pixel i, is the corresponding predicted probability value;
[0131] S145. Slope prediction loss function The aspect raster map G is used to supervise the generation of aspect , using the periodic cosine angle error definition:
[0132]
[0133] Among them, θ i represents the true aspect angle at geographical location i, is the model-predicted slope aspect, both units are in degrees and the range is [0,360);
[0134] S146. The micro-depression mask map M in the output result after the joint loss function training optimization is obtained. depression ={m(x,y)|m(x,y)∈{0,1}}, slope grid map G aspect ={θ(x,y)} and surface roughness map R roughness ={r(x,y)} is extracted as the final micro-topography feature result.
[0135] In this embodiment, S2 includes the following steps:
[0136] S21. Construct the basic raster layer input of the structured evaluation index dataset based on the micro-depression mask map, aspect raster map, and surface roughness map;
[0137] S22. Calculate the slope value s(x,y) at each geographic location to construct a local slope layer. The slope value is used to measure the intensity of horizontal changes in surface elevation. The slope value is obtained by calculating the rate of change of elevation in the east-west and north-south directions of the geographic location, and then squared and summing the square roots of the two rates of change. This value is used to characterize the micro-scale undulation of the surface:
[0138]
[0139] in, and are the east-west and north-south elevation change rates of the DEM at the geographical location (x, y);
[0140] S23. Calculate the water flow convergence index f(x,y) at each geographic location to construct a water flow convergence index layer. The water flow convergence index measures the intensity of surface water flowing into a location from upstream. The water flow convergence index is obtained by summing the areas represented by all upstream grids flowing to the location and performing a numerical transformation to compress the dynamic range. A larger convergence index value indicates that water is more likely to converge at that location:
[0141]
[0142] Among them, A i represents the area of all pixels that sink to the geographic location (x, y), N(x, y) is the total number of sinking units, and log(·) is used to adjust the scale range of the sink index;
[0143] S24. Constructing tillage resistance assessment layer C based on surface roughness map and slope map traffic = {c(x,y)}. The tillage resistance assessment value is used to measure the degree of terrain obstruction encountered by agricultural machinery when passing through the location. The tillage resistance assessment value is obtained by combining the surface roughness value r(x,y) and the slope value s(x,y) according to a fixed weighting coefficient. The roughness value reflects the impact of surface unevenness on the passage of machinery, and the slope value reflects the challenge of the slope angle to the climbing ability of agricultural machinery.
[0144] S25. The obtained water flow convergence index layer F flow , local slope layer S slope and tillage resistance assessment layer C traffic Raster encoding is performed according to spatial coordinate consistency and fused into a structured evaluation index dataset D struct ={f(x,y),s(x,y),c(x,y)}.
[0145] In this embodiment, S3 includes the following steps:
[0146] S31. Input the structured evaluation index dataset into the farmland drainage channel multi-objective optimization modeling module. Based on the coupling relationship between the micro-scale landform's ability to concentrate water flow, surface slope changes, and agricultural machinery accessibility, a multi-objective form of the optimization objective function is established.
[0147] S32. Define the objective function F for evaluating the depth of stagnant water depth, characterizes the effectiveness of drainage channel layout in reducing farmland waterlogging, and calculates the maximum water stagnation depth index Δh based on the interaction area of the convergence index value f(x,y) and the micro-depression mask map max :
[0148]
[0149] Among them, f(x,y) is the water flow convergence index value of the geographical location (x,y), and m(x,y)∈0,1 indicates whether it is a micro-depression area;
[0150] S33. Define the objective function F for earthwork engineering evaluation earth , with the goal of minimizing the volume of terrain transformation involved in canal network design, the surface elevation z(x i ,y i ) and target channel bottom elevation z target The volume deviation of the earthwork excavation and filling volume V is calculated by accumulating the volume deviation of the earthwork excavation cut :
[0151]
[0152] Among them, K is the total number of canal sections, A c is the unit cross-sectional area of a single channel section, z target To design the channel bottom elevation;
[0153] S34. Define the objective function F for evaluating the accessibility of agricultural machinery traffic The accessibility of farmland operations is assessed based on the structured tillage resistance layer, and the access penalty C is calculated based on the cumulative resistance in the intersection area between the canal network layout and the agricultural machinery operation path. traffic , which is used to represent the mean difficulty of the entire path:
[0154]
[0155] Among them, P is the preset passage area of agricultural machinery, L path is the total length of the path, c(x,y) is the tillage resistance value of the geographical location (x,y), C traffic The unit is a dimensionless rating value;
[0156] S35. Constructing the multi-objective optimization objective function F for integrated farmland drainage channels total , in order to jointly optimize the evaluation objective function of stagnant water depth, earthwork engineering and agricultural machinery accessibility:
[0157] F total =w1·F depth +w2·F earth +w3·F traffic ;
[0158] Among them, w1, w2, and w3 are the weighted coefficients of the three objective items, and are flexibly set according to agricultural production needs to comprehensively balance drainage capacity, land transformation costs, and agricultural machinery operation efficiency.
[0159] The designs of S32 through S34 accurately capture the core optimization requirements of farmland drainage channel layout by constructing three-dimensional objective functions for water retention depth, earthwork, and agricultural machinery accessibility. Specifically, S32 utilizes micro-depression and convergence indices to jointly measure water retention risk, improving the accuracy of drainage performance assessments; S33 calculates earthwork volume based on channel bottom elevation differences, strengthening constraints on construction costs; and S34 introduces a passability penalty to ensure consistency between channel network layout and agricultural machinery routes. The three objective functions have a clear structure and explicit physical meaning, providing a high-quality evaluation basis for subsequent intelligent optimization and effectively improving the channel network design's ability to strike a comprehensive balance between water benefits, economic investment, and agricultural operability.
[0160] In this embodiment, S4 includes the following steps:
[0161] S41. Represent the spatial structure of the canal network as a set of optimizable variables and define the canal network layout parameter vector as:
[0162]
[0163] Among them, θ i represents the strike angle of channel section i, l i Indicates the length of the channel section, w i and d i are the channel width and depth respectively, (u i ,v i ) is the starting position of the canal section node in the geographic coordinate system, and K is the total number of canal sections;
[0164] S42. Initialize the candidate solution set with a population size of N The channel network layout parameters of each solution are input into the multi-objective optimization objective function of the farmland drainage channel for fitness evaluation, and the total evaluation value corresponding to each candidate solution is obtained.
[0165] S43. In each iteration, according to the nest replacement mechanism of the Cuckoo search algorithm, several candidate solutions with the worst current fitness are selected for replacement to construct a new solution x (j+1) , the improved Lévy flight search strategy is used to perform global jump perturbations, and the new solution update formula is:
[0166] x (j+1) =x (j) +α·Lévy(λ);
[0167] Where α is the step size adjustment coefficient, Lévy(λ) is the jump step size that obeys the Lévy distribution;
[0168] S44. Introducing an adaptive discovery probability p related to farmland terrain complexity in the jump step control a , the adaptive discovery probability is used to decide whether to accept the newly generated candidate solution:
[0169]
[0170] Among them, γ is the regulating factor, is the fitness of the current solution, F best With F max are the optimal and worst fitness values of the current population, respectively, and ε is a small positive number to prevent the denominator from being zero;
[0171] S45. Execute the nest replacement strategy in each iteration. If the fitness of the new solution Better fitness than the original solution Then keep the new solution, otherwise with probability 1-p a Replace; update the current optimal solution x at the same time best ;
[0172] S46. Introduce the micro-scale agricultural constraint embedding mechanism in the iterative process, and for each candidate solution, the strike angle θ of the canal section i Angle φ with tillage direction i Limitations are imposed to meet the requirements of turning radius and sowing row spacing for agricultural machinery operations:
[0173] |θ i -φ i |≤θ limit ;
[0174] Among them, θ limit is the maximum allowable deviation angle;
[0175] S47. Repeat steps S43 to S46 until the preset termination conditions are met, including the maximum number of iterations or the fitness convergence threshold, and output the optimal channel network layout parameters x best .
[0176] In this embodiment, S5 includes the following steps:
[0177] S51. Generate canal line vector dataset V based on optimal canal network layout parameters channel The canal line vector dataset is used to express the direction characteristics of the canal section in two-dimensional space. The canal line vector dataset is generated by combining the geographic coordinates of the starting and ending points of each canal section, the direction angle and the length information, and is expressed and stored in a spatial vector data structure;
[0178] S52. Construct a node-based watershed partition layer based on the canal vector dataset and the slope raster map. catchmentThe node-based watershed partition layer is used to delineate the surface watershed range controlled by each canal node. The node-based watershed partition layer is obtained by tracing the flow direction of the surface slope information. Each watershed partition has a unique identifier and corresponds one-to-one with the canal node.
[0179] S53. Summarize the channel section design parameters and generate the channel section parameter table T section The channel section parameter table is used to uniformly record the structural characteristics of the channel section. Each record in the channel section parameter table includes the channel section number, channel bottom width, channel depth, designed cross-section shape, lining type and corresponding hydraulic properties. The structure of the channel section parameter table is used for subsequent construction drawing generation and earthwork calculation;
[0180] S54. The canal vector dataset V channel , Node-type watershed partition layer Z catchment And channel section parameter table T section The data is spatially organized under a unified coordinate system and imported into the farmland geographic information management platform. The import operation is used to construct a canal network spatial database model, which has spatial retrieval, topological analysis, and attribute association functions.
[0181] S55. Generate drainage channel construction drawings based on the channel network spatial database model. Drainage channel construction drawings are used to guide on-site layout and construction operations of drainage projects. Drainage channel construction drawings include a channel network overview, a single channel segment location diagram, a channel segment cross-sectional structure diagram, and a construction quantity statistics table. Drainage channel construction drawings combine the location of spatial elements and structural parameters to achieve a linked presentation of graphics and data.
[0182] S56. Calculate the earthwork volume of each canal section based on the elevation difference between the starting and ending points of the canal section, the cross-section parameters, and the canal section length information, and generate the earthwork quantity list L earthwork The earthwork quantity list is used to measure the amount of earthwork required for excavation or filling in each section of the channel. The earthwork quantity list records include the channel section number, starting point elevation, end point elevation, earthwork excavation volume, earthwork filling volume and earthwork allocation suggestions.
[0183] S57. Compare the drainage ditch construction drawings with the earthwork quantity list. earthwork The output is in standard engineering file format, including PDF, DWG, Excel and GIS supported formats. The output content is used for construction scheduling, project filing and intelligent agricultural machinery import.
[0184] Example 1:
[0185] Farm A has welcomed the concentrated rainfall period of the plum rain season. The farm covers an area of about 280 mu and mainly grows wheat and rice. Since the farm is relatively flat and has a large number of depressions, the efficiency of draining accumulated water after rain is extremely low, resulting in long-term water stagnation in some parts of the cultivated land, making it difficult for agricultural machinery to operate. The farm has even missed the best sowing window many times due to poor drainage, which has directly affected the grain production of the season. Farm owner Chen Zhigang has tried many times to lay drainage channels with the help of traditional topographic maps and manual experience, but after many renovations, there are still problems with poor channel lines and obstructed access for agricultural machinery.
[0186] In order to completely improve the drainage problem, the farm introduced the method of the present invention. The project team was led by the smart agriculture research team of the Agricultural University and combined with the drone mapping technology team of the Agriculture and Rural Affairs Bureau to jointly conduct technical transformation tests on the site.
[0187] The first phase involved the collection and processing of microtopographic data. During three consecutive days of dry weather, the research team used a DJI M300RTK drone to conduct multispectral aerial photography of the entire farmland, acquiring red, green, blue, and near-infrared multispectral images with a resolution of 10 cm. Simultaneously, a vehicle-mounted lidar scanner was used to obtain a three-dimensional digital elevation model. After spatial registration and pixel-level uniform resampling, the two types of data were constructed into a unified-scale input tensor, Tinput, which was then fed into the improved ConvNeXt network.
[0188] In the feature extraction stage, the system first integrates the local variance of elevation and the NDWI humidity index through an adaptive feature enhancement module, significantly highlighting the feature expression ability of the micro-scale depression area. The cross-scale slope perception attention module introduced in the middle layer effectively identifies the potential convergence direction and trend of water flow in farmland, and finally generates a micro-depression mask map, slope aspect raster map and surface roughness map. Data show that the total area of micro-depressions in this area is 35.7 acres, with an average depression depth of 17.3 cm, mainly concentrated in the low-lying areas of the southwest region.
[0189] The second stage involves constructing evaluation indicators and setting up an optimization model. Based on the aforementioned characteristic maps, the system generates a structured evaluation indicator dataset (Dstruct), including a water flow convergence index layer, a local slope layer, and a tillage resistance assessment layer. On this basis, a multi-objective optimization model for drainage channels is constructed, with the goal of simultaneously minimizing the depth of stagnant water and the amount of earth excavation, while maximizing the accessibility of agricultural machinery.
[0190] Then, the model enters the canal network parameter optimization stage. The model sets the canal section angle, length, node coordinates, and cross-sectional parameters as continuous optimization variables, and uses the improved Cuckoo search algorithm for global optimization. In each round of iteration, the Lévy flight mechanism and adaptive discovery probability are combined to perform jump perturbations and generate new solutions. Micro-scale agricultural constraints are introduced to strictly limit the angle between the canal section strike angle and the preset agricultural machinery travel direction to ensure the agricultural machinery friendliness of the final generated solution.
[0191] The entire iteration converged within 40 rounds, generating an optimal drainage network layout plan consisting of 78 channel segments. The results were imported into the farmland GIS platform to generate drainage channel construction drawings and earthwork lists. The total length of the automatically generated channel network was approximately 11.6 kilometers, and the total excavation and filling volume was estimated to be 5,480 cubic meters, saving approximately 15.2% of earth excavation compared to traditional manual planning schemes.
[0192] To verify the superiority of the method of the present invention, the research team used the project implementation area as a sample and compared the differences in typical indicators between the present invention and the traditional manual planning method. The data are shown below:
[0193] Table 1 Data comparison between the optimization method of the present invention and the traditional manual method
[0194]
[0195]
[0196] In addition, when comparing the multi-sample training and micro-topography recognition accuracy of the optimized model, the research team used three other typical hilly farmlands in Siyang County as samples, and trained the traditional U-Net model and the ConvNeXt enhanced model of the present invention respectively. The IoU indicators for micro-depression identification were 0.741 and 0.833, respectively, an improvement of 12.4%; the MAE indicator for slope prediction dropped from 8.2 degrees of the traditional model to 5.6 degrees of the present invention.
[0197] During the two heavy rainfalls after the completion of the construction, no serious water stagnation occurred in any part of the farm land, and agricultural machinery was able to complete the sowing and fertilizing operations as planned. Farmers commented that this technology is much better than the previous experience of canal digging schemes. The drawings are intuitive, the design is scientific, the canal digging is more labor-saving, and the effect is immediate.
[0198] To sum up, this Example 1 fully verifies that the present invention has extremely strong practical value and technological advancement under complex farmland landform conditions, and shows significant comprehensive benefits in accurately identifying micro-scale depressions, optimizing channel layout, saving construction costs and improving the efficiency of agricultural machinery traffic. It has broad prospects for promotion and application in large-scale farmland digital construction.
[0199] The present invention makes structural improvements to the traditional ConvNeXt network, introduces an adaptive feature enhancement module and a cross-scale aspect-aware attention mechanism, which significantly improves the accuracy and discriminability of micro-topography information extraction. Specifically, the adaptive feature enhancement module guides feature fusion based on the local variance of elevation and the inter-spectral NDWI index, which can effectively highlight the spatial distribution characteristics of micro-scale depressions and waterlogged areas; while the cross-scale aspect-aware attention module models the aspect angle difference under multi-scale windows, focusing on areas sensitive to terrain aspect changes, thereby more accurately locating potential trend areas of channel direction.
[0200] The present invention establishes a canal network layout optimization model that integrates multi-objective constraints, while taking into account three heterogeneous objectives: water retention depth, earthwork volume, and agricultural machinery accessibility. A weighted objective function is constructed, and the farmland operation path is explicitly introduced as an accessibility constraint. On this basis, the canal network parameter space is defined as a continuous optimization variable with the canal section angle, length, cross-sectional dimensions, and spatial nodes as dimensions. This breaks through the traditional fixed canal layout method based on rule templates or empirical logic, and achieves highly flexible and site-adaptive optimization capabilities.
[0201] This paper proposes an improved Cuckoo search strategy, which combines the Lévy flight mechanism, the adaptive discovery probability mechanism and the micro-scale agricultural constraint embedding strategy to effectively enhance the global search capability and local convergence speed of the canal network parameter space. Specifically, the dynamic adjustment of the jump step size is coupled with the terrain complexity to avoid falling into the local optimum; the discovery probability is dynamically adjusted according to the fitness difference between the current solution and the global optimal solution; and the canal section angle restriction in the agricultural operation direction further improves the practicality and operation-friendliness of the solution.
[0202] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A method for optimizing the layout of farmland drainage channels based on machine learning, characterized in that: The steps include: S1. Collect the original farmland microtopography data, process it using the improved ConvNeXt network multimodal feature extraction model, and generate microtopography feature results; S2. Construct a structured evaluation index dataset based on micro-topography feature results; S3. Develop a multi-objective optimization model for farmland drainage channels based on a structured evaluation indicator dataset. The model's objectives are to minimize the depth and duration of stagnant water in the field, minimize the amount of excavation and fill, and maximize accessibility for agricultural machinery. S4. Set the canal line angle, canal section length, canal section width and depth, and canal section node locations as canal network layout parameters. Use the improved Cuckoo search algorithm to perform a global search for these canal network layout parameters under the multi-objective optimization model for farmland drainage canals, and output the optimal canal network layout parameters. S5. Generate a canal line vector dataset based on the optimal canal network layout parameters. The canal line vector dataset includes canal line vectors, canal node catchment areas, and canal cross-sectional parameters. Import the canal line vector dataset into the farmland geographic information management platform to generate drainage canal construction drawings and earthwork quantity lists.
2. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 1, characterized in that: Said S1 comprises the following steps: S11. Obtain original farmland microtopography data with centimeter-level resolution, including UAV multispectral image data. rgb and LiDAR 3D digital elevation data D dem , the original farmland microtopography data is spatially registered and pixel-level uniformly resampled to construct a unified scale input tensor T input , where I rgb = {I(x,y)}, which represents the multispectral reflectance value at the geographical location (x,y), D dem ={z(x,y)}, which represents the surface elevation at the geographic location (x,y); S12. An adaptive feature enhancement module for farmland micro-topography drainage channel layout is embedded in the initial downsampling stage of the improved ConvNeXt network. The adaptive feature enhancement module uses the local variance of elevation and the inter-spectral NDWI index to guide feature selection and fusion, and obtains the enhanced feature tensor F for farmland drainage channel optimization. enhanced ; Local variance of elevation V local (x,y) is used to highlight microscale depressions and ridges: Among them, z i (x,y) is the elevation value of the local neighborhood around the geographic location (x,y), is the average elevation of the local neighborhood, and N is the total number of pixels in the neighborhood; Interspectral NDWI index W ndwi (x,y) is used to enhance the characteristic expression of waterlogged areas: Among them, I green (x,y) represents the green band reflectance at the geographic location (x,y), I nir (x,y) represents the near-infrared band reflectance at the geographical location (x,y); S13. Add a cross-scale slope-aware attention module to the middle layer of the ConvNeXt network. The cross-scale slope-aware attention module constructs a spatial weight matrix A according to the terrain slope change. aspect (x,y), optimize the expression of convolution perception area convergence trend and drainage channel layout sensitive areas at different scales: Among them, θ j (x, y) is the slope angle of each pixel in the j-th scale window, θ mean (x, y) is the average value of the slope aspect in the multi-scale window, M is the total number of pixels in the scale window, and σ(·) is the normalization function; S14. Enhanced feature tensor F enhanced Perform multi-scale decoding and output the micro-topography feature results after combined training and optimization of the micro-topography depression recognition loss function and the slope prediction loss function, including the micro-bottom mask map M depression , Slope raster map G aspect and surface roughness map R roughness .
3. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 2, characterized in that: The S14 includes the following steps: S141. Enhance the feature tensor F enhanced Input multi-scale decoding module, which includes multiple parallel branches of decoding convolutional layers. Each branch corresponds to a different receptive field scale, extracts multi-scale spatial structure information, and forms a primary decoding feature tensor set. Where s is the scale number and S is the total number of scale branches; S142. Decoding feature tensors at each scale in the primary decoding feature tensor set Perform channel attention reweighting and inter-scale fusion to obtain the fused feature tensor F fused , channel attention weight Calculated based on channel response values; S143. Constructing a joint loss function For the fused feature tensor F fused Perform joint supervised training for micro-topography depression identification and slope angle prediction. The joint loss function includes the micro-depression identification loss function. And the aspect prediction loss function S144. Micro-depression identification loss function Based on the binary cross entropy definition, the micro-depression mask map M generated for supervision is depression : Among them, m i is the true label of pixel i, is the corresponding predicted probability value; S145. Slope prediction loss function The aspect raster map G is used to supervise the generation of aspect , using the periodic cosine angle error definition: Among them, θ i represents the true aspect angle at geographical location i, is the model-predicted slope aspect, both units are in degrees and the range is [0,360); S146. The micro-depression mask map M in the output result after the joint loss function training optimization is obtained. depression ={m(x,y)|m(x,y)∈{0,1}}, slope grid map G aspect ={θ(x,y)} and surface roughness map R roughness ={r(x,y)} is extracted as the final micro-topography feature result.
4. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 2, characterized in that: The S2 comprises the following steps: S21. Construct the basic raster layer input of the structured evaluation index dataset based on the micro-depression mask map, aspect raster map, and surface roughness map; S22. Calculate the slope value s(x,y) at each geographic location. The slope value is used to measure the intensity of horizontal changes in surface elevation. The slope value is obtained by calculating the rate of change of elevation in the east-west and north-south directions of the geographic location, squaring the rates of change in the two directions, and then taking the square root of the sum. S23. Calculate the water flow convergence index f(x,y) at each geographic location. The water flow convergence index measures the intensity of surface water flowing into the location from upstream. The water flow convergence index is obtained by summing the areas represented by all upstream grids flowing to the location and performing a numerical transformation to compress the dynamic range. S24. Constructing tillage resistance assessment layer C based on surface roughness map and slope map traffic = {c(x,y)}, the tillage resistance assessment value is obtained by combining the surface roughness value r(x,y) and the slope value s(x,y) according to a fixed weighting coefficient. The roughness value reflects the impact of surface unevenness on mechanical passage; S25. The obtained water flow convergence index layer F flow , local slope layer S slope and tillage resistance assessment layer C traffic Raster encoding is performed according to spatial coordinate consistency and fused into a structured evaluation index dataset D struct ={f(x,y),s(x,y),c(x,y)}.
5. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 4, characterized in that: The S3 includes the following steps: S31. Input the structured evaluation index dataset into the farmland drainage channel multi-objective optimization modeling module. Based on the coupling relationship between the micro-scale landform's ability to concentrate water flow, surface slope changes, and agricultural machinery accessibility, a multi-objective form of the optimization objective function is established. S32. Define the objective function F for evaluating the depth of stagnant water depth , characterizes the effectiveness of drainage channel layout in reducing farmland waterlogging, and calculates the maximum water stagnation depth index Δh based on the interaction area of the convergence index value f(x,y) and the micro-depression mask map max : Among them, f(x,y) is the water flow convergence index value of the geographical location (x,y), and m(x,y)∈0,1 indicates whether it is a micro-depression area; S33. Define the objective function F for earthwork engineering evaluation earth , with the goal of minimizing the volume of terrain transformation involved in canal network design, the surface elevation z(x i ,y i ) and target channel bottom elevation z target The volume deviation of the earthwork excavation and filling volume V is calculated by accumulating the volume deviation of the earthwork excavation cut : Among them, K is the total number of canal sections, A c is the unit cross-sectional area of a single channel section, z target To design the channel bottom elevation; S34. Define the objective function F for evaluating the accessibility of agricultural machinery traffic The accessibility of farmland operations is assessed based on the structured tillage resistance layer, and the access penalty C is calculated based on the cumulative resistance in the intersection area between the canal network layout and the agricultural machinery operation path. traffic , which is used to represent the mean difficulty of the entire path: Among them, P is the preset passage area of agricultural machinery, L path is the total length of the path, c(x,y) is the tillage resistance value of the geographical location (x,y), C traffic The unit is a dimensionless rating value; S35. Constructing the multi-objective optimization objective function F for integrated farmland drainage channels total , in order to jointly optimize the objective function of water retention depth evaluation, earthwork engineering evaluation and agricultural machinery accessibility evaluation.
6. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 5, characterized in that: The S4 comprises the following steps: S41. Represent the spatial structure of the canal network as a set of optimizable variables and define the canal network layout parameter vector as: Among them, θ i represents the strike angle of channel section i, l i Indicates the length of the channel section, w i and d i are the channel width and depth respectively, (u i ,v i ) is the starting position of the canal section node in the geographic coordinate system, and K is the total number of canal sections; S42. Initialize the candidate solution set with a population size of N The channel network layout parameters of each solution are input into the multi-objective optimization objective function of the farmland drainage channel for fitness evaluation, and the total evaluation value corresponding to each candidate solution is obtained. S43. In each iteration, according to the nest replacement mechanism of the Cuckoo search algorithm, several candidate solutions with the worst current fitness are selected for replacement to construct a new solution x (j+1) , a modified Lévy flight search strategy is used to perform global jump perturbations; S44. Introducing an adaptive discovery probability p related to farmland terrain complexity in the jump step control a , the adaptive discovery probability is used to decide whether to accept the newly generated candidate solution: Among them, γ is the regulating factor, is the fitness of the current solution, F best With F max are the optimal and worst fitness values of the current population, respectively, and ε is a small positive number to prevent the denominator from being zero; S45. Execute the nest replacement strategy in each iteration. If the fitness of the new solution Better fitness than the original solution Then keep the new solution, otherwise with probability 1-p a Replace; update the current optimal solution x at the same time best ; S46. Introduce the micro-scale agricultural constraint embedding mechanism in the iterative process, and for each candidate solution, the strike angle θ of the canal section i Angle φ with tillage direction i Limit it to meet the requirements of turning radius and planting row spacing of agricultural machinery operation|θ i -φ i |≤θ limit , where θ limit is the maximum allowable deviation angle; S47. Repeat steps S43 to S46 until the preset termination conditions are met, including the maximum number of iterations or the fitness convergence threshold, and output the optimal channel network layout parameters x best .
7. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 1, characterized in that: The channel line vector dataset is used to express the direction characteristics of the channel section in two-dimensional space. The channel line vector dataset is generated by combining the geographic coordinates of the starting point and end point of each channel section, the direction angle and length information, and is expressed and stored in a spatial vector data structure.
8. The method for optimizing the layout of farmland drainage channels based on machine learning according to claim 1, characterized in that: The drainage ditch construction drawings and earthwork quantity list L earthwork The output is in standard engineering file format, including PDF, DWG, Excel and GIS supported formats. The output content is used for construction scheduling, project filing and intelligent agricultural machinery import.
Citation Information
Cited By
Trench system transformation method based on cultivated land irrigation capacity and related equipment
CN122114455A