Container grain sampling method
By using automated grain sampling equipment and the Fisher-Yates shuffling algorithm in container shipping, the problem of insufficient sample representativeness in manual sampling methods has been solved, achieving an efficient and low-loss sampling process.
Patent Information
- Application Number
- CN202511415329.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2025-11-07
AI Technical Summary
The existing manual sampling method for bagged grain transported in containers has problems such as insufficient sample representativeness, time-consuming and labor-intensive process, high loss rate, and long logistics and customs clearance time.
An automated grain sampling device was used to scan the container and establish a digital three-dimensional coordinate model. The container was divided into nine spatial areas of the same size. Sampling points were selected using a random selection algorithm and a Fisher-Yates shuffling algorithm to ensure the uniformity and representativeness of the sampling points.
It improves sampling efficiency, reduces human subjective bias, ensures sample representativeness, and reduces losses and logistics clearance time.
Smart Images

Figure CN120907906A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of grain inspection and quarantine, and particularly relates to a container grain sampling method. BACKGROUND
[0002] In the field of entry and exit grain inspection and quarantine, sampling and inspection of container bagged grain is a key link to ensure grain quality and safety and prevent harmful organisms from entering or leaving.
[0003] In the prior art, container bagged grain needs to be sampled by unloading or transported and unloaded according to warehouse stacking standards. Usually, manual sampling is adopted, but it is verified by practice that manual sampling is greatly affected by personal subjectivity, for example, an operator may directly ignore a low position or a position inconvenient to move due to physical reasons. Moreover, manual sampling involves many sampling points, and sampling in this way is time-consuming and laborious, and the uniformity of this manual sampling method is relatively poor, and the representativeness of the sample cannot be reflected, that is, the representativeness of the sample is insufficient. This sampling method not only leads to a high risk of deviation of inspection and quarantine results (such as missing moldy particles and harmful organism eggs), but also increases grain loss (loss rate usually reaches 1%-3%) and logistics customs clearance time (single box sampling takes 2-4 hours) due to unloading, transportation and other operations, which restricts the efficient circulation of grain trade. SUMMARY
[0004] The container grain sampling method provided by the embodiments of the present application aims to solve the problem of poor practicability caused by the fact that the statistical representativeness cannot be reflected by the manual sampling method used in the existing sampling and inspection process of container bagged grain.
[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present application is to provide a container grain sampling method, which comprises the following steps in sequence: S100, scanning a container to be detected by a grain automatic sampling device; S200, establishing a digital three-dimensional coordinate model based on scanning data, and dividing the container to be detected into nine spatial regions of the same size; then randomly setting one pre-sampling point in each of the spatial regions by a random selection algorithm; S300, the grain automatic sampling device selects seven actual sampling points from the nine pre-sampling points by Fisher-Yates shuffling algorithm; in the seven selected actual sampling points, any one of the actual sampling points is set as a first sampling point, and the distances from at least two of the actual sampling points adjacent to the first sampling point to the first sampling point are the same; S400, the grain automatic sampling device samples at the open side of the container to be detected, and the sample taken is stored after being mixed according to the specified requirements.
[0006] In a possible implementation, in the S200 step, the nine space regions are a 3*3 space grid orthogonally distributed along the length direction and the height direction of the container to be detected.
[0007] In a possible implementation, the grain automatic sampling device used comprises: a device body, the bottom of which is provided with a walking module; a sampling rod, one end of which is a sampling end; a lifting assembly arranged on the device body, having a mounting platform that can be lifted along the vertical direction and to which the horizontally arranged sampling rod is connected; a sampling storage system arranged on the device body and connected to the other end of the sampling rod, used for negative pressure sampling and storage after the sampling end reaches the actual sampling point; a matched control unit used for controlling the walking module to drive the device body to move, and for scanning the container to be detected during the movement, and for dividing the sampling region and the sampling point; and then for automatically sampling through the sampling rod, the lifting assembly and the sampling storage system.
[0008] In a possible implementation, one of the corner points of the bottom of the container to be detected is the starting point of the walking route of the grain automatic sampling device.
[0009] In a possible implementation, the control unit comprises: a data acquisition module arranged on the device body; a data processing module in communication with the data acquisition module, used for processing the scanning data and establishing a digital coordinate model; a data control module electrically connected with the walking module, the lifting assembly and the sampling storage system respectively; the data control module is electrically connected with the data acquisition module and the data processing module respectively, and the data control module is used for dividing the regions of the digital coordinate model, and is also used for positioning the insertion depth of the sampling rod, so that the insertion depth of the sampling end of the sampling rod is consistent with the position coordinates of the actual sampling point.
[0010] In a possible implementation, the data acquisition module obtains the original data of the three-dimensional point cloud by emitting laser beams to the container to be detected through the multi-line laser radar, and transmits the digital signals obtained by converting the original data to the data processing module.
[0011] In a possible implementation, the control unit further comprises a human-computer interaction module, which is arranged on the device body and electrically connected with the data control module, the data acquisition module and the data processing module respectively.
[0012] Compared with the prior art, the container grain sampling method in the present implementation has the following advantages: The space grid is uniformly divided, that is, the container to be measured is divided into 3*3 orthogonal grids of the same size along the length and height directions, nine areas cover the "length three equal parts (three layers in front, middle and back) + height three equal parts (three layers in upper, middle and lower)" of the physical space of the container, and each area corresponds to the same grain carrying capacity. This kind of way can ensure that each pre-sampling point has consistent weight and avoid local concentration or local sparseness.
[0013] Seven actual sampling points are selected from the nine pre-sampling points by a random selection algorithm and a Fisher-Yates shuffle algorithm. This kind of way can ensure that each actual sampling point covers the upper, middle and lower three layers or the front, middle and back three layers, and the probability of each pre-sampling point being selected is 7 / 9, effectively excluding the subjective bias of manual selection. At the same time, the shuffling rearrangement of the Fisher-Yates shuffle algorithm makes the randomness of the seven actual sampling points meet the statistical significance requirement, thereby ensuring the representativeness of the sample and reducing the traditional sampling times and improving the sampling efficiency.
[0014] In addition, it is required that among all the adjacent actual sampling points corresponding to the first sampling point, at least two actual sampling points have the same distance to the first sampling point, for example, the grid center (2, 2) is the first sampling point, and the adjacent points (1, 2), (2, 1), (2, 3) and (3, 2) have the same distance d to it. This design further strengthens the uniformity of the spatial distribution and avoids the "local aggregation" (such as seven points concentrated in the left area) that may occur in random selection, so that each actual sampling point forms a "balanced radiation" distribution in the three-dimensional space, ensuring that the sample can cover all key areas of the container, such as the corner, middle and edge. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A flowchart of a container grain sampling method provided for the embodiment of the present application; Figure 2 A structural schematic diagram of establishing a three-dimensional coordinate model for a container in a container grain sampling method provided for the embodiment of the present application (distribution of nine space areas); Figure 3 A structural schematic diagram of an actual working process of a grain automatic sampling device corresponding to a container grain sampling method provided for the embodiment of the present application; Figure 4A sectional view of a sampling end of a sampling rod in a grain automatic sampling device involved in a container grain sampling method provided by the embodiment of the present application; Figure 5 A sectional view of a sampling and storage system in a grain automatic sampling device involved in a container grain sampling method provided by the embodiment of the present application; Figure 6 A P1-P9 position schematic diagram involved in a container grain sampling method provided by the embodiment of the present application.
[0016] Marked for explanation: 1, container; 2, grain automatic sampling device; 3, sampling rod; 40, sampling and storage system; 41, material collecting cylinder; 42, partition plate; 43, feeding pipe; 44, negative pressure pump; 45, three-way pipe; 46, sub-pipeline; 47, first valve; 48, second valve; 49, third valve; 50, fourth valve; 60, hole sealing structure; 61, fixed inclined piece; 62, flip inclined piece; 63, spring. DETAILED DESCRIPTION
[0017] In order to make the technical problems to be solved by the present application, technical solutions and beneficial effects more clear and explicit, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0018] Please refer to Figures 1 to 3 , now a container grain sampling method provided by the present application will be described. The container grain sampling method comprises the following steps in sequence: S100, acquiring scanning data: scanning the container to be detected 1 by the grain automatic sampling device 2.
[0019] S200, digital modeling and region division: a digital three-dimensional coordinate model is established based on the scanning data. Then the container to be detected 1 is divided into nine spatial regions of the same size, and a pre-sampling point is randomly set in each spatial region by a random selection algorithm.
[0020] S300, selecting seven actual sampling points: the grain automatic sampling device 2 selects seven actual sampling points from the nine pre-sampling points by Fisher-Yates shuffling algorithm. In the seven actual sampling points, any one of the actual sampling points is set as a first sampling point, and the distance from at least two of the other actual sampling points adjacent to the first sampling point to the first sampling point is the same.
[0021] S400 sampling and storing samples: the grain automatic sampling device 2 samples at the opening of the container 1 to be tested, and the sample is stored after mixing according to the specified requirements.
[0022] The container grain sampling method provided by the embodiment can ensure that each pre-sampling point has the same weight, and avoid local concentration or local sparseness. Seven actual sampling points are selected from the nine pre-sampling points by using a random selection algorithm and a Fisher-Yates shuffling algorithm. This method can ensure that each actual sampling point can cover any three layers in the 3x3 space region in two perpendicular directions, and the probability of each pre-sampling point being selected is 7 / 9, effectively eliminating the subjective bias of manual selection. At the same time, the shuffling rearrangement of the Fisher-Yates shuffling algorithm makes the randomness of the seven actual sampling points meet the statistical significance requirements, thereby ensuring the representativeness of the sample and reducing the number of traditional sampling times and improving the sampling efficiency. By limiting the distance of the sampling points, the uniformity of the spatial distribution is further strengthened, and the "local aggregation" (such as seven points concentrated in the left region) that may occur in random selection is avoided, so that each actual sampling point forms a "balanced radiation" distribution in the three-dimensional space, ensuring that the sample can cover all key areas of the container 1, such as the corner, the middle, and the edge.
[0023] It should be noted that the opening of the container 1 can be understood as a side of the container 1 being provided with a blocking door, and the opening is formed when the blocking door is opened.
[0024] In some embodiments, the distribution of each space region can adopt a structure as shown in Figure 2 Figure 2 In the S200 step, the nine space regions are 3x3 space grids that are orthogonally distributed along the length and height directions of the container 1 to be tested.
[0025] This method can ensure that the grain automatic sampling device 2 can operate at the opening of the container 1, thereby ensuring the convenience of actual sampling.
[0026] For ease of understanding, the bottom left corner point of the container 1 near the opening side can be taken as the coordinate origin (0, 0, 0), and the following definitions are made: X-axis: along the length direction of the container 1 (from the opening side to the closed side), denoted as L.
[0027] Z-axis: along the height direction of the container 1 (from the bottom to the top), denoted as H.
[0028] Y axis: along the width direction of the container 1 (from the outside to the inside), denoted as W.
[0029] Therefore, the grid is divided into: In the length direction (X axis), L is divided into three segments, and the segment points are X1=L / 3 and X2=2L / 3, forming three length intervals X∈[0, X1), [X1, X2), [X2, L].
[0030] In the height direction (Z axis), H is divided into three segments, and the segment points are Z1=Z / 3 and Z2=2Z / 3, forming three height intervals Z∈[0, Z1), [Z1, Z2), [Z2, H].
[0031] Each length interval and height interval is combined orthogonally to form nine cuboid space regions of the same size, numbered A11 (X∈[0, X1), Z∈[0, Z1)), A12 (X∈[0, X1), Z∈[Z1, Z2)), A13 (X∈[0, X1), Z∈[Z2, H]), A21 (X∈[X1, X2), Z∈[0, Z1)), …, A33 (X∈[X2, L], Z∈[Z2, H]).
[0032] Each space region is uniformly arranged along the X axis and the Z axis. The 3x3 grid covers the three length intervals and the three height intervals of the container 1, including the top region of the container 1 that is most easily ignored by manual sampling, such as (A13, A23, A33), and the enclosed side region of the container 1, such as (A31, A32, A33). Through division, each region has a pre-sampling point, ensuring that the sampling covers no dead angle and the coverage rate reaches 100%. At the same time, it can also ensure that each pre-sampling point has consistent representative weight, and the nine space regions have the same size, corresponding to the same amount of bagged grain, avoiding the imbalance problem of large regions corresponding to multiple points and small regions corresponding to few points. In addition, this equal weight design provides a basis for the unbiased sampling of the Fisher-Yates algorithm, so that the seven actual sampling points can evenly represent the quality of the entire bag of grain.
[0033] In some embodiments, the above-mentioned grain automatic sampling device 2 can adopt a structure as shown in Figure 3 . Referring to Figure 3The automatic grain sampling device 2 comprises a device body, a sampling rod 3, a lifting assembly, a sampling storage system 40 and a matching control unit. The device body is provided with a walking module at the bottom. One end of the sampling rod 3 is a sampling end. The lifting assembly is arranged on the device body and has a mounting platform which can be lifted along the vertical direction and to which the sampling rod 3 is connected horizontally. The sampling storage system 40 is arranged on the device body and connected to the other end of the sampling rod 3, and can perform negative pressure sampling and storage after the sampling end reaches the actual sampling point. The control unit can control the walking module to drive the device body to move, and scan the container 1 to be detected during the movement, and divide the sampling area and sampling points. Then, automatic sampling is performed through the sampling rod 3, the lifting assembly and the sampling storage system 40.
[0034] As to the walking module, it can comprise four walking wheels, each of which can rotate in all directions. Each walking wheel is equipped with two servo motors, one of which is used to drive the walking, and the other is used to drive the walking angle rotation. This kind of walking module can ensure straight walking, in-place rotation, horizontal walking and other actions.
[0035] The lifting assembly mentioned in the embodiment can be a ball screw lifting machine or other lifting structure which can adapt to the height of the container 1. When it is a ball screw lifting machine, it comprises a V-shaped stand, a screw vertically arranged and rotationally arranged on the stand, a sliding seat vertically slidingly connected with the stand and screwingly matched with the screw, and a motor. The motor contained therein can be a servo motor. The end of the sampling rod 3 away from the sampling end can be directly fixed and installed on the sliding seat. The sampling rod 3 can be made of 316L stainless steel and has a cylindrical overall structure. A bevel can be arranged at the sampling end to facilitate insertion into the grain bag. When the sampling rod 3 is inserted through the open end of the container 1 along the length direction of the container 1, it needs to pass through more grain bags when sampling the closed side area. Therefore, the sampling rod 3 can comprise a rod body, one end of the rod body being the sampling end and the other end being connected to the sampling storage system 40.
[0036] The sampling storage system 40 can comprise a collecting cylinder 41 having a containing cavity. The top end of the collecting cylinder 41 is provided with a feeding pipe 43 connected to the other end of the sampling rod 3 through a flexible pipe, and the collecting cylinder 41 is provided with a negative pressure pump 44. Meanwhile, a partition plate 42 can be arranged in the containing cavity, which is located directly below the feeding port. The partition plate 42 can divide the containing cavity into two sub-cavities which are connected through the top end. The grain samples entering the containing cavity through the feeding pipe 43 will be divided into two parts by the top end of the partition plate 42, and the two parts of samples will fall into the two sub-cavities respectively, one part of which is used for testing, and the other part can be mixed and stored. Each sub-cavity is correspondingly provided with an opening at the bottom, so that the samples can be discharged in time, and the two openings are respectively provided with sealing covers.
[0037] As an embodiment of the present embodiment, a sealing structure 60 is arranged at the sampling end of the rod, which includes a fixed wedge 61, a flip wedge 62 and a spring 63. Please refer to Figure 4 The fixed wedge 61 and the flip wedge 62 have the same specifications, and when they are arranged in the same direction, an oval shape that can be placed inside the rod and adapted can be formed. The fixed wedge 61 is fixedly arranged and has a straight edge, which is arranged in a straight line with the diameter of the rod in a horizontal direction. The flip wedge 62 has a straight edge, which is hinged to the straight edge of the fixed wedge 61, i.e. the flip wedge 62 can be tilted upward around the fixed wedge 61, and the flip wedge 62 is arranged away from the sampling end of the rod, and the outer edge of the flip wedge 62 is covered or coated with a sealing layer. The spring 63 is located at the bottom of the flip wedge 62 and can continuously push the flip wedge 62 to have a tendency to tilt upward. In the actual working process, when the sampling and storage system 40 is under negative pressure, the flip wedge 62 will tilt downward under the action of negative pressure to form a through hole above the fixed wedge 61 for the food to pass through. When the rod is inserted into the container 1, the pressure in the rod can be increased by the sampling and storage system 40 to make the flip wedge 62 tilt upward and stay, avoiding the opening of the through hole. This method can effectively prevent the rod from mixing food from other positions during the process of passing through other bagged food, and ensure the accuracy of sampling.
[0038] Regarding the pressurization process, please refer to Figure 5 The gas outlet of the negative pressure pump 44 can be connected to a three-way pipe 45, one of the pipe openings of the three-way pipe 45 is connected to the feed pipe 43 through a sub-pipeline 46, a first valve 47 is arranged on the feed pipe 43, a second valve 48 is arranged on the sub-pipeline 46, and a third valve 49 is arranged on the other pipe opening of the three-way pipe 45. In addition, a gas pipe is arranged on the top end of the collecting cylinder 41, and a fourth valve 50 is arranged on the gas pipe. When the first valve 47 is opened, the third valve 49 is opened, the second valve 48 is closed, and the fourth valve 50 is closed, negative pressure sampling is performed. When the first valve 47 is closed, the second valve 48 is opened, the third valve 49 is closed, and the fourth valve 50 is opened, pressurization is performed. The above-mentioned valves are all solenoid valves.
[0039] An implementable way of the above-mentioned automatic food sampling equipment 2 is shown in Figure 2After the actual sampling point is determined, the sampling rod 3 is moved in Y and Z directions by the walking module and the lifting assembly, and then the coordinates of the two directions are confirmed. After confirmation, the walking module is moved towards the container 1, and then the sampling rod 3 is inserted into the opening of the container 1, so that the sampling end of the sampling rod 3 reaches the actual sampling point. Of course, another implementation manner is that a component capable of moving the sampling rod 3 horizontally is arranged on the sliding seat, for example, a roller set connected with the sampling rod 3 in rolling manner. The sampling rod 3 is clamped by the roller set, and the roller set is rotated to move the sampling rod 3 horizontally. The above manners are well known to those skilled in the art, and will not be described here.
[0040] The device only needs one staff to monitor, and the sampling time of a single container is shortened from 3 hours to 30 minutes. Meanwhile, the process of unloading and transporting is omitted, and the cost is greatly saved.
[0041] In some embodiments, the above-mentioned grain automatic sampling device 2 can adopt the structure as shown in Figure 3 . Referring to Figure 3 , the corner point at the bottom of the container 1 to be detected is the starting point of the walking route of the grain automatic sampling device 2.
[0042] The corner point at the bottom of the container 1 is the starting point, so that the coordinate axes of the digital three-dimensional coordinate model completely correspond to the physical structure of the container 1 (X axis along the length, Z axis along the height), which avoids the coordinate deviation caused by manual definition of the starting point. In actual testing, the error between the model coordinates of the present embodiment and the actual size of the container 1 is less than 2 mm, while the error of the model without fixed starting point is ± 30 mm, which ensures that the obtained point cloud data is complete (no missing area) and can solve the scanning problem of the “dead angle” of the two ends and the top edge of the container 1.
[0043] In some embodiments, the above-mentioned control unit can adopt the structure as shown in Figure 3 . Referring to Figure 3 , the control unit includes a data acquisition module, a data processing module and a data control module. The data acquisition module is arranged on the device body. The data processing module is in communication with the data acquisition module and can process the scanning data and establish a digital coordinate model. The data control module is electrically connected with the walking module, the lifting assembly and the sampling and storage system 40 respectively. The data control module is electrically connected with the data acquisition module and the data processing module respectively, and can divide the digital coordinate model into regions and position the insertion depth of the sampling rod 3, so that the insertion depth of the sampling end of the sampling rod 3 is consistent with the position coordinates of the actual sampling point.
[0044] The laser radar is used as a core component in the data acquisition module. The laser radar performs a surrounding scan on the container 1 to be measured by emitting a laser beam. Each second, 150-300 thousand unit point cloud data points can be generated. The data is converted into a 16-bit digital signal by the built-in ADC and transmitted to the data processing module. The data control module can be an industrial computer. After fitting the cuboid model of the container 1 by the RANSAC algorithm and calculating the actual length L, height H, and width W, the data control module divides the space region according to a 3*3 orthogonal grid, and calculates the coordinates of the nine pre-sampling points. The Fisher-Yates shuffling algorithm is called to randomly sort the nine pre-sampling points, and the first seven are selected as the actual sampling points. The coordinates (X, Y, Z) of the actual sampling points, the size (L, H, W) of the container 1, and other data are transmitted to the data control module.
[0045] In some embodiments, the above-mentioned data acquisition module can adopt a structure as shown in Figure 3 . Referring to Figure 3 , the data acquisition module performs a surrounding scan on the container 1 to be measured by emitting a laser beam through the multi-line laser radar to obtain the original data of the three-dimensional point cloud, and converts the original data into a digital signal and then transmits it to the data processing module.
[0046] The first stage (initial scanning): the device is located at the starting point O (0, 0, 0), and the laser radar starts to rotate (10° / s) to perform a 360° scan on the open side (X=0) of the container 1 to obtain the point cloud data of the open side (including the stacking state of the grain bags).
[0047] The second stage (moving scanning): the device moves along the positive direction of the X axis at a speed of 100 mm / s, while the laser radar continues to rotate and scan. The point cloud data is recorded once every 100 mm of movement (corresponding to a 100 mm interval in the length direction of the container 1). During the movement, the scanning range of the laser radar covers the side surface (Y=W), top (Z=H), and bottom (Z=0) of the container 1.
[0048] The third stage (end point scanning): after the device reaches X=L (the length end point of the container 1), it stops moving, and the laser radar continues to rotate and scan for 360° to obtain the point cloud data of the closed side (X=L) of the container 1.
[0049] The surrounding scan covers the open side, side surface, closed side, top, and bottom of the container 1, and the obtained point cloud data completely restores the physical structure of the container 1 and the stacking state of the grain bags, which facilitates the data processing module to establish a more accurate digital model based on the complete data. For the scenario where the grain bags are irregularly stacked (such as some bags being tilted or protruding), the point cloud data of the laser radar can accurately identify the irregular areas, and the data processing module will automatically adjust the pre-sampling point position, such as avoiding gaps and selecting the nearest grain bag to ensure that the sampling point is located inside the grain bag.
[0050] In some embodiments, the control unit described above can adopt the structure as shown in Figure 3 Referring to Figure 3 , the control unit further comprises a human-computer interaction module, which is arranged on the device body and is electrically connected with the data control module, the data acquisition module and the data processing module respectively.
[0051] The hardware composition of the human-computer interaction module can include a touch screen, and the software involves a main interface, a parameter setting interface, a data query interface and a monitoring interface. Through the use of the human-computer interaction module, the operation threshold can be reduced, the sampling process can be monitored in real time, timely intervention can be facilitated, the safety can be improved, safety accidents can be reduced, and the management and traceability of data can be facilitated.
[0052] For the above-mentioned embodiments, the sampling points can adopt the structure as shown in Figure 6 Referring to Figure 6 In the seven actual sampling points selected, any one of the actual sampling points is set as a first sampling point, and at least two of the other actual sampling points adjacent to the first sampling point have the same distance to the first sampling point. This design further strengthens the uniformity of the spatial distribution, avoids the "local aggregation" that may occur when randomly selecting points (for example, seven points are concentrated in the left region), and makes the actual sampling points form a "balanced radiation" distribution in the three-dimensional space, so as to ensure that the samples can cover all key areas of the container 1, such as the corner points, the middle part and the edges.
[0053] Referring to Figure 6 It can be seen that the seven actual sampling points selected are P1, P2, P4, P5, P6, P7 and P9. The actual sampling points adjacent to P1 and having the same distance are P2 and P4. The actual sampling points adjacent to P2 and having the same distance are P1, P5 and P6. The actual sampling points adjacent to P4 and having the same distance are P1, P5 and P7. The actual sampling points adjacent to P5 and having the same distance are P2, P4, P6, P7 and P9. The actual sampling points adjacent to P6 and having the same distance are P2 and P5. The actual sampling points adjacent to P7 and having the same distance are P4, P5 and P9. The actual sampling points adjacent to P9 and having the same distance are P5 and P7.
[0054] The seven actual sampling points selected are not on the same vertical plane (two-dimensional space). In fact, under the condition of the specific distance of the first sampling point, a spherical surface is formed, and the other actual sampling points adjacent to it are located on this spherical surface.
[0055] As a specific implementation detail of the present embodiment: The pre-sampling point coordinates are defined based on a 3x3 orthogonal grid, and the coordinates (X, Z) of the nine pre-sampling points are defined as: P1(X1, Z1), P2(X1, Z2), P3(X1, Z3).
[0056] P4(X2, Z1), P5(X2, Z2), P6(X2, Z3).
[0057] P7(X3, Z1), P8(X3, Z2), P9(X3, Z3).
[0058] Fisher-Yates algorithm selection points: Number nine pre-sampling points as 1-9, stored in array A = [1, 2, 3, 4, 5, 6, 7, 8, 9]. Generate random seed. Start from the end of array A (index 8), exchange with the element of the previous random index position in turn, such as index 8 and index 5 exchange, index 7 and index 2 exchange, a total of 7 times.
[0059] Select the pre-sampling points corresponding to the first seven elements of the exchanged array as the actual sampling points, and store them in array B = [B1, B2,..., B7], B1 is the first actual sampling point, and B7 is the seventh.
[0060] Distance constraint verification and adjustment: Randomly select any one point in array B as the first sampling point Bk (k = 1-7), usually select the first point B1 of array B. Define "adjacent point" as the point adjacent to Bk in X axis or Z axis direction, such as Bk = P5(X2, Z2), adjacent points are P2, P4, P6, P8. Calculate the distance between Bk and each adjacent point. If it is satisfied, such as Bk = P5, the distances from adjacent points P2, P4, P6, P8 to P5 are equal, then the actual sampling points are retained.
[0061] If it is not satisfied, such as Bk = P1, its adjacent points are only P2(X1, Z2) and P4(X2, Z1), the distance from P1 to P2 is recorded as D1, the distance from P1 to P4 is recorded as D2, D1≠D2, and there is no other adjacent point, then the point selection adjustment mechanism is triggered. That is, from the two pre-sampling points in array A that have not been selected, such as P8, P9 in array A, randomly select one point, such as P8, replace the point in array B that does not satisfy the distance constraint, such as replace B1 = P1 with P8. Then recalculate the distance between the first sampling point (new B1 = P8) and the adjacent points in the new array B (such as B = [P8, B2, B3, B4, B5, B6, B7]). The coordinates of P8 are (X3, Z2), and the adjacent points are P5, P7, P9. Calculation gives the distance D3 from P8 to P5, the distance D4 from P8 to P7, and the distance D5 from P8 to P9. At this time, D4 = D5, which satisfies that at least two adjacent points have the same distance, and the actual sampling points are retained.
[0062] If the distance constraint is still not satisfied after the first replacement, repeat the above steps (including reselecting the pre-sampling points) until the distance constraint is satisfied. The coordinates (X, Y, Z) of the final seven actual sampling points that satisfy the distance constraint are transmitted to the data control module, which can be used for subsequent sampling operations.
[0063] The above description is merely preferred embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall fall within the protection scope of the present application.
Claims
1. A method of sampling a container of grain, the method comprising: The method comprises the steps of: S100, scanning the container to be detected by a grain automatic sampling device; S200, establishing a digital three-dimensional coordinate model based on the scanning data, and dividing the container to be detected into nine spatial regions of the same size; then randomly selecting a pre-sampling point in each of the spatial regions; S300, the grain automatic sampling device selects seven actual sampling points from the nine pre-sampling points by Fisher-Yates shuffling algorithm; in the seven actual sampling points, any one of the actual sampling points is set as a first sampling point, and the distances from at least two of the other actual sampling points adjacent to the first sampling point to the first sampling point are the same; S400, the grain automatic sampling device samples at the opening of one side of the container to be detected, and the sample is stored after being mixed according to the specified requirements.
2. A method of sampling a cargo of grain in a container as claimed in claim 1 wherein, In the S200 step, the nine spatial regions are 3*3 spatial grids orthogonally distributed along the length and height directions of the container to be detected.
3. A method of sampling a cargo of grain in a container as claimed in any one of claims 1-2 wherein, The grain automatic sampling device comprises: a device body provided with a walking module at the bottom; a sampling rod having a sampling end at one end; a lifting assembly arranged on the device body and having a mounting platform connected with the horizontally arranged sampling rod and capable of lifting along the vertical direction; a sampling storage system arranged on the device body and connected with the other end of the sampling rod, for negative pressure sampling and storage after the sampling end reaches the actual sampling point; a matched control unit for controlling the walking module to move the device body, and scanning the container to be detected and dividing the sampling region and sampling point during the movement, and then automatically sampling through the sampling rod, the lifting assembly and the sampling storage system.
4. A method of sampling a cargo of grain in a container as claimed in claim 3 wherein, One of the corner points of the bottom of the container to be detected is the starting point of the walking route of the grain automatic sampling device.
5. A method of sampling a cargo of grain in a container as claimed in claim 3 wherein, The control unit comprises: a data acquisition module arranged on the device body; a data processing module in communication with the data acquisition module, for processing the scanning data and establishing a digital coordinate model; a data control module electrically connected with the walking module, the lifting assembly and the sampling storage system respectively; the data control module is electrically connected with the data acquisition module and the data processing module respectively, and is used for region division of the digital coordinate model and positioning of the insertion depth of the sampling rod, so that the insertion depth of the sampling end of the sampling rod is consistent with the position coordinates of the actual sampling point.
6. A method of sampling a cargo of grain in a container as claimed in claim 5 wherein, The data acquisition module obtains the original data of the three-dimensional point cloud by surrounding scanning of the container to be detected through the multi-line laser radar, and transmits the digital signal converted from the original data to the data processing module.
7. A method of sampling a cargo of grain in a container as claimed in claim 5 wherein, The control unit further comprises a human-computer interaction module arranged on the device body and electrically connected with the data control module, the data acquisition module and the data processing module respectively.
Citation Information
Patent Citations
Method and device for determining burying position of soil moisture monitoring instrument
CN104569342A
Sampling method and device of carriage coal
CN105445054A
Grain pile sampling height random layout method and round bin grain pile sampling method
CN110309977A
Grain truck sampling point automatic generation method and system based on laser radar scanning positioning
CN116148809A
Sampling point selection method and system, sampling method and system and storage medium
CN116645139A