A Method for Extracting Tobacco Field Contours from Large-Scale GPS Point Cloud Data Based on Graph Neural Networks

By processing tobacco field point cloud data through graph neural networks and combining dynamic graph convolution and reinforcement learning optimization, smooth tobacco field contours are generated. This solves the contour extraction problem of existing methods in sparse point clouds and noisy environments, and achieves efficient and accurate contour extraction and agricultural management support.

CN120807962BActive Publication Date: 2026-03-06GUANGDONG TOBACCO MEIZHOU
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511300466.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2026-03-06
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Existing methods for extracting tobacco field contours suffer from problems such as contour distortion, boundary breakage, high computational cost, and error accumulation when dealing with sparse point clouds and noise interference, making them difficult to adapt to the needs of agricultural deployments that are multi-source, heterogeneous, and subject to changing scenarios.

Method used

An end-to-end approach based on graph neural networks is adopted, which generates continuous and smooth tobacco field contours by point cloud feature extraction, dynamic graph convolution and reinforcement learning optimization, combined with particle swarm optimization and B-spline fitting.

Benefits of technology

It achieves accurate contour extraction in sparse point cloud and noisy environments, improves contour continuity, geometric accuracy and structural robustness, has strong adaptability and is suitable for plot segmentation and agricultural analysis in digital agriculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807962B_ABST
    Figure CN120807962B_ABST
Patent Text Reader

Abstract

This invention discloses a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks, belonging to the field of tobacco field contour extraction. The method includes: S1, collecting and standardizing GPS point cloud data of the tobacco field area; S2, employing an anomaly detection mechanism based on point feature distribution, combined with a point cloud denoising network to clean and complete the data; S3, constructing a corner detection module, combining residual structure and graph attention mechanism to extract key corners; S4, constructing a graph structure based on candidate corners, and using a dynamic graph convolutional network to predict connectivity; S5, optimizing the contour topology through reinforcement learning to improve boundary continuity and geometric consistency; S6, using a particle swarm optimization algorithm to fit boundary curves, generating a closed and smooth tobacco field contour; and S7, outputting the final contour coordinate sequence and structure map for area calculation and land management in agricultural systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of tobacco field contour extraction, and in particular relates to a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks. Background Technology

[0002] With the continuous advancement of digital agriculture, tasks such as refined land management, intelligent yield assessment, agricultural machinery path optimization, and intelligent assistance for agricultural decision-making are increasingly reliant on high-precision geospatial information. Against this backdrop, tobacco fields, as typical cash crop cultivation areas, require precise boundary contour information. This information is not only a prerequisite for basic agricultural operations such as land registration, plot division, sowing, and fertilization, but also directly impacts the effectiveness of higher-level intelligent systems such as pest and disease monitoring, agricultural machinery path planning, and land resource statistics. Therefore, accurate extraction of tobacco field contours has become a crucial link in promoting the digitalization and intelligentization of agriculture.

[0003] Existing methods mainly fall into three categories, each with its own obvious limitations:

[0004] First, boundary fitting methods based on geometric rules (such as convex hull, α-Shape, Voronoi diagrams, etc.) are widely used for contour generation of regular point sets, offering the advantage of computational efficiency. However, they are highly dependent on the spatial distribution of the point set, especially when edge points are sparse or locally missing, easily leading to significant "envelope expansion" or "boundary breakage" problems. For example, when processing sparse point clouds with slender and curved boundaries, the α-Shape method often results in contour distortion due to misconnection of internal points, affecting the accuracy of subsequent area estimation and path planning.

[0005] Secondly, image processing-based segmentation methods rely on remote sensing images or aerial images to extract boundaries through image analysis techniques such as semantic segmentation and edge detection. Although they can achieve good accuracy under conditions of high image clarity, they are highly dependent on external visual data and are subject to factors such as lighting, cloud cover, and shooting angle. They have high deployment costs and are difficult to update frequently, making them unsuitable for large amounts of asynchronously acquired point cloud data.

[0006] Finally, point cloud modeling methods based on deep learning often require converting point clouds into regular voxels, depth maps, or bird's-eye views before inputting them into CNNs for prediction. Although they have a certain automatic modeling capability, the spatial structural relationship between the original points is often destroyed during the data conversion process, resulting in a decrease in boundary continuity and a limitation in topological representation. This is especially true when modeling unordered point sets, where they exhibit significant instability.

[0007] In addition to the inherent limitations of the aforementioned modeling methods, most current mainstream contour extraction processes adopt a "modular chain" approach, which involves combining multiple stages such as data preprocessing, feature point extraction, graph construction, and boundary fitting. This results in fragmented information between modules, inconsistent optimization objectives, and a tendency for error accumulation and propagation. Furthermore, it heavily relies on manual experience for parameter tuning, making it difficult to adapt to the diverse and ever-changing needs of actual agricultural deployments. Summary of the Invention

[0008] To address the aforementioned technical problems, this invention provides a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks, comprising:

[0009] Obtain GPS point cloud data of the tobacco field collection area, and standardize and normalize it to construct the original input point set;

[0010] Based on the original input point set, an anomaly detection mechanism based on point feature distribution is adopted, combined with a point cloud denoising network to remove anomalies and complete edges, forming cleaned point cloud data.

[0011] Based on the cleaned point cloud data, a corner detection network is constructed using an improved point cloud feature extraction network. The corner detection network combines residual structure and graph attention mechanism to extract local and global geometric features, identify corners with significant boundaries, and obtain an initial node set.

[0012] A graph structure is constructed based on the initial set of nodes. A dynamic graph convolutional neural network is used to predict the connection between nodes and generate connected edges based on node feature similarity and spatial geometric relationship.

[0013] Based on the constructed graph structure, reinforcement learning structure optimization methods are used to iteratively optimize the graph structure by constructing a reward function with closure, smoothness, and shape consistency as objectives.

[0014] Particle swarm optimization algorithm is introduced to fit the parameters of the boundary point sequence in the optimized graph structure, and B-spline curves are used to generate continuous, smooth and closed contour curves.

[0015] Output the coordinate sequence and vector boundary structure of the tobacco field outline for use in agricultural management systems for tasks such as plot segmentation, area calculation, and boundary visualization.

[0016] Preferably, the standardization and normalization processing includes performing mean-standard deviation normalization on the GPS point cloud data, expressed as:

[0017] ;

[0018] in, and The latitude and longitude coordinates of sampling point S, and These are the mean values ​​of the latitude and longitude coordinates of the GPS sampling points. and These represent the standard deviations of the latitude and longitude coordinates of the GPS sampling points.

[0019] Preferably, the outlier detection and completion includes: constructing a nearest neighbor set for each point, calculating the density and orientation features of the point, and using them as features to input the point cloud denoising model, outputting an anomaly score to remove outliers; for missing parts at the edge of the point cloud, a feature propagation-based completion mechanism is used for completion.

[0020] Preferably, in the corner detection network, the expression for the response function is:

[0021] ;

[0022] in, Represents the response function. The number of scale layers, Point In the The second-order curvature change of the layer, These are scale-weighted parameters.

[0023] Preferably, the process of predicting the connection between nodes using a dynamic graph convolutional neural network includes: extracting the feature difference and spatial vector of the node pairs, inputting them into the dynamic graph convolutional neural network, and outputting the connection probability, expressed as:

[0024] ;

[0025] in, For connection probability, The linear mapping weight matrix, For bias terms, This is the Sigmoid function.

[0026] Preferably, the expression for the reward function is:

[0027] ;

[0028] in, For the reward function, This is the closure degree weighting coefficient. This is the smoothness weighting coefficient. This is the shape consistency weighting coefficient. To score the closure, For smoothness score, Score for shape consistency.

[0029] Preferably, the expression for generating a continuous, smooth, and closed contour curve using B-spline curves is:

[0030] ;

[0031] in, The results are from the curve fitting. Indicates the number of control points. Indicates control points, Let represent the k-th order B-strip basis function.

[0032] Preferably, the process of generating a continuous, smooth, and closed contour curve using B-spline curves further includes using a minimum position error objective function. Optimization was carried out, including, These are the boundary points extracted from the point cloud. For B-spline fitting curves in parameters The position below.

[0033] Preferably, the process of constructing a graph structure based on the initial node set further includes: using a dynamic graph modeling mechanism to dynamically generate a set of connected edges based on the geometric structure and node feature relationship of the input point cloud, and introducing an edge confidence gating mechanism.

[0034] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.

[0035] Compared with the prior art, the present invention has the following advantages and technical effects:

[0036] This invention discloses a method for extracting the contours of tobacco fields from large-scale GPS point clouds based on graph neural networks (GNNs). Addressing the problems of irregular distribution, sparse sampling, and noise interference in point cloud data under real agricultural scenarios, it proposes an end-to-end structured processing and optimization mechanism, enabling accurate reconstruction of tobacco field boundary contours. Compared with traditional methods based on geometric rules or image segmentation, this invention significantly improves contour continuity, geometric accuracy, and structural robustness.

[0037] This invention, for the first time, combines an improved point cloud feature extraction network (PointNeXt) with dynamic graph neural network modeling to achieve adaptive graph construction of the spatial relationships of the original point cloud, effectively overcoming the connectivity problem caused by fixed adjacency relationships in sparse point cloud scenarios. Simultaneously, by introducing a contour topology optimization mechanism based on reinforcement learning, and designing comprehensive indices of closure, smoothness, and morphological consistency, it guides intelligent decision-making for edge connection actions, further improving the integrity and rationality of the contour structure.

[0038] Furthermore, this invention innovatively introduces particle swarm optimization and B-spline fitting strategies in the contour curve generation stage, enhancing the continuity and smoothness of boundary fitting and significantly reducing contour distortion caused by discrete point noise. The overall solution features high automation, end-to-end optimization, and good adaptability, and can be widely applied to tasks such as planting area mapping, plot segmentation, area estimation, and agricultural analysis in digital agriculture, demonstrating broad practical application and promotion value. Attached Figure Description

[0039] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0040] Figure 1 This is a flowchart illustrating a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks, according to an embodiment of the present invention.

[0041] Figure 2 This is a schematic diagram of the structure and data flow of the reinforcement learning optimization module in an embodiment of the present invention. Detailed Implementation

[0042] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0043] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0044] Example 1

[0045] This embodiment provides a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks, including:

[0046] The system implementation in this embodiment is based on the PyTorch deep learning framework (version 1.13.1). The core network modules include a PointNeXt-based graph neural network and a DGCNN structure. Edge-connection discriminant networks and reinforcement learning Actor-Critic modules are also implemented in the PyTorch environment. Graph structure processing and visualization use Open3D (version 0.16) as the primary 3D graphics interface tool. The system runs on Ubuntu 20.04 and utilizes an NVIDIA RTX 3090 GPU (24GB VRAM), an Intel i9-10980XE CPU, and 128GB of RAM for training and inference.

[0047] S1. Obtain GPS point cloud data of the tobacco field area, and standardize and normalize the original point set to construct an input point set under a unified space;

[0048] S2. An anomaly detection mechanism based on point feature distribution, combined with a point cloud denoising network to clean the data and complete the boundaries, to obtain a high-quality point cloud;

[0049] S3. Identify key points with boundary features based on a deep corner detection network and construct an initial graph node set;

[0050] S4. Construct a graph structure by using a dynamic graph convolutional neural network to predict the connection edges between node pairs and generate an initial graph.

[0051] S5. Topological optimization of graph structures based on reinforcement learning methods to improve contour closure, smoothness and boundary consistency;

[0052] S6. Use the particle swarm optimization algorithm to fit the boundary point sequence in the figure with B-spline curves to form a smooth and continuous closed boundary.

[0053] S7. Output the coordinate sequence and boundary vector map of the final tobacco field outline, which will be used by the agricultural management platform for tasks such as plot segmentation, area statistics and boundary visualization.

[0054] Figure 1 The main processing flow of the data preprocessing stage, feature modeling stage, and boundary fitting stage is shown from left to right. Each module corresponds to steps S1 to S7 in the invention content section, as detailed below:

[0055] Data preprocessing stage: Corresponding to step S1 of the invention, the original GPS point cloud data is first collected, and after standardization and normalization, a unified input dataset is formed for subsequent model building.

[0056] 2. Feature Modeling Stage: Corresponding to invention steps S2 to S4. First, the point cloud cleaning module removes outliers and completes edges in the input point cloud (S2); then, the corner detection module extracts geometrically significant structural nodes (S3); finally, the graph structure construction module and the GNN edge connection prediction module are combined to establish the initial contour graph structure (S4).

[0057] 3. Boundary Fitting Stage: Corresponding to steps S5 to S7 of the invention. Through the reinforcement learning-driven topology optimization module (S5), the closure and geometric rationality of the contour map structure are further improved; then, the PSO particle swarm optimization algorithm and B-spline fitting method are used to generate smooth boundaries (S6); the final output is a boundary structure file in vector format, such as GeoJSON or WKT format, for use by the agricultural management system (S7).

[0058] Furthermore, the point cloud normalization process in S1 includes:

[0059] Let the original point cloud data be:

[0060] ;

[0061] in and These are the latitude and longitude coordinates of the GPS sampling points. The data was then normalized using mean-standard deviation.

[0062] ;

[0063] This process ensures that the data distribution meets the input requirements for subsequent neural network modeling.

[0064] Furthermore, the point cloud anomaly detection and completion in S2 includes:

[0065] For each point Construct its nearest neighbor set Calculate the density characteristics of the points With directional features Then, it is used as a feature input to the PointCleanNet point cloud denoising model, which outputs anomaly scores. .like If the point cloud has missing edges, it is considered an outlier and removed. For missing parts at the point cloud edges, the following feature propagation-based completion mechanism is used:

[0066] ;

[0067] Furthermore, the response function of the corner detection network in S3 includes:

[0068] Setting points The corner response is:

[0069] ;

[0070] The corner point set is selected through response threshold filtering and non-maximum suppression.

[0071] Furthermore, the dynamic graph modeling mechanism in S4 is as follows:

[0072] For each pair of candidate nodes Extract its feature vector The vectors are then concatenated into a 512-dimensional vector and input into an edge confidence discriminant network. This discriminant network consists of two multilayer perceptron (MLP) layers, each with a fully connected structure of 512→128→1. ReLU activation is used between each layer, and the final output is a connection probability score. This score is then passed through a sigmoid function. The confidence probability mapped to the range (0,1) is then compared with a set threshold. A comparison is performed. When the connection probability exceeds a threshold, the edge between nodes is retained; otherwise, it is discarded, thus achieving data-driven dynamic generation of edge connections. The gating function takes the following form:

[0073] ;

[0074] in, For indicator functions, Here are the trainable parameters, and τ∈(0,1) is the confidence threshold. The graph node features are defined by this strategy, which dynamically adjusts edge connection decisions during training to avoid unnecessary connections between weakly related points and improve structural simplicity.

[0075] After initial edge filtering, to further refine the connections, this invention introduces a connection probability prediction mechanism based on Dynamic Graph Convolutional Neural Network (DGCNN). For each pair of nodes... Calculate its characteristic difference Spatial location difference The two are concatenated as input features. The DGCNN module uses two stacked EdgeConv units for feature extraction, with each EdgeConv unit... The nearest neighbor nodes form a local neighborhood. The first EdgeConv layer maps the input 256-dimensional features to 128-dimensional features, and the second layer further reduces the 128-dimensional features to 64-dimensional features. After each convolutional operation, ReLU activation and BatchNormalization are used for regularization. After two EdgeConv layers, the fused edge features are obtained. The connection probabilities are output through a linear mapping layer (64→1):

[0076] ;

[0077] in, The linear mapping weight matrix, For bias terms, This is the Sigmoid function.

[0078] Ultimately based on the prediction The probability is further used to filter the edges, forming a preliminary outline map with a reasonable structure and good boundary connectivity.

[0079] Through the aforementioned dynamic graph construction mechanism, this invention can dynamically adjust the graph structure based on the local geometric features and global spatial distribution of the input point cloud. Compared to traditional static nearest neighbor graph modeling methods, this significantly improves the connectivity and prediction accuracy of boundary contours in sparse and noisy point cloud environments. Furthermore, since both gating discrimination and connectivity prediction processes are completed within an end-to-end training framework, the graph modeling module can collaboratively optimize with subsequent topology optimization and contour fitting processes, thereby enhancing the overall performance and generalization ability of the contour extraction system.

[0080] Furthermore, the contour topology optimization method in S5 is as follows:

[0081] Based on reinforcement learning, this method takes the contour map structure state as input and iteratively optimizes the boundary connectivity, smoothness, and consistency of the overall contour shape through intelligent decision-making on edge connection actions.

[0082] The reinforcement learning module employs a dual-network structure based on Actor-Critic, used for policy generation and state value estimation respectively. The policy network (Actor) takes the features of node pairs connected by candidate edges as input. Each node is encoded as a 128-dimensional embedding vector by a graph neural network, and these are concatenated to form a 256-dimensional input feature. This network contains two fully connected layers, mapping the input to intermediate representations of 128 and 64 dimensions respectively. Both layers use the ReLU activation function to enhance non-linear expressiveness. Finally, a sigmoid activation function layer outputs the edge probability of the current node pair, serving as the basis for action policy decisions.

[0083] The corresponding Critic network evaluates the long-term reward of the current contour map structure state. Its input is a 128-dimensional graph representation formed by global average pooling of the embedded features of all nodes. This network also consists of two fully connected layers with hidden layers of dimensions 128 and 64. The final output is a single scalar value used to estimate the value function of the current state. .

[0084] During network training, the Proximal Policy Optimization (PPO) algorithm is used for updates to enhance the stability of the training process and the policy convergence speed.

[0085] To guide the evolution of the graph structure toward the ideal contour, the following comprehensive reward function is designed:

[0086] ;

[0087] in, For the reward function, This is the closure degree weighting coefficient. This is the smoothness weighting coefficient. This is the shape consistency weighting coefficient. The closure score is calculated based on the normalized Euclidean distance between the start and end points. The curvature smoothness of the profile is measured by taking the negative value of the standard deviation of the angle between adjacent sides; Measuring the contour shape and the reference shape The Hausdorff distance difference between the indicators was calculated and normalized to a consistency score. The weighting coefficients for each indicator were set as follows: , , To ensure priority on closure while considering local smoothness and overall shape, the reward function design balances the geometric closure of the contour, local continuity, and the rationality of the overall shape, effectively guiding edge connection actions to balance different quality objectives during the contour topology optimization process.

[0088] During training, the topology optimization network is evaluated every 200 steps. If the reward increase is less than 1%, the learning rate is dynamically adjusted (multiplied by 0.9) to promote training convergence.

[0089] Furthermore, the topology optimization stage in S5 introduces a graph embedding regularization term:

[0090] By constraining the relative distances between nodes in the topological space, the continuity and boundary consistency of the contour structure are enhanced. The regularization term is expressed as:

[0091] ;

[0092] in, Represents the node embedding vector. This is its Euclidean distance in the original point cloud space. This can be jointly optimized with the main task loss to suppress abnormal deformation or local redundant shrinkage.

[0093] During the topology optimization process of S5, the structural optimization results can be fed back to the corner scoring function and graph construction module to fine-tune the importance weight of corner points and the confidence of edge connections, thereby achieving cross-module joint optimization and improving the overall prediction accuracy and stability of the system.

[0094] Furthermore, the contour curve fitting process in S6 includes:

[0095] Using the sequence of closed boundary corner points as control points, fit a B-spline curve:

[0096] ;

[0097] The PSO algorithm is used to optimize the control point parameters so that the fitted curve best fits the point cloud boundary.

[0098] Furthermore, the contour output method in S7 includes:

[0099] Output coordinate sequence Construct vector boundary files, supporting GeoJSON and WKT formats:

[0100] {"type":"Polygon","coordinates":[[x1,y1],[x2,y2],...,[x1,y1]]};

[0101] The graph structure and coordinate data are saved together for use by the agricultural management system.

[0102] The `type` field indicates that the output geometry is a polygon, and the `coordinates` field represents the sequence of coordinates of the polygon's outline points, stored in latitude and longitude coordinate format, with the last point coinciding with the starting point to form a closed-loop boundary. This data structure can be directly used for visualization rendering and area calculation in agricultural map systems.

[0103] Figure 2 This diagram illustrates the structure and data flow of the reinforcement learning optimization module in this embodiment, demonstrating the edge connection optimization process of the graph neural network under the synergistic effect of the policy network and the value network. The module shown corresponds to step S5 (contour topology optimization) in the invention, as detailed below:

[0104] Contour graph input: The graph structure (such as the preliminary predicted edge connection graph) is used as the current state input and passed to the reinforcement learning module for optimization.

[0105] Policy Network (Actor): Based on the current contour graph nodes and their features, it outputs edge connection action policies (such as whether to connect an edge, connection confidence, etc.) for updating the graph structure.

[0106] Graph structure update: After executing the strategy action, the optimized graph structure is obtained, which is more closed, smooth, and has a reasonable shape.

[0107] Reward function calculation: Based on the optimized graph structure, the reward function is calculated by combining indicators such as closure, smoothness, and shape consistency. This reward signal is used to guide strategy improvement. It is evaluated through a value network.

[0108] The Critic network receives state and reward information, estimates the long-term value of the current contour structure state, and uses it to train and optimize the policy network, thus achieving a closed loop in the entire optimization process.

[0109] Example 2

[0110] This embodiment provides a method for extracting tobacco field contours from large-scale GPS point cloud data based on graph neural networks, including:

[0111] S1. Obtain GPS point cloud data of the tobacco field collection area, and standardize and normalize it to construct the original input point set;

[0112] S2. An anomaly detection mechanism based on point feature distribution is adopted, and combined with a point cloud denoising network to remove anomalies and complete edges in the original point cloud data, forming cleaned point cloud data.

[0113] S3. Based on the improved point cloud feature extraction network, a corner detection module is constructed. The residual structure and graph attention mechanism are used to extract local and global geometric features, identify corners with significant boundaries, and obtain an initial node set.

[0114] S4. Construct a graph structure based on the set of corner points, use a dynamic graph convolutional neural network to predict the connection between nodes, and generate connected edges based on the node feature similarity and spatial geometric relationship.

[0115] S5. Construct an initial contour topology graph based on the graph structure, and use reinforcement learning structure optimization methods to iteratively optimize the graph structure by constructing a reward function with the objectives of closure, smoothness and shape consistency.

[0116] S6. Particle swarm optimization algorithm is introduced to fit the parameters of the boundary point sequence in the topology graph, and B-spline curves are used to generate continuous, smooth and closed contour curves.

[0117] S7. Outputs the coordinate sequence and vector boundary structure of the tobacco field outline, which is used for tasks such as plot segmentation, area calculation, and boundary visualization in the agricultural management system.

[0118] Optionally, the corner detection module in S3 uses a variable-scale aggregation mechanism to extract corner response intensity features from different scales, thereby improving the detection capability for inflection points with complex curvature. This is used as the corner response function. Another optimized implementation of the response function can be defined as follows:

[0119] ;

[0120] in, The number of scale layers, Indicates the first The second-order curvature change of the layer points, w l These are scale-weighted parameters that can be learned through joint training. This mechanism can effectively enhance the robustness of corner points to multi-scale deformation.

[0121] Optionally, the graph construction strategy in step S4 adopts a dynamic graph modeling mechanism, that is, dynamically generating a set of connected edges based on the geometric structure and node feature relationship of the input point cloud, rather than relying on fixed rules (such as k-nearest neighbors).

[0122] The connection relationship between node pairs is determined by the edge confidence prediction module. This module constructs input based on node features, outputs the connection probability through a neural network, and filters the edge set according to the set confidence threshold, thereby realizing a data-driven edge-based graph construction method.

[0123] Furthermore, to improve structural simplicity, the edge confidence prediction module introduces a gating mechanism, retaining only valid edges with high confidence, avoiding connections between weakly correlated nodes, and improving the accuracy and stability of contour topology mapping.

[0124] Optionally, the graph construction strategy in S4 introduces an edge confidence gating mechanism to address the edge connectivity error problem. The gating function takes the following form:

[0125]

[0126] in, For indicator functions, Here are the trainable parameters, and τ∈(0,1) is the confidence threshold. The graph node features are defined by this strategy, which dynamically adjusts edge connection decisions during training to avoid unnecessary connections between weakly related points and improve structural simplicity.

[0127] Optionally, the contour topology optimization stage in S5 adopts a reinforcement learning-based method, taking the contour map structure state as input and iteratively optimizing the boundary connectivity, smoothness and consistency of the overall contour shape through intelligent decision-making of edge connection actions.

[0128] Optionally, the contour topology optimization stage in step S5 employs a reinforcement learning-based method, using intelligent decision-making for edge connection actions to iteratively optimize the boundary connectivity, curvature smoothness, and overall morphological consistency of the contour graph structure. This invention introduces an Actor-Critic architecture during topology optimization, constructing a policy network (Actor) and a value network (Critic) to predict edge connection actions and evaluate the value of the overall structural state.

[0129] The policy network takes the feature representations of candidate node pairs as input. The node features are encoded by a graph neural network to form embedding vectors. The embedding features of the node pairs are concatenated and then input into the policy network. A multilayer perceptron extracts high-order features, and finally outputs the edge connection probability to guide the selection of edge connection actions. The value network takes the overall contour graph structure as input, forms a graph structure representation through global feature aggregation, and further estimates the long-term reward of the current contour state, providing a reference for policy updates.

[0130] To enhance the stability and convergence efficiency of the training process, the reinforcement learning module employs Proximal Policy Optimization (PPO) for updates. Simultaneously, to guide the contour topology towards an ideal state, this invention designs a comprehensive reward function that considers three aspects: contour closure, curvature smoothness, and overall morphological consistency. The closure index is calculated based on the normalized Euclidean distance between the contour's start and end points; the curvature smoothness index is measured by the standard deviation of the angle between adjacent edges; and the overall morphological consistency is evaluated using the Hausdorff distance between the contour shape and the reference plot shape. These indices are combined according to set weights to form a comprehensive score, which guides the optimization direction of edge connection actions, balancing local continuity and overall rationality, and improving the geometric quality and stability of the final contour structure.

[0131] Furthermore, in the topology optimization stage, a graph embedding regularization term can be introduced to constrain the relative distance relationship between nodes in the topology space, suppress abnormal deformation or local shrinkage, enhance boundary continuity and overall consistency, thereby improving the expression accuracy of the contour structure.

[0132] Optionally, in the topology optimization stage of S5, a graph embedding regularization term is introduced to constrain the relative distance relationships between nodes in the topological space, thereby enhancing the continuity and boundary consistency of the contour structure. The regularization term expression is:

[0133]

[0134] in, Represents the node embedding vector. This is its Euclidean distance in the original point cloud space. This can be jointly optimized with the main task loss to suppress abnormal deformation or local redundant shrinkage.

[0135] Optionally, during the topology optimization process of S5, the structural optimization results can be fed back to the corner scoring function and graph construction module to fine-tune the importance weights of corner points and the confidence of edge connections, thereby achieving cross-module joint optimization and improving the overall prediction accuracy and stability of the system.

[0136] Optionally, the final contour can be reconstructed using B-spline interpolation curves, exported as a standard vector boundary file (such as WKT, GeoJSON), and used for GIS system interaction. The interpolation optimization process can incorporate a minimum position error objective function:

[0137]

[0138] in, These are the boundary points extracted from the point cloud. for spline fitting curves in parameters The position below. This process ensures that the fitted contour is smoother and closer to the actual boundary.

[0139] Optionally, the key model modules in this embodiment (such as the corner detection network and the edge prediction network) can be deployed in a lightweight manner through model pruning, parameter constraints, etc., to adapt to edge devices or low-power platforms and have high engineering practicality.

[0140] Optionally, the method in this embodiment supports processing GPS data collected by various mobile sensing terminals (such as agricultural machinery, handheld devices, and drones), and has strong robustness and versatility for different time accuracies, path densities, and error distributions.

[0141] On the other hand, this embodiment also provides an electronic device, including a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein the processor implements the method when executing the computing program.

[0142] On the other hand, this embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method.

[0143] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for extracting tobacco field contour based on a graph neural network from large-scale GPS point cloud data, characterized in that, The method comprises the following steps: acquire GPS point cloud data of a tobacco field collection area, and perform standardization and normalization processing on the GPS point cloud data to construct an original input point set; based on the original input point set, adopt an abnormal point detection mechanism based on point feature distribution, and combine a point cloud denoising network to perform abnormal point elimination and edge completion, to form cleaned point cloud data; based on the cleaned point cloud data, utilize an improved point cloud feature extraction network PointNeXt to construct a corner point detection network, the corner point detection network combines a residual structure and an attention mechanism to extract local and global geometric features, identify corner points with boundary saliency, and obtain an initial node set; construct a graph structure according to the initial node set, adopt a dynamic graph convolutional neural network to predict connections between edges of node pairs, and generate connected edges according to node feature similarity and spatial geometric relationship; based on the constructed graph structure, utilize a reinforcement learning structure optimization method, construct a reward function with closure, smoothness and shape consistency as targets, and iteratively optimize the graph structure; introduce a particle swarm optimization algorithm to perform parameter fitting on boundary point sequences in the optimized graph structure, and utilize a B-spline curve to generate a continuous, smooth and closed contour curve; output coordinate sequences and vector boundary structures of a tobacco field contour, for use in land segmentation, area calculation and boundary visualization tasks in an agricultural management system; in the corner point detection network, an expression of a response function is: ; wherein, represents a response function, is a scale number of layers, represents a point In the first a second-order curvature variation of the layer, is a scale weighting parameter; the process of predicting connections between edges of node pairs by the dynamic graph convolutional neural network comprises: For each pair of nodes, the feature difference and the spatial position difference are calculated, and the two are spliced as input features. The DGCNN module uses two layers of stacked EdgeConv units for feature extraction. The first layer of EdgeConv maps the input 256-dimensional features to 128-dimensional features, and the second layer further reduces the 128-dimensional features to 64-dimensional features. After each layer of convolution operation, a ReLU activation function and a BatchNormalization are used for regularization. After two layers of EdgeConv processing, the fused edge features are obtained The connection probability is output through a linear mapping layer, and the expression is as follows: wherein, is a connection probability, is a linear mapping weight matrix, is a bias term, is a Sigmoid function, is a fused edge feature; an expression of the reward function is: ; in, For the reward function, This is the closure degree weighting coefficient. This is the smoothness weighting coefficient. This is the shape consistency weighting coefficient. The closure score is calculated based on the normalized Euclidean distance between the start and end points. The curvature smoothness of the profile is measured by taking the negative value of the standard deviation of the angle between adjacent sides; Measuring the contour shape and the reference shape The difference in Hausdorff distance between them; the process of constructing a graph structure according to the initial node set further comprises: adopting a dynamic graph modeling mechanism to dynamically generate an edge set according to geometric structure and node feature relationship of the input point cloud, and introducing an edge confidence gating mechanism.

2. The method of claim 1, wherein, the standardization and normalization processing comprises performing mean-standard deviation normalization processing on the GPS point cloud data, and an expression is: ; wherein, and are the longitude and latitude coordinates of the sampling points, and are the mean values of the longitude and latitude coordinates of the GPS sampling points, respectively, and are the standard deviations of the longitude and latitude coordinates of the GPS sampling points, respectively.

3. The method of claim 1, wherein, the abnormal point elimination and edge completion comprise: constructing a nearest neighbor set for each point, calculating density features and direction features of the point, and inputting the density features and the direction features into a point cloud denoising model as feature inputs, to output an abnormal score to eliminate outliers; for a part where edges of the point cloud are missing, a feature propagation type completion mechanism is adopted for completion; an expression of the feature propagation type completion mechanism is: ; wherein is the nearest neighbor set.

4. The method of claim 1, wherein, an expression of the utilization of the B-spline curve to generate a continuous, smooth and closed contour curve is: ; wherein, is the curve fit result, denotes the number of control points, denotes the control points, denotes the k-th B-spline basis function.

5. The method of claim 1, wherein, the process of utilizing the B-spline curve to generate a continuous, smooth and closed contour curve further comprises optimization by a minimum position error objective function.

6. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that, the processor implements the method of any one of claims 1-5 when executing the computing program.