Large-scale GPS point cloud data tobacco field contour extraction method based on graph neural network
Through an end-to-end processing method based on graph neural networks, the problem of insufficient contour continuity in tobacco field contour extraction was solved, and accurate contour extraction was achieved under sparse point clouds and noise interference, which is suitable for plot segmentation and agricultural analysis in digital agriculture.
Patent Information
- Application Number
- CN202511300466.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-09-12
AI Technical Summary
Existing tobacco field contour extraction methods have problems such as insufficient contour continuity, boundary breakage and error accumulation when dealing with sparse point clouds, noise interference and multi-source heterogeneous data, making them difficult to adapt to agricultural deployment needs.
An end-to-end processing method based on graph neural network is adopted, combined with an improved point cloud feature extraction network and a dynamic graph convolutional neural network. Through outlier detection, edge completion, corner detection, graph structure optimization and B-spline curve fitting, a continuous and smooth tobacco field outline is generated.
It achieves accurate contour extraction of sparse point cloud data in real agricultural scenarios, improves contour continuity, geometric accuracy and structural robustness, has strong adaptability, and is suitable for plot segmentation and agricultural analysis in digital agriculture.
Smart Images

Figure CN120807962A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of tobacco field contour extraction, and particularly relates to a large-scale GPS point cloud data tobacco field contour extraction method based on a graph neural network. BACKGROUND
[0002] With the continuous advancement of digital agriculture, fine plot management, intelligent yield assessment, agricultural machinery path optimization, and intelligent decision-making assistance for agricultural tasks increasingly rely on high-precision geographic spatial information. In this context, the boundary contour information of tobacco fields, as a typical economic crop planting area, is not only a prerequisite for carrying out basic agricultural operations such as land right confirmation, plot division, and sowing and fertilization, but also directly affects the execution effect of upper intelligent systems such as disease and pest monitoring, agricultural machinery path planning, and land resource statistics. In a sense, the accurate extraction of tobacco field contours has become one of the key links to promote the landing of digital and intelligent agriculture.
[0003] Existing methods mainly include the following three types, each with obvious limitations:
[0004] Firstly, boundary fitting methods based on geometric rules (such as convex hull, alpha-shape, Voronoi diagram, etc.) are widely used for contour generation of regular point sets, with the advantage of high computational efficiency, but they have strong dependence on the spatial distribution of point sets, especially in the case of sparse edge points or local missing, which can easily cause "envelope expansion" or "boundary rupture" problems. For example, the alpha-shape method often causes contour distortion due to the misconnection of internal points when dealing with sparse point clouds with long and curved boundaries, affecting the accuracy of subsequent area estimation and path planning.
[0005] Secondly, segmentation methods based on image processing 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 high image clarity conditions, they are highly dependent on external visual data and are subject to factors such as light, clouds, and shooting angles, making them difficult to update frequently and unsuitable for large amounts of asynchronously collected point cloud data.
[0006] Finally, point cloud modeling methods based on deep learning often convert point clouds into regular voxels, depth maps, or bird's eye views before inputting them into CNN for prediction. Although they have certain automatic modeling capabilities, they often destroy the spatial structure relationship between original points during data conversion, leading to a decrease in boundary continuity and limited topological expression, especially when modeling unordered point sets, which shows obvious instability.
[0007] In addition to the adaptability of the above modeling methods, the current mainstream contour extraction process mostly adopts a "modular series" method, that is, it is completed through multiple stages such as data preprocessing, feature point extraction, graph construction and boundary fitting, the information between modules is fragmented, the optimization objectives are not unified, error accumulation and propagation are easy to occur, and it is highly dependent on manual experience parameter adjustment, and it is difficult to adapt to the actual agricultural deployment requirements of multi-source heterogeneous and scene variable. SUMMARY
[0008] To solve the above technical problems, the present application provides a large-scale GPS point cloud data tobacco field contour extraction method based on a graph neural network, comprising:
[0009] Obtain the GPS point cloud data of the tobacco field collection area, and perform standardization and normalization processing on the GPS point cloud data to construct an original input point set;
[0010] According to the original input point set, an abnormal point detection mechanism based on point feature distribution is adopted, combined with a point cloud denoising network to remove abnormal points and complete edges, to form cleaned point cloud data;
[0011] Based on the cleaned point cloud data, an improved point cloud feature extraction network is used to construct an angle point detection network, which combines residual structure and graph attention mechanism to extract local and global geometric features, identify angle points with boundary significance, and obtain an initial node set;
[0012] According to the initial node set, a graph structure is constructed, and a dynamic graph convolutional neural network is used to predict the connection between node pairs and generate connected edges according to node feature similarity and spatial geometric relationship;
[0013] Based on the constructed graph structure, a reinforcement learning structure optimization method is used to iteratively optimize the graph structure by constructing a reward function with closure, smoothness and shape consistency as the target;
[0014] A particle swarm optimization algorithm is introduced to fit the boundary point sequence in the optimized graph structure, and a B-spline curve is used to generate a continuous, smooth and closed contour curve;
[0015] The coordinate sequence and vector boundary structure of the tobacco field contour are output, which are used for land division, area calculation and boundary visualization tasks in the agricultural management system.
[0016] Preferably, the standardization and normalization processing includes performing mean-standard deviation normalization processing on the GPS point cloud data, and the expression is:
[0017] ;
[0018] Wherein, And S is the latitude and longitude coordinates of the sampling point, and are the mean of the longitude and latitude coordinates of the GPS sampling points, and are the standard deviations of the longitude and latitude coordinates of the GPS sampling points, respectively.
[0019] Preferably, the outlier detection and completion includes: constructing a nearest neighbor set for each point, calculating the density feature and directional feature of the point, and inputting them as features into the point cloud denoising model, outputting anomaly scores to eliminate outliers; for missing parts on the edge of the point cloud, a feature propagation completion mechanism is used to complete them.
[0020] Preferably, in the corner detection network, the response function is expressed as:
[0021] ;
[0022] in, represents the response function, is the number of scale layers, Indicates a point In the The second-order curvature of the layer changes, is the scale weighting parameter.
[0023] Preferably, the process of using a dynamic graph convolutional neural network to predict the connection between the edges of the node pairs includes: extracting the feature difference and spatial vector of the node pairs, inputting the dynamic graph convolutional neural network, and outputting the connection probability, which is expressed as:
[0024] ;
[0025] in, is the connection probability, is the linear mapping weight matrix, is the bias term, is the Sigmoid function.
[0026] Preferably, the reward function is expressed as:
[0027] ;
[0028] in, is the reward function, is the closure weight coefficient, is the smoothness weight coefficient, is the shape consistency weight coefficient, is the closure score, is the smoothness score, Score shape consistency.
[0029] Preferably, the expression for generating a continuous, smooth, closed contour curve using a B-spline curve is:
[0030] ;
[0031] in, is the curve fitting result, represents the number of control points, represents the control point, represents the k-order B-strip spline basis function.
[0032] Preferably, the process of generating a continuous, smooth, closed contour curve using a B-spline curve further includes the following steps: Optimize, where are the boundary points extracted from the point cloud, For B-spline fitting curve in parameters The next position.
[0033] Preferably, the process of constructing a graph structure based on the initial node set also includes: adopting a dynamic graph modeling mechanism to dynamically generate an edge set based on the geometric structure of the input point cloud and the node feature relationship, and introducing an edge confidence gating mechanism.
[0034] On the other hand, the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the method when executed by a processor.
[0035] Compared with the prior art, the present invention has the following advantages and technical effects:
[0036] This paper discloses a large-scale tobacco field contour extraction method based on a graph neural network (GNN). This method addresses the irregular distribution, sparse sampling, and noise interference of point cloud data in real agricultural scenarios by proposing an end-to-end structured processing and optimization mechanism, enabling accurate recovery of tobacco field boundary contours. Compared with traditional methods based on geometric rules or image segmentation, this method significantly improves contour continuity, geometric accuracy, and structural robustness.
[0037] This paper, for the first time, combines an improved point cloud feature extraction network (PointNeXt) with dynamic graph neural network modeling to achieve adaptive mapping of the spatial relationships of the original point cloud, effectively overcoming the connectivity issues caused by fixed adjacency relationships in sparse point cloud scenarios. Furthermore, by introducing a reinforcement learning-based contour topology optimization mechanism and designing comprehensive closure, smoothness, and morphological consistency metrics to guide intelligent decision-making for edge connection actions, the integrity and rationality of the contour structure are further improved.
[0038] In addition, the application innovatively introduces particle swarm optimization and B-spline fitting strategy in the profile curve generation stage, enhances the continuity and smoothness of boundary fitting, and significantly reduces the profile distortion caused by discrete point noise. The overall scheme has high automation, end-to-end optimization and good adaptability, and can be widely used in digital agriculture for tasks such as planting area mapping, land segmentation, area estimation and agricultural analysis, and has wide practical application and popularization value. BRIEF DESCRIPTION OF DRAWINGS
[0039] The accompanying drawings, which form a part of this application, are intended to provide further understanding of the application and are incorporated herein in their entirety. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0040] Figure 1 The flowchart of the tobacco field contour extraction method based on the graph neural network of the embodiment of the present application is shown in the figure.
[0041] Figure 2 The structure and data flow of the reinforcement learning optimization module of the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0042] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0043] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from here.
[0044] Embodiment one
[0045] The tobacco field contour extraction method based on the graph neural network of the present application includes:
[0046] The system of the present embodiment is implemented based on the PyTorch deep learning framework (version 1.13.1), and the core network module includes a graph neural network based on PointNeXt and a DGCNN structure. The edge connection discrimination network, the reinforcement learning Actor-Critic module, etc. are all implemented in the PyTorch environment. Open3D (version 0.16) is used as the main three-dimensional graphics interface tool for graph structure processing and visualization. The system runs on the Ubuntu20.04 operating system, and uses NVIDIARTX3090GPU (24GB video memory), Inteli9-10980XECPU and 128GB memory environment for training and reasoning.
[0047] S1, acquire GPS point cloud data of a tobacco field area, and perform standardization and normalization processing on the original point set to construct an input point set in a unified space;
[0048] S2, based on an abnormal point detection mechanism of point feature distribution, combine a point cloud denoising network to clean and complete the boundary of the data, and obtain high-quality point cloud;
[0049] S3, based on a deep angle point detection network, identify key points with boundary features, and construct an initial graph node set;
[0050] S4, construct a graph structure, predict the connection edges between node pairs by using a dynamic graph convolutional neural network, and generate an initial graph;
[0051] S5, based on a reinforcement learning method, perform topological optimization on the graph structure to improve the contour closure, smoothness, and boundary consistency;
[0052] S6, use a particle swarm optimization algorithm to fit a B-spline curve to the boundary point sequence in the graph to form a smooth and continuous closed boundary;
[0053] S7, output the coordinate sequence and boundary vector graph of the final tobacco field contour for land segmentation, area statistics, and boundary visualization tasks of an agricultural management platform.
[0054] Figure 1 The main processing flow of the data preprocessing stage, the feature modeling stage, and the boundary fitting stage is shown from left to right, and each module corresponds to steps S1 to S7 in the invention content chapter, as follows:
[0055] Data preprocessing stage: corresponding to the invention step S1, first collect the original GPS point cloud data, and after standardization and normalization processing, form a structured input data set for subsequent model modeling.
[0056] 2. Feature modeling stage: corresponding to invention steps S2 to S4. First, the point cloud cleaning module performs abnormal point removal and edge completion on the input point cloud (S2); then the corner point detection module extracts structure nodes with geometric saliency (S3); and then the graph structure construction module and the GNN edge connection prediction module are combined to realize the establishment of the initial contour graph structure (S4).
[0057] 3. Boundary fitting stage: corresponding to invention steps S5 to S7. Through the topological structure optimization module driven by reinforcement learning (S5), the closure and geometric rationality of the contour graph structure are further improved; then the PSO particle swarm optimization algorithm and the B-spline fitting method are used to complete the generation of smooth boundaries (S6); finally, the output is a boundary structure file in vector format, such as GeoJSON or WKT format, which is used for calling by an agricultural management system (S7).
[0058] Further, the S1 midpoint cloud standardization processing includes:
[0059] Let the original acquisition point cloud data be:
[0060] ;
[0061] Wherein and are the longitude and latitude coordinates of the GPS sampling points. The mean-standard deviation normalization processing is performed on the data:
[0062] ;
[0063] The processing ensures that the data distribution meets the input requirements of subsequent neural network modeling.
[0064] Further, the S2 midpoint cloud outlier detection and completion includes:
[0065] For each point , its nearest neighbor set is constructed , and the density feature and the direction feature of the point are calculated. Then, they are input as features into the point cloud denoising model PointCleanNet, and the abnormal score is output. If , it is considered as an outlier and is removed. For the part of the point cloud edge that is missing, the following feature propagation type completion mechanism is adopted:
[0066] ;
[0067] Further, the response function of the S3 corner point detection network includes:
[0068] Let the corner point response of point be:
[0069] ;
[0070] The corner point set is selected through response threshold screening and non-maximum suppression.
[0071] Further, the dynamic graph modeling mechanism in S4 is:
[0072] For each pair of candidate nodes , its feature vector is extracted and then concatenated into a 512-dimensional vector, which is input into the edge confidence discrimination network. The discrimination network consists of two layers of multilayer perceptron (MLP), which are 512→128→1 fully connected structures, respectively, and ReLU activation function is used between each layer. The final output is the connection probability score. The score is then passed through the Sigmoid function mapped to a confidence probability between 0 and 1, which is further compared with a set threshold The edges between nodes are retained when the connection probability exceeds the threshold, otherwise they are removed, thus realizing the dynamic generation of data-driven edge connections. The gating function is as follows:
[0073] ;
[0074] wherein, is an indicator function, is a trainable parameter, and τ∈(0, 1) is a confidence threshold, is a graph node feature. This strategy dynamically adjusts the edge connection decision through training, avoids unnecessary edges between weakly related points, and improves the simplicity of the structure.
[0075] After the preliminary edge selection is completed, in order to further refine the connection relationship, the application introduces a connection probability prediction mechanism based on a dynamic graph convolutional neural network (DGCNN). 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, and each EdgeConv unit takes nearest neighbor nodes as the local neighborhood. 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, and the connection probability is output through a linear mapping layer (64→1):
[0076] ;
[0077] wherein, is a linear mapping weight matrix, is a bias term, is a Sigmoid function.
[0078] Finally, the edges are further selected according to the predicted probability, and a preliminary outline graph with reasonable structure and good boundary connectivity is formed.
[0079] Through this dynamic graph construction mechanism, the present invention dynamically adjusts 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, because both the gated discrimination and connectivity prediction processes are completed within an end-to-end training framework, the graph modeling module can be synergistically optimized with the subsequent topology optimization and contour fitting processes, improving the overall performance and generalization capabilities of the contour extraction system.
[0080] Furthermore, the contour topology optimization method in S5 is:
[0081] Based on the reinforcement learning method, the structural state of the contour graph is used as input, and the boundary connectivity, smoothness and consistency of the overall contour morphology are iteratively optimized through intelligent decision-making of edge connection actions.
[0082] The reinforcement learning module employs a dual actor-critic network architecture, responsible for policy generation and state value estimation. The policy network (actor) takes the features of node pairs connected by candidate edges as input. Each node is encoded into a 128-dimensional embedding vector by a graph neural network, which is then concatenated to form a 256-dimensional input feature. The network comprises two fully connected layers, mapping the input into 128-dimensional and 64-dimensional intermediate representations, respectively. Both layers utilize ReLU activation functions to enhance nonlinear representation. Finally, a sigmoid activation layer outputs the edge probability for the current node pair, which serves as the basis for action policy decisions.
[0083] The corresponding value network (Critic) is used to evaluate the long-term return of the current contour graph structure state. Its input is a 128-dimensional graph representation formed by global average pooling of all node embedding features. This network also consists of a two-layer fully connected structure with hidden layer dimensions of 128 and 64. The final output is a single scalar value used to estimate the value function of the current state. .
[0084] During the network training process, the Proximal Policy Optimization (PPO) algorithm is used for updating to enhance the stability of the training process and the speed of policy convergence.
[0085] In order to guide the graph structure to evolve towards the ideal contour, the following comprehensive reward function is designed:
[0086] ;
[0087] in, is the reward function, is the closure weight coefficient, is the smoothness weight coefficient, is the shape consistency weight coefficient. The closure score is calculated based on the normalized Euclidean distance between the starting point and the end point; The curvature smoothness of the contour is measured by taking the negative value of the standard deviation of the angle between adjacent edges; Measuring contour shape against reference shape The Hausdorff distance difference between them is normalized to the consistency score. The weight coefficients of each indicator are set as 、 、 , to ensure closure priority while taking into account both local smoothness and overall morphology. The reward function design takes into account the geometric closure, local continuity, and overall morphological rationality of the contour, which can effectively guide the edge connection action to balance different quality objectives in the process of optimizing the contour topology.
[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, a graph embedding regularization term is introduced in the topology optimization stage in S5:
[0090] To constrain the relative distance relationship of nodes in the topological space, thereby enhancing the continuity and boundary consistency of the contour structure. The regular term expression is:
[0091] ;
[0092] in, represents the node embedding vector, is the 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 contraction.
[0093] During the topology optimization process of S5, the structural optimization results can be fed back to the corner point scoring function and graph construction module to fine-tune the corner point importance weights and edge connection confidence, 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] Use the closed boundary corner point sequence as control points to fit a B-spline curve:
[0096] ;
[0097] The control point parameters are optimized by the PSO algorithm to make the fitting curve fit the point cloud boundary best.
[0098] Furthermore, the contour output method in S7 includes:
[0099] Output coordinate sequence , build vector boundary file, support GeoJSON, WKT format:
[0100] {"type": "Polygon", "coordinates": [[x1, y1], [x2, y2],... [x1, y1]]};
[0101] And save the graph structure and coordinate data together, for agricultural management system to call.
[0102] Among them, the type field indicates that the output geometry type is polygon (Polygon), and the coordinates field represents the contour point coordinate sequence of the polygon, stored in the format of longitude and latitude coordinates, and the last point is consistent with the starting point to form a closed loop boundary. This data structure can be directly used for visualization rendering and area calculation of agricultural map system.
[0103] Figure 2 The structure and data flow diagram of the reinforcement learning optimization module in this embodiment is shown in the figure, which shows the edge connection optimization process of the graph neural structure under the cooperative action of the policy network and the value network. The module shown in the figure corresponds to step S5 (contour topology optimization) in the invention content, which is as follows:
[0104] Contour graph input: graph structure (such as preliminary prediction edge connection graph) as current state input, transmitted into the reinforcement learning module for optimization.
[0105] Policy network (Actor): based on the current contour graph node and its features, output edge connection action strategy (such as whether to connect edge, connection confidence, etc.), used for updating the graph structure.
[0106] Graph structure update: after executing the policy action, the optimized graph structure is obtained, which is more closed, smooth and reasonable in shape.
[0107] Reward function calculation: based on the optimized graph structure, calculate the reward function combining the closure, smoothness and shape consistency , used to guide policy improvement. The reward signal is evaluated by the value network.
[0108] Value network (Critic): receives state and reward information, estimates the long-term value of the current contour structure state, and is used to train and optimize the policy network, realizing the closed loop of the whole optimization process.
[0109] Embodiment two
[0110] A large-scale GPS point cloud data tobacco field contour extraction method based on graph neural network is provided in this embodiment, which comprises:
[0111] S1, acquire the GPS point cloud data of the tobacco field collection area, and standardize and normalize the same to construct an original input point set;
[0112] S2, adopt an abnormal point detection mechanism based on point feature distribution, combine a point cloud denoising network to remove abnormal points and complete edges from the original point cloud data, and form cleaned point cloud data;
[0113] S3, construct a corner point detection module based on an improved point cloud feature extraction network, adopt a residual structure and a graph attention mechanism to extract local and global geometric features, identify corner points with significant boundaries, and obtain an initial node set;
[0114] S4, construct a graph structure based on the corner point set, adopt a dynamic graph convolutional neural network to predict the connection between node pairs, and generate connected edges according to the node feature similarity and spatial geometric relationship;
[0115] S5, construct an initial contour topology graph based on the graph structure, and use a reinforcement learning structure optimization method to iteratively optimize the graph structure by constructing a reward function with closure, smoothness and shape consistency as the target;
[0116] S6, introduce a particle swarm optimization algorithm to parameterize the boundary point sequence in the topology graph, and use a B-spline curve to generate a continuous, smooth and closed contour curve;
[0117] S7, output the coordinate sequence and vector boundary structure of the tobacco field contour for land segmentation, area calculation and boundary visualization tasks in the agricultural management system.
[0118] Optionally, the corner point detection module in S3 uses a variable scale aggregation mechanism to extract corner point response intensity features from different scales to improve the detection capability of complex curvature inflection points. As another optimization implementation of the corner point response function , the response function can be defined as:
[0119] ;
[0120] wherein, is the scale layer number, represents the second-order curvature change of the point in the layer, and w l is a scale weighting parameter, which can be learned through joint training. This mechanism can effectively enhance the robustness of the corner point to multi-scale deformation.
[0121] Optionally, the graph construction strategy in S4 step adopts a dynamic graph modeling mechanism, i.e., dynamically generates an edge set according to 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 edge relationship between node pairs is determined by the edge confidence prediction module. This module constructs input based on node features, outputs edge probability through a neural network, and filters the edge set according to the set confidence threshold, thereby realizing a data-driven edge mapping method.
[0123] Furthermore, to improve the structural simplicity, the edge confidence prediction module introduces a gating mechanism to retain only valid edges with high confidence, avoid connecting weakly related nodes, and improve 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 connection error problem. The gating function is as follows:
[0125]
[0126] in, is the indicator function, is a trainable parameter, τ∈(0,1) is the confidence threshold, is a graph node feature. This strategy dynamically adjusts edge connection decisions through 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, which takes the contour graph structural state as input and iteratively optimizes the boundary connectivity, smoothness and consistency of the overall contour morphology through intelligent decision-making of edge connection actions.
[0128] Optionally, the contour topology optimization phase in step S5 employs a reinforcement learning-based approach to iteratively optimize the contour graph's boundary connectivity, curvature smoothness, and overall morphological consistency by intelligently determining edge connection actions. This paper introduces an actor-critic architecture into the topology optimization process, constructing a policy network (actor) and a value network (critic) to predict edge connection actions and assess 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 an embedding vector. The embedded features of the node pairs are then concatenated and input into the policy network. A multi-layer perceptron extracts high-order features, ultimately outputting edge connection probabilities to guide the selection of edge connection actions. The value network, on the other hand, takes the overall profile graph structure as input and forms a graph structure representation through global feature aggregation. It then estimates the long-term reward of the current profile state, providing a reference for policy updates.
[0130] To enhance the stability and convergence efficiency of the training process, the reinforcement learning module adopts the Proximal Policy Optimization (PPO) algorithm for updating. Meanwhile, to guide the evolution of the contour topology structure towards an ideal state, the application designs a comprehensive reward function, which comprehensively considers three aspects of the contour, namely, the closedness, the curvature smoothness and the overall shape consistency. The closedness index is calculated by normalizing the Euclidean distance between the starting point and the ending point of the contour, the curvature smoothness index is measured according to the standard deviation of the angle change of adjacent edges, and the overall shape consistency is evaluated by the Hausdorff distance between the contour shape and the reference land shape. The indexes are combined to form a comprehensive score according to the set weight, which is used to guide the optimization direction of the edge connection action, taking into account the local continuity and overall rationality, and improving the geometric quality and stability of the final contour structure.
[0131] Further, in the topology structure optimization stage, a graph embedding regularization term can be introduced to constrain the relative distance relationship of nodes in the topology space, suppress abnormal deformation or local shrinkage phenomenon, enhance the boundary continuity and overall consistency, and thus improve the expression accuracy of the contour structure.
[0132] Optionally, in the topology structure optimization stage in S5, a graph embedding regularization term is introduced to constrain the relative distance relationship of nodes in the topology space, so as to enhance the continuity and boundary consistency of the contour structure. The regularization term expression is:
[0133]
[0134] wherein, represents a node embedding vector, is the Euclidean distance thereof in the original point cloud space. This term can be optimized jointly with the main task loss to suppress abnormal deformation or local redundant shrinkage.
[0135] Optionally, in the topology optimization process of S5, the structure optimization result can be fed back to the corner point scoring function and the graph construction module to fine-tune the importance weight of the corner point and the edge connection confidence, so as to realize cross-module joint optimization and improve the overall prediction accuracy and stability of the system.
[0136] Optionally, the final contour can be reconstructed by a B-spline interpolation curve, which can be exported as a standard vector boundary file (such as WKT, GeoJSON) and used for GIS system interaction. The interpolation optimization process can combine a minimum position error objective function:
[0137]
[0138] wherein, is a boundary point extracted from the point cloud, is the parameter The process ensures that the fitted contour is smoother and closer to the actual boundary.
[0139] Optionally, the key model modules (such as the corner detection network and the edge connection prediction network) in the embodiment can be realized by model pruning, parameter quantity constraint and other methods to realize lightweight deployment, adapt to edge devices or low-power platforms, and have high engineering practicability.
[0140] Optionally, the method in the embodiment supports processing GPS data collected by various mobile sensing terminals (such as agricultural machines, handheld devices, and unmanned aerial vehicles), and has strong robustness and universality for different time accuracy, path density, and error distribution.
[0141] On the other hand, the embodiment also provides an electronic device, which includes a memory, a processor, and a computing program stored in the memory and executable on the processor, and the processor implements the method when executing the computing program.
[0142] On the other hand, the embodiment also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method.
[0143] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A tobacco field contour extraction method based on large-scale GPS point cloud data based on graph neural network, characterized in that: include: Obtain GPS point cloud data of the tobacco field collection area, standardize and normalize it, and construct the original input point set; Based on the original input point set, an outlier detection mechanism based on point feature distribution is adopted, combined with a point cloud denoising network to perform outlier removal and edge completion to form cleaned point cloud data; 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 a residual structure with a graph attention mechanism to extract local and global geometric features, identify corners with boundary significance, and obtain an initial node set. Constructing a graph structure based on the initial node set, using a dynamic graph convolutional neural network to predict connections between pairs of nodes, and generating connected edges based on node feature similarity and spatial geometric relationships; Based on the constructed graph structure, the reinforcement learning structure optimization method is used to iteratively optimize the graph structure by constructing a reward function with closure, smoothness and shape consistency as the goals; The particle swarm optimization algorithm is introduced to perform parameter fitting on the boundary point sequence in the optimized graph structure, and the B-spline curve is used to generate a continuous, smooth and closed contour curve. Outputs the coordinate sequence and vector boundary structure of the tobacco field outline, which can be used for plot segmentation, area calculation and boundary visualization tasks in agricultural management systems.
2. The method according to claim 1, characterized in that The standardization and normalization processing includes performing mean-standard deviation normalization processing on the GPS point cloud data, and the expression is: ; in, and S is the latitude and longitude coordinates of the sampling point, and are the mean of the longitude and latitude coordinates of the GPS sampling points, and are the standard deviations of the longitude and latitude coordinates of the GPS sampling points, respectively.
3. The method according to claim 1, characterized in that The outlier detection and completion method includes: constructing a nearest neighbor set for each point, calculating the density and direction features of the point, inputting them into a point cloud denoising model as features, and outputting anomaly scores to eliminate outliers; for missing parts on the edge of the point cloud, a feature propagation completion mechanism is used to complete them.
4. The method according to claim 1, wherein In the corner detection network, the response function is expressed as: ; in, represents the response function, is the number of scale layers, Indicates a point In the The second-order curvature of the layer changes, is the scale weighting parameter.
5. The method according to claim 1, wherein The process of using a dynamic graph convolutional neural network to predict the connection between node pairs includes: extracting the feature difference and spatial vector of the node pair, inputting the dynamic graph convolutional neural network, and outputting the connection probability, which is expressed as: ; in, is the connection probability, is the linear mapping weight matrix, is the bias term, is the Sigmoid function.
6. The method according to claim 1, characterized in that The expression of the reward function is: ; in, is the reward function, is the closure weight coefficient, is the smoothness weight coefficient, is the shape consistency weight coefficient, is the closure score, is the smoothness score, Score shape consistency.
7. The method according to claim 1, characterized in that The expression for generating a continuous, smooth, closed contour curve using a B-spline curve is: ; in, is the curve fitting result, represents the number of control points, represents the control point, represents the k-order B-strip basis function.
8. The method according to claim 1, characterized in that The process of generating a continuous, smooth, closed contour curve using a B-spline curve also includes the following steps: Optimize, where are the boundary points extracted from the point cloud, For B-spline fitting curve in parameters The next position.
9. The method according to claim 1, characterized in that The process of constructing a graph structure based on the initial node set also includes: adopting a dynamic graph modeling mechanism to dynamically generate an edge set based on the geometric structure of the input point cloud and the node feature relationship, and introducing an edge confidence gating mechanism.
10. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, wherein: When the processor executes the computing program, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Execution decision and optimization method and device based on graph structure, equipment and medium
CN120509437A
Method for reconstructing a 3D object based on dynamic graph network
US20210248812A1
Cited By
DGNN-based laser radar airport bird flock detection and early warning method and system
CN121522660A