Agricultural product detection preprocessing system and method based on machine vision perception and decision

By combining machine vision monitoring units with adaptive decision-making units, key states in the pre-processing of agricultural products for testing are monitored and optimized in real time, solving the problems of low efficiency, large errors, and high costs in existing technologies, and achieving efficient and safe pre-processing of agricultural products for testing.

CN122329784APending Publication Date: 2026-07-03OIL CROPS RES INST CHINESE ACAD OF AGRI SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
OIL CROPS RES INST CHINESE ACAD OF AGRI SCI
Filing Date
2026-04-22
Publication Date
2026-07-03

Smart Images

  • Figure CN122329784A_ABST
    Figure CN122329784A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of testing and inspection technology, specifically relating to a pretreatment system and method for agricultural product testing based on machine vision perception and decision-making. The system includes a machine vision monitoring unit, an adaptive decision-making unit, and an execution unit. The machine vision monitoring unit is used to achieve real-time acquisition of global and local states; the adaptive decision-making unit generates optimized process parameter instructions by analyzing the acquired image features; the execution unit precisely executes operations such as sample addition, ultrasonic extraction, centrifugation purification, and pipetting according to the instructions. The method includes vision-guided sample addition, adaptive ultrasonic extraction, adaptive centrifugation purification, and vision-assisted pipetting. A closed-loop control is formed through machine vision perception and adaptive decision-making, dynamically adjusting process parameters such as ultrasonication and centrifugation. This invention solves the problems of low efficiency, poor consistency, and weak adaptability in existing pretreatment methods, improves the automation and intelligence level of pretreatment, ensures accurate and reliable test results, and has broad application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of inspection and testing technology, specifically relating to a pre-processing system and method for agricultural product testing based on machine vision perception and decision-making. It is applicable to the pre-processing stage of detecting pesticide residues, mycotoxins, and heavy metals in agricultural products such as grains, oils, fruits, vegetables, and livestock products. It can be widely used in scenarios such as agricultural product quality and safety risk monitoring and supervision, testing institutions, and production and processing enterprises, providing intelligent and efficient pre-processing technology support for agricultural product quality and safety supervision and high-quality industrial development. Background Technology

[0002] With consumers increasingly focused on the quality and safety of agricultural products, regulatory requirements for agricultural product safety are becoming more stringent, leading to an exponential increase in the number of samples tested. Sample pretreatment, as the core link between sampling and instrumental analysis, directly determines the reliability and throughput of the entire testing process, and is a crucial prerequisite for ensuring accurate and efficient test results.

[0003] Traditional pretreatment processes heavily rely on manual operation, involving multiple tedious and precise steps such as weighing, pipetting, shaking, ultrasonic extraction, centrifugation, and purification, which have significant drawbacks: First, they are inefficient and cannot meet the needs of rapid detection of large batches of samples; second, human error is large, resulting in poor consistency of processing results among different operators and different batches of samples, affecting the comparability of test data; third, labor costs are high, requiring professional operators with long training periods; and fourth, safety is poor, as operators are frequently exposed to organic solvents such as acetonitrile and methanol, posing health risks.

[0004] In recent years, automated pretreatment platforms integrating modules such as liquid addition, shaking, and centrifugation have emerged in the industry, replacing manual operation to some extent and significantly improving processing efficiency. However, these platforms are essentially still "programmed" execution devices, with their processing flow based on fixed time and parameter settings. They lack the ability to perceive and judge the key physicochemical states during pretreatment in real time and cannot dynamically adjust process parameters according to the actual state of the sample.

[0005] Meanwhile, machine vision technology has made significant progress in the external quality inspection of agricultural products (such as grading and damage identification), and has also achieved adaptive control based on visual feedback in industrial scenarios. However, the deep integration of highly robust machine vision perception and adaptive decision-making for monitoring the chemical processes in the pretreatment of food and agricultural products with complex compositions and variable states remains a technological gap. Existing technologies cannot dynamically adjust core process parameters such as ultrasonication and centrifugation based on real-time conditions such as differences in sample matrix (e.g., spinach and peanuts, corn and fruits and vegetables), the degree of mixing of extracts, and the clarity of centrifugation separation interfaces. This results in significant room for improvement in processing efficiency and consistency, making it difficult to adapt to the diverse pretreatment needs of different types of agricultural products, and failing to fundamentally solve problems such as under-extraction and over-extraction that affect detection accuracy. Summary of the Invention

[0006] The technical problem to be solved by this invention is to provide a pre-processing system and method for agricultural product testing based on machine vision perception and decision-making, which addresses the shortcomings of existing technologies. By using machine vision to perceive the key states of the entire pre-processing process in real time and combining adaptive decision-making to dynamically optimize process parameters, the pre-processing efficiency can be greatly improved, providing an accurate and reliable sample basis for subsequent instrument detection and analysis.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: I. A Pre-processing System for Agricultural Product Detection Based on Machine Vision Perception and Decision Making This invention provides a pre-processing system for agricultural product testing based on machine vision perception and decision-making, comprising: a machine vision monitoring unit, an adaptive decision-making unit, and an execution unit; The machine vision monitoring unit includes a first vision monitoring module and a second vision monitoring module, used to acquire images of the equipment and solution status during the pretreatment process in real time; the adaptive decision unit is communicatively connected to the machine vision monitoring unit, and includes a feature extraction module and a decision model module, used to receive and analyze the images of the equipment and solution status, extract feature information, and output optimized process parameter instructions; the execution unit is communicatively connected to the adaptive decision unit, and includes an automatic pipetting module, an ultrasonic extraction module, a centrifugal purification module, and a robotic arm, etc., used to receive the process parameter instructions and execute corresponding pretreatment operations.

[0008] Preferably, the first visual monitoring module is mounted on the top of the experimental platform via a top bracket, with its image acquisition lens pointing vertically downwards and covering the entire operating area of ​​the execution unit. The first visual monitoring module is used to monitor the operating status and spatial position of each component of the execution unit in real time. The second visual monitoring module is mounted on the side of the reaction vessel via a side bracket. Its image acquisition lens is at a preset angle to the axis of the reaction vessel. The second visual monitoring module is used to monitor the sample status, liquid level, and reaction progress in the reaction vessel in real time.

[0009] Preferably, the feature extraction module is used to extract multi-dimensional feature vectors from the device and solution state images. The feature vectors include liquid level height features, solution grayscale value features, solution layer interface features, and position features of each execution component. The decision model module adopts a deep learning model that integrates CNN and LSTM. Based on the multi-dimensional feature vector and combined with the preset detection standard, it generates optimization instructions for the corresponding process parameters, including ultrasonic power and time, centrifugation time and speed, and pipetting height and volume.

[0010] Preferably, the automatic pipetting module is installed on one side of the middle part of the experimental table, and includes a pipetting pump, a pipette and a reagent storage box. The automatic pipetting module is used for adding extract and transferring sample solution in the reaction vessel. The ultrasonic extraction module is installed in the main operating area in the middle of the experimental platform. It includes an ultrasonic generator and a liftable ultrasonic probe. The ultrasonic extraction module is used to perform ultrasonic-assisted extraction of sample components in the solution in the reaction vessel to obtain a crude sample solution. The centrifugal purification module includes a centrifuge, which is used to centrifuge the crude sample solution to separate the supernatant and precipitate containing the sample components. The robotic arm is mounted on a guide rail on one side of the experimental table. It can move along the X, Y, and Z axes and is equipped with a clamping device at its end. The robotic arm is used to perform the movement operations of the pipette and the reaction vessel.

[0011] Preferably, the execution unit further includes a sample weighing module, a container cleaning module, and a waste liquid collection module; the sample weighing module is used to accurately weigh the sample, and the container cleaning module and the waste liquid collection module are used to clean the reaction container and collect the waste liquid in the container after the pretreatment is completed, respectively.

[0012] II. A Pre-processing Method for Agricultural Product Detection Based on Machine Vision Perception and Decision-Making Based on the same inventive concept, this invention also provides a pre-processing method for agricultural product testing based on machine vision perception and decision-making, employing the agricultural product pre-processing system described above, specifically including the following steps: S1, Visual-guided sample addition: The first visual monitoring module guides the robotic arm to transfer a sample of a preset weight into the reaction container. At the same time, the adaptive decision unit calculates the required volume of extract based on the sample type, weighing mass, and preset extraction standards. Under the real-time monitoring of the second visual monitoring module, the automatic transfer module adds the target volume of extract into the reaction container. S2, Adaptive Ultrasonic Extraction: Adjust the insertion depth of the ultrasonic probe according to the current liquid level in the reaction vessel and start the ultrasonic generator. Quantify the homogenization state of the solution by calculating the gray variance of different heights in the solution area of ​​the reaction vessel, and dynamically adjust the ultrasonic power and time until the gray value characteristics of the solution reach the preset extraction standard and then turn off the ultrasonic generator. S3, Adaptive Centrifugal Purification: The first visual monitoring module guides the robotic arm to transfer the reaction vessel to the container support of the centrifugal purification module and starts the centrifuge. The second visual monitoring module monitors the clarity of the layering interface between the supernatant and the precipitate in real time and dynamically adjusts the centrifugation speed and time until the supernatant and the precipitate are effectively separated and then the centrifuge is turned off. S4, Visual-assisted pipetting: Based on the interface between the supernatant and the precipitate, the robotic arm and automatic pipetting module are guided to accurately pick up the target phase liquid in the reaction vessel and transfer it to the test tube to be tested, thus completing the pipetting operation.

[0013] Preferably, in step S1, the volume of the required extract is calculated using the following formula: V 提 =m×k×f In the formula, V 提 m is the required extraction volume; k is the sample mass; k is the preset liquid-to-solid ratio, which is set according to the sample type; f is the matrix correction coefficient, which is set according to the complexity of the sample matrix.

[0014] Preferably, in step S2, if the variance of gray values ​​at different heights in the solution area is ≤2% and there are no obvious sample particles remaining, it is determined that the gray value characteristics of the solution have reached the preset extraction standard, and the ultrasonic generator is turned off. If the extraction standard is not reached after the preset standard time T1, the ultrasonic power is increased or the ultrasonic time is extended according to the preset ratio until the preset extraction standard is reached.

[0015] Preferably, in step S3, if the solution area is clearly stratified and the gray value of the supernatant is ≥170, it is determined that the supernatant and the precipitate have been effectively separated, and the centrifuge is turned off. If the effective separation standard is not achieved after the preset standard time T2, the centrifugation speed or centrifugation time will be increased according to the preset ratio until the supernatant and precipitate are effectively separated.

[0016] Preferably, in step S4, the precise removal of the target phase liquid from the reaction vessel includes: The first vision monitoring module guides the robotic arm to move the pipette above the reaction vessel, and the second vision monitoring module guides the pipette nozzle to be aligned with the supernatant area, and adjusts the insertion depth of the nozzle to a preset height above the layered interface to avoid aspirating sediment.

[0017] Compared with the prior art, the present invention has the following main advantages: 1. This invention achieves precise global and local monitoring of the entire pretreatment process through the dual-module layout of the machine vision monitoring unit. Combined with the deep learning model of the adaptive decision unit, process parameters can be dynamically optimized. With the coordinated operation of each module of the execution unit, the automation and intelligence level of pretreatment is greatly improved, the processing cycle is effectively shortened, energy consumption and reagent consumption are reduced, and efficient processing of large batches of agricultural product samples is achieved.

[0018] 2. This invention achieves precise connection between sample weighing, transfer, and liquid addition steps through visual guidance. Combined with adaptive adjustment of ultrasonic and centrifugation parameters and a characteristic threshold monitoring mechanism, it can ensure that different types and batches of agricultural products can achieve the best pretreatment effect, with stable extraction recovery rate and low intra-batch relative standard deviation, providing a precise and reliable sample basis for subsequent instrument detection and analysis.

[0019] 3. The system of the present invention has a reasonable overall layout and is easy to operate. The processing flow can be flexibly adjusted through preset parameters to adapt to the pre-processing needs of various types of agricultural products. Moreover, the automated execution reduces the risk of personnel coming into contact with organic solvents. It has broad application prospects and promotional value. Attached Figure Description

[0020] Figure 1 This is a schematic diagram of the overall pretreatment system for agricultural product testing in an embodiment of the present invention; Figure 2 This is a flowchart of the pretreatment method for agricultural product testing in an embodiment of the present invention. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0022] It should be noted that, depending on the implementation needs, the various steps / components described in this application can be broken down into more steps / components, or two or more steps / components or parts of the operation of steps / components can be combined into new steps / components to achieve the purpose of this invention.

[0023] Example 1: This example provides a pre-processing system for agricultural product testing based on machine vision perception and decision-making, such as... Figure 1 As shown, it mainly includes: The machine vision monitoring unit is fixedly installed on the top of the experimental platform and the side of the reaction vessel. It is used to collect images of the equipment and solution status in real time during the pretreatment process, realize all-round monitoring of the global and local areas, and provide accurate data support for adaptive decision-making. An adaptive decision-making unit, integrated in a control box on one side of the experimental platform, establishes a stable connection with the machine vision monitoring unit via wired communication. It is used to receive and analyze images of the equipment and solution status, extract feature information, and generate optimized process parameter instructions. The execution units are distributed in the operating area in the middle of the experimental platform and are communicatively connected to the adaptive decision unit. They are used to receive the process parameter instructions and accurately execute the corresponding pretreatment operations. Each execution module is arranged according to the sample flow sequence to shorten the transfer path and improve processing efficiency.

[0024] Furthermore, the machine vision monitoring unit specifically includes: a mounting bracket, a first vision monitoring module, and a second vision monitoring module; wherein, the mounting bracket adopts an adjustable structure to facilitate adjustment of the monitoring angle according to the container specifications; The first visual monitoring module is mounted on the top center of the experimental platform via a bracket. It uses a wide-angle industrial camera with the lens pointing vertically downwards to cover the entire operating area of ​​the execution unit. It is used to monitor the operating status, spatial position, and sample container placement of the execution components (robotic arm, ultrasonic probe, pipette, etc.) globally, ensuring that the components operate in a coordinated manner and are accurately positioned. The second visual monitoring module is mounted on the side of the reaction vessel frame via a side bracket, forming a 45° angle with the axis of the reaction vessel. It uses a macro industrial camera and is equipped with a supplementary lighting device to monitor the sample state (such as sample dispersion and precipitation), liquid level, and reaction process phenomena (such as turbidity and stratification) in the reaction vessel in real time. The acquired image resolution is no less than 1920×1080, and the frame rate is no less than 30 frames / second to ensure that subtle changes in state are captured.

[0025] Furthermore, the adaptive decision-making unit specifically includes: The feature extraction module is used to extract multi-dimensional feature vectors from the device and solution state images. The feature vectors include liquid level features, solution gray value features, solution layer interface features, and execution component position features. It also uses existing image preprocessing, edge detection, and threshold segmentation algorithms to remove interference information and retain effective features. The decision model module adopts a deep learning-based model fusion strategy, integrating CNN convolutional neural networks and LSTM temporal networks. It is pre-trained and optimized using a large amount of pre-processed image data and corresponding detection results under different agricultural products and process parameters. Based on the multi-dimensional feature vector and the preset detection standards, it can generate optimization instructions for at least one process parameter among ultrasonic power and time, centrifugation time and speed, and pipetting height. The instruction response time does not exceed 0.5 seconds, ensuring real-time performance.

[0026] Furthermore, the execution unit includes: The automatic pipetting module is installed on one side of the middle of the experimental platform. It includes a pipetting pump, a pipette, and a reagent storage box. The reagent storage box is divided into sections according to type such as organic solvents and buffer solutions. The pipette has an adjustable range (0.1mL-50mL) for accurately adding extraction and purification solutions. The addition accuracy error does not exceed ±0.1mL. The addition is completed under the real-time monitoring of the second visual monitoring module to ensure accurate addition volume. The ultrasonic extraction module is installed in the main operating area in the middle of the experimental platform. It includes an ultrasonic generator, a height-adjustable ultrasonic probe and a temperature sensor. The ultrasonic probe can automatically adjust the insertion depth according to the liquid level. The temperature sensor monitors the temperature of the extraction liquid in real time to avoid the ultrasonic thermal effect from affecting the sample composition. It is used to perform ultrasonic-assisted extraction of the sample to obtain a crude sample solution. The ultrasonic power can be adaptively adjusted between 50W and 300W. The centrifugation purification module includes a centrifuge with an adaptive speed adjustment between 1000 r / min and 15000 r / min, used to centrifuge the crude sample solution to achieve effective separation of the supernatant containing the sample components from the precipitate. The robotic arm is mounted on a guide rail on one side of the experimental table and can move along the X, Y, and Z axes. It is equipped with a clamping device at the end and is used to transfer and position samples, containers and functional modules under the guidance of the first visual monitoring module. The positioning accuracy does not exceed ±0.5mm, ensuring the precise connection of each operation step. The auxiliary modules include a sample weighing module, a container cleaning module, and a waste liquid collection module. The sample weighing module is installed next to the initial position of the robotic arm with an accuracy of no less than 0.01g, and is used for accurate sample weighing. The container cleaning module is installed at the end of the experimental platform and is used to clean the reaction container after pretreatment to avoid cross-contamination. The waste liquid collection module is located at the bottom of the experimental platform and is used to collect waste organic solvents and waste liquids for environmentally friendly treatment.

[0027] Example 2, based on the same inventive concept, also provides a pre-processing method for agricultural product testing based on machine vision perception and decision-making, employing the agricultural product pre-processing system described above, such as... Figure 2 As shown, the specific steps include the following: Step S1, Visual-guided sample addition: After the system starts up and completes the reset of each execution component, the initial state of the sample is visually identified, and the required volume of extract liquid is calculated in combination with the sample weighing mass and preset extraction standards. The liquid addition operation is completed accurately under visual monitoring. Specifically, it includes: S11: After the system starts, the first vision monitoring module performs global positioning and status scanning on the robotic arm, ultrasonic probe, pipette and reaction container rack, collects the initial position images of each component, and sends them to the adaptive decision unit. The adaptive decision unit determines whether each execution unit device is in the preset "zero position" or standby state. If there is a deviation, it sends an adjustment command to drive each device back to the preset position. S12: The operator places the agricultural product sample to be tested on the sample weighing module. The first vision monitoring module monitors the sample placement position, guides the robotic arm to move above the sample, clamps the sample and transfers it to the weighing area to complete the sample weighing (weighing accuracy is not less than 0.01g). The weighing data is synchronously transmitted to the adaptive decision unit. S13: Under the dynamic positioning guidance of the first vision monitoring module, the robotic arm accurately transfers the weighed sample into a reaction container of preset specifications and places it in the designated position on the reaction container rack. S14: The second visual monitoring module aligns with the reaction container, acquires an initial state image of the sample inside the tube, identifies the sample type, volume, and distribution, extracts the initial feature vector, and sends it to the adaptive decision unit. The adaptive decision unit calculates the required volume of extract based on the sample type, weighing mass, and preset extraction standards, and sends a liquid addition command to the automatic pipetting module. After receiving the command, the automatic pipetting module accurately extracts the corresponding volume of reagent and, under the real-time monitoring of the second visual monitoring module, slowly adds the reagent to the reaction container, monitoring changes in liquid level to ensure accurate liquid addition and complete the sample addition operation.

[0028] The adaptive decision-making unit calculates the required volume of extract based on the sample type, weighing mass, and preset extraction standards. The specific calculation formula is as follows: V 提 =m×k×f In the formula, V 提m is the required extraction volume (in mL), k is the sample mass (in g), k is the preset liquid-solid ratio (in mL / g, set according to sample type: k=2-3 mL / g for fruits and vegetables, k=4-6 mL / g for grains and oils), and f is the matrix correction coefficient (set according to the complexity of the sample matrix, with a value range of 1.0-1.2; the more complex the matrix, the larger the f value).

[0029] Step S2, Adaptive Ultrasonic Extraction: The ultrasonic probe is visually guided to adjust the insertion depth according to the liquid level and start the ultrasonic operation. The homogenization status of the solution is monitored in real time, and the ultrasonic power and time are dynamically adjusted until the preset extraction standard is reached and then the ultrasonic operation is stopped. Specifically, it includes: S21: After the sample is added, the adaptive decision unit sends a positioning command to the robotic arm. The first vision monitoring module guides the robotic arm to hold the ultrasonic probe and move it above the reaction vessel. The second vision monitoring module monitors the liquid level in the reaction vessel and feeds the data back to the decision unit. S22: The decision unit instructs the robotic arm to adjust the insertion depth of the ultrasonic probe (usually 2-2.5 cm below the liquid surface) based on the liquid level to ensure that the ultrasonic energy is applied evenly to the extract. S23: Start the ultrasonic extraction module and begin ultrasonic extraction at the initial preset power (50W-300W). At the same time, the second visual monitoring module enters the high-speed continuous acquisition mode, acquiring an image of the solution in the reaction vessel every 0.1 seconds to continuously monitor the homogenization status of the solution. S24: The feature extraction module extracts feature vectors such as solution grayscale value and turbidity from the acquired image and sends them to the decision model module; the decision model module compares the real-time feature vectors with the preset "fully extracted" feature threshold to determine the degree of sample extraction; If the gray values ​​at different heights in the solution area are monitored to be uniform (gray value variance ≤ 2%) and there are no obvious sample particles remaining, it indicates that the extraction is sufficient. The decision unit sends a stop command to shut down the ultrasonic extraction module. If the extraction standard is not reached after the preset standard time T1, the decision unit dynamically adjusts the ultrasonic power (±10W) or extends the ultrasonic time until the optimal extraction state is reached to avoid under-extraction or over-extraction and complete the ultrasonic extraction operation.

[0030] Step S3, Adaptive centrifugal purification: After the reaction vessel is transferred and positioned under visual guidance, the centrifugation operation is started. The solution stratification status is monitored in real time, and the centrifugation speed and time are dynamically adjusted until the supernatant and precipitate are effectively separated and the centrifugation operation is stopped. Specifically, it includes: S31: After ultrasonic extraction, the adaptive decision unit sends a transfer command, and the first vision monitoring module guides the robotic arm to accurately transfer the reaction vessel to the reaction vessel support of the centrifugal purification module, ensuring that the reaction vessel is placed stably and centered, and avoiding shaking during centrifugation. S32: The decision unit presets the initial centrifugation speed (1000r / min-15000r / min) and centrifugation time based on the sample type and extraction liquid volume, starts the centrifugation purification module, and begins the centrifugation operation; S33: During centrifugation, the second visual monitoring module acquires a layered image of the solution in the reaction vessel every 10 seconds, monitors the clarity of the separation interface between the supernatant and the precipitate, extracts the feature vector of the layered interface, and sends it to the decision model module. The decision model module judges the centrifugation effect based on the real-time feature vector: if the supernatant is clear (gray value ≥ 170) and the layer interface is clear (gray value variance ≤ 1%), it indicates that the centrifugation is sufficient, and the decision unit sends a stop command to shut down the centrifugation purification module; if the effective separation standard is not reached after the preset standard time T2, the decision unit dynamically adjusts the centrifugation speed (± 500 r / min) or extends the centrifugation time until the supernatant and precipitate are effectively separated, and the centrifugation purification operation is completed.

[0031] Step S4, Visual-assisted pipetting: Visually identify the interface between the supernatant and the sediment layer, guide the pipetting device to accurately aspirate and transfer the supernatant, and clean the container and reset the system after pipetting to prepare for the next batch of samples.

[0032] Specifically, it includes: S41: After centrifugation, the second visual monitoring module acquires layered images inside the reaction vessel, accurately identifies the liquid level of the supernatant and the interface with the sediment layer, extracts feature vectors, and sends them to the adaptive decision unit. S42: The decision unit sends a pipetting instruction to the robotic arm and automatic pipetting module based on the height of the supernatant liquid level. The first vision monitoring module guides the robotic arm to hold the pipette and move it above the reaction vessel. The second vision monitoring module guides the pipette nozzle to be aligned with the supernatant area, and the insertion depth is controlled within 0.5-1cm above the layer interface to avoid aspirating sediment. S43: Start the pipette and slowly aspirate the supernatant. The second visual monitoring module monitors the aspiration process in real time. If the aspiration port is detected to be close to the sedimentation interface, a stop aspiration command is sent immediately to ensure that the aspirated supernatant is free of sediment and impurities. S44: Guided by the first vision monitoring module, the robotic arm accurately transfers the aspirated supernatant into the test tube to be tested, completing the pipetting operation; S45: After pretreatment is completed, the adaptive decision unit sends a cleaning command, and the robotic arm guides the container cleaning module to clean the used reaction container, pipette, etc. The waste liquid is discharged into the waste liquid collection module. At the same time, all execution units of the system are reset, waiting for the pretreatment operation of the next batch of samples.

[0033] Example 3: This example uses the pretreatment of pesticide residues in fruit and vegetable agricultural products (spinach) as an example, employing the agricultural product pretreatment system and method of this application, including: 1) After the system starts up, the first vision monitoring module (installed at the center of the top of the experimental platform) performs global positioning and status scanning of the robotic arm, ultrasonic probe, and reaction vessel rack to ensure that all execution units are in the preset "zero position" or standby state. Subsequently, under the dynamic positioning guidance of the first vision monitoring module, the robotic arm transfers the weighed 25g spinach sample (weighing accuracy 0.01g) into a 100mL reaction vessel and places it in the designated position on the reaction vessel rack; 2) The second visual monitoring module (installed on the side of the reaction vessel rack at a 45° angle to the reaction vessel) is aligned with the reaction vessel. After the sample is placed in, it acquires an initial state image and sends the feature vector of this "initial state" to the adaptive decision unit. The adaptive decision unit drives the pipette pump to add 50.0 mL of acetonitrile solution according to the characteristics of the spinach sample. The second visual monitoring module simultaneously monitors the liquid level to ensure that the added liquid volume is accurate and completes the sample addition. 3) Guided by the first visual monitoring module, the robotic arm inserts the ultrasonic probe 2cm below the liquid surface. After starting the ultrasound (initial power 150W), the second visual monitoring module enters the high-speed continuous acquisition mode to continuously monitor the homogenization state of the solution in the reaction vessel. After 1 minute, it is detected that the gray values ​​at different heights in the area are all less than 150, and the variance of the gray values ​​of the solution layer at different heights is 1.65% (≤2%). The decision unit sends a stop command to stop the ultrasonic extraction. 4) After ultrasonic extraction, the robotic arm, guided by the first visual monitoring module, transfers the reaction vessel to the centrifugal purification module. The decision unit presets the initial centrifugal speed to 8000 r / min and the centrifugal time to 2 min, and starts the centrifugal module. 5) After the centrifugation module has been running for 2 minutes, the second visual monitoring module detects that the gray value of the upper layer of the reaction solution after centrifugation is greater than 200, and the variance of the gray value of the solution layer at different heights is 1.87% (≤2%). It is determined that the centrifugation effect has reached the best state, and the decision unit sends a stop command to shut down the centrifugation module. 6) Guided by the first vision monitoring module, the robotic arm moves the pipette above the reaction vessel. The second vision monitoring module guides the pipette to insert it 0.8 cm below the surface of the supernatant, accurately aspirating the supernatant into the tube to be processed, thus completing the pretreatment. In this example, the pretreatment according to the NY / T761-2008 agricultural industry standard is high-speed homogenization for 2 minutes (rotation speed greater than 10000 rpm / min). According to the scheme of this invention, the sample is fully dispersed after running for 1 minute, and the mixing effect brought about by ultrasonic cavitation has reached dynamic equilibrium. The adaptive decision not only saves ultrasonic processing time, reduces energy consumption and thermal effects, and avoids under-extraction or over-extraction, but also fundamentally improves the consistency of extraction efficiency among different samples.

[0034] The samples processed by the pretreatment system of this application were verified by gas chromatography analysis. The extraction recoveries of the target pesticide residues, dimethoate, phoxim, and methamidophos, were consistently between 92.09% and 105.41%, with intra-batch relative standard deviations (RSD) of 3.6% to 6.3%. These results are significantly better than those of traditional manual pretreatment methods (recovery rates ranging from 82% to 115%, with an RSD of approximately 10%).

[0035] Example 4: This example uses the pretreatment of mycotoxins in grain and oilseed agricultural products (corn) as an example, employing the agricultural product pretreatment system and method of this application, including: 1) After the system starts, the first vision monitoring module performs global positioning and status scanning on the robotic arm, ultrasonic probe, and reaction vessel rack to ensure that all execution units are in the preset "zero position" or standby state. Subsequently, under the dynamic positioning guidance of the first vision monitoring module, the robotic arm transfers a 5g weighed corn sample (weighing accuracy 0.01g) into a 50mL reaction vessel and places it in the designated position on the reaction vessel rack; 2) The second visual monitoring module is located on the side of the reaction container. After the sample is placed into the reaction container, it sends the feature vector of this "initial state" to the adaptive decision unit. The adaptive decision unit drives the pipette pump to add 25mL of 84% acetonitrile aqueous extraction solution according to the matrix characteristics of the corn sample. The second visual monitoring module simultaneously monitors the rise of the liquid level to ensure that the added liquid volume is accurate, thus completing the first closed loop of "perception-decision-execution". 3) Guided by the first visual monitoring module, the robotic arm inserts the ultrasonic probe 2.5 cm below the liquid surface. After starting the ultrasound (initial power 200W), the second visual monitoring module enters the high-speed continuous acquisition mode to continuously monitor the homogenization state of the solution in the reaction vessel. After 2 minutes, the gray values ​​at different heights in the monitoring area are all less than 100, and the variance of the gray values ​​of the solution layer at different heights is 1.29% (≤2%), at which point the ultrasonic extraction is stopped. 4) After the ultrasonic extraction is completed, the robotic arm transfers the reaction vessel to the centrifugal purification module. The decision unit presets the initial centrifugal speed to 10,000 r / min and the centrifugal time to 2 min, and starts the centrifugal module. 5) After the centrifugation module has been running for 2 minutes, the second visual monitoring module detects that the gray value of the upper layer of the reaction solution after centrifugation is greater than 195, and the variance of the gray value of the solution layer at different heights is 0.98% (≤1%). The centrifugation effect has reached the best state, and the centrifugation module is turned off. 6) Under visual guidance, the robotic arm precisely aspirates the supernatant into the tube to be treated, completing the pretreatment; In this example, the sample pretreatment according to GB / T5009.22-2016 is high-speed homogenization for 3 minutes (rotation speed greater than 10000 r / min). According to the scheme of this invention, the sample is fully dispersed after running for 2 minutes. The ultrasonic cavitation and thermal effect improve the extraction efficiency, avoid under-extraction or over-extraction, and fundamentally improve the consistency of extraction efficiency among different samples.

[0036] The samples processed by the pretreatment system of this application were verified by LC-MS / MS analysis, and the recovery rate of the target aflatoxin B1 was consistently between 95.14% and 106.21%, with an intra-batch relative standard deviation (RSD) of only 3.9%. This result is significantly better than the traditional manual pretreatment method (recovery rate range of 80%-120%, RSD of about 15%).

[0037] Furthermore, all parts of this application that are not described in detail are the same as or implemented using existing technology.

[0038] In summary: 1. This invention achieves precise global and local monitoring of the entire pretreatment process through the dual-module layout of the machine vision monitoring unit. Combined with the deep learning model of the adaptive decision unit, process parameters can be dynamically optimized. With the coordinated operation of each module of the execution unit, the automation and intelligence level of pretreatment is greatly improved, the processing cycle is effectively shortened, energy consumption and reagent consumption are reduced, and efficient processing of large batches of agricultural product samples is achieved.

[0039] 2. This invention achieves precise connection between sample weighing, transfer, and liquid addition steps through visual guidance. Combined with adaptive adjustment of ultrasonic and centrifugation parameters and a characteristic threshold monitoring mechanism, it can ensure that different types and batches of agricultural products can achieve the best pretreatment effect, with stable extraction recovery rate and low intra-batch relative standard deviation, providing a precise and reliable sample basis for subsequent instrument detection and analysis.

[0040] 3. The system of the present invention has a reasonable overall layout and is easy to operate. The processing flow can be flexibly adjusted through preset parameters to adapt to the pre-processing needs of various types of agricultural products. Moreover, the automated execution reduces the risk of personnel coming into contact with organic solvents. It has broad application prospects and promotional value.

[0041] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A pre-processing system for agricultural product testing based on machine vision perception and decision-making, characterized in that, include: Machine vision monitoring unit, adaptive decision-making unit, and execution unit; The machine vision monitoring unit includes a first vision monitoring module and a second vision monitoring module, used to acquire images of the equipment and solution status during the pretreatment process in real time; the adaptive decision unit is communicatively connected to the machine vision monitoring unit, and includes a feature extraction module and a decision model module, used to receive and analyze the images of the equipment and solution status, extract feature information, and output optimized process parameter instructions; the execution unit is communicatively connected to the adaptive decision unit, and includes an automatic pipetting module, an ultrasonic extraction module, a centrifugal purification module, and a robotic arm, used to receive the process parameter instructions and execute corresponding pretreatment operations.

2. The agricultural product pretreatment system based on machine vision perception and decision-making according to claim 1, characterized in that, The first visual monitoring module is mounted on the top of the experimental platform via a top bracket. Its image acquisition lens is vertically downward and covers the entire operating area of ​​the execution unit. The first visual monitoring module is used to monitor the operating status and spatial position of each component of the execution unit in real time. The second visual monitoring module is mounted on the side of the reaction vessel via a side bracket. Its image acquisition lens is at a preset angle to the axis of the reaction vessel. The second visual monitoring module is used to monitor the sample status, liquid level, and reaction progress in the reaction vessel in real time.

3. The agricultural product pretreatment system based on machine vision perception and decision-making according to claim 1, characterized in that, The adaptive decision-making unit includes a feature extraction module and a decision model module; The feature extraction module is used to extract multi-dimensional feature vectors from the device and solution state images. The feature vectors include liquid level height features, solution grayscale value features, solution layer interface features, and position features of each execution component. The decision model module adopts a deep learning model that integrates CNN and LSTM. Based on the multi-dimensional feature vector and combined with the preset detection standard, it generates optimization instructions for the corresponding process parameters, including ultrasonic power and time, centrifugation time and speed, and pipetting height and volume.

4. The agricultural product pretreatment system based on machine vision perception and decision-making according to claim 1, characterized in that, The execution unit is equipped with an automatic liquid transfer module, an ultrasonic extraction module, a centrifugal purification module, and a robotic arm; The automatic pipetting module is installed on one side of the middle of the experimental platform. It includes a pipetting pump, a pipette, and a reagent storage box. The automatic pipetting module is used for adding extract and transferring sample solution in the reaction vessel. The ultrasonic extraction module is installed in the main operating area in the middle of the experimental platform. It includes an ultrasonic generator and a liftable ultrasonic probe. The ultrasonic extraction module is used to perform ultrasonic-assisted extraction of sample components in the solution in the reaction vessel to obtain a crude sample solution. The centrifugal purification module includes a centrifuge, which is used to centrifuge the crude sample solution to separate the supernatant and precipitate containing the sample components. The robotic arm is mounted on a guide rail on one side of the experimental table. It can move along the X, Y, and Z axes and is equipped with a clamping device at its end. The robotic arm is used to perform the movement operations of the pipette and the reaction vessel.

5. The agricultural product pretreatment system based on machine vision perception and decision-making according to claim 1, characterized in that, The execution unit is also equipped with a sample weighing module, a container cleaning module, and a waste liquid collection module; the sample weighing module is used to accurately weigh the sample, and the container cleaning module and the waste liquid collection module are used to clean the reaction container and collect the waste liquid in the container after the pretreatment is completed, respectively.

6. A pre-processing method for agricultural product testing based on machine vision perception and decision-making, employing the agricultural product pre-processing system as described in any one of claims 1 to 5, characterized in that, Includes the following steps: S1, Visual-guided sample addition: The first visual monitoring module guides the robotic arm to transfer a sample of a preset weight into the reaction container. At the same time, the adaptive decision unit calculates the required volume of extract based on the sample type, weighing mass, and preset extraction standards. Under the real-time monitoring of the second visual monitoring module, the automatic transfer module adds the target volume of extract into the reaction container. S2, Adaptive Ultrasonic Extraction: Adjust the insertion depth of the ultrasonic probe according to the current liquid level in the reaction vessel and start the ultrasonic generator. Quantify the homogenization state of the solution by calculating the gray variance of different heights in the solution area of ​​the reaction vessel, and dynamically adjust the ultrasonic power and time until the gray value characteristics of the solution reach the preset extraction standard and then turn off the ultrasonic generator. S3, Adaptive Centrifugal Purification: The first visual monitoring module guides the robotic arm to transfer the reaction vessel to the container support of the centrifugal purification module and starts the centrifuge. The second visual monitoring module monitors the clarity of the layering interface between the supernatant and the precipitate in real time and dynamically adjusts the centrifugation speed and time until the supernatant and the precipitate are effectively separated and then the centrifuge is turned off. S4, Visual-assisted pipetting: Based on the interface between the supernatant and the precipitate, the robotic arm and automatic pipetting module are guided to accurately pick up the target phase liquid in the reaction vessel and transfer it to the test tube to be tested, thus completing the pipetting operation.

7. The method for pretreatment of agricultural products for testing according to claim 6, characterized in that... In step S1, the required volume of the extract is calculated using the following formula: In 提 =m×k×f In the formula, V 提 m is the required extraction volume; k is the sample mass; k is the preset liquid-to-solid ratio, which is set according to the sample type; f is the matrix correction coefficient, which is set according to the complexity of the sample matrix.

8. The method for pretreatment of agricultural products for testing according to claim 6, characterized in that... In step S2, if the variance of gray values ​​at different heights in the solution area is ≤2% and there are no obvious sample particles remaining, it is determined that the gray value characteristics of the solution have reached the preset extraction standard, and the ultrasonic generator is turned off. If the extraction standard is not reached after the preset standard time T1, the ultrasonic power is increased or the ultrasonic time is extended according to the preset ratio until the preset extraction standard is reached.

9. The method for pretreatment of agricultural products for testing according to claim 6, characterized in that... In step S3, if the solution area is clearly separated and the gray value of the supernatant is ≥170, it is determined that the supernatant and the precipitate have been effectively separated, and the centrifuge is turned off. If the effective separation standard is not achieved after the preset standard time T2, the centrifugation speed or centrifugation time will be increased according to the preset ratio until the supernatant and precipitate are effectively separated.

10. The method for pretreatment of agricultural products for testing according to claim 6, characterized in that... In step S4, the precise removal of the target phase liquid from the reaction vessel includes: The first vision monitoring module guides the robotic arm to move the pipette above the reaction vessel, and the second vision monitoring module guides the pipette nozzle to be aligned with the supernatant area, and adjusts the insertion depth of the nozzle to a preset height above the layered interface to avoid aspirating sediment.