An AI-based intelligent planning method and system for grain pile sampling point trajectories of a vehicle
By using an AI-based intelligent planning system for the trajectory of grain pile sampling points in vehicles, combined with 3D vision sensors and robotics technology, the safety hazards and cheating problems of manual operation in grain sampling have been solved, achieving efficient and scientific grain pile sampling and improving the fairness and representativeness of the testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LIANGZHU BRANCH OF HANGZHOU GRAIN COLLECTION & STORAGE CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-30
AI Technical Summary
Existing grain sampling techniques rely on manual operation, which poses safety risks, results in poor sample representativeness, and automated sampling equipment is easily manipulated, making it difficult to achieve scientific and uniform grain pile coverage and impartial quality testing.
An AI-based intelligent planning system for sampling point trajectories in grain piles is adopted, which combines 3D vision sensors, robotics, and deep learning algorithms to generate the optimal set of random sampling points and motion trajectories, thereby achieving fully automated sampling.
It achieves high-precision 3D reconstruction of grain piles and AI algorithm-driven uniform sampling, avoiding cheating, improving the scientific nature and representativeness of sampling, reducing labor costs and risks, and improving detection efficiency and impartiality.
Smart Images

Figure CN122308171A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of grain storage technology, and in particular to an AI-based intelligent planning method for the trajectory of grain pile sampling points on vehicles, an AI-based intelligent planning system for the trajectory of grain pile sampling points on vehicles, electronic equipment, and computer-readable storage medium. Background Technology
[0002] Sampling of bulk grain (hereinafter referred to as "grain piles") carried by transport vehicles (such as trucks and trailers) is a crucial first step in the grain procurement, storage, distribution, and quality inspection processes. The scientific validity and representativeness of the sampling directly determine the accuracy and impartiality of subsequent quality inspection results, which is related to national food security, trade settlement, and food safety.
[0003] Traditional and current mainstream technical solutions mainly employ two sampling methods: manual sampling and electric negative pressure automatic sampling.
[0004] Currently, manual sampling at grain purchasing sites relies on samplers manually inserting samplers into the grain pile on top of vehicles, point by point. This method is not only extremely labor-intensive, requiring samplers to frequently climb to heights, posing serious safety hazards, but also highly dependent on personal experience in the selection of sampling points, insertion depth, and sampling techniques. This leads to significant fluctuations in sample representativeness and susceptibility to non-technical factors such as "favoritism" or "personal connections," making standardization and traceability difficult. This method is limited by human observation, personal experience, and physical strength, making it difficult to scientifically and evenly cover all layers and areas of the grain pile. It is prone to human biases such as "surface sampling" and "sampling of preferred areas," and the samples cannot truly reflect the quality of the entire batch of grain.
[0005] Electric negative pressure automatic sampling machines use a vacuum pump to generate a strong negative pressure airflow, drawing grain from the grain pile into a sampling tube. While this automates operation and reduces labor costs, its working principle itself introduces new technical drawbacks. Some semi-automatic systems employ fixed sampling points or patterns (such as the fixed grid method). This deterministic pattern is easily predicted by grain delivery personnel, who can then circumvent quality inspections by adulterating or selectively treating grain at specific points, seriously threatening food security and market fairness.
[0006] Therefore, there is an urgent need for an unmanned sampling solution that can automatically sense, make intelligent decisions, and execute precisely. Summary of the Invention
[0007] To address the technical problems existing in the prior art, the present invention provides the following technical solution:
[0008] On the one hand, an AI-based intelligent trajectory planning system for grain pile sampling points in automobiles is provided, including:
[0009] The perception subsystem is used to collect three-dimensional point cloud data of the grain pile of the vehicle to be inspected.
[0010] A decision-making and planning subsystem, communicatively connected to the perception subsystem, is used to process the 3D point cloud data and generate an optimal set of random sampling points and the robot's motion trajectory; and
[0011] The execution control subsystem is communicatively connected to the decision and planning subsystem and is used to control the sampling robot to perform automated sampling operations according to the motion trajectory.
[0012] Preferably, the decision-making and planning subsystem includes: a data perception and fusion module, used to preprocess, register, and reconstruct the three-dimensional point cloud data to generate a continuous three-dimensional mesh model of the grain pile; an AI decision module, connected to the data perception and fusion module, used to perform semantic segmentation on the three-dimensional mesh model based on a deep learning model to extract effective sampling areas, and run a dynamic random optimal sampling point planning algorithm to generate the optimal random sampling point set within the effective sampling area; and a motion path planning module, connected to the AI decision module, used to plan a collision-free and time-optimal end effector motion trajectory based on the optimal random sampling point set, robot kinematic constraints, and environmental model.
[0013] Preferably, the dynamic random optimal sampling point planning algorithm includes the following steps:
[0014] S1. The effective sampling area is voxelized, and a comprehensive weight value is calculated for each voxel. The comprehensive weight value is a weighted sum of depth weight factor, curvature weight factor, and spatial repulsion weight factor. The depth weight factor is used to promote the uniform distribution of sampling points in the vertical direction of the grain pile, the curvature weight factor is used to increase the sampling probability of high curvature areas to enhance the capture of morphological features, and the spatial repulsion weight factor is used to avoid excessive density of sampling points based on the distance from the selected points.
[0015] S2. Iterative Monte Carlo sampling is performed based on the weights of each voxel. In each iteration, candidate points are randomly selected according to the weights, and the robot accessibility constraints and simulated annealing criteria are combined to determine whether to accept the candidate point and add it to the temporary point set. At the same time, the weights of each voxel are dynamically updated until the number of selected points reaches the preset value.
[0016] S3. Project the points in the temporary point set onto the surface of the grain pile, perform spatial sorting, and output the final optimal random sampling point set.
[0017] Preferably, the motion path planning module is configured to: use a path search algorithm based on random sampling to search for a collision-free path in the robot configuration space, optimize the access order of the optimal random sampling point set using an approximate solution to the traveling salesman problem, and then generate a smooth and continuous end trajectory through trajectory interpolation.
[0018] Preferably, the semantic segmentation model in the AI decision module is a point cloud segmentation network based on deep learning. It automatically identifies and segments the surface area of the grain pile by extracting local features and understanding global semantics from the input three-dimensional geometric data, while filtering out invalid areas such as the carriage structure.
[0019] Preferably, the sensing subsystem includes multiple lidar and / or depth cameras deployed at the sampling station, forming a multi-view three-dimensional vision sensor array for synchronously acquiring high-precision point cloud data covering the entire cargo compartment area.
[0020] Preferably, the execution control subsystem includes a multi-degree-of-freedom robotic arm, a deep sampler mounted at the end of the robotic arm, and a motion controller; the motion controller is used to receive the motion trajectory command and drive the robotic arm and the sampler to coordinate and complete the action sequence of positioning, insertion, extraction and cleaning.
[0021] Preferably, the data perception and fusion module includes a point cloud preprocessing unit and a 3D reconstruction unit; the point cloud preprocessing unit is used to filter, register and remove the background of multi-source point clouds to output a clean grain pile point cloud; the 3D reconstruction unit is used to reconstruct the clean point cloud into a continuous triangular mesh surface model.
[0022] Preferably, it also includes a human-computer interaction and data management subsystem, which includes a graphical user interface and a task database for vehicle information binding, task management, parameter configuration, visualization of 3D models and planning results, and archiving and report generation of sampled data.
[0023] On the other hand, an AI-based intelligent trajectory planning method for sampling points in grain piles of vehicles is provided, including the following steps:
[0024] Raw point cloud data of the grain pile in the truck was collected using a 3D vision sensor.
[0025] The original point cloud data is preprocessed and three-dimensionally reconstructed to generate a digital surface model of the grain pile.
[0026] The digital surface model is processed using an AI semantic segmentation model to extract the effective sampling area;
[0027] Within the effective sampling area, a dynamic random optimal sampling point planning algorithm is run to generate an optimal random sampling point set that satisfies the constraints of spatial representativeness, randomness, and robot executability.
[0028] Based on the optimal set of random sampling points, combined with the robot kinematics model and environmental obstacle information, a collision-free and time-optimal robot motion trajectory is planned.
[0029] The sampling robot is controlled to perform automated sampling operations according to the stated motion trajectory.
[0030] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when executed by the processor, the computer-readable instructions implement any of the methods described above for AI-based intelligent planning of vehicle grain pile sampling point trajectories.
[0031] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement any of the above-described AI-based intelligent planning methods for the trajectory of grain pile sampling points in vehicles.
[0032] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following:
[0033] 1. A leap forward in the scientific rigor and representativeness of sampling: This scheme, based on high-precision 3D reconstruction and AI algorithms, ensures that sampling points are evenly and adaptively distributed in 3D space, strictly covering all parts of the grain pile, including the top, middle, bottom, edges, corners, and center. The representativeness of the samples far surpasses that of manual sampling, and can most accurately reflect the quality of the entire batch of grain. This avoids the shortcomings of "relying on human experience and having systematic biases."
[0034] 2. Strong anti-cheating and anti-prediction capabilities: The core randomness of the DROSPA algorithm in this solution (based on random seeds and probabilistic sampling) ensures that the spatial distribution of each sampling point is unique and unpredictable, avoiding the easy identification of patterns or empirical methods. Grain delivery personnel cannot predict where the next sampling point will be, fundamentally eliminating targeted adulteration and cheating.
[0035] 3. Full-process automation and high-efficiency operation: This solution automates the entire process from vehicle identification, scanning, analysis, planning to execution, sorting, and reporting. Single-vehicle operation time can be reduced to just a few minutes, operating 24 / 7 without interruption, significantly improving the efficiency of logistics nodes and reducing labor costs and risks. It is unaffected by weather or personnel conditions.
[0036] 4. High adaptability and robustness: This solution uses real-time 3D vision for perception, and the algorithm dynamically adapts to the unique shape of each "truck". Regardless of whether the grain pile is conical, trapezoidal, or irregularly raised, the system can automatically adjust the sampling strategy to ensure that all sampling points are effective and representative, easily handling irregular grain pile shapes.
[0037] 5. Standardization and Digital Management:
[0038] The execution process of this solution is strictly defined by programs and algorithms, achieving an industrial-grade level of standardization. Data is automatically collected throughout the entire process, generating structured digital reports, realizing full digitalization, visualization, and traceability of the inspection process, greatly improving the modernization level of grain quality supervision.
[0039] 6. Technology Integration and Scalability: It deeply integrates three cutting-edge technologies: 3D vision, AI, and robotics, to build an open technology platform. Future functionalities can be easily expanded, such as integrating near-infrared (NIR) sensors for "instant sampling and testing," or connecting to more advanced AI models to analyze anomalies within grain piles, demonstrating broad potential for technological evolution. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of the hardware composition structure of an AI-based intelligent planning system for the trajectory of grain pile sampling points in a vehicle, provided in an embodiment of the present invention.
[0042] Figure 2 This is a schematic diagram of the software system architecture provided in an embodiment of the present invention;
[0043] Figure 3 This is a schematic diagram of the flow mechanism of the dynamic random optimal sampling point planning algorithm provided in the embodiment of the present invention;
[0044] Figure 4 This is a schematic diagram of the iterative process provided in an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of the process mechanism of the motion path planning module provided in an embodiment of the present invention;
[0046] Figure 6 This is a flowchart illustrating an AI-based intelligent planning method for the trajectory of grain pile sampling points in a vehicle, as provided in an embodiment of the present invention.
[0047] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0048] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0049] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0050] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0051] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0052] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0053] This solution aims to achieve fully automated, adaptive, randomized, and optimized planning of sampling points and movement trajectories for grain piles in automobiles by integrating 3D vision, artificial intelligence, and robot control technologies, thereby fundamentally improving the scientific rigor, fairness, anti-cheating measures, and operational efficiency of sampling.
[0054] I. Overall Hardware and Software Components of the System
[0055] This system is a comprehensive mechatronics system integrating sensing, decision-making, and execution. Its overall architecture is as follows: Figure 1 As shown.
[0056] (I) Hardware System Composition
[0057] 1.1 Perception Subsystem
[0058] Core hardware:
[0059] 3D vision sensor array: Employs multiple high-precision LiDAR and / or depth cameras (such as structured light or ToF cameras). Deployed above and to both sides of the sampling station, it forms a multi-view scanning network to ensure comprehensive coverage of the entire cargo area of a typical vehicle without blind spots.
[0060] Auxiliary positioning sensor:
[0061] Vehicle outline recognition camera (2D): Used to quickly identify vehicle type, wheelbase, and approximate parking location.
[0062] RFID reader / license plate recognition camera: used to bind vehicle information and sampling tasks.
[0063] High-precision RTK-GNSS receiver or UWB positioning base station (optional): used for global positioning of mobile robots in large areas.
[0064] Data communication connection:
[0065] The 3D sensor transmits raw point cloud / depth map data in real time to the data acquisition card in the central computing unit or directly through a network switch via a high-speed interface such as GigE Vision or USB 3.0.
[0066] Auxiliary sensor data is uploaded to the central control unit via Ethernet or RS-485 / 232 serial port.
[0067] 1.2 Decision-making and planning subsystem (core computing platform)
[0068] Core hardware: Industrial-grade edge computing server / high-end industrial control computer (central control and computing unit).
[0069] CPU: A high-performance multi-core processor used for point cloud processing and logic control.
[0070] GPU: Equipped with a high-performance NVIDIA GPU (such as RTX A5000 / A6000 or Jetson AGX Orin series) to run AI models and perform real-time inference.
[0071] Memory: High-capacity DDR4 / DDR5 RAM (≥32GB).
[0072] Storage: High-speed NVMe SSDs are used to store the system, algorithm library, model, and temporary data.
[0073] Data communication connection:
[0074] Interconnected with the sensing subsystem and execution control subsystem via gigabit / 10-gigabit Ethernet switches.
[0075] Low-latency, high-synchronization control command communication is achieved with the execution control subsystem via real-time industrial Ethernet bus (such as EtherCAT, PROFINET IRT) or high-speed fieldbus.
[0076] 1.3 Execution Control Subsystem
[0077] Core hardware:
[0078] Sampling robot body: Options available depending on the application scenario:
[0079] A high-precision industrial robotic arm with six degrees of freedom (6-DOF) can be mounted on a fixed base or a mobile AGV.
[0080] The gantry-type Cartesian coordinate robot (XYZ three axes) is suitable for fixed workstations and has a strong structural rigidity.
[0081] End effector (sampler): an electric or pneumatic deep sampler with functions of rotation, insertion, extraction, and cleaning.
[0082] Motion controller: A high-performance multi-axis motion controller (such as Beckhoff TwinCAT, KUKA KRC, or a PC-based software control system) is responsible for receiving trajectory commands, performing interpolation calculations in joint space / Cartesian space, and servo control.
[0083] Servo drive unit and motor: drive the precise positioning and movement of each joint / axis of the robot.
[0084] Data communication connection:
[0085] The motion controller connects all servo drives in a daisy chain via real-time industrial Ethernet (EtherCAT) to achieve microsecond-level synchronous control cycles.
[0086] The motion controller transmits advanced commands (target points, path points) and provides status information via Ethernet to the central computing unit.
[0087] (ii) Software System
[0088] Software architecture such as Figure 2 As shown, a layered design is adopted, including the following functional layers:
[0089] 1. Driver and Communication Layer: Responsible for hardware drivers, sensor data acquisition, and bus communication protocol stack.
[0090] 2. Data Perception and Fusion Layer: The data perception and fusion layer is the core link connecting the perception hardware and the AI decision-making layer. It is responsible for transforming raw sensor data into structured 3D semantic information, providing accurate spatial input for subsequent sampling point planning and path generation. It includes a point cloud preprocessing module and a grain pile 3D reconstruction module.
[0091] 2.1 Point Cloud Preprocessing Module: Performs filtering (statistical filtering, voxel filtering downsampling), registration (multi-view point cloud alignment), noise reduction, and background removal (removal of ground and fixed facilities) on multi-source 3D point clouds, outputting high-quality "clean point clouds".
[0092] (1). Multi-source point cloud filtering
[0093] Statistical filtering: By calculating the average distance and standard deviation within the neighborhood of each point, "flying points" with abnormal distances (such as dust in the air or sensor noise) are eliminated. For example, setting the number of neighborhood points to 50 and the standard deviation threshold to 1.5 can effectively remove more than 95% of isolated noise points.
[0094] Voxel filtering downsampling: The point cloud space is divided into voxels of a fixed size (e.g., 0.05m×0.05m×0.05m), and each voxel retains a representative point (e.g., the centroid point). While ensuring geometric features, the number of point clouds is reduced (usually from 108 levels to 105 levels), thus improving the efficiency of subsequent processing.
[0095] (2). Multi-view point cloud registration
[0096] Objective: To unify the point clouds collected by different sensors (such as lidar above and to the sides of the workstation) into the same coordinate system (such as the world coordinate system) to eliminate spatial misalignment caused by differences in perspective.
[0097] Method: The ICP (Iterative Closest Point) algorithm or feature matching (such as FPFH features) is used to achieve alignment by minimizing the distance error between point clouds. For example, the point cloud registration of a truck's grain pile from the front, rear, and sides can be controlled within ±3mm.
[0098] (3). Background removal
[0099] Objective: To remove non-grain pile areas (such as the ground, carriage chassis, and fixed facilities) from the point cloud, and retain only the point cloud of the carriage and grain pile.
[0100] Methods: Combining semantic information from 2D vehicle contour cameras (such as the vehicle's bounding box) and 3D geometric features (such as ground plane fitting), background filtering is achieved through region growing or thresholding. For example, the RANSAC algorithm is used to fit the ground plane and remove point clouds with Z coordinates lower than the vehicle's floor.
[0101] Output: Clean point cloud (P_clean) after filtering, registration, and denoising, providing input for 3D reconstruction.
[0102] 2.2 Grain Pile 3D Reconstruction Module: Performs surface reconstruction (such as Poisson reconstruction and triangulation) on the registered point cloud, transforms the discrete point cloud into a continuous 3D surface model, realizes the digital expression of the grain pile morphology, generates a continuous 3D surface model (Mesh) of the grain pile, and estimates the total volume.
[0103] (1). Surface reconstruction
[0104] Poisson Reconstruction: Based on the normal vector information of point clouds, a closed 3D mesh is generated by solving the Poisson equation. It is suitable for smooth grain pile morphology. For example, Poisson reconstruction of wheat grain pile point clouds can generate a fine model containing more than 100,000 triangular facets with a surface error of <0.02m.
[0105] Triangulation reconstruction: The point cloud is directly connected into a triangular mesh through Delaunay triangulation. It is suitable for irregularly raised grain piles and has a fast reconstruction speed (single frame processing time <1 second).
[0106] (2). Volume estimation
[0107] Method: Based on the reconstructed mesh model, the volume of the grain pile is calculated by voxelizing or tetrahedralizing the mesh. For example, the mesh model is divided into 1 cm³ voxels, the number of voxels contained inside the grain pile is counted, and the reasonableness of the volume is verified by combining vehicle tonnage information.
[0108] Output: A three-dimensional surface model (M_mesh) and volume estimate (V) of the grain pile, where M_mesh is used as input to the semantic segmentation model and V is used to calculate the number of sampling points under the national standard rules (e.g., N=ceil(V / basic volume unit)).
[0109] The point cloud preprocessing module receives raw point cloud data from the sensing subsystem (transmitted via GigE Vision / USB3.0 interface).
[0110] The preprocessed clean point cloud (P_clean) is directly input into the grain pile 3D reconstruction module as the data source for surface reconstruction.
[0111] The generated 3D mesh model (M_mesh) is used on the one hand for the semantic segmentation model of the grain pile (extracting the effective sampling region A_valid), and on the other hand for collision detection in the motion path planning module (such as avoiding collisions between the robotic arm and the carriage).
[0112] Example: After a truck loaded with rice enters the workstation, a 3D sensor array collects the original point cloud (containing 1.2 million points), which is then downsampled to 300,000 points through voxel filtering. The multi-view data is then aligned through ICP registration. After removing the point clouds of the ground and the truck floor, a Poisson reconstruction is used to generate a Mesh model with an estimated volume of 38.2 m3. Finally, the model is output to the semantic segmentation model to extract the A_valid region.
[0113] Between the data perception and fusion layer and the perception layer: relying on the raw point cloud data provided by the 3D vision sensor array, the accuracy of the sensor (such as the angular resolution of 0.1° of LiDAR) directly affects the preprocessing and reconstruction quality.
[0114] Between the data perception and fusion layer and the AI decision-making layer: The 3D reconstruction model (M_mesh) is the core input for the semantic segmentation of grain piles. Its accuracy determines the accuracy of A_valid region extraction, which in turn affects the sampling point planning results of the DROSPA algorithm.
[0115] Through the above functions, the data perception and fusion layer realizes the transformation from "physical point cloud" to "digital model", providing a reliable spatial foundation for the system's intelligent decision-making.
[0116] 3. AI Decision-Making Layer (Core of this Solution):
[0117] 3.1 Semantic Segmentation Model for Grain Pile
[0118] The core of the grain pile semantic segmentation model is a point cloud segmentation network based on deep learning (such as PointNet++, RandLA-Net) to identify and distinguish the grain pile surface, the boundary of the carriage, and possible irregular areas (such as depressions and impurity accumulation areas).
[0119] The construction process and operation mechanism of the grain pile semantic segmentation model are as follows:
[0120] Model building process:
[0121] 1) Data Collection and Labeling: A large amount of grain pile point cloud data was collected from different scenarios, covering various vehicle types (such as trucks and trailers), grain pile shapes (conical, trapezoidal, irregular bulges), lighting conditions, and grain types (rice, wheat, etc.). The original point clouds were manually labeled to mark semantic categories such as "grain pile surface", "truck side panel", "truck floor", and "non-grain pile objects" to construct a training dataset.
[0122] 2) The network architecture chosen is a deep learning-based point cloud segmentation network, such as PointNet++ or RandLA-Net. These networks can directly process 3D point cloud data and capture local geometric features and global contextual information through multilayer perceptrons (MLPs) and attention mechanisms, making them suitable for semantic segmentation of unstructured scenes such as grain piles.
[0123] 3) Model training and optimization
[0124] Input preprocessing: Downsampling, denoising, and coordinate normalization are performed on the original point cloud to enhance data robustness.
[0125] Training strategy: Use the cross-entropy loss function in conjunction with the Adam optimizer to train the model parameters through multiple rounds of iteration. Introduce data augmentation techniques (such as random rotation, translation, and noise addition) to improve the model's generalization ability.
[0126] 4) Performance evaluation: The segmentation effect of the model is verified by indicators such as intersection-over-union ratio (IoU) and accuracy, and targeted optimization is carried out for misclassified samples (such as confusion between grain piles and wagons).
[0127] The model's operating mechanism is as follows:
[0128] 1) Input data: The model receives a pre-processed 3D mesh model of the grain pile (M_mesh) or key point cloud (P_key), which comes from the multi-sensor fusion and 3D reconstruction results of the perception subsystem;
[0129] 2) Feature extraction and classification
[0130] Local feature learning: By using the SetAbstraction layer of PointNet++ or the local feature aggregation module of RandLA-Net, features are extracted from the neighborhood of each point to capture geometric properties such as curvature and normal vector of the grain pile surface.
[0131] 3) Semantic classification: The extracted features are input into a fully connected layer, and the class probability of each point / patch is output (e.g., "grain pile surface" probability 0.95, "carriage panel" probability 0.03). Finally, the semantic label is obtained through the Softmax function.
[0132] 4) Valid Region Extraction: Based on the classification results, regions labeled "grain pile surface" and whose upward normal component is greater than the threshold (to avoid misclassifying sides) are selected to form the valid sampling region A_valid. Simultaneously, the grain pile volume V is estimated. This process provides precise spatial constraints for subsequent sampling point planning.
[0133] By leveraging the deep learning model's ability to understand 3D geometric data, the system distinguishes between grain piles and non-grain pile areas from point clouds, achieving a mapping from physical space to semantic space. It automatically eliminates invalid areas such as the carriage structure and the ground, ensuring that sampling points are distributed only on the actual grain pile surface, preventing the robot from performing invalid actions, and improving sampling accuracy.
[0134] Example: Taking a wheat truck sampling scenario at a grain depot as an example, the practical application effect of the grain pile semantic segmentation model is verified.
[0135] 1) Data Acquisition and Preprocessing: A 3D LiDAR scanner was used to scan the grain pile of a Jiefang J7 truck fully loaded with wheat to obtain raw point cloud data (containing 1,200,000 points) with a point cloud density of 100 points / cm². The number of point clouds was reduced to 300,000 points through voxel downsampling. Statistical filtering was used to remove background noise outside the truck bed (filter radius 0.1m, standard deviation threshold 1.5), and the coordinate system was converted to a local coordinate system with the center of the truck bed floor as the origin.
[0136] 2) Model Input and Inference: The preprocessed point cloud was input into the trained RandLA-Net model (input resolution 0.05m, batch size=8, training iterations 50 rounds). The model extracts the normal vector (average deviation <3°) and curvature features (mean square error <0.02mm-1) of the grain pile surface through a 5-layer local feature aggregation module, and outputs semantic labels after Softmax classification.
[0137] 3) Segmentation Results and Validation: The model output 89,642 labels for "grain pile surface" (29.9%), 15,321 labels for "carriage side panel" (5.1%), and 2,107 labels for "non-grain pile objects" (0.7%). Validated by manually annotated 1000 verification points, the overall classification accuracy reached 96.3%, with an IoU value of 0.92 for the grain pile surface and a carriage boundary discrimination accuracy of 98.7% (misclassified points were mainly concentrated in the transition area where the grain pile and carriage meet).
[0138] 4) Valid Region Extraction: Grain pile surface points with a Z-component normal vector > 0.8 (corresponding to a tilt angle < 36.9°) were selected to generate a valid sampling region A_valid, with an area of approximately 12.6 m² and an estimated volume of 38.2 m³ (an error of 1.06% compared to the manually measured value of 37.8 m³). This region excluded interference from the wagon bed (1.2 m high) and the ground, providing precise spatial constraints for the subsequent DROSPA algorithm.
[0139] 5) Engineering application results: In a continuous sampling operation of 100 truckloads of wheat, the model took an average processing time of 2.3 seconds per truckload, the accuracy of effective area extraction remained stable at over 95%, and there were no invalid robot actions due to misjudgment. Compared with the traditional manual area delineation method, the efficiency of sampling point planning was improved by 40%, and the sampling representativeness index (coefficient of variation) was reduced to 0.08.
[0140] 3.2 Dynamic Random Optimal Sampling Point Planning Algorithm (DROSPA)
[0141] The core algorithm proposed in this scheme—the Dynamic Random Optimal Sampling Point Planning Algorithm—generates the optimal set of random sampling points in real time based on the reconstruction model, segmentation results, and national standard rules. The core objective of the DROSPA algorithm is to generate an optimal set of sampling points within the effective area A_valid of the grain pile that satisfies constraints of spatial representativeness (covering different depths and regions), randomness (anti-cheating), and robot reachability. It simulates a physical process: randomly "scattering" points within a grain pile, but the distribution of these points is constrained by an energy function that encourages points to cluster in "important" areas while preventing them from being too densely packed together. Its core idea is to simulate the "energy constraint" in the physical process through importance sampling and exclusion volume optimization, ensuring that sampled points cluster in "important areas" while maintaining spatial dispersion.
[0142] like Figure 3 As shown, the algorithm consists of three key steps: spatial discretization and weight graph generation, iterative Monte Carlo sampling and optimization, and post-processing and output.
[0143] Step 1: Spatial Discretization and Weighted Graph Generation
[0144] 1) Voxelization: The valid region A_valid is uniformly divided into a set of small voxels V = {vj}. The center coordinates of each voxel vj are... The attributes include the semantic region to which it belongs (such as surface, middle layer, bottom layer, corner).
[0145] 2) Calculate the weight: Calculate a sampling weight wj for each voxel vj. This weight combines the depth factor, curvature factor, and spatial distribution factor. The formula is as follows:
[0146] ,in:
[0147] The sampling weight of voxel vj indicates that a higher value means the voxel is more likely to be selected as a sampling point. This weight serves as the probability basis for subsequent Monte Carlo sampling and determines the spatial distribution preference of sampling points. By combining three factors, sampling points are preferentially distributed in important regions (such as the middle layer and high curvature areas), while maintaining spatial uniformity through a rejection mechanism. Ultimately, this achieves the dual goals of "representativeness + randomness," providing a scientific basis for subsequent robotic sampling.
[0148] Depth weighting. Encourages uniform sampling along the vertical direction (Z-axis). For example,
[0149] , The Z-coordinate of the voxel center , These are the minimum and maximum Z coordinates of the effective area of the grain pile, respectively, to ensure that the sampling points are evenly distributed in the vertical direction of the grain pile (upper / middle / lower layers), avoiding concentration on the surface or bottom layer. Alternatively, a nonlinear function can be used to make the middle layer slightly more weighted to avoid sampling only the surface and bottom layers.
[0150] Voxel Center The absolute value of the curvature of the grain pile surface, i.e., curvature / shape weight. This is calculated... The average curvature of the nearby surface is used to estimate C( ) = |κ( )|, where κ is the estimated curvature. High curvature regions (such as the top, corners, and depressions of the grain pile) usually reflect grain loading characteristics or impurity accumulation, and their weight is increased to enhance sample representativeness.
[0151]
[0152] Spatial repulsion weights (updated during iteration) and the selected temporary point set The distance to the nearest point is inversely proportional to the square of the distance to avoid excessive point density. The denominator is the set of temporary points selected in the current iteration. Neutral Squared distance from the nearest point (voxel center) and Nearest point The square of the Euclidean distance, i.e. σ is a small constant to prevent division by zero and to prevent the denominator from being zero when the distance is zero. By being inversely proportional to the square of the distance to the selected points, it avoids overly dense sampling points and ensures spatial dispersion. This makes the algorithm tend to select locations that are relatively far from the already selected points, thus ensuring the spatial dispersion of the points.
[0153] α, β, γ: Adjustable hyperparameters used to balance the relative importance of the three objectives of depth, shape, and dispersion. α + β + γ = 1, and can be adjusted according to the needs of grain variety, inspection standards, etc. (For example, β can be increased in scenarios sensitive to impurities). By balancing the three objectives through hyperparameters α, β, and γ, the optimality of sampling points in terms of vertical distribution, morphological characteristics, and spatial dispersion is ensured. An example of a scenario-based adjustment strategy for α, β, and γ is as follows:
[0154] 1.1). Rice paddy scene
[0155] Grain characteristics: The outer shell of rice is relatively brittle, and areas with high curvature (such as the top and corners of the grain pile) are easily damaged by compression, which leads to distortion in the detection of "outer brown rice rate"; the shape of the grain pile is mostly conical or irregularly raised, and the density difference in the vertical direction is large, so it is necessary to focus on ensuring the representativeness of the middle layer sampling.
[0156] Parameter adjustments: α=0.45 (increase depth factor weight): Strengthen uniform sampling in the vertical direction (upper / middle / lower layers), avoiding concentration in easily damaged surface or bottom layers. β=0.15 (decrease curvature factor weight): Reduce sampling preference for high curvature areas (such as sharp corners), reducing interference from damaged rice grains on the sample. γ=0.4 (maintain spatial repulsion factor weight): Ensure point dispersion, avoiding error amplification caused by localized dense sampling.
[0157] 1.2). Wheat Scene
[0158] Grain characteristics: Wheat grains are hard and stable in shape. Areas with high curvature (such as edges and depressions) are not easily damaged and may accumulate impurities (such as wheat husks and dust). Grain piles are relatively regular in shape (such as trapezoids) and have a relatively uniform density distribution in the vertical direction, but impurities may be concentrated in specific areas.
[0159] Parameter adjustment: α=0.3 (reduce the weight of the depth factor): The requirement for vertical distribution uniformity is lower, which can reduce the dependence on depth.
[0160] β=0.4 (Increase curvature factor weight): Enhances sampling of high curvature regions, captures impurity aggregation characteristics, and improves sample representativeness. γ=0.3 (Decrease spatial repulsion factor weight): Allows for moderately dense sampling to cover local areas where impurities may be concentrated.
[0161] Summary of Adjusted Logic:
[0162] Grain seeds α (depth factor) β (curvature factor) γ (spatial repulsion) Core Objectives paddy High (0.45) Low (0.15) Medium (0.4) To avoid breakage and ensure vertical uniformity wheat Low (0.3) High (0.4) Low (0.3) Capture impurities and enhance morphological feature sampling
[0163] By dynamically adjusting α, β, and γ, the algorithm can adapt to the physical characteristics of different grains, achieving "scenario-based optimal sampling" and further improving the authenticity and reliability of the detection data.
[0164] This step constructs a dynamic "probability map" that quantifies the abstract goals of "representativeness" and "randomness" into the probability of selection for each spatial location.
[0165] Step 2: Iterative Monte Carlo Sampling and Optimization
[0166] Initialization: Clear temporary point sets = {}, sets the maximum number of iterations, MaxIter.
[0167] like Figure 4 As shown, the iterative process (for iter = 1 to MaxIter):
[0168] a. Weight-based random proposal: Based on the normalized weights wj / sum(w) of all current voxels, a voxel v_selected is randomly selected using the roulette wheel selection method, and its center c_selected is used as a candidate point p_candidate.
[0169] b. Reachability Filtering: Check if p_candidate is within the robot's workspace W_robot and if the end effector can reach it in a safe posture. If not, reject the candidate point and return to step a.
[0170] c. Energy Decision: Calculate the change in "energy" for accepting the candidate point. We define the total energy E(S) of a system, which consists of the "repulsive energy" between points and the "attractive energy" between a point and a "low-weight region". For a simplified decision, we can calculate the change in energy after p_candidate is added, compared to... The minimum distance d_min between all points.
[0171] Acceptance Criteria (Simulated Annealing Idea): Accept if d_min > d_threshold or exp(-ΔE / T) > rand(0,1), where d_threshold is a minimum spacing threshold calculated based on the grain pile size and N (preset number of sampling points) to ensure that the points are not too close together. ΔE is the energy change (approximately using a negative correlation function of distance), T is a gradually decreasing "temperature" parameter, and rand(0,1) is a random number between 0 and 1. Initially at high temperatures, even if d_min is small, there is a probability of acceptance, enhancing the exploratory nature; later at low temperatures, only proposals that make the point set more dispersed are accepted, enhancing convergence.
[0172] d. Update: If accepted, add p_candidate. And immediately update the weights wj of all voxels (mainly updating the spatial repulsion weights in the formula, because...). (Changed).
[0173] e. Terminate the check: if | If | = N, exit the iteration. If MaxIter is not full by the time it is reached, the planning fails, and parameters need to be adjusted or an alarm needs to be triggered.
[0174] Step 3: Post-processing and Output
[0175] Fine-tuning: The points in Stemp are projected onto the grain pile surface model M_semantic. The points in Stemp are then slightly adjusted to be precisely located on the grain pile surface model M_semantic (by projecting along the point normal or searching for the nearest surface point), ensuring that they are precisely located on the grain pile surface.
[0176] Sorting: Based on the needs of the path planning module, sorting... The points in the path are spatially sorted (e.g., by the nearest neighbor method or the approximate solution to the traveling salesman problem) to generate the most efficient access order. The access order of the points is optimized by the nearest neighbor method or the approximate solution to the traveling salesman problem to improve the path efficiency.
[0177] Output: Final sampling point set .
[0178] The perception layer relies on the semantic segmentation result A_valid to define the sampling space; the segmentation accuracy directly affects the algorithm's foundation. The robot model needs to query the robot's kinematics model and workspace W_robot during reachability filtering. The output... As input to the path planning module, it collaboratively achieves "scientific location + efficient trajectory".
[0179] It has the following technical advantages:
[0180] Representativeness: Ensure point coverage of the upper / middle / lower and edge / middle / corner areas of the grain pile through depth and curvature factor;
[0181] Anti-cheating: Random seeds and probability sampling make the distribution of points unpredictable, eliminating targeted doping;
[0182] Feasibility: By incorporating robot workspace constraints, ensure that all points are safely reachable.
[0183] 3.3 Motion path planning module: Based on robot kinematics and obstacle avoidance constraints, the sampling point sequence is planned into a time-optimal, smooth, and collision-free robot end-effector trajectory (joint space or Cartesian space path).
[0184] The motion path planning module is a key link connecting the AI decision-making layer and the execution control layer. Its core objective is to transform a discrete set of sampling points into a time-optimal, smooth, and collision-free motion trajectory that the robot can execute. Its working principle and operation mechanism are as follows:
[0185] (1) Core inputs and constraints
[0186] 1) Input data
[0187] Sampling point set: The final sampling point set output by the DROSPA algorithm. It contains the 3D coordinates of each point in the world coordinate system.
[0188] Environmental Model: 3D Mesh Model of Grain Pile Vehicle outline model, robot workspace boundary .
[0189] Robot parameters: Kinematic model of the robotic arm (such as DH parameters), joint velocity / acceleration limits, end effector posture constraints.
[0190] 2) Core Constraints
[0191] Collision-free constraints: The trajectory must avoid obstacles such as grain piles, carriages, and the ground to ensure that the robotic arm does not collide during its movement.
[0192] Kinematic constraints: satisfy the physical limitations of the robot's joint angle range, speed, and acceleration to avoid joint over-limit or violent movement.
[0193] Time optimization: Minimize the total motion time while satisfying constraints to improve work efficiency.
[0194] (2) Operating mechanism and key steps, as follows Figure 5 As shown
[0195] Step 1: Path Search and Optimization (Coarse Planning)
[0196] Objective: Determine the access order and collision-free path from the starting point (safe standby position) to all sampling points.
[0197] Method: Sampling-based planning algorithms such as RRT (Rapid Exploratory Random Tree) or PRM (Probabilistic Roadmap) randomly sample feasible paths in the robot configuration space (C space) and find the optimal path through heuristic search.
[0198] Access order optimization: Using approximate solutions to the Traveling Salesman Problem (TSP) (such as genetic algorithms and simulated annealing), the access order of sampling points is optimized to reduce the total travel distance.
[0199] Output: A path skeleton containing key points (start point, sampling point, and end point).
[0200] Step 2: Trajectory Generation and Smoothing (Fine Planning)
[0201] Objective: To transform the path skeleton into a continuous, smooth robot end-effector trajectory.
[0202] Method: Cartesian space trajectory, using polynomial interpolation (such as 5th degree B spline) or Bézier curve to ensure the continuity of position, velocity, and acceleration (C2 continuity) and avoid robot arm vibration.
[0203] Joint space trajectory: The joint angles corresponding to each path point are solved by inverse kinematics, and then smooth interpolation (such as cubic splines) is performed in the joint space to ensure smooth joint movement.
[0204] Output: Discretized path point sequence It includes position, attitude, velocity, and timestamp information.
[0205] Step 3: Collision Detection and Verification
[0206] Objective: To ensure that the planned trajectory does not collide in physical space.
[0207] Method: Geometric collision detection is performed using axis-aligned bounding boxes (AABB) or oriented bounding boxes (OBB) to detect collisions between the robot model, the grain pile model, and environmental obstacles, and to determine in real time whether each point on the trajectory interferes with the obstacle.
[0208] Simulation verification: Simulate the trajectory execution process in a virtual environment and visually check whether the robotic arm's movement is smooth and free of singularities (such as joint angles approaching their limits).
[0209] Output: Validated safe trajectory or conflict warning indicating need for replanning.
[0210] (3) Interaction logic with other modules
[0211] Input source: Receives output from the AI decision-making layer. Point set, relying on the 3D mesh model of grain pile provided by the data perception and fusion layer. Collision detection is performed.
[0212] Output destination: The discrete trajectory points are sent to the control and execution layer, where the trajectory interpolation module converts them into a sequence of position commands for the robot joints.
[0213] Feedback mechanism: If the sensor detects environmental changes (such as abnormal grain pile shape) during execution, the module can trigger dynamic replanning to ensure that the trajectory adapts to the new scenario in real time.
[0214] Through TSP optimization and velocity planning, the total motion time can be reduced by 20%-30% compared to fixed-sequence sampling. Combined with collision detection using a 3D model, physical interference between the robotic arm and vehicles or grain piles is avoided, reducing the failure rate to below 0.1%. Through high-order polynomial interpolation, the maximum acceleration at the robotic arm's end effector is controlled within 0.5 m / s², minimizing disturbance to the grain pile and equipment wear.
[0215] Through the above mechanism, the motion path planning module realizes the transformation from "discrete points" to "continuous trajectories", providing accurate, efficient and safe motion guidance for fully automated robot sampling.
[0216] (III) The execution logic of the algorithm and the hardware / software system is as follows:
[0217] 1. With the Perception Layer: The algorithm directly consumes M_semantic and A_valid output from the Perception Layer. The accuracy of semantic segmentation directly affects the definition of A_valid, thus determining the basic search space of the algorithm.
[0218] 2. Robot Model: The algorithm needs to query the robot's kinematic model and workspace W_robot during the "reachability filtering" step. This requires the software system to maintain an accurate geometric and kinematic description of the robot.
[0219] With path planning: DROSPA output It is the input to the path planning module. The two are decoupled but also work together: DROSPA ensures the scientific nature and randomness of the points; path planning is responsible for transforming the points into safe and efficient robot movements.
[0220] 3. Human-computer interaction: Algorithm parameters (α, β, γ, N, d_threshold, etc.) can be fine-tuned by the operator through HMI according to the grain variety and inspection purpose, realizing a certain degree of customized sampling strategy.
[0221] 4. Control and Execution Layer:
[0222] Robot inverse kinematics / trajectory interpolation module: converts the end effector path into a sequence of servo position commands for each joint / axis.
[0223] Real-time control and status monitoring module: issues commands and monitors the robot's status and sensor feedback in real time to achieve safety interlocks and abnormal handling.
[0224] 5. Human-Computer Interaction and Data Management Layer:
[0225] Graphical User Interface (HMI): Displays a 3D model of the grain pile, planned locations, real-time video, and task progress.
[0226] Task Management and Database: Manage vehicle information, sampling plans, historical data, and model versions.
[0227] (iv) Hardware-software interaction process and control logic
[0228] 1. Initialization and Readiness:
[0229] The software system starts up and loads the AI model, path planning parameters, robot model, and kinematic parameters.
[0230] The control system is powered on, the servo is enabled, the robot performs a homing operation, and moves to a safe standby position;
[0231] The 3D sensor is activated to perform intrinsic parameter calibration and on-site extrinsic parameter calibration (hand-eye calibration / world coordinate system calibration).
[0232] Vehicle guidance and information binding:
[0233] When a vehicle enters the workstation, the auxiliary camera identifies the license plate / RFID, and the HMI interface creates a new sampling task and binds the vehicle information.
[0234] The software guides the driver to park the vehicle in the optimal scanning area via audio-visual indicators or an HMI.
[0235] 3. Sensing data acquisition and triggering:
[0236] After the vehicle comes to a complete stop, the software determines that the vehicle is in position by using signals from the vehicle contour camera or ground loop coil, triggering a synchronous scan of the 3D sensor array.
[0237] All 3D sensors complete the acquisition of a complete frame of point cloud data in a very short time (< 2 seconds) and transmit it to the data perception and fusion layer via the network.
[0238] 4. AI Decision-Making Process (Core Software Processing):
[0239] 4.1 Point Cloud Processing: The driving and communication layer receives the raw data, and the data perception and fusion layer performs preprocessing and 3D reconstruction to generate an accurate 3D model of the grain pile, M_mesh.
[0240] 4.2 Semantic Segmentation: Input the M_mesh or key point cloud P_cloud into the grain pile semantic segmentation model deployed on the GPU. The model outputs the probability of the category to which each point / patch belongs, and finally obtains a 3D model M_semantic with semantic labels, which distinguishes between "valid grain pile areas" A_valid and "invalid areas (cargo panels, gaps, etc.)" A_invalid.
[0241] 4.3 Dynamic stochastic optimal sampling point planning:
[0242] The algorithm reads national standard rules (such as the number of sampling points N = f(V) estimated based on the volume V of the grain pile).
[0243] Based on A_valid, run the DROSPA algorithm to output the final sample point set. Each point pi = (xi, yi, zi) contains its 3D coordinates in the world coordinate system.
[0244] 4.4 Motion Path Planning:
[0245] Will Input path planning module. This module considers the robot's workspace, joint constraints, and collision detection with the vehicle / environment model to plan a collision-free, time-optimal trajectory T(t) for the end effector, sequentially passing through all points pi (or an optimized access order). The trajectory T(t) is discretized into a series of high-density path points {wp1, wp2, ...}, containing position, orientation, velocity, and time information.
[0246] 5. Issuance and execution of control commands:
[0247] After the planning is completed, the trajectory interpolation module of the control and execution layer converts the path point sequence {wpk} into the angle / position sequence {θk} of each joint of the robot.
[0248] The real-time control module sends {θk} to the motion controller via a real-time Ethernet bus in either Cyclic Synchronous Position Mode (CSP) or Contour Position Mode (CP).
[0249] Within each control cycle (typically 1ms or less), the motion controller calculates the torque / speed command based on the received position command, combined with feedforward and feedback control algorithms, and sends it to the corresponding servo driver via EtherCAT.
[0250] The servo driver drives the motor to move precisely, causing the robotic arm to move along the planned trajectory.
[0251] When the end effector reaches directly above the pre-sampling point, the software sends a series of action commands (via digital I / O or bus communication) to the PLC or I / O module of the end effector, such as descent, rotation, insertion, extraction, lifting, and cleaning, to complete single-point sampling.
[0252] 6. Looping and Termination:
[0253] Repeat step 5 until all N points have been sampled.
[0254] The robot returns to a safe standby position, and the software controls the automatic dispensing and labeling of samples, and generates a sampling report (including 3D model diagram, sampling point distribution map, vehicle information, etc.).
[0255] The system is ready and waiting for the next vehicle.
[0256] II. An AI-based intelligent trajectory planning method for grain pile sampling points in automobiles.
[0257] like Figure 6 As shown, the implementation steps of the above system are as follows:
[0258] Step 1: System Deployment and Calibration
[0259] 1. At the sampling station, install the 3D sensor array, robotic arm, and protective facilities according to the design drawings.
[0260] 2. Connect the power, network, and bus of all hardware devices.
[0261] 3. Run the calibration software: First, perform intrinsic parameter calibration for each 3D sensor; then perform hand-eye calibration (determine the relationship between the robotic arm end effector and the tool coordinate system) and multi-sensor extrinsic parameter calibration (unify all sensors to the world coordinate system). Use a high-precision calibration board or calibration object.
[0262] 4. Measure and input the position of the robot base in the world coordinate system, and establish a complete transformation chain from world coordinates to robot coordinates.
[0263] Technical Principle: Through rigorous geometric calibration, a precise transformation relationship is established between the three spatial coordinate systems (sensor coordinate system, world coordinate system, and robot coordinate system) for perception, decision-making, and execution. This forms the mathematical foundation for the accurate registration and execution of all subsequent perception, planning, and control processes. It ensures that the sampling point coordinates pi calculated by the algorithm can be precisely executed by the robot, with errors controlled within the millimeter level.
[0264] Step Two: Vehicle Entry and Information Registration
[0265] 1. The vehicle drives toward the sampling area, triggering the entrance sensor.
[0266] 2. RFID readers automatically read vehicle tags, or license plate recognition cameras capture license plates. The system creates pending tasks in the background database, associating them with vehicle information (license plate, vehicle type, cargo owner, expected grain type, etc.).
[0267] 3. The guidance screen directs the driver to the precise parking space.
[0268] Technical principle: Utilizing automatic identification technology enables contactless and automated binding of task information, reducing human input errors and laying a data foundation for end-to-end traceability. It improves process automation and achieves information management with "one file per vehicle."
[0269] Step 3: Rapid scanning and reconstruction of the 3D morphology of the grain pile
[0270] 1. Once the vehicle has come to a complete stop and the system confirms that it is in position, the central computing unit sends a synchronization trigger signal to all 3D sensors.
[0271] 2. The sensor acquires a complete frame of point cloud data P_raw in a very short time.
[0272] 3. The point cloud preprocessing module performs filtering (removing flying points), registration (fusion of multiple views), and background segmentation (removing ground, vehicle chassis, etc.) on P_raw to obtain a clean point cloud P_clean containing only the carriages and grain piles.
[0273] 4. The 3D reconstruction module performs surface reconstruction on P_clean to generate a continuous triangular mesh model M_mesh.
[0274] Technical Principles: Multi-sensor synchronous elimination of motion blur; point cloud registration algorithms (such as ICP, feature matching) align data from different perspectives; surface reconstruction algorithms (such as Poisson reconstruction) infer continuous geometric surfaces from discrete point clouds. A high-precision digital 3D model of the grain pile is obtained within seconds, providing realistic geometric input for subsequent intelligent analysis and overcoming the inaccuracies of manual estimation.
[0275] Step 4: AI-based semantic segmentation and effective region extraction
[0276] 1. Input M_mesh or the keypoint set P_key sampled from P_clean into the pre-trained grain pile semantic segmentation neural network.
[0277] 2. The neural network classifies each point / surface and outputs a category label (e.g., grain pile surface, carriage side panel, carriage floor, non-grain pile object).
[0278] 3. Based on the classification results, the software extracts the set of all faces labeled as "grain pile surface" with a normal upward component greater than a threshold (to avoid selecting side surfaces), forming the valid sampling region A_valid. Simultaneously, the algorithm estimates the total volume V of the grain pile.
[0279] Technical Principle: Leveraging the powerful feature learning capabilities of deep learning models (such as PointNet++), the model directly understands scene semantics from 3D geometric data. This capability is acquired through training on a large amount of labeled data (point cloud data of various vehicle types, grain pile shapes, and lighting conditions). It intelligently distinguishes between "sampleable" grain and "unsampleable" vehicle structures, ensuring the planning algorithm operates only within the correct physical space and avoiding invalid or erroneous actions.
[0280] Step 5: Run the DROSPA algorithm to generate optimal random sampling points.
[0281] 1. The system automatically determines the number of sampling points N based on the estimated volume V, according to national standard GB 5491 or preset rules. For example, N = ceil(V / basic volume unit).
[0282] 2. Call the DROSPA algorithm module, and input M_semantic (including A_valid), N, W_robot and the current task ID as random seeds.
[0283] 3. The algorithm runs (as described in Chapter 3), and after iterative optimization, outputs the final set of sampling points. .
[0284] Technical Principle: The DROSPA algorithm integrates three major objectives—representativeness, randomness, and operability—into a computable optimization framework. It finds the optimal set of points that satisfy multiple objective constraints through probabilistic sampling and iterative optimization. The generated points are scientifically distributed in three-dimensional space (covering top, middle, bottom, edges, and corners), and are different each time (determined by a random seed, unpredictable), ensuring executability. This is the core of this scheme's enhanced scientific rigor and anti-cheating capabilities.
[0285] Step Six: Robot Motion Path Planning and Simulation Verification
[0286] 1. Path planning module receives .
[0287] 2. The module loads the robot's URDF model, the vehicle's 3D model (simplified), and the environmental obstacle model to build a complete collision detection scenario.
[0288] 3. Using a motion planning algorithm based on random sampling (such as RRT*, PRM) or an optimization algorithm for point-to-point motion, plan a path for the robotic arm's end effector to safely visit all points sequentially from the starting point. The system retrieves the continuous trajectory T(t) from the points in the path and finally returns the safe point. Simultaneously, the visiting order is optimized to reduce the total movement time.
[0289] 4. Perform motion simulation in the software and visually check whether the trajectory is smooth, without collisions, and without singularities.
[0290] Technical Principles: Motion planning searches for feasible paths in the robot's high-dimensional configuration space; collision detection uses axis-aligned bounding boxes (AABB) or more precise geometric intersection detection algorithms; trajectory optimization considers joint velocity and acceleration constraints. Transforming abstract sampling points into safe, reliable, and efficient robot motion commands is a crucial bridge connecting intelligent decision-making and physical execution, ensuring the safety and smoothness of the automation process.
[0291] Step 7: Trajectory Execution and Automated Sampling
[0292] 1. After the planning is verified to be correct, the central computing unit sends the trajectory data T(t) to the robot motion controller.
[0293] 2. The motion controller executes the trajectory, driving the robotic arm to move.
[0294] 3. When the robotic arm's end effector carrying the sampler reaches directly above the first target point, the central computing unit sends a "descent" command to the sampler via the I / O module. The sampler rotates and inserts into the grain pile to a preset depth (the depth can be adaptively set according to the relative height of the point in the grain pile).
[0295] 4. After reaching the specified depth, send the "extract" command to collect sub-samples, and then "lift" back to the safe height.
[0296] 5. Move to the discharge port, send the "clean" command, and inject the sample collected in one batch into the corresponding sample container or primary sample dispenser.
[0297] 6. Repeat steps 3-5 until all N points have been sampled.
[0298] Technical principle: Through high-precision multi-axis servo control and strict timing logic, the planned spatial trajectory and motion sequence are accurately reproduced in the physical world. This enables fully automated sampling operations with high repeatability and no human intervention, freeing up manpower and eliminating human fatigue and inconsistencies.
[0299] Step 8 (optional): Sample processing, data archiving, and report generation
[0300] 1. After sampling is completed, the robot returns to its original position. The automated sample sorting system will then divide, package, and label the mixed total sample (the label information is associated with the task ID).
[0301] 2. The system automatically generates a digital report for this sampling operation, which includes: vehicle information, sampling time, 3D grain pile model rendering (with sampling point locations marked), a list of sampling point coordinates, a path planning map, and key process logs.
[0302] 3. All data (raw point cloud, model, planning results, report) are uploaded to the central database for archiving, supporting multi-dimensional querying and backtracking by time, license plate, cargo owner, etc.
[0303] Technical Principle: Utilizing database technology and a report generation engine, this system achieves fully digital management of inspection process information. It establishes complete and tamper-proof digital traceability archives, greatly enhancing the transparency and credibility of the inspection process and providing irrefutable evidence for quality dispute arbitration.
[0304] In summary, this solution, through innovative system design, core algorithms, and detailed implementation steps, provides an intelligent solution that completely revolutionizes grain pile sampling operations in automobiles. It not only surpasses existing methods in all aspects of technical indicators, but also has significant social and economic value in ensuring food security, maintaining market fairness, and improving industry efficiency.
[0305] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention, such as... Figure 7 As shown, electronic device 410 may include a first processor 2001.
[0306] Optionally, the electronic device 410 may also include a memory 2002 and a transceiver 2003.
[0307] The first processor 2001, memory 2002, and transceiver 2003 can be connected via a communication bus.
[0308] The following is combined Figure 7 A detailed description of each component of electronic device 410 is provided below:
[0309] The first processor 2001 is the control center of the electronic device 410. It can be a single processor or a collective term for multiple processing elements. For example, the first processor 2001 can be one or more central processing units (CPUs), application-specific integrated circuits (ASICs), or one or more integrated circuits configured to implement embodiments of the present invention, such as one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs).
[0310] Optionally, the first processor 2001 can perform various functions of the electronic device 410 by running or executing software programs stored in the memory 2002 and calling data stored in the memory 2002.
[0311] In a specific implementation, as one example, the first processor 2001 may include one or more CPUs, for example... Figure 7 CPU0 and CPU1 are shown in the diagram.
[0312] In a specific implementation, as one example, the electronic device 410 may also include multiple processors, for example... Figure 7 The first processor 2001 and the second processor 2004 are shown in the diagram. Each of these processors can be a single-core processor or a multi-core processor. Here, a processor can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0313] The memory 2002 is used to store the software program that executes the present invention, and is controlled by the first processor 2001 to execute it. The specific implementation method can be referred to the above method embodiment, and will not be repeated here.
[0314] Optionally, the memory 2002 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 2002 may be integrated with the first processor 2001 or may exist independently and be connected via the interface circuit of the electronic device 410. Figure 7 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0315] The transceiver 2003 is used to communicate with network devices or with terminal devices.
[0316] Alternatively, transceiver 2003 may include a receiver and a transmitter. Figure 7 (Not shown separately). The receiver is used to implement the receiving function, and the transmitter is used to implement the transmitting function.
[0317] Optionally, the transceiver 2003 can be integrated with the first processor 2001, or it can exist independently and be connected via the interface circuit of the electronic device 410. Figure 7 (Not shown in the image) is coupled to the first processor 2001, and this embodiment of the invention does not specifically limit this.
[0318] It should be noted that, Figure 7 The structure of the electronic device 410 shown does not constitute a limitation on the router. Actual knowledge structure identification devices may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0319] Furthermore, the technical effects of the electronic device 410 can be referenced from the technical effects of the AI-based intelligent planning method for the trajectory of grain pile sampling points in automobiles described in the above method embodiments, and will not be repeated here.
[0320] It should be understood that the first processor 2001 in the embodiments of the present invention may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0321] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An AI-based intelligent trajectory planning system for grain pile sampling points in automobiles, characterized in that, include: The perception subsystem is used to collect three-dimensional point cloud data of the grain pile of the vehicle to be inspected. The decision-making and planning subsystem is communicatively connected to the perception subsystem and is used to process the three-dimensional point cloud data and generate the optimal set of random sampling points and the robot's motion trajectory. as well as The execution control subsystem is communicatively connected to the decision and planning subsystem and is used to control the sampling robot to perform automated sampling operations according to the motion trajectory.
2. The system according to claim 1, characterized in that, The decision-making and planning subsystem includes: The data perception and fusion module is used to preprocess, register and reconstruct the three-dimensional point cloud data to generate a continuous three-dimensional mesh model of the grain pile. The AI decision-making module, connected to the data perception and fusion module, is used to perform semantic segmentation on the 3D mesh model based on a deep learning model to extract effective sampling regions, and to run a dynamic random optimal sampling point planning algorithm to generate the optimal random sampling point set within the effective sampling regions; and The motion path planning module, connected to the AI decision module, is used to plan a collision-free and time-optimal end effector motion trajectory based on the optimal set of random sampling points, robot kinematic constraints, and environmental model.
3. The system according to claim 2, characterized in that, The dynamic stochastic optimal sampling point planning algorithm includes the following steps: S1. The effective sampling area is voxelized, and a comprehensive weight value is calculated for each voxel. The comprehensive weight value is a weighted sum of depth weight factor, curvature weight factor, and spatial repulsion weight factor. The depth weight factor is used to promote the uniform distribution of sampling points in the vertical direction of the grain pile, the curvature weight factor is used to increase the sampling probability of high curvature areas to enhance the capture of morphological features, and the spatial repulsion weight factor is used to avoid excessive density of sampling points based on the distance from the selected points. S2. Iterative Monte Carlo sampling is performed based on the weights of each voxel. In each iteration, candidate points are randomly selected according to the weights, and the robot accessibility constraints and simulated annealing criteria are combined to determine whether to accept the candidate point and add it to the temporary point set. At the same time, the weights of each voxel are dynamically updated until the number of selected points reaches the preset value. S3. Project the points in the temporary point set onto the surface of the grain pile, perform spatial sorting, and output the final optimal random sampling point set.
4. The system according to claim 2, characterized in that, The motion path planning module is configured to: use a path search algorithm based on random sampling to search for a collision-free path in the robot configuration space, optimize the access order of the optimal random sampling point set using an approximate solution to the traveling salesman problem, and then generate a smooth and continuous end trajectory through trajectory interpolation.
5. The system according to claim 2, characterized in that, The semantic segmentation model in the AI decision module is a point cloud segmentation network based on deep learning. It automatically identifies and segments the surface area of the grain pile by extracting local features and understanding global semantics from the input three-dimensional geometric data, while filtering out invalid areas such as the carriage structure.
6. The system according to any one of claims 1-5, characterized in that, The perception subsystem includes multiple lidar and / or depth cameras deployed at the sampling station, forming a multi-view three-dimensional vision sensor array, used to synchronously collect high-precision point cloud data covering the entire cargo compartment area.
7. The system according to any one of claims 1-5, characterized in that, The execution control subsystem includes a multi-degree-of-freedom robotic arm, a deep sampler installed at the end of the robotic arm, and a motion controller; the motion controller is used to receive the motion trajectory instructions and drive the robotic arm and the sampler to coordinate and complete the action sequence of positioning, insertion, extraction and cleaning.
8. The system according to claim 2, characterized in that, The data perception and fusion module includes a point cloud preprocessing unit and a 3D reconstruction unit; the point cloud preprocessing unit is used to filter, register and remove the background of multi-source point clouds to output a clean grain pile point cloud; the 3D reconstruction unit is used to reconstruct the clean point cloud into a continuous triangular mesh surface model.
9. The system according to claim 1, characterized in that, It also includes a human-computer interaction and data management subsystem, which includes a graphical user interface and a task database for vehicle information binding, task management, parameter configuration, visualization of 3D models and planning results, and archiving and report generation of sampled data.
10. An AI-based intelligent planning method for the trajectory of sampling points in grain piles for automobiles, characterized in that, Includes the following steps: Raw point cloud data of the grain pile in the truck was collected using a 3D vision sensor. The original point cloud data is preprocessed and three-dimensionally reconstructed to generate a digital surface model of the grain pile. The digital surface model is processed using an AI semantic segmentation model to extract the effective sampling area; Within the effective sampling area, a dynamic random optimal sampling point planning algorithm is run to generate an optimal random sampling point set that satisfies the constraints of spatial representativeness, randomness, and robot executability. Based on the optimal set of random sampling points, combined with the robot kinematics model and environmental obstacle information, a collision-free and time-optimal robot motion trajectory is planned. The sampling robot is controlled to perform automated sampling operations according to the stated motion trajectory.