Royal jelly automated grading control system and method

The automated royal jelly grading control system enables simultaneous multi-parameter acquisition and adaptive optimization of grading models, solving the problems of low efficiency and poor accuracy in royal jelly grading, improving production efficiency and product quality consistency, and providing quality traceability capabilities.

CN120146698BActive Publication Date: 2025-09-16BEIJING FENGZHEN SCIENTECH DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510329654.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-09-16
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The existing royal jelly grading relies on manual operation, which is inefficient and has inconsistent standards. The single detection parameter cannot fully reflect the quality differences. In addition, manual sampling has random errors, data collection between multi-parameter detection equipment is not synchronized, and traceability information is difficult to associate, making automation impossible.

Method used

An automated royal jelly grading control system is adopted, including a data acquisition module that synchronously acquires color, moisture and HDA content data, a control module that performs normalization processing and generates grade judgment results, an execution module that performs automatic sorting and packaging, and a grading model is constructed by combining a gradient boosting decision tree. The Bayesian optimization algorithm is used for hyperparameter tuning, and a dynamic pruning strategy is set to achieve synchronous multi-parameter acquisition and adaptive optimization of the model.

Benefits of technology

The royal jelly grading efficiency has been improved by 40%-50%, the grading accuracy has reached 99%, and the production efficiency has been increased by 60%-70%, ensuring product quality consistency and providing quality traceability support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146698B_ABST
    Figure CN120146698B_ABST
Patent Text Reader

Abstract

The present invention discloses a royal jelly automated grading control system and method, belonging to the field of bee product processing automation technology. The system synchronously obtains the color data, moisture data and HDA content data of the royal jelly sample through a data acquisition module. The control module normalizes the multimodal data and constructs a grading model based on a gradient boosting decision tree to generate a grade judgment result, dynamically generates sorting execution parameters, and the execution module drives the actuator to complete automatic sorting and packaging. The human-computer interaction interface supports the visualization of the grading process and real-time adjustment of parameters. The present invention can be widely used in the automated grading production line of royal jelly production enterprises, significantly improving grading efficiency and accuracy, ensuring product quality consistency, and providing data support for subsequent quality traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of bee product processing, and in particular relates to an automatic grading control system and method for royal jelly. Background Art

[0002] Royal jelly, a high-value bee product, has a grading quality that directly impacts market circulation and consumer rights. Traditional royal jelly grading relies primarily on manual testing, where inspectors determine moisture content by observing color and feel, combined with laboratory testing for 10-hydroxy-2-decenoic acid (HDA) content for a comprehensive assessment. This method has significant drawbacks: First, manual testing is inefficient, with single batch testing taking up to several hours, making it difficult to meet the demands of large-scale production. Second, test results are significantly influenced by subjective experience, with different inspectors arguing differently about color depth and viscosity, leading to inconsistent grading standards. Furthermore, existing automated grading systems often rely on a single metric (such as moisture content) for judgment, failing to integrate multi-dimensional quality characteristics. Furthermore, they lack dynamic model optimization mechanisms, making them difficult to adapt to complex production scenarios. To address these issues, the present invention proposes an automated royal jelly grading control system and method. Summary of the Invention

[0003] An object of embodiments of the present invention is to solve at least the above problems and / or disadvantages and to provide at least the advantages to be described hereinafter.

[0004] Another object of the present invention is to provide a royal jelly automated grading control system and method to solve the following problems:

[0005] The existing royal jelly grading relies on manual operation, resulting in low efficiency, inconsistent standards, and a single detection parameter that cannot fully reflect quality differences; manual sampling has random errors, data collection between multi-parameter detection equipment is not synchronized, traceability information is difficult to associate, and automation cannot be achieved.

[0006] To this end, the technical solution provided by the present invention is:

[0007] In a first aspect, a royal jelly automated grading control system comprises:

[0008] a data acquisition module configured to synchronously acquire grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly;

[0009] a control module configured to receive the grade characteristic data of the royal jelly sample collected by the data collection module and perform normalization processing on the multiple grade characteristic data, then generate a grade determination result based on the multiple detection characteristic data, and dynamically generate a sorting execution parameter based on the grade determination result;

[0010] an execution module configured to receive the sorting execution parameters of the control module and drive an execution mechanism to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0011] A human-machine interface is configured to display the grading process and receive manual real-time modifications to sorting execution parameters.

[0012] Preferably, in the royal jelly automated grading control system, the control module includes:

[0013] a real-time calibration unit configured to perform deviation compensation on the detection data based on a preset reference sample;

[0014] An exception handling unit, configured to trigger a recheck process for samples exceeding a threshold and record an exception log;

[0015] a classification model unit configured to construct a classification model through a gradient boosting decision tree according to the quality feature data;

[0016] a storage unit configured to store pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and historical collected royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photographic or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0017] The decision optimization unit is configured to iteratively update the weight coefficients of the characteristic data of each grade in the grading model through historical data.

[0018] Preferably, in the royal jelly automated grading control system, the data acquisition module includes:

[0019] a sampling unit configured to take a portion of the sample from the original royal jelly as a royal jelly sample by driving a sampling mechanical arm, and to establish a one-to-one correspondence between the test sample and the original royal jelly from which it is derived;

[0020] A color detection unit is configured to obtain image data of the royal jelly sample through a visual sensor, compare it with the photo data corresponding to each grade of royal jelly pre-stored in the control module, and provide a color detection result;

[0021] a moisture detection unit, configured to obtain spectral data of the royal jelly sample through a near-infrared spectrometer and calculate the moisture content of the royal jelly sample;

[0022] The HDA content detection unit is configured to obtain chromatographic data of the royal jelly sample through high performance liquid chromatography and calculate the HDA content in the royal jelly sample.

[0023] Preferably, the royal jelly automated grading control system further comprises:

[0024] A verification module is configured to perform a secondary inspection and verification on the sorted raw royal jelly;

[0025] A quality traceability database is configured to associate royal jelly samples with original royal jelly, their production time, test parameters and grading results.

[0026] Preferably, in the royal jelly automated grading control system, the data acquisition module further includes a synchronization control unit, and the synchronization control unit is configured to:

[0027] The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology;

[0028] Use timestamp marking technology to establish temporal correlation between multimodal data;

[0029] Asynchronous processing of data collection and transmission is achieved through a ring buffer mechanism.

[0030] Preferably, in the royal jelly automated grading control system, the grading model constructed by the gradient boosting decision tree includes:

[0031] Parallel model training based on the LightGBM algorithm framework;

[0032] Use Bayesian optimization algorithm for hyperparameter tuning;

[0033] Set dynamic pruning strategies to prevent model overfitting;

[0034] Contains multiple classification output nodes corresponding to the grade of royal jelly.

[0035] Preferably, in the royal jelly automated grading control system, the sampling unit comprises:

[0036] A positioning system based on machine vision guides the sampling robot arm to take samples through 3D vision;

[0037] Integrated micro weighing sensor to achieve dynamic monitoring of sampling volume;

[0038] Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container;

[0039] A bidirectional association between the sample and the original royal jelly container was established using an image matching algorithm.

[0040] In a second aspect, an automated grading control method for royal jelly based on the system comprises the following steps:

[0041] Data collection step: synchronously obtaining grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly;

[0042] Control step: normalizing the various grade feature data, generating grade determination results based on the various detection feature data, and dynamically generating sorting execution parameters based on the grade determination results;

[0043] Execution step: driving the actuator to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0044] Human-computer interaction steps: display the grading process and receive manual real-time modifications to sorting execution parameters.

[0045] Preferably, in the method for controlling the automated grading of royal jelly, the control step comprises:

[0046] Real-time calibration step: compensate the deviation of the test data based on the preset reference sample;

[0047] Exception handling steps: trigger the re-inspection process for samples that exceed the threshold and record the exception log;

[0048] Steps for building a classification model: Building a classification model through a gradient boosting decision tree based on quality feature data;

[0049] Storing step: storing pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and collected historical royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photo or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0050] Decision optimization step: Iteratively update the weight coefficients of each grade characteristic data in the grading model through historical data.

[0051] Preferably, in the method for controlling the automated grading of royal jelly, the data collection step comprises the following steps:

[0052] Sampling step: taking out a portion of the sample from the original royal jelly by driving the sampling mechanism as the royal jelly sample, and establishing a one-to-one correspondence between the test sample and the original royal jelly from which it is derived;

[0053] Color detection step: The image data of the royal jelly sample is obtained through the visual sensor, and compared with the photo data corresponding to each grade of royal jelly pre-stored in the control step, and the color detection result is given;

[0054] Moisture detection step: obtaining spectral data of the royal jelly sample through a near-infrared spectrometer and calculating the moisture content of the royal jelly sample;

[0055] HDA content detection step: obtaining chromatographic data of the royal jelly sample by high performance liquid chromatography and calculating the HDA content in the royal jelly sample.

[0056] Preferably, the method for automated grading control of royal jelly further comprises the following steps:

[0057] Verification steps: Conduct secondary random inspection and verification on the sorted raw royal jelly;

[0058] Quality traceability steps: Establish a correlation between the royal jelly sample and the original royal jelly, its production time, test parameters and grading results.

[0059] Preferably, in the method for controlling the automated grading of royal jelly, the data acquisition step further comprises a synchronization control step, and the synchronization control step comprises:

[0060] The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology;

[0061] Use timestamp marking technology to establish temporal correlation between multimodal data;

[0062] Asynchronous processing of data collection and transmission is achieved through a ring buffer mechanism.

[0063] Preferably, in the automated grading control method for royal jelly, the grading model constructed by the gradient boosting decision tree in the grading model step includes:

[0064] Parallel model training based on the LightGBM algorithm framework;

[0065] Use Bayesian optimization algorithm for hyperparameter tuning;

[0066] Set dynamic pruning strategies to prevent model overfitting;

[0067] Contains multiple classification output nodes corresponding to the grade of royal jelly.

[0068] Preferably, in the method for automated grading control of royal jelly, the sampling step comprises:

[0069] A positioning system based on machine vision guides the sampling robot arm to take samples through 3D vision;

[0070] Integrated micro weighing sensor to achieve dynamic monitoring of sampling volume;

[0071] Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container;

[0072] A bidirectional association between the sample and the original royal jelly container was established using an image matching algorithm.

[0073] The embodiments of the present invention have at least the following beneficial effects:

[0074] In the automated royal jelly grading control system of the present invention, the data acquisition module can simultaneously collect data on the color, moisture, and 10-hydroxy-2-decenoic acid (HDA) content of royal jelly samples. Traditional sequential data acquisition methods require waiting for each test item to complete, resulting in a long overall data acquisition time. The present invention's synchronous data acquisition overcomes this time constraint. While the color detection unit acquires image data using a visual sensor, the moisture detection unit calculates moisture content using a near-infrared spectrometer, and the HDA content detection unit acquires chromatographic data and calculates HDA content using high-performance liquid chromatography. This significantly shortens the overall data acquisition time and improves data acquisition efficiency by 40%-50% compared to traditional methods. This allows the system to more quickly acquire complete royal jelly sample grade characteristic data, providing a timely basis for subsequent grading decisions.

[0075] The synchronization system of this invention uses timestamp technology to establish temporal correlations between multimodal data. When collecting different types of data, the acquisition time of each data point is accurately recorded, ensuring that data from different test items are time-correlated. When color data is collected at a specific moment, moisture and HDA content data are also accurately time-stamped, avoiding erroneous correlations caused by inconsistent data collection times. Furthermore, a ring buffer mechanism enables asynchronous processing of data collection and transmission, ensuring stable data transmission even at high data acquisition speeds, reducing the possibility of data loss and errors, thereby improving data consistency and accuracy and providing high-quality data input for subsequent grading models.

[0076] The control module of the present invention adopts gradient boosting decision tree to construct a grading model, and combines with Bayesian optimization algorithm to perform hyperparameter tuning. The gradient boosting decision tree itself has a strong learning ability, can handle complex nonlinear relationships, and conduct in-depth analysis and learning of the grade characteristic data of royal jelly. The Bayesian optimization algorithm can be used to quickly find the optimal parameter settings among many possible hyperparameter combinations, so that the grading model can better fit the training data while avoiding the overfitting problem. In this way, the accuracy of the grading model is significantly improved, and the grading accuracy rate can reach more than 99%. In addition, a dynamic pruning strategy is set to prevent the model from overfitting, so that the model can still maintain good generalization ability when facing new royal jelly sample data and accurately perform grading judgments.

[0077] The decision-making optimization unit of the present invention iteratively updates the weight coefficients of each grade characteristic data in the grading model using historical data. As the system continues to operate, it accumulates a large amount of royal jelly sample testing data, which contains characteristic information about royal jelly from different batches and sources. By analyzing and learning from this historical data, the model can dynamically adjust the weights of each grade characteristic data based on actual conditions. For example, if HDA content is found to have a more significant impact on royal jelly grade at a certain stage, the model will increase the weight of HDA content data accordingly. This continuous optimization and adaptive adjustment capability enables the grading model to better adapt to various changes in the royal jelly production process, such as fluctuations in raw material quality and changes in the production environment, thereby ensuring the stability and reliability of the system during long-term operation.

[0078] The present invention comprehensively improves the performance and efficiency of the entire automated royal jelly grading control system. Rapid and accurate data collection provides a solid foundation for grading decisions, and the grading model can quickly and accurately determine the grade. The execution module can promptly drive the actuator to automatically sort and package according to the grading results, making the grading process smoother and more efficient. Compared with traditional manual grading or simple automated grading systems, this system can increase the grading process speed by 60% to 70%, greatly improving production efficiency and reducing labor costs.

[0079] The present invention can be widely used in the automated grading lines of royal jelly production enterprises, significantly improving grading efficiency and accuracy, ensuring product quality consistency, and providing data support for subsequent quality traceability.

[0080] Other advantages, objectives and features of the present invention will be reflected in part from the following description and will be understood by those skilled in the art through study and practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1This is a block diagram of the royal jelly automated grading control system of this application;

[0082] Figure 2 This is a flow chart of the automated grading control method for royal jelly of this application. DETAILED DESCRIPTION

[0083] The present invention will be described in further detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.

[0084] like Figure 1 As shown, the present invention provides an automatic grading control system for royal jelly, comprising:

[0085] a data acquisition module configured to synchronously acquire grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly;

[0086] a control module configured to receive the grade characteristic data of the royal jelly sample collected by the data collection module and perform normalization processing on the multiple grade characteristic data, then generate a grade determination result based on the multiple detection characteristic data, and dynamically generate a sorting execution parameter based on the grade determination result;

[0087] an execution module configured to receive the sorting execution parameters of the control module and drive an execution mechanism to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0088] The human-machine interface is configured to display the grading process and accept manual real-time modifications to sorting execution parameters. The automated royal jelly grading control system provided in this embodiment utilizes a modular architecture. The data acquisition module integrates multiple sensors to achieve simultaneous multi-parameter detection: the visual sensor utilizes an industrial-grade CCD camera (resolution ≥ 5 megapixels) coupled with an LED ring light source for color data acquisition; the near-infrared spectrometer utilizes a micro-fiber probe (wavelength range 900-1700 nm); and the high-performance liquid chromatograph is equipped with a C18 column (4.6×250 mm). The control module is built on an industrial control computer (main frequency ≥ 3.2 GHz), using Python for data processing and integrating the NumPy library for data normalization. The execution module utilizes a servo motor-driven robotic arm (repeatability ±0.05 mm) coupled with a pneumatic gripper for sorting operations. The human-machine interface utilizes a 15.6-inch industrial touchscreen, powered by the WinCE operating system, supporting parameter input and status monitoring. The system realizes communication between modules through RS485 bus, and the communication rate is set to 115200bps.

[0089] In the above solution, preferably, the control module includes:

[0090] a real-time calibration unit configured to perform deviation compensation on the detection data based on a preset reference sample;

[0091] An exception handling unit, configured to trigger a recheck process for samples exceeding a threshold and record an exception log;

[0092] a classification model unit configured to construct a classification model through a gradient boosting decision tree according to the quality feature data;

[0093] a storage unit configured to store pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and historical collected royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photographic or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0094] The decision optimization unit is configured to iteratively update the weighting coefficients of each grade characteristic data in the grading model based on historical data. The control module's real-time calibration unit uses a three-point calibration method: daily at startup, it sequentially tests a standard white plate (99% reflectance), a standard gray plate (50% reflectance), and a standard black plate (<1% reflectance) to establish a spectral response curve. The exception handling unit sets three thresholds: when test data exceeds the first threshold, a buzzer alarm is triggered; when it exceeds the second threshold, it is automatically marked and recorded; and when it exceeds the third threshold, a re-inspection process is initiated. The grading model unit implements the LightGBM algorithm based on the Scikit-learn framework, with a maximum tree depth of 8, a learning rate of 0.1, and 1000 iterations. The storage unit uses a SQLite database to create a historical data storage table (fields include: sample number, test time, color value, moisture content, HDA content, and grading result). The decision optimization unit has a weekly automatic update mechanism, triggering model retraining when the historical data volume reaches 100,000.

[0095] In one embodiment of the present invention, preferably, the data acquisition module includes:

[0096] a sampling unit configured to take a portion of the sample from the original royal jelly as a royal jelly sample by driving a sampling mechanical arm, and to establish a one-to-one correspondence between the test sample and the original royal jelly from which it is derived;

[0097] A color detection unit is configured to obtain image data of the royal jelly sample through a visual sensor, compare it with the photo data corresponding to each grade of royal jelly pre-stored in the control module, and provide a color detection result;

[0098] a moisture detection unit, configured to obtain spectral data of the royal jelly sample through a near-infrared spectrometer and calculate the moisture content of the royal jelly sample;

[0099] The HDA content detection unit is configured to acquire chromatographic data from the royal jelly sample using high-performance liquid chromatography and calculate the HDA content in the royal jelly sample. The data acquisition module's sampling unit utilizes a six-axis robotic arm (3kg load capacity) coupled with a 3D vision camera (0.02mm accuracy), using OpenCV for image recognition and positioning. A micro weighing sensor (0-50g range, 0.01g accuracy) is integrated into the end of the sampling needle for real-time monitoring of sample volume. The laser marking system utilizes a fiber laser (1064nm wavelength, 20W power) to generate a QR code on the container surface. The image matching algorithm utilizes ORB feature point detection, and a FLANN matcher is used to establish an association between the sample and the container. The color detection unit utilizes HSV color space analysis to establish a standard color card database (containing 12 standard color numbers). The moisture detection unit utilizes partial least squares to establish a near-infrared spectroscopy-moisture content prediction model with a model R² ≥ 0.985.

[0100] In one embodiment of the present invention, preferably, it further includes:

[0101] A verification module is configured to perform a secondary inspection and verification on the sorted raw royal jelly;

[0102] The quality traceability database is configured to establish an association between royal jelly samples and original royal jelly, as well as its production time, test parameters and grading results. The verification module is equipped with an independent testing station and uses the same testing equipment as the main testing module to conduct 10% random inspections on sorted samples. The quality traceability database is constructed using blockchain technology. Each sample generates a unique hash value (SHA-256 algorithm) to record information such as production batches, test parameters, and grading results. The system uses the MQTT protocol to upload data to the chain, and the blockchain nodes are deployed on the company's private cloud server. The verification process sets up an automatic comparison mechanism. When the re-inspection results are inconsistent with the initial inspection results, a full batch recall procedure is triggered. The quality traceability interface supports multi-dimensional queries, and can be traced back to the specific production time and inspector by scanning the code or entering the batch number.

[0103] In one embodiment of the present invention, preferably, the data acquisition module further includes a synchronization control unit, and the synchronization control unit is configured to:

[0104] The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology;

[0105] Use timestamp marking technology to establish temporal correlation between multimodal data;

[0106] Asynchronous data acquisition and transmission are achieved through a ring buffer mechanism. The synchronization control unit utilizes multi-threaded programming technology, deploying three independent threads within the data acquisition module to handle color, moisture, and HDA data collection, respectively. Timestamp accuracy reaches milliseconds, and the system clock synchronization module (NTP protocol) ensures time consistency across sensors. The ring buffer utilizes a double buffering mechanism, with each buffer set to 1024KB. Old data is automatically overwritten when the data acquisition rate exceeds the transmission rate. Data transmission utilizes the TCP / IP protocol, with a heartbeat check mechanism (at 5-second intervals) ensuring a stable communication link. The synchronization control unit also integrates a data integrity check algorithm, using CRC-32 checksums to ensure error-free data transmission.

[0107] In one embodiment of the present invention, preferably, the hierarchical model constructed by the gradient boosting decision tree includes:

[0108] Parallel model training based on the LightGBM algorithm framework;

[0109] Use Bayesian optimization algorithm for hyperparameter tuning;

[0110] Set dynamic pruning strategies to prevent model overfitting;

[0111] Contains multiple classification output nodes corresponding to the grade of royal jelly. The grading model is constructed using a distributed computing architecture, and Spark MLlib is used for parallel training. The Bayesian optimization algorithm sets the parameter search space: learning rate 0.01-0.3, maximum tree depth 3-12, and minimum number of leaf node samples 20-100. The dynamic pruning strategy sets the maximum number of leaf nodes to 100, and automatically performs post-pruning when the tree complexity exceeds the threshold. The model output layer uses the Softmax function for multi-classification, corresponding to five grade levels (special grade, first grade, second grade, third grade, and unqualified). The model evaluation metric uses the F1-score, and the validation set ratio is set to 20%. Training stops when the F1-score does not improve after 5 consecutive iterations.

[0112] In one embodiment of the present invention, preferably, the sampling unit comprises:

[0113] A positioning system based on machine vision guides the sampling robot arm to take samples through 3D vision;

[0114] Integrated micro weighing sensor to achieve dynamic monitoring of sampling volume;

[0115] Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container;

[0116] An image matching algorithm was used to establish a bidirectional relationship between the sample and the original royal jelly container. The sampling unit's positioning system employed binocular stereo vision, establishing a three-dimensional coordinate system using a calibration plate (200 × 200 mm). The robotic arm's motion planning employed a quintic polynomial interpolation algorithm to ensure a smooth sampling path. The micro-load sensor signal was connected to the control system via a 24-bit A / D converter module (100 Hz conversion rate). Laser marking parameters were set to 20 kHz frequency, 200 ns pulse width, and 500 mm / s marking speed. The image matching algorithm set a feature point matching threshold of 0.7, triggering repositioning when fewer than 15 matching points were found. The association between the sample and container was established using a database foreign key, creating a bidirectional index table (container ID → sample ID, sample ID → container ID).

[0117] The present invention also provides a method for automatically controlling the grading of royal jelly based on the automatic grading control system of royal jelly, such as Figure 2 As shown, the following steps are included:

[0118] Data collection step: synchronously obtaining grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly;

[0119] Control step: normalizing the various grade feature data, generating grade determination results based on the various detection feature data, and dynamically generating sorting execution parameters based on the grade determination results;

[0120] Execution step: driving the actuator to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0121] Human-computer interaction step: Display the grading process and receive manual real-time modifications to the sorting execution parameters. The automated grading control method adopts a state machine design pattern, which is divided into five states: initialization, standby, detection, sorting, and maintenance. The data acquisition step sets up a cyclic detection mechanism, and the detection cycle is configurable (adjustable from 1 to 10 seconds). The control step adopts a pipeline processing architecture, and the three stages of data normalization, model inference, and parameter generation are executed in parallel. The execution step sets up a safety protection mechanism, and immediately stops the movement of the actuator's robotic arm when an obstacle is detected. The human-computer interaction step adopts a permission management system, with three levels of permissions: administrator, operator, and visitor. The system log records all operating behaviors, and the storage period is not less than 180 days.

[0122] In one embodiment of the present invention, preferably, the controlling step includes:

[0123] Real-time calibration step: compensate the deviation of the test data based on the preset reference sample;

[0124] Exception handling steps: trigger the re-inspection process for samples that exceed the threshold and record the exception log;

[0125] Steps for building a classification model: Building a classification model through a gradient boosting decision tree based on quality feature data;

[0126] Storing step: storing pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and collected historical royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photo or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0127] Decision optimization step: The weight coefficients of each grade characteristic data in the grading model are updated iteratively through historical data. The real-time calibration of the control step uses a dynamic compensation algorithm to adjust the detection parameters based on changes in ambient temperature (compensation range 0-40°C). A three-level warning mechanism is set up for abnormal handling: yellow warning (data fluctuation ±5%), orange warning (±10%), and red warning (±15%). Transfer learning technology is used in the construction of the grading model, and fine-tuning is performed based on the pre-trained model (ImageNet dataset). The storage step sets a data backup strategy, with automatic daily backups to an off-site server. Decision optimization uses an online learning mechanism, triggering incremental model updates when the accumulated new data reaches 1,000 items. Abnormal log records include timestamps, sample numbers, detection parameters, abnormality types, and other information.

[0128] In one embodiment of the present invention, preferably, the data collection step includes the following steps:

[0129] Sampling step: taking out a portion of the sample from the original royal jelly by driving the sampling mechanism as the royal jelly sample, and establishing a one-to-one correspondence between the test sample and the original royal jelly from which it is derived;

[0130] Color detection step: The image data of the royal jelly sample is obtained through the visual sensor, and compared with the photo data corresponding to each grade of royal jelly pre-stored in the control step, and the color detection result is given;

[0131] Moisture detection step: obtaining spectral data of the royal jelly sample through a near-infrared spectrometer and calculating the moisture content of the royal jelly sample;

[0132] HDA content testing: Chromatographic data of the royal jelly sample is obtained using high-performance liquid chromatography (HPLC), and the HDA content in the royal jelly sample is calculated. The data acquisition step utilizes time-division multiplexing technology, completing three-color data acquisition within 0.5 seconds. Anti-contamination measures are implemented during the sampling step, with automatic ultraviolet disinfection (wavelength 254nm, intensity 100μW / cm²) performed after each sampling. Color testing is performed using standard ambient light (D65 light source, illumination 5000lux). Moisture testing utilizes a temperature compensation algorithm (compensation range 10-30°C). Quality control standards are implemented for HDA content testing: calibration with a standard is performed after every 100 test runs (standard deviation ≤ 2%). The correspondence between the sample and the original royal jelly is achieved through a dual coding system: laser coding on the container surface and an RFID tag within the sample.

[0133] Preferably, the method for automated grading control of royal jelly further comprises the following steps:

[0134] Verification steps: Conduct secondary random inspection and verification on the sorted raw royal jelly;

[0135] Quality traceability steps: Establish a correlation between the royal jelly sample and the original royal jelly, its production time, test parameters and grading results. After the automatic sorting and packaging of the original royal jelly is completed, the secondary sampling verification begins. First, according to the preset sampling ratio, such as 10%, a certain number of samples are randomly selected from the sorted original royal jelly batch. These samples are sent to an independent verification and testing area, which is equipped with testing equipment of the same type and accuracy as in the data collection step, including visual sensors for color detection, near-infrared spectrometers for moisture detection, and high-performance liquid chromatography for HDA content detection. The grade characteristic data of the extracted samples are re-tested, and the color data, moisture data and HDA content data obtained are compared in detail with the data recorded during the previous grading. If the difference between the two is within the allowable error range—for example, the color ΔE value is within 2, the moisture content error is within ±0.5%, and the HDA content error is within ±0.3%—the sample is considered qualified. If it is outside the error range, it is considered unqualified and the batch containing the sample must be reclassified, which may include reclassification of the entire batch. During the verification process, the verification results of each sample are recorded in detail, including verification time, test data, and differences from the initial inspection data. This complete verification log facilitates subsequent quality analysis and traceability. Furthermore, throughout the grading control process, starting with the data collection step, each royal jelly sample and its corresponding raw royal jelly are uniquely identified. For example, during the sampling step, a unique traceability code is generated on the surface of the raw royal jelly container using laser marking technology. This code contains basic information such as the production batch and production time. During the data collection process, the collected royal jelly sample's grade characteristic data (color, moisture, HDA content) is associated and stored with the corresponding traceability code. In the control step, the generated grade determination result is also bound to the traceability code. After the execution step completes sorting and packaging, the identification information on the packaging is also linked to the traceability code. A special quality traceability database is established to uniformly store and manage the above-mentioned related information. The database adopts a structured design and contains multiple data tables, such as sample information table, test parameter table, grading result table, etc. The data in each table is linked together through the traceability code as the primary key. Users can query the detailed production and testing information of the royal jelly sample in the quality traceability system by entering the traceability code, production time, batch number and other information, realize forward traceability from product to raw material and reverse traceability from raw material to product, and ensure the traceability of product quality.

[0136] Preferably, in the method for controlling the automated grading of royal jelly, the data acquisition step further comprises a synchronization control step, and the synchronization control step comprises:

[0137] Multi-threaded data acquisition technology enables the simultaneous collection of color, moisture, and HDA content data. During the data acquisition step, multi-threaded programming is employed to achieve this synchronization. In the system's software architecture, independent threads are created for the color, moisture, and HDA detection units. For example, Python's threading module is used to create three threads: color_thread controls the visual sensor for color data acquisition, moisture_thread controls the near-infrared spectrometer for moisture data acquisition, and hda_thread controls the high-performance liquid chromatograph for HDA content data acquisition. These three threads are started simultaneously and execute their respective detection tasks in parallel, achieving synchronous data collection. Within each thread, appropriate acquisition frequencies and intervals are set to ensure representative and accurate data. For example, the acquisition frequency for color data is set to once per second, the acquisition frequency for moisture data is set to once every 5 seconds, and the acquisition frequency for HDA content data is set to once every 10 seconds. These frequencies are adjusted appropriately based on the response time and data processing requirements of different detection devices.

[0138] Timestamp tagging technology is used to establish temporal associations between multimodal data. When each thread collects data, a precise timestamp is added to each collected data point. The timestamp uses a high-precision system clock, accurate to the millisecond level. For example, when the color detection unit collects image data of a royal jelly sample, the specific time the image was collected is recorded. The timestamped data is stored in a temporary buffer, and during subsequent data processing, different types of data are sorted and associated based on the timestamps. For example, when a comprehensive analysis of a royal jelly sample at a specific moment is required, the color data, moisture data, and HDA content data corresponding to that moment can be found based on the timestamp, ensuring data consistency and correlation, providing an accurate basis for subsequent grading decisions.

[0139] A ring buffer mechanism enables asynchronous data acquisition and transmission. To achieve this, a ring buffer mechanism is employed. A fixed-size ring buffer is created in the system, for example, 1024 data units. As each thread collects data, it sequentially writes it into the ring buffer. Simultaneously, an independent data transmission thread is created that continuously reads data from the ring buffer and transmits it, for example, to the control module for processing. When the ring buffer is full, newly collected data overwrites the oldest data, creating a recycling loop. The ring buffer mechanism allows the data acquisition and data transmission threads to run independently without interfering with each other. Even at high data acquisition speeds, data loss due to delayed data transmission is prevented. For example, if the color detection unit collects a large amount of image data in a short period of time, this data can be stored in the ring buffer and then transmitted when the data transmission thread becomes idle, thereby improving the system's data processing efficiency and stability.

[0140] Preferably, in the automated grading control method for royal jelly, the grading model constructed by the gradient boosting decision tree in the grading model step includes:

[0141] Parallel model training based on the LightGBM algorithm framework; during the control step's classification model construction, the LightGBM algorithm framework is used to train the classification model. First, a large amount of grade characteristic data for royal jelly samples is collected as a training dataset. This data includes color, moisture, and HDA content data, as well as corresponding grade labels. The training dataset is divided into multiple subsets, and these subsets are trained simultaneously on multiple compute nodes or CPU cores using LightGBM's parallel training capabilities. For example, using a distributed computing framework such as Apache Spark in conjunction with LightGBM, the dataset can be distributed across multiple compute nodes, with each node independently training the model. Finally, the training results from each node are merged and integrated to produce the final classification model. Parallel training can significantly shorten model training time and improve training efficiency. For example, for a training dataset containing 100,000 samples, traditional serial training may take hours or even days. However, using parallel training, training time can be reduced to tens of minutes or even less.

[0142] Hyperparameter tuning is performed using the Bayesian optimization algorithm. When training a hierarchical model using the LightGBM algorithm, certain hyperparameters must be configured, such as the learning rate, maximum tree depth, and minimum number of leaf samples. To find the optimal hyperparameter combination, the Bayesian optimization algorithm is used. First, a hyperparameter search space is defined. For example, the learning rate range is [0.01, 0.3], and the maximum tree depth range is [3, 12]. Then, the Bayesian optimization algorithm is used to iteratively search within this search space. In each iteration, the algorithm builds a probabilistic model based on previous search results to predict model performance metrics (such as accuracy and F1 score) under different hyperparameter combinations. The hyperparameter combination with the highest potential for performance improvement is then selected for the next training round. Through multiple iterative searches, the hyperparameters are continuously optimized until the optimal combination is found. For example, after 20 iterative searches, the optimal learning rate is 0.1, the maximum tree depth is 8, and the hierarchical model achieves an accuracy of 99%.

[0143] Setting a dynamic pruning strategy prevents model overfitting. To prevent hierarchical models from overfitting the training data, a dynamic pruning strategy is implemented during model training. In the LightGBM algorithm, pruning is achieved by controlling the tree growth process. For example, the maximum number of leaf nodes can be set to 100. When the number of leaf nodes in the tree reaches this limit, further growth of the tree is stopped. A minimum gain threshold is also set. If the gain from splitting a node is less than this threshold, the node is not split and remains a leaf node. For example, if the minimum gain threshold is set to 0.01, if the accuracy improvement after splitting a node is less than 0.01, the node is not split. During model training, the pruning strategy parameters are dynamically adjusted based on changes in training data and model performance. For example, if the model performance on the validation set begins to decline, the maximum number of leaf nodes can be appropriately reduced or the minimum gain threshold can be increased to further strengthen pruning, thereby improving the model's generalization ability.

[0144] The grading model contains multiple classification output nodes corresponding to the royal jelly grade. The output layer is designed with multiple classification output nodes, each node corresponding to a royal jelly grade. During model training, a cross-entropy loss function is used to measure the difference between the model's predictions and the actual grade. By continuously adjusting the model parameters, the model's predictions are made as close to the actual grade as possible. When the grade feature data of a new royal jelly sample is input, the model outputs a probability value for each output node, indicating the probability that the sample belongs to each grade. The grade corresponding to the node with the largest probability value is selected as the final grading result for the sample.

[0145] Preferably, in the method for automated grading control of royal jelly, the sampling step comprises:

[0146] A machine vision-based positioning system uses 3D vision to guide a sampling robotic arm during sampling. A 3D vision camera is installed in the raw royal jelly storage area to capture three-dimensional spatial information of the raw royal jelly container. The 3D vision camera uses a high-precision depth sensor to accurately measure the container's position, shape, and dimensions. A machine vision-based positioning algorithm processes the image data captured by the 3D vision camera to identify the exact position and posture of the raw royal jelly container. For example, feature extraction and matching algorithms are used to extract characteristic points on the container's surface, match them with a pre-stored container model, and calculate the container's position and posture. This positioning information is transmitted to the robotic arm's control system, which uses this information to plan a motion path. Using 3D vision guidance, the robotic arm accurately moves over the container and inserts the sampling needle for sampling. The sampling robotic arm, with millimeter-level precision, ensures accurate removal of royal jelly samples from the container.

[0147] An integrated micro-load sensor enables dynamic monitoring of the sampling volume. The micro-load sensor is integrated into the sampling needle of the sampling arm to measure the weight of the royal jelly sample in real time. During the sampling process, the micro-load sensor continuously transmits the measured weight data to the control system. The control system monitors changes in the sampling volume in real time based on the preset sampling volume requirements. For example, if the preset sampling volume is 5 grams, when the weight measured by the micro-load sensor approaches 5 grams, the control system promptly controls the sampling arm to stop sampling, ensuring the accuracy of the sampling volume. If the sampling volume exceeds or falls below the preset value during the sampling process, the control system automatically adjusts the sampling strategy. For example, if the sampling volume exceeds the preset value, the sampling arm will return the excess royal jelly sample to the container. If the sampling volume is insufficient, the sampling arm will resample until the preset volume is reached.

[0148] Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container; after sampling is completed, a laser marking device is used to generate a unique traceability code on the surface of the original royal jelly container. Laser marking technology has the characteristics of clear, durable, and non-wearable marking, which can ensure that the traceability code remains clear and readable during subsequent storage and transportation. The traceability code contains important information such as the production batch, production time, and origin of the original royal jelly in the container. Optionally, when generating the traceability code, the laser marking equipment can convert the relevant information into a QR code or barcode according to the preset coding rules and format for marking. At the same time, the traceability code is associated with the information of the royal jelly sample corresponding to the container and stored for subsequent quality tracing and management.

[0149] An image matching algorithm is used to establish a bidirectional association between the sample and the original royal jelly container. During the sampling process, an image acquisition device is used to capture images of the original royal jelly container surface and the royal jelly sample. This image acquisition device can be a 3D vision camera or a standard 2D camera to ensure clear and complete images. An image matching algorithm is used to process the captured container and sample images to extract feature points. For example, the ORB (Oriented FAST and Rotated BRIEF) feature extraction algorithm is used to extract key points and descriptors from the images. The feature matching algorithm is used to match feature points in the container and sample images, and the number of matching points and the matching degree are calculated. When the matching degree reaches a certain threshold, the sample is considered to have an association with the container. For example, when the number of matching points exceeds 10 and the matching degree exceeds 80%, a bidirectional association between the sample and container is established. This established association is stored in a database for easy query and management. For example, by entering the sample number, you can query the information of the corresponding original royal jelly container, and by entering the container number, you can query the information of the sample taken from the container, realizing two-way traceability of samples and containers.

[0150] The grade characteristic data of royal jelly in the present invention include color data, moisture data and 10-hydroxy-2-decenoic acid (HDA) content data of royal jelly, but the grade characteristics of royal jelly are not limited to these, and also include: sensory indicators such as state, smell and taste, physical and chemical indicators such as protein and acidity, and microbial indicators.

[0151] Royal jelly quality grades are usually classified according to national standards and some common standards in the industry, as follows:

[0152] Color: Superior quality: Generally milky white or light yellow, shiny, and uniform in color. First-class quality: Mostly milky white or light yellow, with slight color variations permitted, but generally uniform overall. Qualified quality: The color range is relatively wide, ranging from milky yellow to dark yellow, but without obvious discoloration, darkening, or other abnormalities.

[0153] The moisture content standards for royal jelly vary across different quality grades and within different standard systems, primarily based on national standards such as GB 9697-2008 "Royal Jelly." Superior quality: Moisture content is generally below 62.5%. This grade of royal jelly has a relatively high concentration of active ingredients, which is more conducive to preservation and the effectiveness of its effects. First-class quality: Moisture content typically does not exceed 64%. While maintaining the quality of the royal jelly, this slightly relaxed moisture content requirement remains at a relatively low level, effectively preserving its nutritional components and physical and chemical properties. Qualified quality: Moisture content is permitted to be below 66%. While this relatively high moisture content is still within an acceptable range, it generally guarantees the quality and value of the royal jelly.

[0154] 10-Hydroxy-α-decenoic acid (HDA): Superior quality: HDA content ≥1.8%. First-class quality: HDA content between 1.6% and 1.8%. Qualified quality: HDA content not less than 1.4%.

[0155] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the following embodiments are provided for illustration:

[0156] This embodiment provides an automated grading control system for royal jelly. The grading control system utilizes a modular design and consists of a data acquisition module, a control module, an execution module, a verification module, and a human-machine interface. The system hardware utilizes industrial-grade components to support production lines processing 3,000 kg of royal jelly per day. Each module communicates via Industrial Ethernet (Profinet protocol), with a data transmission rate of 100 Mbps and a system response time of <200 ms. It includes:

[0157] A data acquisition module is configured to synchronously acquire grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly; the data acquisition module includes:

[0158] A sampling unit is configured to extract a portion of the sample from the original royal jelly as a royal jelly sample by driving a sampling mechanical arm, and is used to establish a one-to-one correspondence between the test sample and the original royal jelly from which it is derived; the sampling unit includes:

[0159] A positioning system based on machine vision guides the sampling robot arm to take samples through 3D vision;

[0160] Integrated micro weighing sensor to achieve dynamic monitoring of sampling volume;

[0161] Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container;

[0162] A bidirectional association between the sample and the original royal jelly container was established using an image matching algorithm.

[0163] A color detection unit is configured to obtain image data of the royal jelly sample through a visual sensor, compare it with the photo data corresponding to each grade of royal jelly pre-stored in the control module, and provide a color detection result;

[0164] a moisture detection unit, configured to obtain spectral data of the royal jelly sample through a near-infrared spectrometer and calculate the moisture content of the royal jelly sample;

[0165] The HDA content detection unit is configured to obtain chromatographic data of the royal jelly sample through high performance liquid chromatography and calculate the HDA content in the royal jelly sample.

[0166] A synchronization control unit, wherein the synchronization control unit is configured to:

[0167] The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology;

[0168] Use timestamp marking technology to establish temporal correlation between multimodal data;

[0169] Asynchronous processing of data collection and transmission is achieved through a ring buffer mechanism.

[0170] A control module is configured to receive the grade characteristic data of the royal jelly sample collected by the data collection module and normalize the multiple grade characteristic data, then generate a grade determination result based on the multiple detection characteristic data, and dynamically generate a sorting execution parameter based on the grade determination result; the control module includes:

[0171] a real-time calibration unit configured to perform deviation compensation on the detection data based on a preset reference sample;

[0172] An exception handling unit, configured to trigger a recheck process for samples exceeding a threshold and record an exception log;

[0173] A classification model unit is configured to construct a classification model based on the quality feature data by using a gradient boosting decision tree; the classification model constructed by the gradient boosting decision tree includes:

[0174] Parallel model training based on the LightGBM algorithm framework;

[0175] Use Bayesian optimization algorithm for hyperparameter tuning;

[0176] Set dynamic pruning strategies to prevent model overfitting;

[0177] Contains multiple classification output nodes corresponding to the grade of royal jelly.

[0178] a storage unit configured to store pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and historical collected royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photographic or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0179] The decision optimization unit is configured to iteratively update the weight coefficients of the characteristic data of each grade in the grading model through historical data.

[0180] an execution module configured to receive the sorting execution parameters of the control module and drive an execution mechanism to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0181] A human-machine interface is configured to display the grading process and receive manual real-time modifications to sorting execution parameters.

[0182] A verification module is configured to perform a secondary inspection and verification on the sorted raw royal jelly;

[0183] A quality traceability database is configured to associate royal jelly samples with original royal jelly, their production time, test parameters and grading results.

[0184] The data acquisition module's synchronous acquisition unit utilizes Python multithreading technology (the threading module), setting up three independent threads to control the visual sensor, near-infrared spectrometer, and high-performance liquid chromatograph, respectively. Timestamp accuracy reaches milliseconds, with device clocks synchronized via the NTP protocol (deviation ≤ ±1ms). A double-buffered ring buffer mechanism is used, with each buffer holding 1MB and a data acquisition rate of 30MB / h. The sampling unit: 3D visual positioning: A Keyence 3D laser displacement sensor (LJ-V7000 series) is used in conjunction with a six-axis robotic arm (UR5e) to achieve ±0.1mm positioning accuracy. Color detection: A Basler ac A2000-50gm camera (2 megapixels) is used with a D65 standard illuminant, employing HSV color space analysis to establish a 12-level standard color chart database (ΔE < 2). Moisture detection: A near-infrared spectrometer (Ocean Optics QE65000) uses a PLS algorithm to establish a prediction model (R² = 0.989, RMSE = 0.28%). HDA detection was performed using an Agilent 1260 Infinity II HPLC system, a C18 column (4.6 × 250 mm), a mobile phase of methanol-water (45:55), and a detection wavelength of 210 nm. Dynamic weighing was performed using an integrated HBM U10 micro-load sensor (0-50 g range, 0.01 g accuracy) for real-time monitoring of sample volume. Laser marking was performed using an IPG YLR-20 fiber laser to generate a 200-byte QR code compliant with the ISO / IEC 18004 standard on the container surface. Image matching was performed using the ORB feature point detection algorithm (implemented in OpenCV), with a feature point matching threshold of 0.7 and a matching time of <150 ms.

[0185] Control Module: Industrial control computer: Intel i7-12700 processor, Ubuntu 20.04 LTS system, Python 3.9 development environment. Data normalization: Z-score standardization is used, processing range [-1, 1]. Real-time calibration: Three-point calibration method (standard whiteboard / grayboard / blackboard), automatically performed daily at startup, to compensate for ambient temperature drift (0-40°C). Hierarchical model construction: Algorithm framework: LightGBM 3.3.2, setting num_leaves=31, max_depth=8, and learning_rate=0.1. Model optimization: Bayesian optimization parameter adjustment (search space: learning_rate 0.01-0.3, max_depth 3-12), objective function F1-score. Dynamic pruning: The maximum number of leaf nodes is set to 100, and post-pruning is triggered when the Gini impurity gain is <0.01. Decision Optimization Mechanism: Historical data storage: SQLite database with a capacity of 500GB, supporting data storage of 100,000 records per day. Model iteration: Incremental updates are triggered when the accumulated new data reaches 5,000, with a training cycle of 4 hours. Exception handling: Three thresholds are set (yellow ±5%, orange ±10%, and red ±15%), with red alerts triggering a re-inspection process.

[0186] The execution module uses a four-axis Delta robot (Epson LS6), with a repeatability of ±0.05mm and a sorting speed of 120 times / minute. A pneumatic gripper (SMC MHF2-16D) with adjustable gripping force (5-30N) accommodates different packaging containers. A servo filler (accuracy ±0.5g) is used for packaging in food-grade PE bags (0.08mm thickness). A laser coder (Sato CL4NX) generates a one-dimensional code containing production time, batch, and grade information. Blockchain storage uses the Hyperledger Fabric platform, generating a SHA-256 hash for each package and uploading the timestamp to the blockchain with second-level accuracy.

[0187] Verification module: An independent inspection station is equipped with the same testing equipment as the main module, with a random inspection rate of 10%. Re-inspection results are automatically compared, and a full batch recall is triggered if the inconsistency rate exceeds 0.5%.

[0188] Quality traceability database: Utilizing MySQL 8.0, a traceability table with 15 fields (container ID, production time, test parameters, grading results, etc.) is established. It supports 7 levels of forward and reverse traceability, with query response times of less than 2 seconds.

[0189] Human-computer interaction interface: The operation terminal uses a 15.6-inch industrial touchscreen (Advantech TPC-1551HI), runs Windows 10 IoT, and has a resolution of 1920×1080. The interface is divided into a real-time monitoring area (data refresh rate 5Hz), a parameter setting area (0.1% increments), and an alarm display area (three-color indicator). Three levels of access control are available: administrator (system configuration), operator (routine operations), and guest (read-only access). An operation log records all actions, with a storage period of 180 days and supports keyword search.

[0190] The system of this embodiment ran continuously for 72 hours without any failure, with a classification accuracy of 99.2% and a sorting speed of 100 times / minute.

[0191] Environmental adaptability

[0192] Temperature and humidity test: Stable operation in an environment with a temperature of 5-40°C and a humidity of 30-80%, with a detection error of <±0.5%.

[0193] Anti-electromagnetic interference: CE certified and in compliance with EN 61000-6-2 standards.

[0194] This embodiment realizes the full process automation control of royal jelly grading, significantly improving production efficiency while ensuring detection accuracy. It is suitable for the quality control needs of large-scale production enterprises and provides a reliable technical solution for royal jelly grading. The key indicators of the system are shown in Table 1:

[0195] Table 1 System performance indicators

[0196] index Numerical Grading accuracy 99.2% Sorting speed 100 times / minute Data storage delay <100ms Abnormal response time <5 seconds Traceability code readability 99.9% Model update cycle 48 hours (automatically triggered)

[0197] A method for automated royal jelly grading control includes five core steps: data acquisition, control processing, sorting execution, verification and traceability, and human-computer interaction. This method uses a pipeline processing architecture, with a single batch processing time controlled within 30 minutes, supporting large-scale production of 3,000 kg of royal jelly per day. The method includes the following steps:

[0198] Data collection step: synchronously obtaining grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly; the data collection step includes the following steps:

[0199] Sampling step: by driving the sampling mechanism to take out a portion of the sample from the original royal jelly as a royal jelly sample, and to establish a one-to-one correspondence between the test sample and the original royal jelly from which it originated; the sampling step includes: a positioning system based on machine vision, sampling through 3D vision-guided sampling robotic arm; integrating a micro weighing sensor to realize dynamic monitoring of the sampling amount; using laser marking technology to generate a unique traceability code on the surface of the original royal jelly container; and establishing a bidirectional association between the sample and the original royal jelly container through an image matching algorithm.

[0200] Color detection step: The image data of the royal jelly sample is obtained through the visual sensor, and compared with the photo data corresponding to each grade of royal jelly pre-stored in the control step, and the color detection result is given;

[0201] Moisture detection step: obtaining spectral data of the royal jelly sample through a near-infrared spectrometer and calculating the moisture content of the royal jelly sample;

[0202] HDA content detection step: obtaining chromatographic data of the royal jelly sample by high performance liquid chromatography and calculating the HDA content in the royal jelly sample.

[0203] The synchronous control steps include: realizing synchronous collection of color data, moisture data and HDA content data through multi-threaded data collection technology; establishing temporal correlation between multimodal data by adopting timestamp marking technology; realizing asynchronous processing of data collection and transmission by using a ring buffer mechanism.

[0204] Control step: normalize the multiple grade feature data, then generate grade determination results based on the multiple detection feature data, and dynamically generate sorting execution parameters based on the grade determination results; the control step includes:

[0205] Real-time calibration step: compensate the deviation of the test data based on the preset reference sample;

[0206] Exception handling steps: trigger the re-inspection process for samples that exceed the threshold and record the exception log;

[0207] Steps for building a grading model: Build a grading model through a gradient boosting decision tree based on quality feature data; the grading model built through the gradient boosting decision tree includes: parallel model training based on the LightGBM algorithm framework; hyperparameter tuning using the Bayesian optimization algorithm; setting a dynamic pruning strategy to prevent model overfitting; and including multiple classification output nodes corresponding to the grade of royal jelly.

[0208] Storing step: storing pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and collected historical royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photo or video data corresponding to each grade of royal jelly, water content data, and HDA content data;

[0209] Decision optimization step: Iteratively update the weight coefficients of each grade characteristic data in the grading model through historical data.

[0210] Execution step: driving the actuator to automatically sort and package the original royal jelly corresponding to the royal jelly sample;

[0211] Human-computer interaction steps: display the grading process and receive manual real-time modifications to sorting execution parameters.

[0212] Verification steps: Conduct secondary random inspection and verification on the sorted raw royal jelly;

[0213] Quality traceability steps: Establish a correlation between the royal jelly sample and the original royal jelly, its production time, test parameters and grading results.

[0214] Specifically, step S1: data collection step

[0215] 1.Synchronous multi-threaded acquisition:

[0216] Three independent threads are started to control the visual sensor, near-infrared spectrometer and high-performance liquid chromatograph respectively, and data synchronous collection is achieved through Python multi-threading technology.

[0217] The NTP protocol is used to calibrate the clocks of each device to ensure millisecond-level timestamp accuracy and establish a temporal correlation between multimodal data.

[0218] Data is transmitted asynchronously through a ring buffer (double buffer mechanism, capacity 1MB), with an acquisition rate of 30MB / h and a packet loss rate of <0.1%.

[0219] 2. Accurate sampling and traceability

[0220] A six-axis robotic arm (UR5e) is driven and positioned with a 3D vision sensor (Keyence LJ-V7000), with a positioning accuracy of ±0.1mm.

[0221] The sampling volume (0-50 g, accuracy 0.01 g) was dynamically monitored by a micro weighing sensor (HBM U10), and the sampling needle was automatically sterilized by ultraviolet light (254 nm, 10 seconds).

[0222] The ORB feature point detection algorithm (OpenCV) was used to establish a bidirectional association between the sample and the container, with a matching threshold of 0.7 and a matching time of <150 ms.

[0223] A fiber laser (IPG YLR-20) generates a QR code on the container surface that complies with the ISO / IEC 18004 standard and has a code capacity of 200 bytes.

[0224] 3. Multi-parameter detection

[0225] Color detection: An industrial camera (Basler acA2000-50gm) captured images under D65 standard light source, analyzed them in the HSV color space, and compared them with a 12-level standard color chart (ΔE < 2).

[0226] Moisture content was calculated using a near-infrared spectrometer (Ocean Optics QE65000) using the PLS algorithm (R² = 0.989, RMSE = 0.28%). The temperature compensation formula is: Correction value = Measurement value × (1 + 0.0015 × (T - 25)).

[0227] HDA detection: High performance liquid chromatography (Agilent 1260 Infinity II) was equipped with a C18 column, the mobile phase was methanol-water (45:55), the detection wavelength was 210 nm, and the content was calculated by integrating the peak area.

[0228] Step S2: Control processing step

[0229] 1. Data Preprocessing

[0230] Color, moisture, and HDA data were Z-score standardized (range [-1, 1]).

[0231] Moving average filtering (window 5) was used to remove high-frequency noise from the HDA data, and temperature compensation was used to correct the moisture data.

[0232] 2. Real-time calibration and exception handling

[0233] Perform a three-point calibration (white board / gray board / black board) every day when the machine is turned on to establish the spectral response compensation curve.

[0234] Three threshold levels are set (yellow ±5%, orange ±10%, red ±15%). The red warning triggers the re-inspection process, and the abnormality log records the timestamp, sample number and abnormality type.

[0235] 3. Hierarchical model construction and optimization

[0236] A hierarchical model is built based on the LightGBM algorithm with parameter settings: num_leaves=31, max_depth=8, and learning_rate=0.1.

[0237] Bayesian optimization is used to adjust parameters (search space: learning_rate 0.01-0.3, max_depth 3-12), and the objective function F1-score.

[0238] Set a dynamic pruning strategy (maximum leaf nodes 100, pruning when Gini gain < 0.01) to prevent overfitting.

[0239] Historical data is stored in a SQLite database with a capacity of 500GB, supporting 100,000 records per day. The model is automatically updated every time 5,000 new data are accumulated.

[0240] Step S3: Execute sorting step

[0241] 1. Intelligent sorting execution

[0242] The Delta robot (Epson LS6) dynamically adjusts its motion trajectory (quintic polynomial interpolation) based on the grading results, with a sorting speed of 120 times / minute and a repeatability accuracy of ±0.05mm.

[0243] The pneumatic gripper (SMC MHF2-16D) has an adjustable gripping force of 5-30N and is suitable for different packaging containers.

[0244] The servo filling machine (accuracy ±0.5g) completes the quantitative packaging, and the packaging material is food-grade PE bags (thickness 0.08mm).

[0245] 2. Traceability code generation

[0246] The laser coding machine (Sato CL4NX) generates a one-dimensional code on the packaging surface, which contains information such as production time, batch, and grade.

[0247] Hyperledger Fabric blockchain technology is used to record packaging information. A SHA-256 hash value is generated for each package, and the timestamp on the chain is accurate to the second.

[0248] Step S4: Verification and tracing step

[0249] 1. Secondary sampling verification

[0250] Independent testing stations conduct random inspections at a rate of 10%, and the re-inspection results are automatically compared. When the inconsistency rate exceeds 0.5%, a recall of the entire batch is triggered.

[0251] The verification process includes re-inspection of all parameters including color, moisture and HDA, and the testing equipment is configured in the same way as the main module.

[0252] 2. Quality traceability system

[0253] A traceability table (15 fields) was established in the MySQL 8.0 database, supporting 7 levels of forward / reverse traceability and a query response time of < 2 seconds.

[0254] Traceability information includes container ID, production time, test parameters, grading results, etc., which can be queried by scanning the code or entering the batch number.

[0255] Step S5: Human-computer interaction step

[0256] 1. Real-time monitoring and parameter adjustment

[0257] A 15.6-inch industrial touch screen (Advantech TPC-1551HI) displays the grading process (data refresh rate 5Hz) and supports real-time viewing of grading results.

[0258] Provides a parameter setting interface (0.1% step size) and supports operations such as visual sensor white balance adjustment and spectrometer baseline correction.

[0259] 2. Permission Management and Logging

[0260] Three-level permission control (administrator / operator / visitor), different roles have corresponding operation permissions.

[0261] The operation log records all actions (timestamp, operator, and operation content), has a storage period of 180 days, and supports keyword retrieval.

[0262] This embodiment achieves automated and precise control of royal jelly grading through a standardized method and process, and is suitable for large-scale production scenarios.

[0263] The working process of the present invention is:

[0264] 1. Data Collection Phase

[0265] The sampling unit uses 3D vision to guide the sampling robotic arm to accurately take samples from the original royal jelly container (accuracy ±0.1mm), and the micro weighing sensor monitors the sampling volume in real time (accuracy of 0.01g).

[0266] The multi-threaded synchronous control unit drives the visual sensor, near-infrared spectrometer, and high-performance liquid chromatograph to synchronously collect color, moisture, and HDA data, and timestamp technology ensures data timing consistency.

[0267] Laser marking generates a unique traceability code, and image matching algorithms establish a bidirectional association between samples and containers.

[0268] 2. Control processing stage

[0269] The control module performs Z-score normalization on the multimodal data and calibrates the detection data in real time based on the preset benchmark samples.

[0270] The gradient boosting decision tree model processes data through the LightGBM algorithm and generates classification results by combining Bayesian optimization parameter adjustment and dynamic pruning strategy.

[0271] Historical data is iteratively updated to update model weights, and abnormal samples trigger a re-inspection process and record logs.

[0272] 3. Sorting execution stage

[0273] The execution module receives the control parameters, the servo-driven robotic arm automatically sorts the raw royal jelly according to the grading results, and the filling machine completes the quantitative packaging (±0.5g accuracy).

[0274] The laser coding machine generates a one-dimensional code containing production information on the packaging surface, and blockchain technology records traceability data.

[0275] 4. Verification and tracing stage

[0276] The verification module conducts a second inspection on 10% of the sorted products, compares the re-inspection results with the initial inspection, and any deviations from the tolerance trigger a recall of the entire batch.

[0277] The quality traceability database associates samples with production time, test parameters and other information, and supports 7 levels of forward / reverse queries.

[0278] 5. Human-computer interaction stage

[0279] The touch interface displays the grading process in real time and supports online adjustment of parameter thresholds and abnormal alarm processing.

[0280] Three-level permission management ensures operational security, and historical data can be exported for analysis.

[0281] Working principle:

[0282] 1. Synchronous multimodal data acquisition

[0283] Multi-threading technology is used to control multiple types of sensors in parallel, and timestamp marking and ring buffer mechanism are used to achieve efficient data synchronization.

[0284] The visual sensor uses HSV color space analysis, the near-infrared spectrometer uses the PLS algorithm to predict the moisture content, and the HPLC calculates the HDA content through the chromatographic peak area.

[0285] 2. Intelligent tiered decision-making

[0286] The control module normalizes the data and then inputs it into the gradient boosting decision tree model. The model is trained in parallel based on the LightGBM framework, and dynamic pruning is used to prevent overfitting.

[0287] The Bayesian optimization algorithm automatically searches for optimal hyperparameters, and historical data drives continuous model optimization.

[0288] 3. Precise execution and traceability

[0289] The sampling robot arm plans the path through cubic spline interpolation, and the pneumatic gripper realizes flexible sorting.

[0290] Laser marking and blockchain technology build an unalterable traceability system, and image matching algorithms ensure a two-way association between samples and containers.

[0291] 4. Closed-loop quality control

[0292] The verification module analyzes and re-inspects data through statistical process control (SPC), and the quality traceability system makes the entire process data traceable.

[0293] The human-computer interaction interface provides real-time monitoring and parameter fine-tuning, and the exception handling mechanism ensures system robustness.

[0294] The present invention realizes full-process automated control of royal jelly grading through deep collaboration between hardware and algorithms, significantly improving production efficiency while ensuring detection accuracy.

[0295] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.

Claims

1. A royal jelly automatic grading control system, characterized in that: include: The data acquisition module is configured to synchronously acquire grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly. The data acquisition module also includes a synchronization control unit, which is configured to: The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology; Use timestamp marking technology to establish temporal correlation between multimodal data; Asynchronous processing of data collection and transmission is achieved through a ring buffer mechanism; a control module configured to receive the grade characteristic data of the royal jelly sample collected by the data collection module and perform normalization processing on the multiple grade characteristic data, then generate a grade determination result based on the multiple detection characteristic data, and dynamically generate a sorting execution parameter based on the grade determination result; an execution module configured to receive the sorting execution parameters of the control module and drive an execution mechanism to automatically sort and package the original royal jelly corresponding to the royal jelly sample; a human-machine interface configured to display the grading process and receive manual real-time modifications to sorting execution parameters; The control module includes: a real-time calibration unit configured to perform deviation compensation on the detection data based on a preset reference sample; An exception handling unit, configured to trigger a recheck process for samples exceeding a threshold and record an exception log; a classification model unit configured to construct a classification model through a gradient boosting decision tree according to the quality feature data; a storage unit configured to store pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and historical collected royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photographic or video data corresponding to each grade of royal jelly, water content data, and HDA content data; A decision optimization unit configured to iteratively update the weight coefficients of characteristic data of each grade in the grading model through historical data; The hierarchical model constructed by the gradient boosting decision tree includes: Parallel model training based on the LightGBM algorithm framework; Use Bayesian optimization algorithm for hyperparameter tuning; Set dynamic pruning strategies to prevent model overfitting; Contains multiple classification output nodes corresponding to the grade of royal jelly.

2. The royal jelly automated grading control system according to claim 1, characterized in that: The data acquisition module includes: a sampling unit configured to take a portion of the sample from the original royal jelly as a royal jelly sample by driving a sampling mechanical arm, and to establish a one-to-one correspondence between the test sample and the original royal jelly from which it is derived; A color detection unit is configured to obtain image data of the royal jelly sample through a visual sensor, compare it with the photo data corresponding to each grade of royal jelly pre-stored in the control module, and provide a color detection result; a moisture detection unit, configured to obtain spectral data of the royal jelly sample through a near-infrared spectrometer and calculate the moisture content of the royal jelly sample; The HDA content detection unit is configured to obtain chromatographic data of the royal jelly sample through high performance liquid chromatography and calculate the HDA content in the royal jelly sample.

3. The royal jelly automated grading control system according to claim 1, characterized in that: Also includes: A verification module is configured to perform a secondary inspection and verification on the sorted raw royal jelly; A quality traceability database is configured to associate royal jelly samples with original royal jelly, their production time, test parameters and grading results.

4. The royal jelly automated grading control system according to claim 2, characterized in that: The sampling unit comprises: A positioning system based on machine vision guides the sampling robot arm to take samples through 3D vision; Integrated micro weighing sensor to achieve dynamic monitoring of sampling volume; Laser marking technology is used to generate a unique traceability code on the surface of the original royal jelly container; A bidirectional association between the sample and the original royal jelly container was established using an image matching algorithm.

5. An automated grading control method for royal jelly based on the system of claim 1, characterized in that: The following steps are involved: Data collection step: synchronously obtaining grade characteristic data of the royal jelly sample, wherein the grade characteristic data includes color data, moisture data, and 10-hydroxy-2-decenoic acid (HDA) content data of the royal jelly; Control step: normalizing the various grade feature data, generating grade determination results based on the various detection feature data, and dynamically generating sorting execution parameters based on the grade determination results; Execution step: driving the actuator to automatically sort and package the original royal jelly corresponding to the royal jelly sample; Human-computer interaction steps: display the grading process and receive manual real-time modification of sorting execution parameters; The control step comprises: Real-time calibration step: compensate the deviation of the test data based on the preset reference sample; Exception handling steps: trigger the re-inspection process for samples that exceed the threshold and record the exception log; Steps for building a classification model: Building a classification model through a gradient boosting decision tree based on quality feature data; Storing step: storing pre-stored royal jelly grade characteristic data, real-time collected royal jelly sample grade characteristic data, and collected historical royal jelly sample grade characteristic data, wherein the pre-stored royal jelly grade characteristic data includes photo or video data corresponding to each grade of royal jelly, water content data, and HDA content data; Decision optimization step: iteratively update the weight coefficients of each grade characteristic data in the grading model through historical data; The data acquisition step further includes a synchronization control step, which includes: The simultaneous collection of color data, moisture data and HDA content data is achieved through multi-threaded data collection technology; Use timestamp marking technology to establish temporal correlation between multimodal data; Asynchronous processing of data collection and transmission is achieved through a ring buffer mechanism; The hierarchical model constructed by the gradient boosting decision tree in the hierarchical model step includes: Parallel model training based on the LightGBM algorithm framework; Use Bayesian optimization algorithm for hyperparameter tuning; Set dynamic pruning strategies to prevent model overfitting; Contains multiple classification output nodes corresponding to the grade of royal jelly.

6. The automated grading control method for royal jelly according to claim 5, characterized in that: The data collection step includes the following steps: Sampling step: taking out a portion of the sample from the original royal jelly by driving the sampling mechanism as the royal jelly sample, and establishing a one-to-one correspondence between the test sample and the original royal jelly from which it is derived; Color detection step: The image data of the royal jelly sample is obtained through the visual sensor, and compared with the photo data corresponding to each grade of royal jelly pre-stored in the control step, and the color detection result is given; Moisture detection step: obtaining spectral data of the royal jelly sample through a near-infrared spectrometer and calculating the moisture content of the royal jelly sample; HDA content detection step: obtaining chromatographic data of the royal jelly sample by high performance liquid chromatography and calculating the HDA content in the royal jelly sample.

Citation Information

Patent Citations

  • Method for rapid detection of contents of water and protein in royal jelly

    CN104849232A

  • Method for quickly measuring moisture content of pulping material with near infrared spectrum technology

    CN105181640A