Online sampling and laboratory testing linkage intelligent quality control method for litchi sorting
Patent Information
- Application Number
- CN202611084473.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]本申请提供了一种荔枝分拣的在线抽检与实验室检测联动智能质量管控方法,旨在解决当前荔枝分拣环节的抽检工作普遍依赖人工完成,抽检样本选取缺乏科学依据,代表性不足且流转效率低下等问题
1.基于分拣流水线的实时分拣数据执行分层抽样,提升抽检样本的科学性与代表性,配合自动化的样本抓取与送检流转,降低人工成本,提升抽检环节的执行效率与准确性。
Smart Images

Figure CN122583263A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent sorting technology for agricultural products, and in particular to an intelligent quality control method that links online sampling and laboratory testing for lychee sorting. Background Technology
[0002] Currently, random sampling in the lychee sorting process generally relies on manual labor. The selection of samples lacks scientific basis, is not representative enough, and has low circulation efficiency. The data from online rapid testing and laboratory precision testing are independent of each other and have not formed an effective linkage. It is impossible to use laboratory test results to optimize the control parameters of online sorting, and it is difficult to improve the accuracy of online testing. At the same time, the quality traceability capability of the entire lychee sorting process is weak, and it is impossible to achieve quality traceability at the individual fruit level and complete batch quality file management, which makes it difficult to meet the requirements of food-grade quality control. Summary of the Invention
[0003] This application provides an intelligent quality control method that links online sampling inspection with laboratory testing in lychee sorting, aiming to solve the problems that the current lychee sorting process generally relies on manual sampling, the selection of sampling samples lacks scientific basis, the samples are not representative enough, and the circulation efficiency is low.
[0004] In a first aspect, embodiments of this application provide an intelligent quality control method for online sampling and laboratory testing linkage in lychee sorting, the method comprising: The system acquires real-time sorting data generated by the lychee sorting line, constructs a stratified sampling strategy based on the real-time sorting data, and determines the samples to be sampled. It then controls the embodied intelligent mechanism to complete the grasping operation of the samples to be sampled and completes the transfer of the sampled samples to the laboratory testing stage. The system collects first quality data of the sampled specimens obtained through online rapid detection and second quality data of the corresponding sampled specimens obtained through laboratory testing, and establishes a correlation link between the first quality data and the second quality data. Based on the correlation link, the first quality data, and the second quality data, a quality correction model is constructed, and the online sorting parameters of the lychee sorting line are output according to the quality correction model. After the online sorting parameters of the lychee sorting line are updated, the full sorting process data and corresponding test data of a single lychee are obtained, and a single-fruit quality traceability record and a full batch lychee quality archive are generated for the lychee sorting line.
[0005] In some embodiments, acquiring real-time sorting data generated by the lychee sorting line includes: collecting lychee information output from each station of the lychee sorting line; the lychee information includes lychee appearance image data, weight data, location coordinate data, sorting time sequence data, and batch identification data; generating a unique identification identifier for each lychee, and generating the real-time sorting data based on the unique identification identifier and the lychee information.
[0006] In some embodiments, the step of constructing a stratified sampling strategy based on real-time sorting data to determine the samples to be inspected includes: stratifying the single fruit data in the real-time sorting data according to a preset dimension, determining the sampling ratio of the corresponding stratum according to the total number of single fruits in each stratum, randomly selecting single fruits from each stratum according to the sampling ratio, and marking the selected single fruits as samples to be inspected; the preset dimension includes batch identifier, appearance grade, and weight range.
[0007] In some embodiments, controlling the embodied intelligent mechanism to complete the grasping operation of the sample to be inspected and to complete the transfer of the sample to the laboratory testing stage includes: reading the location coordinate data and unique identification of the sample to be inspected, planning the grasping motion path of the embodied intelligent mechanism; controlling the embodied intelligent mechanism to reach the corresponding position to grasp the sample to be inspected, placing the sample to be inspected in the laboratory delivery carrier, synchronizing the unique identification to the laboratory testing system, and completing the transfer.
[0008] In some embodiments, the acquisition of first quality data of the sampled specimens obtained by online rapid detection and second quality data of the corresponding sampled specimens obtained by laboratory testing includes: acquiring peel color data, surface defect data, and near-infrared spectral preliminary detection data of the sampled specimens output by the online rapid detection station; binding the peel color data, surface defect data, and near-infrared spectral preliminary detection data with the unique identification identifier of the corresponding sampled specimens as the first quality data; acquiring sugar content data, acidity data, pulp texture data, and pesticide residue data of the sampled specimens output by the laboratory testing equipment, and binding the sugar content data, acidity data, pulp texture data, and pesticide residue data with the unique identification identifier of the corresponding sampled specimens as the second quality data.
[0009] In some embodiments, establishing the association link between the first quality data and the second quality data, and constructing a quality correction model based on the association link, the first quality data, and the second quality data, includes: using a unique identifier as the matching basis, matching the first quality data and the second quality data of the same sample to form a data association link; dividing the associated first quality data and the second quality data into a training dataset and a validation dataset; fitting the mapping relationship between the first quality data and the second quality data based on the training dataset; iteratively optimizing the mapping relationship through the validation dataset to generate a quality correction model.
[0010] In some embodiments, the step of outputting online sorting parameters of the lychee sorting line according to the quality correction model includes: inputting the online detection data collected in real time by the lychee sorting line into the quality correction model to obtain the corrected single fruit quality judgment result; adjusting the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting line according to the corrected quality judgment result; and sending the adjusted quality grading threshold and abnormal fruit rejection threshold as updated online sorting parameters to the lychee sorting line.
[0011] In some embodiments, after the online sorting parameters of the lychee sorting line are updated, the process of acquiring the entire sorting process data and corresponding test data of a single lychee, and generating a single-fruit-level quality traceability record and a full batch lychee quality archive for the lychee sorting line, includes: collecting full-process node data of a single lychee from feeding, testing and grading to warehousing; associating the quality test data of the corresponding single fruit to generate a single-fruit-level quality traceability record; generating a corresponding traceability code for each lychee; acquiring the quality data, sampling data and sorting parameter data of all lychees in the same batch to form a full batch lychee quality archive; and storing the traceability record and quality archive in a preset control system.
[0012] In some embodiments, the method further includes: statistically analyzing the quality distribution patterns and sampling deviation data in the historical full batch quality archives of lychees to construct a batch quality fluctuation prediction model; inputting the real-time sorting data of the current batch into the batch quality fluctuation prediction model to obtain the quality fluctuation prediction result of the current batch; dynamically adjusting the sampling ratio of the stratified sampling strategy according to the quality fluctuation prediction result, generating targeted sampling instructions for the predicted abnormal quality intervals, and controlling the embodied intelligent mechanism to supplement the grabbing of lychee samples in the corresponding intervals to complete the inspection.
[0013] In some embodiments, the method further includes: summarizing the iterative data of quality correction models corresponding to different litchi varieties and different maturity levels, extracting the correction parameter set corresponding to each variety and maturity level, and establishing a variety correction parameter database; when a new variety or new maturity litchi is connected to the litchi sorting line, identifying the variety and maturity information of the current litchi, and calling the corresponding correction parameter set from the variety correction parameter database to complete the initialization of the quality correction model and the automatic configuration of online sorting parameters.
[0014] This application has the following beneficial effects: 1. Stratified sampling is performed based on real-time sorting data from the sorting line to improve the scientific rigor and representativeness of the sampled products. Combined with automated sample grabbing and delivery, this reduces labor costs and improves the efficiency and accuracy of the sampling process.
[0015] 2. Establish a data link between online rapid testing and laboratory precision testing, build a quality calibration model and optimize online sorting parameters in reverse, effectively improving the accuracy of online testing and the quality control level of the sorting process.
[0016] 3. Achieve full-process quality traceability at the single-fruit level, while generating complete batch quality archives, improving the quality control system of the entire lychee sorting chain, and meeting the standard requirements for food-grade quality control.
[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic flowchart illustrating the steps of an intelligent quality control method for online sampling and laboratory testing of lychee sorting, provided in one embodiment of this application. Figure 2 This is a schematic diagram of the embodied intelligent mechanism corresponding to an online sampling and laboratory testing linkage intelligent quality control method for lychee sorting provided in an embodiment of this application; Figure 3 This is a schematic block diagram of an intelligent quality control system for online sampling and laboratory testing of lychees, provided in one embodiment of this application. Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0023] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0024] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0025] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0026] Currently, random sampling in the lychee sorting process generally relies on manual labor. The selection of samples lacks scientific basis, is not representative enough, and has low circulation efficiency. The data from online rapid testing and laboratory precision testing are independent of each other and have not formed an effective linkage. It is impossible to use laboratory test results to optimize the control parameters of online sorting, and it is difficult to improve the accuracy of online testing. At the same time, the quality traceability capability of the entire lychee sorting process is weak, and it is impossible to achieve quality traceability at the individual fruit level and complete batch quality file management, which makes it difficult to meet the requirements of food-grade quality control.
[0027] Please refer to Figure 1 This application provides an intelligent quality control method for online sampling and laboratory testing linkage in lychee sorting. The provided method includes steps S101 to S103. Details are as follows: Step S101. Obtain real-time sorting data generated by the lychee sorting line, construct a stratified sampling strategy based on the real-time sorting data, determine the samples to be sampled; control the embodied intelligent mechanism to complete the grabbing operation of the samples to be sampled, and complete the transfer of the sampled samples to the laboratory testing stage.
[0028] Specifically, this step is executed collaboratively by the central control unit of the lychee sorting line and the motion control unit of the embodied intelligent mechanism. It is divided into two execution stages: sampling strategy generation and physical transfer of samples, and no human intervention is required throughout the process.
[0029] The first phase involves constructing a stratified sampling strategy and determining the samples to be sampled. After the lychee sorting line starts operating, data acquisition units deployed at each workstation continuously collect all sorting data generated during the line's operation and upload all data to the central control unit in real time. The central control unit cleans, deduplicates, and aligns the received multi-source data, generating a globally unique identifier for each lychee entering the line. All collected data corresponding to a single lychee is bound and stored with the unique identifier, forming a complete real-time sorting database.
[0030] Based on this, the central control unit invokes a pre-set stratified sampling algorithm module. Using the individual fruit data in the real-time sorting database as a basis, it groups and stratifies all individual fruits according to a pre-set stratification dimension. Then, based on the total number of individual fruits in each stratum and the corresponding batch quality control requirements, it calculates the sampling quantity and sampling ratio for each stratum. Subsequently, according to the determined sampling ratio, a corresponding number of individual fruits are selected within the corresponding stratum using random number generation. The selected individual fruits are marked as lychee samples to be inspected, and the unique identification identifier and real-time position coordinates on the production line of all lychee samples to be inspected are recorded.
[0031] The second stage involves the sampling and delivery of samples for testing. The central control unit synchronously sends the location coordinates, unique identifiers, and timing information of all lychee samples to be sampled to the motion control unit of the embodied intelligent mechanism. Based on the real-time operating speed of the production line, the arrival time of the samples, and the motion parameters of the embodied intelligent mechanism itself, the motion control unit plans and generates the optimal grasping path, while simultaneously predicting the arrival time of the samples at the grasping station. When a lychee sample arrives at the grasping station along the production line, the motion control unit drives the machine body and end effector to the corresponding position, completing a stable grasping action for a single lychee sample. After grasping, the motion control unit controls the embodied intelligent mechanism to place the grasped lychee sample into a pre-set laboratory delivery carrier, and simultaneously synchronizes the unique identifier of the corresponding lychee sample to the laboratory-side testing management system via wired or wireless communication, completing the entire process of sample transfer and information synchronization from the sorting production line to the laboratory testing stage.
[0032] Step S102. Collect the first quality data of the sampled samples obtained by online rapid detection and the second quality data of the corresponding sampled samples obtained by laboratory detection, and establish the correlation link between the first quality data and the second quality data; construct a quality correction model based on the correlation link, the first quality data and the second quality data, and output the online sorting parameters of the lychee sorting line according to the quality correction model.
[0033] Specifically, this step is executed by the data analysis module and model training module of the central control unit. The core of this step is to achieve the linkage correction between online detection data and laboratory detection data, forming a closed loop for optimizing detection accuracy.
[0034] First, dual-end quality data collection and correlation link establishment are performed. The testing unit deployed at the online rapid testing station performs rapid non-destructive testing on all lychees passing through the station, including samples to be inspected, generating corresponding online testing results, i.e., the first quality data. After the online testing unit uploads the generated first quality data to the central control unit, the central control unit binds the first quality data with the unique identification mark of the corresponding lychee and stores it in the real-time sorting database.
[0035] Once the sampled specimens enter the laboratory for testing via the delivery vehicle, the precision testing equipment in the laboratory performs multi-dimensional physicochemical index tests on the specimens, generating corresponding laboratory test results, i.e., the second quality data. The laboratory testing management system binds the generated second quality data with the unique identifier of the corresponding sample and transmits it back to the central control unit on the production line side. Upon receiving the second quality data, the central control unit uses the unique identifier as the unique matching key to retrieve the corresponding first quality data for the sample from the database. This allows for a one-to-one matching of the two sets of test data for the same lychee sample, forming a data link connecting the online and laboratory ends, thus enabling data exchange between the two ends for the same tested object.
[0036] Next, the quality correction model is constructed and optimized. The model training module of the central control unit retrieves all the matched two-end quality data and randomly divides the dataset into training and validation datasets according to a preset ratio. The training dataset is used to fit the mapping relationship, and the validation dataset is used to verify the model accuracy. The model training module uses the first quality data in the training dataset as input features and the corresponding second quality data as the calibration target. It adopts a supervised fitting training method to learn the mapping relationship and deviation pattern between online rapid detection data and laboratory precision detection data. After each round of training, the accuracy of the currently generated mapping relationship is verified using the validation dataset. The error value between the validation result and the calibration value is calculated. When the error value is higher than the preset accuracy threshold, the internal parameters of the model are adjusted and iterative training continues. When the error value is lower than or equal to the preset accuracy threshold, the training process is stopped, and the current mapping relationship is solidified as the final quality correction model.
[0037] Finally, the online sorting parameters are generated and distributed. After the quality correction model is built, the central control unit inputs the online detection data collected in real time from the production line into the quality correction model, and the model outputs the single-fruit quality judgment result after deviation correction. Based on the corrected full-volume single-fruit quality judgment result and combined with the preset grading standards, the central control unit recalculates the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting production line. The recalculated thresholds are used as the updated online sorting parameters and distributed to each grading execution station and detection station of the production line through the industrial bus, realizing the reverse optimization of online sorting control parameters by the laboratory's precise test results.
[0038] Step S103. After the online sorting parameters of the lychee sorting line are updated, the full sorting process data and corresponding test data of a single lychee are obtained, and a single-fruit quality traceability record and a full batch lychee quality archive are generated for the lychee sorting line.
[0039] Specifically, this step is executed by the traceability management module of the central control unit. It is initiated after the online sorting parameters are updated and take effect, thus achieving full-chain quality traceability.
[0040] First, the traceability management module retrieves full-process node data for each lychee from the real-time sorting database, starting from its entry into the production line. This includes data on feeding time, batch number, testing data at each workstation, grading results, sampling marks, outbound time, and flow information. Simultaneously, it retrieves online and laboratory testing data for the corresponding lychee. All data is then sorted and integrated according to time, generating a single-fruit-level quality traceability record for each lychee. For each single-fruit-level quality traceability record, the traceability management module generates a unique traceability code. This code corresponds one-to-one with the unique identifier of the lychee, allowing for the retrieval of the corresponding lychee's full-process quality information via a barcode scanner.
[0041] Based on this, the traceability management module uses batch identifiers as indexes to aggregate quality grading data for all lychees within the same production batch, dual-end testing data of sampled specimens, online sorting parameter adjustment records during batch operation, abnormal fruit removal records, and all quality control data. This data is then structured according to a preset file format to generate a complete batch-wide lychee quality file. Both the generated single-fruit-level quality traceability records and the batch-wide lychee quality file are stored in a dedicated storage unit within the control system, supporting subsequent quality traceability, regulatory verification, and data analysis, thus meeting the end-to-end traceability requirements for food-grade quality control.
[0042] In some embodiments, acquiring real-time sorting data generated by the lychee sorting line includes: collecting lychee information output from each station of the lychee sorting line; the lychee information includes lychee appearance image data, weight data, location coordinate data, sorting time sequence data, and batch identification data; generating a unique identification identifier for each lychee, and generating the real-time sorting data based on the unique identification identifier and the lychee information.
[0043] This embodiment further refines the process of collecting and generating real-time sorting data. The lychee sorting line is sequentially deployed along the material conveying direction, including an infeed station, a visual inspection station, a weighing station, a grading station, and an outfeed station. Each station is equipped with a corresponding data acquisition unit, and all acquisition units are communicatively connected to the central control unit. Specifically, the infeed station is equipped with a photoelectric sensor and a batch scanning unit. When lychees enter the line, the photoelectric sensor triggers a count, and the batch scanning unit reads the batch identifier information of the current infeed batch, generating infeed sequence data and batch attribution data for each lychee.
[0044] The visual inspection station is equipped with an area array image acquisition unit and a spectral acquisition unit to acquire appearance images and preliminary near-infrared spectra of the litchis passing through the station, outputting visual data such as the litchi's appearance image, peel color parameters, and surface defect identification results. The weighing station is equipped with a high-precision online weighing unit to detect the weight of individual litchis passing through the station, outputting the weight data of a single fruit. The grading station is equipped with a position detection unit to record the grading exit position and grading time of individual litchis, outputting grading result data and position coordinate data.
[0045] After receiving all the data uploaded from each of the aforementioned workstations, the central control unit first performs time-series alignment and identity matching on the data of the same lychee collected from different workstations based on the feeding sequence and workstation spacing to ensure that all data correspond to the same inspection object. After matching is completed, the central control unit generates a globally unique identification identifier for each lychee, binding all the corresponding lychee's appearance image data, weight data, location coordinate data, sorting sequence data, and batch identification data to the unique identification identifier to form structured single-fruit sorting data. The collection of all single-fruit sorting data constitutes the real-time sorting data, which is stored in real-time in the central control unit's memory database for subsequent sampling and analysis.
[0046] In some embodiments, the step of constructing a stratified sampling strategy based on real-time sorting data to determine the samples to be inspected includes: stratifying the single fruit data in the real-time sorting data according to a preset dimension, determining the sampling ratio of the corresponding stratum according to the total number of single fruits in each stratum, randomly selecting single fruits from each stratum according to the sampling ratio, and marking the selected single fruits as samples to be inspected; the preset dimension includes batch identifier, appearance grade, and weight range.
[0047] This embodiment further refines the construction of the stratified sampling strategy and the process of determining the samples to be sampled. After the central control unit completes the collection and storage of real-time sorting data, it calls the stratified sampling module to perform the sampling operation. The stratification dimensions are set as three dimensions: batch identifier, appearance grade, and weight range.
[0048] First, the first layer is divided according to batch identification, isolating lychee data from different production batches. Sampling is performed independently on a batch-by-batch basis, avoiding sample bias caused by cross-batch sampling. Second, the second layer is divided according to appearance grade. Based on the appearance recognition results output from the visual inspection station, lychees within the same batch are divided into four appearance grade levels: premium, first-grade, second-grade, and ungraded. Finally, the third layer is divided according to weight range. Based on the single-fruit weight data output from the weighing station, each appearance grade level is further divided into multiple consecutive weight range levels according to preset weight intervals, ultimately forming a multi-dimensional hierarchical structure.
[0049] After stratification, the sampling module counts the total number of individual fruits within each finest stratum. Based on the preset total sampling ratio and the proportion of individual fruits in each stratum, it calculates the sampling quantity for each stratum. The higher the proportion of individual fruits in a stratum, the greater the sampling quantity. For strata with substandard appearance grades, a higher sampling ratio is set separately to improve the coverage of abnormal quality samples. After determining the sampling quantity for each stratum, the sampling module uses a pseudo-random number generation algorithm to randomly select the corresponding number of individual fruits from the list of individual fruits in the corresponding stratum. The selected individual fruits are marked as lychee samples to be inspected. At the same time, the unique identifier, the location of the workstation, and the estimated arrival time at the grabbing workstation of all samples to be inspected are recorded, and a list of samples to be inspected is generated and synchronized to the embodied intelligent mechanism control unit.
[0050] In some embodiments, controlling the embodied intelligent mechanism to complete the grasping operation of the sample to be inspected and to complete the transfer of the sample to the laboratory testing stage includes: reading the location coordinate data and unique identification of the sample to be inspected, planning the grasping motion path of the embodied intelligent mechanism; controlling the embodied intelligent mechanism to reach the corresponding position to grasp the sample to be inspected, placing the sample to be inspected in the laboratory delivery carrier, synchronizing the unique identification to the laboratory testing system, and completing the transfer.
[0051] This embodiment further refines the process of grasping and sending samples for inspection by the embodied intelligent mechanism. After receiving the list of samples to be inspected from the central control unit, the control unit of the embodied intelligent mechanism first calculates the time node of each sample to be inspected arriving at the grasping station based on the real-time conveying speed of the production line and the current position of the sample to be inspected, and generates a grasping task queue in chronological order.
[0052] For each grasping task in the queue, the control unit combines the current pose of the embodied intelligent mechanism, the spatial position of the grasping station, and the placement position of the delivery carrier to generate a collision-free grasping motion path through motion planning algorithms. The path includes the body adjustment path, the arm extension path, the end effector grasping path, and the return and transfer path. When the sample to be inspected reaches the preset trigger position of the grasping station, the position sensor sends a trigger signal to the control unit. The control unit drives the body joints and the end effector to move according to the planned motion path. The end effector adopts a flexible clamping structure to control the clamping force during the grasping process and avoid mechanical damage to the lychee peel.
[0053] After the grasping action is completed, the control unit drives the robotic arm to smoothly place the grasped lychee sample into the corresponding sample slot of the laboratory delivery carrier. For each sample placed, the control unit binds the unique identifier of the corresponding sample to the sample slot number of the delivery carrier, ensuring a one-to-one correspondence between the physical location of the sample and the information identifier. Once all samples in a batch have been placed, the delivery carrier transports them to the laboratory testing area via an automated transfer track. Simultaneously, the control unit synchronizes the binding relationship between the sample slot and the unique identifier to the laboratory testing management system. The laboratory testing equipment can then directly retrieve the sorting data of the corresponding sample through the sample slot number, completing the delivery flow of the sampled specimens.
[0054] In some embodiments, the acquisition of first quality data of the sampled specimens obtained by online rapid detection and second quality data of the corresponding sampled specimens obtained by laboratory testing includes: acquiring peel color data, surface defect data, and near-infrared spectral preliminary detection data of the sampled specimens output by the online rapid detection station; binding the peel color data, surface defect data, and near-infrared spectral preliminary detection data with the unique identification identifier of the corresponding sampled specimens as the first quality data; acquiring sugar content data, acidity data, pulp texture data, and pesticide residue data of the sampled specimens output by the laboratory testing equipment, and binding the sugar content data, acidity data, pulp texture data, and pesticide residue data with the unique identification identifier of the corresponding sampled specimens as the second quality data.
[0055] This embodiment further refines the process of collecting and binding dual-end quality data. The first quality data is collected by an online rapid detection station deployed on the sorting line. The detection process does not require contact with the lychees and does not damage the fruit. The collected parameters include three categories: the first category is peel color data, obtained through visible light image acquisition and color space conversion, used to characterize the maturity and color uniformity of the lychee; the second category is surface defect data, obtained through image recognition algorithms, including the type, area, and location information of three types of defects: lesions, mechanical damage, and fruit cracks; the third category is near-infrared spectral preliminary inspection data, obtained by collecting the transmission spectrum data of the lychee through a near-infrared spectral acquisition unit, to preliminarily estimate the internal sugar content and moisture content parameters of the lychee. All parameters obtained from online detection are bound to the unique identification mark of the corresponding lychee and stored in the database to form the first quality data.
[0056] The second quality data is collected by precision testing equipment in the laboratory. This involves destructive or semi-destructive high-precision testing, and the collected parameters include four categories: First, sugar content data, obtained by measuring the soluble solids content of lychee juice using a refractometer, providing an accurate sugar content value; second, acidity data, obtained by measuring the acidity content using a pH meter, providing an accurate value for titratable acid content; third, pulp texture data, obtained by measuring the firmness and elasticity of the pulp using a texture analyzer; and fourth, pesticide residue data, obtained by detecting pesticide residues in the lychee peel and pulp using chromatographic equipment. After laboratory testing is completed, all test parameters are linked to the unique identifier of the corresponding sample and transmitted back to the central control unit, forming the second quality data.
[0057] In some embodiments, establishing the association link between the first quality data and the second quality data, and constructing a quality correction model based on the association link, the first quality data, and the second quality data, includes: using a unique identifier as the matching basis, matching the first quality data and the second quality data of the same sample to form a data association link; dividing the associated first quality data and the second quality data into a training dataset and a validation dataset; fitting the mapping relationship between the first quality data and the second quality data based on the training dataset; iteratively optimizing the mapping relationship through the validation dataset to generate a quality correction model.
[0058] This embodiment further refines the process of establishing data association links and constructing quality correction models. After receiving the second quality data from the laboratory, the central control unit initiates a data matching process. Using the unique identifier as the unique matching field, it retrieves the first quality data of the corresponding sample from the real-time sorting database and pairs and stores the two sets of data corresponding to the same unique identifier. All paired data from both ends form an associated dataset. Each data entry contains both the online rapid detection result and the laboratory precision detection result for the same lychee sample, thus forming a data association link connecting the online and laboratory ends.
[0059] In the model building phase, the associated dataset is first preprocessed to remove invalid samples with missing data or detection anomalies. The remaining valid data is then normalized to eliminate differences in the units of different parameters. After preprocessing, the dataset is randomly divided into training and validation datasets in an 8:2 ratio, with the training dataset comprising 80% of the total data and the validation dataset comprising 20%.
[0060] The model training process employs supervised regression training, using all parameters from the first quality data as input features and three core parameters from the second quality data—sugar content, acidity, and pulp texture—as output targets. The training establishes a non-linear mapping relationship between the input features and the output targets. After each training iteration, the input features from the validation dataset are imported into the current model to obtain predicted output values. The average error between the predicted output values and the actual detection values in the validation dataset is calculated. When the average error exceeds a preset threshold, the model's internal weight parameters are adjusted, and the next iteration of training continues. When the average error is less than or equal to the preset threshold, and the error no longer decreases after multiple training iterations, the model is considered converged, the training process is stopped, and the current model structure and parameters are solidified as the final quality correction model, stored in the model library for later use.
[0061] In some embodiments, the step of outputting online sorting parameters of the lychee sorting line according to the quality correction model includes: inputting the online detection data collected in real time by the lychee sorting line into the quality correction model to obtain the corrected single fruit quality judgment result; adjusting the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting line according to the corrected quality judgment result; and sending the adjusted quality grading threshold and abnormal fruit rejection threshold as updated online sorting parameters to the lychee sorting line.
[0062] This embodiment further refines the process of outputting online sorting parameters from the quality correction model. After the quality correction model is deployed, the central control unit inputs the first quality data of each lychee collected in real time from the production line into the quality correction model. The model outputs the corrected internal quality parameters for the corresponding lychee, including the corrected sugar content, acidity, and texture parameters. The central control unit combines the corrected internal quality parameters with the lychee's appearance quality parameters as the basis for determining the quality grading of individual fruits.
[0063] The central control unit has multiple pre-set quality grading standards. Based on the sales demand and control requirements of the current batch, it calls upon the corresponding grading standard and, combined with the corrected quality parameter distribution of the entire batch of lychees, calculates the corresponding grading thresholds for each grade, including sugar content thresholds, color thresholds, and defect area thresholds for premium, first-grade, and second-grade fruit. Simultaneously, the central control unit calculates the abnormal fruit removal thresholds based on the criteria for judging abnormal fruit, including initial pesticide residue screening thresholds and severe defect removal thresholds.
[0064] After calculating all threshold parameters, the central control unit uses the new grading threshold and rejection threshold as the updated online sorting parameters and sends them to the grading actuator and online detection unit of the production line via industrial Ethernet. The online detection unit completes real-time quality judgment according to the new threshold, and the grading actuator completes the grading and unloading of lychees according to the new judgment results, realizing the dynamic optimization and closed-loop adjustment of online sorting parameters based on the laboratory precision test results.
[0065] In some embodiments, after the online sorting parameters of the lychee sorting line are updated, the process of acquiring the entire sorting process data and corresponding test data of a single lychee, and generating a single-fruit-level quality traceability record and a full batch lychee quality archive for the lychee sorting line, includes: collecting full-process node data of a single lychee from feeding, testing and grading to warehousing; associating the quality test data of the corresponding single fruit to generate a single-fruit-level quality traceability record; generating a corresponding traceability code for each lychee; acquiring the quality data, sampling data and sorting parameter data of all lychees in the same batch to form a full batch lychee quality archive; and storing the traceability record and quality archive in a preset control system.
[0066] This embodiment further refines the process of generating single-fruit quality traceability records and full-batch quality archives. During the single-fruit quality traceability record generation stage, the traceability module of the central control unit uses the unique identifier of each lychee as an index to retrieve the entire process node data of the corresponding lychee from the feeding station to the warehousing station. This includes feeding time, batch number, origin information, appearance inspection data, weight data, online spectral detection data, quality grading results, whether it was sampled, the corresponding laboratory test data, warehousing time, and all quality and circulation data related to the corresponding lychee's distribution channel. The traceability module structures all data in chronological order to generate the corresponding single-fruit quality traceability file and generates a unique traceability code for each lychee. The traceability code can be in the form of a QR code or a digital code, and is bound one-to-one with the unique identifier. Consumers or regulatory personnel can scan the traceability code to retrieve the full-process quality information of the corresponding lychee, achieving full-chain quality traceability at the single-fruit level.
[0067] During the batch-wide lychee quality record generation phase, the traceability module uses the batch identifier as an index to summarize the basic information of all lychees in the corresponding batch. This includes the total batch quantity, the proportion of each grade of fruit, the quantity and proportion of abnormal fruit, the total number of samples tested and the stratified sampling ratio, the end-to-end testing data of all samples tested, records of sorting parameter adjustments during batch processing, the accuracy verification results of the quality calibration model, and comprehensive quality control data on batch testing and operation personnel. Following the standardized format of food production quality records, the traceability module organizes the above data into a structured batch quality record file. This file supports export, printing, and storage, meeting the record retention requirements of food production supervision and providing data support for subsequent batch quality control optimization. Both the generated individual fruit traceability records and batch quality records are encrypted and stored on a dedicated storage server in the control system, with different access levels to ensure data security.
[0068] In some embodiments, the method further includes: statistically analyzing the quality distribution patterns and sampling deviation data in the historical full batch quality archives of lychees to construct a batch quality fluctuation prediction model; inputting the real-time sorting data of the current batch into the batch quality fluctuation prediction model to obtain the quality fluctuation prediction result of the current batch; dynamically adjusting the sampling ratio of the stratified sampling strategy according to the quality fluctuation prediction result, generating targeted sampling instructions for the predicted abnormal quality intervals, and controlling the embodied intelligent mechanism to supplement the grabbing of lychee samples in the corresponding intervals to complete the inspection.
[0069] This embodiment, based on the core method, adds batch quality fluctuation prediction and dynamic sampling adjustment functions. The data analysis module of the central control unit periodically retrieves all historically stored quality files for all batches of lychees, extracts quality distribution data for each batch, deviation data of sampled goods, and historical data on quality fluctuation patterns in different seasons and production areas. Feature extraction and pattern fitting are performed on the historical data to construct a batch quality fluctuation prediction model. The prediction model can predict the quality distribution of the entire batch of lychees and the ranges where quality anomalies may occur, based on batch origin information, variety information, maturity information, and real-time sorting data at the initial feeding stage.
[0070] During the current batch of lychee sorting operation, the central control unit collects lychee sorting data of a preset quantity at the initial feeding stage, inputs the data into the batch quality fluctuation prediction model, and the model outputs the quality fluctuation prediction results for the current batch, including the expected proportion of each grade of fruit, the high-risk abnormal quality range, and the expected overall quality deviation direction.
[0071] Based on the quality fluctuation prediction results, the central control unit dynamically adjusts the sampling ratio of the stratified sampling strategy: for stratified intervals predicted to have a risk of quality anomalies, the sampling ratio is increased to increase the number of samples tested and improve the detection probability of abnormal quality; for stratified intervals predicted to have stable quality, the sampling ratio is appropriately reduced to improve sorting efficiency while ensuring the representativeness of the sampling. Simultaneously, for intervals predicted to have concentrated abnormal quality, targeted sampling instructions are generated, prioritizing the assignment of embodied intelligent mechanisms to collect and send lychee samples from the corresponding intervals for testing. This allows for advance acquisition of laboratory test data for abnormal intervals, timely adjustment of online sorting parameters, and avoids batch quality grading errors.
[0072] In some embodiments, the method further includes: summarizing the iterative data of quality correction models corresponding to different litchi varieties and different maturity levels, extracting the correction parameter set corresponding to each variety and maturity level, and establishing a variety correction parameter database; when a new variety or new maturity litchi is connected to the litchi sorting line, identifying the variety and maturity information of the current litchi, and calling the corresponding correction parameter set from the variety correction parameter database to complete the initialization of the quality correction model and the automatic configuration of online sorting parameters.
[0073] This embodiment, based on the core method, adds a multi-variety adapted model parameter library and automatic configuration function. The central control unit sets up a variety correction parameter database, which stores the quality correction model parameter sets and sorting parameter benchmark values corresponding to different litchi varieties and different maturity levels. The database construction process is as follows: for each litchi variety and its corresponding maturity level, sufficient double-end detection correlation data are collected to train and generate a corresponding dedicated quality correction model. The core correction parameters in the model are extracted and combined with the grading standard parameters of the corresponding variety to form a correction parameter set for the corresponding variety and maturity level, which is then stored in the variety correction parameter database. As the operating data accumulates, the parameter set in the database is continuously iterated and optimized to continuously improve the correction accuracy for the corresponding varieties.
[0074] When a new variety or a new maturity level of lychee is introduced into the lychee sorting line, the visual recognition unit deployed at the feeding station first captures an image of the lychee's appearance. Using a variety recognition algorithm, it identifies the variety and maturity level of the lychee and sends the results to the central control unit. Upon receiving the results, the central control unit retrieves the corresponding calibration parameter set for the variety and maturity level from the variety calibration parameter database. It then directly calls the parameter set to quickly initialize the quality calibration model and simultaneously calls the corresponding grading benchmark parameters to automatically configure the online sorting parameters. This eliminates the need to collect data from scratch to train the model, enabling rapid deployment of new variety sorting and detection, significantly shortening the production line adaptation cycle for new varieties, and improving the line's multi-variety adaptability.
[0075] In some embodiments, this example, combined with the structural design of the embodied intelligent mechanism, fully illustrates the hardware implementation and methodological coordination logic of the sample grabbing and transfer process. The embodied intelligent mechanism structure used in this example is as follows: Figure 2 As shown, the embodied intelligent mechanism used in this embodiment is a humanoid bipedal robot structure, which includes a head module, a torso module, a two-arm module, a two-legged movement module and a built-in control module. All modules are connected by a mechanical structure, and the movement of each joint is driven by a built-in servo motor, giving it full degrees of freedom of movement and spatial manipulation capabilities.
[0076] The head module integrates a vision recognition unit and a depth sensing unit to capture real-time images of the production line, identify the position and posture of the lychee samples to be sampled, and assist in grasping and positioning. The torso module serves as the support structure for the entire machine, housing the main control unit, power supply unit, and communication unit, responsible for the machine's motion control, data processing, and external communication. Each of the two arm modules has multiple rotary joints, with flexible gripping end effectors at the ends. The gripping surfaces are made of flexible, non-slip material, adaptable to lychee fruits of different sizes, maintaining stable gripping during grasping while avoiding damage to the peel. The bipedal movement module has multi-joint motion capabilities, enabling the machine to move and adjust its posture, adapting to the grasping needs of different workstations on the production line, eliminating the need for fixed installation in a single location.
[0077] When performing the task of grabbing samples for random inspection, the embodied intelligent mechanism first uses the depth sensing unit and vision recognition unit on its head to collect real-time images of the production line, identify the real-time position and posture of the lychees to be inspected, and combine this with the position coordinate data issued by the central control unit to complete the secondary positioning calibration of the target. After positioning is completed, the main control unit plans the movement trajectory of the two arms, controls the corresponding arm to extend to the grasping position, and drives the flexible end effector to complete the wrapping grasp of the lychee fruit. After grasping, the main control unit controls the arms to retract, and adjusts the position of the machine body through the bipedal movement module to place the grasped lychee sample into the delivery carrier.
[0078] For tasks involving the grasping of multiple samples awaiting inspection, the embodied intelligent mechanism can adjust its position via its bipedal module, continuously grasping multiple samples in coordination with the assembly line's operating speed, without needing to adjust the assembly line's rhythm. Simultaneously, the embodied intelligent mechanism incorporates a force control sensor unit that can detect the gripping force of the end effector and the contact force of the arm in real time, dynamically adjusting the gripping force during the grasping process to ensure grasping stability while preventing fruit damage. The built-in communication unit can interact with the central control unit and laboratory testing system in real time, synchronizing sample identification information and task status, achieving fully automated and unmanned operation of the entire sampling and inspection process, significantly reducing labor costs and improving the efficiency and accuracy of sampling and inspection.
[0079] Please see Figure 3As shown, Figure 3 This is a schematic diagram of the structure of the online sampling and laboratory testing linked intelligent quality control system 200 for lychee sorting provided in this application embodiment. This online sampling and laboratory testing linked intelligent quality control system 200 for lychee sorting is used to execute the steps of the online sampling and laboratory testing linked intelligent quality control method for lychee sorting shown in the above embodiments. The online sampling and laboratory testing linked intelligent quality control system 200 for lychee sorting can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, laptop computer, wearable device, or robot.
[0080] like Figure 3 As shown, the intelligent quality control system 200, which links online sampling and laboratory testing for lychee sorting, includes: The data acquisition unit 201 is used to acquire real-time sorting data generated by the lychee sorting production line, construct a stratified sampling strategy based on the real-time sorting data, determine the samples to be sampled, control the embodied intelligent mechanism to complete the grasping operation of the samples to be sampled, and complete the transfer of the sampled samples to the laboratory testing stage. The data acquisition unit 202 is used to acquire the first quality data of the sampled samples obtained by online rapid detection and the second quality data of the corresponding sampled samples obtained by laboratory detection, and to establish the correlation link between the first quality data and the second quality data; to construct a quality correction model based on the correlation link, the first quality data and the second quality data, and to output the online sorting parameters of the lychee sorting line according to the quality correction model. The file generation unit 203 is used to obtain the full sorting process data and corresponding test data of a single lychee after the online sorting parameters of the lychee sorting line are updated, and to generate a single-fruit quality traceability record and a full batch of lychee quality file for the lychee sorting line.
[0081] In some embodiments, acquiring real-time sorting data generated by the lychee sorting line includes: collecting lychee information output from each station of the lychee sorting line; the lychee information includes lychee appearance image data, weight data, location coordinate data, sorting time sequence data, and batch identification data; generating a unique identification identifier for each lychee, and generating the real-time sorting data based on the unique identification identifier and the lychee information.
[0082] In some embodiments, the step of constructing a stratified sampling strategy based on real-time sorting data to determine the samples to be inspected includes: stratifying the single fruit data in the real-time sorting data according to a preset dimension, determining the sampling ratio of the corresponding stratum according to the total number of single fruits in each stratum, randomly selecting single fruits from each stratum according to the sampling ratio, and marking the selected single fruits as samples to be inspected; the preset dimension includes batch identifier, appearance grade, and weight range.
[0083] In some embodiments, controlling the embodied intelligent mechanism to complete the grasping operation of the sample to be inspected and to complete the transfer of the sample to the laboratory testing stage includes: reading the location coordinate data and unique identification of the sample to be inspected, planning the grasping motion path of the embodied intelligent mechanism; controlling the embodied intelligent mechanism to reach the corresponding position to grasp the sample to be inspected, placing the sample to be inspected in the laboratory delivery carrier, synchronizing the unique identification to the laboratory testing system, and completing the transfer.
[0084] In some embodiments, the acquisition of first quality data of the sampled specimens obtained by online rapid detection and second quality data of the corresponding sampled specimens obtained by laboratory testing includes: acquiring peel color data, surface defect data, and near-infrared spectral preliminary detection data of the sampled specimens output by the online rapid detection station; binding the peel color data, surface defect data, and near-infrared spectral preliminary detection data with the unique identification identifier of the corresponding sampled specimens as the first quality data; acquiring sugar content data, acidity data, pulp texture data, and pesticide residue data of the sampled specimens output by the laboratory testing equipment, and binding the sugar content data, acidity data, pulp texture data, and pesticide residue data with the unique identification identifier of the corresponding sampled specimens as the second quality data.
[0085] In some embodiments, establishing the association link between the first quality data and the second quality data, and constructing a quality correction model based on the association link, the first quality data, and the second quality data, includes: using a unique identifier as the matching basis, matching the first quality data and the second quality data of the same sample to form a data association link; dividing the associated first quality data and the second quality data into a training dataset and a validation dataset; fitting the mapping relationship between the first quality data and the second quality data based on the training dataset; iteratively optimizing the mapping relationship through the validation dataset to generate a quality correction model.
[0086] In some embodiments, the step of outputting online sorting parameters of the lychee sorting line according to the quality correction model includes: inputting the online detection data collected in real time by the lychee sorting line into the quality correction model to obtain the corrected single fruit quality judgment result; adjusting the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting line according to the corrected quality judgment result; and sending the adjusted quality grading threshold and abnormal fruit rejection threshold as updated online sorting parameters to the lychee sorting line.
[0087] In some embodiments, after the online sorting parameters of the lychee sorting line are updated, the process of acquiring the entire sorting process data and corresponding test data of a single lychee, and generating a single-fruit-level quality traceability record and a full batch lychee quality archive for the lychee sorting line, includes: collecting full-process node data of a single lychee from feeding, testing and grading to warehousing; associating the quality test data of the corresponding single fruit to generate a single-fruit-level quality traceability record; generating a corresponding traceability code for each lychee; acquiring the quality data, sampling data and sorting parameter data of all lychees in the same batch to form a full batch lychee quality archive; and storing the traceability record and quality archive in a preset control system.
[0088] In some embodiments, the method further includes: statistically analyzing the quality distribution patterns and sampling deviation data in the historical full batch quality archives of lychees to construct a batch quality fluctuation prediction model; inputting the real-time sorting data of the current batch into the batch quality fluctuation prediction model to obtain the quality fluctuation prediction result of the current batch; dynamically adjusting the sampling ratio of the stratified sampling strategy according to the quality fluctuation prediction result, generating targeted sampling instructions for the predicted abnormal quality intervals, and controlling the embodied intelligent mechanism to supplement the grabbing of lychee samples in the corresponding intervals to complete the inspection.
[0089] In some embodiments, the method further includes: summarizing the iterative data of quality correction models corresponding to different litchi varieties and different maturity levels, extracting the correction parameter set corresponding to each variety and maturity level, and establishing a variety correction parameter database; when a new variety or new maturity litchi is connected to the litchi sorting line, identifying the variety and maturity information of the current litchi, and calling the corresponding correction parameter set from the variety correction parameter database to complete the initialization of the quality correction model and the automatic configuration of online sorting parameters.
[0090] It should be noted that, for the sake of convenience and brevity, the specific working process of the online sampling and laboratory testing linkage intelligent quality control system for lychee sorting and its various modules described above can be found in the corresponding contents of the various embodiments of the online sampling and laboratory testing linkage intelligent quality control method for lychee sorting, and will not be repeated here.
[0091] The aforementioned intelligent quality control method linking online sampling and laboratory testing for lychee sorting can be implemented as a computer program, which can perform tasks such as... Figure 3 It runs on the system shown.
[0092] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.
[0093] The storage medium can store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any intelligent quality control method that links online sampling and laboratory testing for lychee sorting.
[0094] The processor provides computing and control capabilities, supporting the operation of the entire computer device.
[0095] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to perform any kind of intelligent quality control method that links online sampling inspection and laboratory testing for lychee sorting.
[0096] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0097] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.
[0098] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: The system acquires real-time sorting data generated by the lychee sorting line, constructs a stratified sampling strategy based on the real-time sorting data, and determines the samples to be sampled. It then controls the embodied intelligent mechanism to complete the grasping operation of the samples to be sampled and completes the transfer of the sampled samples to the laboratory testing stage. The system collects first quality data of the sampled specimens obtained through online rapid detection and second quality data of the corresponding sampled specimens obtained through laboratory testing, and establishes a correlation link between the first quality data and the second quality data. Based on the correlation link, the first quality data, and the second quality data, a quality correction model is constructed, and the online sorting parameters of the lychee sorting line are output according to the quality correction model. After the online sorting parameters of the lychee sorting line are updated, the full sorting process data and corresponding test data of a single lychee are obtained, and a single-fruit quality traceability record and a full batch lychee quality archive are generated for the lychee sorting line.
[0099] In some embodiments, acquiring real-time sorting data generated by the lychee sorting line includes: collecting lychee information output from each station of the lychee sorting line; the lychee information includes lychee appearance image data, weight data, location coordinate data, sorting time sequence data, and batch identification data; generating a unique identification identifier for each lychee, and generating the real-time sorting data based on the unique identification identifier and the lychee information.
[0100] In some embodiments, the step of constructing a stratified sampling strategy based on real-time sorting data to determine the samples to be inspected includes: stratifying the single fruit data in the real-time sorting data according to a preset dimension, determining the sampling ratio of the corresponding stratum according to the total number of single fruits in each stratum, randomly selecting single fruits from each stratum according to the sampling ratio, and marking the selected single fruits as samples to be inspected; the preset dimension includes batch identifier, appearance grade, and weight range.
[0101] In some embodiments, controlling the embodied intelligent mechanism to complete the grasping operation of the sample to be inspected and to complete the transfer of the sample to the laboratory testing stage includes: reading the location coordinate data and unique identification of the sample to be inspected, planning the grasping motion path of the embodied intelligent mechanism; controlling the embodied intelligent mechanism to reach the corresponding position to grasp the sample to be inspected, placing the sample to be inspected in the laboratory delivery carrier, synchronizing the unique identification to the laboratory testing system, and completing the transfer.
[0102] In some embodiments, the acquisition of first quality data of the sampled specimens obtained by online rapid detection and second quality data of the corresponding sampled specimens obtained by laboratory testing includes: acquiring peel color data, surface defect data, and near-infrared spectral preliminary detection data of the sampled specimens output by the online rapid detection station; binding the peel color data, surface defect data, and near-infrared spectral preliminary detection data with the unique identification identifier of the corresponding sampled specimens as the first quality data; acquiring sugar content data, acidity data, pulp texture data, and pesticide residue data of the sampled specimens output by the laboratory testing equipment, and binding the sugar content data, acidity data, pulp texture data, and pesticide residue data with the unique identification identifier of the corresponding sampled specimens as the second quality data.
[0103] In some embodiments, establishing the association link between the first quality data and the second quality data, and constructing a quality correction model based on the association link, the first quality data, and the second quality data, includes: using a unique identifier as the matching basis, matching the first quality data and the second quality data of the same sample to form a data association link; dividing the associated first quality data and the second quality data into a training dataset and a validation dataset; fitting the mapping relationship between the first quality data and the second quality data based on the training dataset; iteratively optimizing the mapping relationship through the validation dataset to generate a quality correction model.
[0104] In some embodiments, the step of outputting online sorting parameters of the lychee sorting line according to the quality correction model includes: inputting the online detection data collected in real time by the lychee sorting line into the quality correction model to obtain the corrected single fruit quality judgment result; adjusting the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting line according to the corrected quality judgment result; and sending the adjusted quality grading threshold and abnormal fruit rejection threshold as updated online sorting parameters to the lychee sorting line.
[0105] In some embodiments, after the online sorting parameters of the lychee sorting line are updated, the process of acquiring the entire sorting process data and corresponding test data of a single lychee, and generating a single-fruit-level quality traceability record and a full batch lychee quality archive for the lychee sorting line, includes: collecting full-process node data of a single lychee from feeding, testing and grading to warehousing; associating the quality test data of the corresponding single fruit to generate a single-fruit-level quality traceability record; generating a corresponding traceability code for each lychee; acquiring the quality data, sampling data and sorting parameter data of all lychees in the same batch to form a full batch lychee quality archive; and storing the traceability record and quality archive in a preset control system.
[0106] In some embodiments, the method further includes: statistically analyzing the quality distribution patterns and sampling deviation data in the historical full batch quality archives of lychees to construct a batch quality fluctuation prediction model; inputting the real-time sorting data of the current batch into the batch quality fluctuation prediction model to obtain the quality fluctuation prediction result of the current batch; dynamically adjusting the sampling ratio of the stratified sampling strategy according to the quality fluctuation prediction result, generating targeted sampling instructions for the predicted abnormal quality intervals, and controlling the embodied intelligent mechanism to supplement the grabbing of lychee samples in the corresponding intervals to complete the inspection.
[0107] In some embodiments, the method further includes: summarizing the iterative data of quality correction models corresponding to different litchi varieties and different maturity levels, extracting the correction parameter set corresponding to each variety and maturity level, and establishing a variety correction parameter database; when a new variety or new maturity litchi is connected to the litchi sorting line, identifying the variety and maturity information of the current litchi, and calling the corresponding correction parameter set from the variety correction parameter database to complete the initialization of the quality correction model and the automatic configuration of online sorting parameters.
[0108] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the online sampling and laboratory testing linkage intelligent quality control method for lychee sorting as provided in any embodiment of this application.
[0109] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0110] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for intelligent quality control linking online sampling and laboratory testing in lychee sorting, characterized in that, include: The system acquires real-time sorting data generated by the lychee sorting line, constructs a stratified sampling strategy based on the real-time sorting data, and determines the samples to be sampled. It then controls the embodied intelligent mechanism to complete the grasping operation of the samples to be sampled and completes the transfer of the sampled samples to the laboratory testing stage. The system collects first quality data of the sampled specimens obtained through online rapid detection and second quality data of the corresponding sampled specimens obtained through laboratory testing, and establishes a correlation link between the first quality data and the second quality data. Based on the correlation link, the first quality data, and the second quality data, a quality correction model is constructed, and the online sorting parameters of the lychee sorting line are output according to the quality correction model. After the online sorting parameters of the lychee sorting line are updated, the full sorting process data and corresponding test data of a single lychee are obtained, and a single-fruit quality traceability record and a full batch lychee quality archive are generated for the lychee sorting line.
2. The method according to claim 1, characterized in that, The acquisition of real-time sorting data generated by the lychee sorting production line includes: Collect lychee information output from each station of the lychee sorting line; the lychee information includes lychee appearance image data, weight data, location coordinate data, sorting sequence data, and batch identification data; A unique identifier is generated for each lychee, and the real-time sorting data is generated based on the unique identifier and lychee information.
3. The method according to claim 2, characterized in that, The stratified sampling strategy based on real-time sorting data, which determines the samples to be sampled, includes: The single fruit data in the real-time sorting data is stratified according to the preset dimensions. The sampling ratio of the corresponding stratum is determined according to the total number of single fruits in each stratum. Single fruits are randomly selected from each stratum according to the sampling ratio, and the selected single fruits are marked as samples to be inspected. The preset dimensions include batch identifier, appearance grade, and weight range.
4. The method according to claim 1, characterized in that, The control embodied intelligent mechanism completes the grasping operation of the sample to be sampled and completes the transfer of the sample to the laboratory testing stage, including: Read the location coordinates and unique identifier of the sample to be sampled, and plan the grasping motion path of the intelligent mechanism. The system controls the embodied intelligent mechanism to reach the corresponding position to grab the sample to be sampled, places the sample to be sampled in the laboratory delivery carrier, and synchronizes the unique identification mark to the laboratory testing system to complete the delivery process.
5. The method according to claim 1, characterized in that, The acquisition of first quality data of the sampled samples obtained through online rapid detection and second quality data of the corresponding sampled samples obtained through laboratory testing includes: Collect data on peel color, surface defects, and preliminary near-infrared spectral data of the sampled fruit from the online rapid testing station. The peel color data, surface defect data, and near-infrared spectral preliminary inspection data are bound to the unique identification mark of the corresponding sample and used as the first quality data. The sugar content, acidity, pulp texture, and pesticide residue data of the sampled specimens are collected from the laboratory testing equipment. The sugar content, acidity, pulp texture, and pesticide residue data are then bound to the unique identification mark of the corresponding sample as the second quality data.
6. The method according to claim 5, characterized in that, The process of establishing a correlation link between the first quality data and the second quality data, and constructing a quality correction model based on the correlation link, the first quality data, and the second quality data, includes: Using unique identifiers as the matching basis, the first quality data and the second quality data of the same sample are matched to form a data association link; The first and second quality data after association are divided into training datasets and validation datasets. The mapping relationship between the first and second quality data is fitted based on the training dataset, and the mapping relationship is iteratively optimized through the validation dataset to generate a quality correction model.
7. The method according to claim 1, characterized in that, The online sorting parameters of the lychee sorting line output according to the quality correction model include: The online detection data collected in real time from the lychee sorting line is input into the quality correction model to obtain the corrected single fruit quality judgment result. Based on the revised quality assessment results, the quality grading threshold and abnormal fruit rejection threshold of the lychee sorting line are adjusted, and the adjusted quality grading threshold and abnormal fruit rejection threshold are sent to the lychee sorting line as updated online sorting parameters.
8. The method according to claim 1, characterized in that, After the online sorting parameters of the lychee sorting line are updated, the entire sorting process data and corresponding test data of a single lychee are obtained, and a single-fruit-level quality traceability record and a full batch lychee quality archive are generated for the lychee sorting line, including: Collect data from each individual lychee throughout the entire process, from feeding, testing and grading to delivery, and link it with the quality testing data of the corresponding individual fruit to generate a single-fruit quality traceability record, and generate a corresponding traceability code for each lychee. The system acquires quality data, sampling data, and sorting parameter data for all lychees in the same batch, forming a quality archive for the entire batch of lychees. The traceability records and quality archives are then stored in a pre-set control system.
9. The method according to claim 1, characterized in that, The method further includes: By statistically analyzing the quality distribution patterns and sampling deviation data in the historical quality records of all batches of lychees, a batch quality fluctuation prediction model is constructed. Input the real-time sorting data of the current batch into the batch quality fluctuation prediction model to obtain the quality fluctuation prediction result of the current batch. Based on the quality fluctuation prediction results, the sampling ratio of the stratified sampling strategy is dynamically adjusted, and targeted sampling instructions are generated for the predicted abnormal quality range. The embodied intelligent mechanism is then controlled to supplement the collection of lychee samples in the corresponding range to complete the inspection.
10. The method according to claim 1, characterized in that, The method further includes: We collected iterative data of quality correction models for different litchi varieties and different maturity levels, extracted the correction parameter sets for each variety and maturity level, and established a variety correction parameter database. When new varieties or new maturity levels of lychees are introduced into the lychee sorting line, the variety and maturity information of the current lychee are identified, and the corresponding correction parameter set is called from the variety correction parameter database to complete the initialization of the quality correction model and the automatic configuration of online sorting parameters.