A ginseng seed nondestructive classification method and system thereof

The ORBMO-RF model, which fuses image and hyperspectral data, solves the problems of accuracy and efficiency in ginseng seed classification, achieving efficient non-destructive testing and accurate classification.

CN120808048BActive Publication Date: 2025-11-11JILIN AGRICULTURAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511269523.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-11-11
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

Existing technologies lack methods for classifying ginseng seeds based on image and spectral features, resulting in inaccurate classification, low efficiency, and high costs.

Method used

An ORBMO-RF model was constructed to classify ginseng seeds by using an image and hyperspectral data fusion method, combined with an improved RBMO algorithm and an RF model.

Benefits of technology

It achieves accurate and non-destructive classification of ginseng seeds, improves classification accuracy, reduces the randomness and subjectivity of manual parameter adjustment, and enhances the model's recognition performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808048B_ABST
    Figure CN120808048B_ABST
Patent Text Reader

Abstract

A non-destructive classification method and system for ginseng seeds, relating to the field of computer image detection technology, solves the problem of the lack of existing classification methods for ginseng seeds based on image and spectral features. The method involves: collecting image data and hyperspectral data of ginseng seeds separately; preprocessing both data separately; performing feature filtering on the preprocessed data; fusing the feature-filtered data; constructing an ORBMO-RF model by combining an improved RBMO algorithm with a RF model; and inputting the fused data into the ORBMO-RF model for further processing to complete the classification of ginseng seeds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer image detection technology, specifically to a non-destructive classification method and system for ginseng seeds. Background Technology

[0002] Currently, the seeds circulating in the market for ginseng cultivation are mainly cultivated ginseng seeds, forest-grown ginseng seeds, American ginseng seeds, and Korean ginseng seeds. These seeds look similar and are not easy to distinguish, especially cultivated ginseng seeds, forest-grown ginseng seeds, and Korean ginseng seeds, which are highly similar in morphological characteristics and difficult for the average person to identify with the naked eye. Moreover, these four types of seeds have significantly different suitable planting methods due to their varietal characteristics, and the economic value of the ginseng produced varies greatly depending on its quality, yield, and market positioning. Therefore, accurate and non-destructive classification of ginseng seeds is an important and significant task in ginseng production.

[0003] Traditional seed classification methods mainly include morphological identification and chemical identification. Morphological identification primarily includes seed classification based on morphological characteristics and classification based on external features identified by the human eye. This method has good classification results, but it also has drawbacks such as inconsistent classification, slow classification speed, high misclassification rate, and waste of manpower. Chemical identification utilizes techniques including fluorescence scanning, chemical composition analysis, molecular biology techniques such as DNA detection, and electrophoresis analysis. Among these, fluorescence scanning, chemical analysis, and DNA detection methods (gene detection methods) have high identification accuracy, but the procedures are complex, time-consuming, and costly, requiring experienced operators and expensive equipment, making them unsuitable for rapid identification of large-scale seeds. Due to the limitations of the above methods in terms of efficiency, cost, and operational complexity, there is an urgent need to develop rapid identification and non-destructive testing technologies for ginseng seeds.

[0004] With the development of computer technology, computer vision and spectral techniques have been recognized as important solutions. These methods have been widely applied in crop breeding, agricultural product quality testing, and pest and disease diagnosis. Although there has been considerable research on seed classification of major crops such as corn, wheat, and rice, and some literature has explored the application of hyperspectral or image technology in agricultural product identification, no research on ginseng seed classification has been found. Existing domestic and international research has largely focused on the quality evaluation of ginseng roots, detection of medicinal components, or origin traceability, while the image and spectral characteristics of ginseng seeds have not been thoroughly explored and modeled.

[0005] In summary, existing technologies lack a classification method for ginseng seeds based on their image and spectral characteristics. Summary of the Invention

[0006] This invention solves the problem of the lack of a classification method for ginseng seeds based on image and spectral features in existing technologies.

[0007] The present invention discloses a non-destructive classification method for ginseng seeds, comprising the following steps:

[0008] Step S1: Collect image data and hyperspectral data of ginseng seeds respectively;

[0009] Step S2: Preprocess the image data and hyperspectral data of ginseng seeds respectively;

[0010] Step S3: Perform feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively;

[0011] Step S4: Fuse the image data of the ginseng seeds after feature screening with the hyperspectral data of the ginseng seeds;

[0012] Step S5: After improving the RBMO algorithm, combine it with the RF model to construct the ORBMO-RF model;

[0013] Step S6: Input the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing to complete the classification of ginseng seeds.

[0014] Furthermore, in one embodiment of the present invention, the improvement of the RBMO algorithm in step S5 specifically includes:

[0015] An improved circle chaotic mapping mechanism is introduced in the population initialization phase of the RBMO algorithm.

[0016] An improved golden sine search strategy is introduced in the prey attack phase of the RBMO algorithm.

[0017] In the later search phase of the RBMO algorithm, adaptive simulated annealing is introduced.

[0018] Furthermore, in one embodiment of the present invention, the improved circle chaotic mapping mechanism is specifically as follows:

[0019] ;

[0020] Among them, parameters ,parameter , For the next chaotic value, For the current chaos, This is a modulo operation.

[0021] Furthermore, in one embodiment of the present invention, the improved golden sine search strategy is specifically as follows:

[0022] The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy.

[0023] Furthermore, in one embodiment of the present invention, the improvement of the golden sine search strategy by introducing the Lévy Flight perturbation mechanism is specifically as follows:

[0024] ;

[0025] in, for Distribution step size, For the disturbance intensity, It is the golden ratio constant. Uniformly distributed random numbers, The angle of the sinusoidal disturbance is... The position of the current optimal individual. For the first The updated position of each individual For the first The current location of each individual. for Individual position vectors.

[0026] Furthermore, in one embodiment of the present invention, the adaptive simulated annealing specifically refers to:

[0027] ;

[0028] in, The current temperature. The initial temperature. To control the cooling rate, This represents the current iteration number.

[0029] The present invention discloses a non-destructive classification system for ginseng seeds, which is implemented using the aforementioned non-destructive classification method for ginseng seeds, and includes the following modules:

[0030] The acquisition module collects image data and hyperspectral data of ginseng seeds, respectively;

[0031] The preprocessing module performs preprocessing on the image data and hyperspectral data of ginseng seeds respectively;

[0032] The filtering module performs feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively;

[0033] The fusion module fuses the image data of ginseng seeds after feature screening with the hyperspectral data of ginseng seeds;

[0034] The module improves the RBMO algorithm and combines it with the RF model to construct the ORBMO-RF model;

[0035] The classification module inputs the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thus completing the classification of ginseng seeds.

[0036] This invention addresses the problem in existing technologies of lacking a classification method for ginseng seeds based on image and spectral features. Specific beneficial effects include:

[0037] 1. The present invention provides a non-destructive classification method for ginseng seeds. Existing technologies lack classification methods for ginseng seeds based on image and spectral features. To address this technical problem and fill the gap in the field of ginseng seed variety classification, this invention proposes a method that integrates image and hyperspectral features, based on the construction of an ORBMO-RF model, to achieve accurate and non-destructive classification of ginseng seeds.

[0038] 2. The non-destructive classification method for ginseng seeds described in this invention addresses the drawback of the RBMO algorithm being prone to getting trapped in local optima. It constructs a hybrid optimization framework by introducing three mechanisms: an improved circle chaotic mapping mechanism, a golden sine search strategy, and adaptive simulated annealing. The improved RBMO algorithm significantly affects the accuracy of the RF model by optimizing hyperparameters, reducing the randomness and subjectivity of manual parameter tuning, and improving the model's ability to identify multi-source heterogeneous data. This provides a novel method for achieving non-destructive detection and accurate classification in seed sorting applications.

[0039] 3. The non-destructive classification method for ginseng seeds described in this invention uses the ORBMO-RF model to find optimal parameters through multiple iterations, thereby improving classification accuracy. This method not only improves the accuracy and efficiency of hyperparameter tuning but also ultimately achieves superior classification performance. Attached Figure Description

[0040] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0041] Figure 1 The image shows a sample of ginseng seeds as described in Embodiment 1, wherein (a) is cultivated ginseng seed, (b) is Korean ginseng seed, (c) is forest ginseng seed, and (d) is American ginseng seed;

[0042] Figure 2 This is a diagram of the image data acquisition device for ginseng seeds described in Embodiment 1;

[0043] Figure 3This is a diagram of the hyperspectral data acquisition device for ginseng seeds described in Embodiment 1;

[0044] Figure 4 This is a diagram of the single ginseng seed extraction process described in Embodiment 1, wherein (a) is the image data of the ginseng seed, (b) is the grayscale image, (c) is the image after noise reduction, (d) is the binary image, (e) is the mask image of a single ginseng seed, and (f) is the segmented image of a single ginseng seed.

[0045] Figure 5 It is a mean map of morphological features of different seed categories as described in Implementation Method 1, wherein the left side is a mean map of texture features and the right side is a mean map of geometric features;

[0046] Figure 6 The above are the scatter plot and frequency distribution histogram described in Implementation Method 2, wherein (a) is the scatter plot of the circle chaotic mapping mechanism, (b) is the scatter plot of the improved circle chaotic mapping mechanism, (c) is the frequency distribution histogram of the circle chaotic mapping mechanism, and (d) is the frequency distribution histogram of the improved circle chaotic mapping mechanism.

[0047] Figure 7 This is a comparison diagram of the search paths of the golden sine search strategy described in Implementation Method 2 and the golden sine search strategy with the introduction of the Lévy Flight perturbation mechanism in a certain two-dimensional objective function space. Detailed Implementation

[0048] Various embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. The embodiments described with reference to the drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0049] Implementation Method 1: The non-destructive classification method for ginseng seeds described in this implementation method includes the following steps:

[0050] Step S1: Collect image data and hyperspectral data of ginseng seeds respectively;

[0051] Step S2: Preprocess the image data and hyperspectral data of ginseng seeds respectively;

[0052] Step S3: Perform feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively;

[0053] Step S4: Fuse the image data of the ginseng seeds after feature screening with the hyperspectral data of the ginseng seeds;

[0054] Step S5: After improving the RBMO algorithm, combine it with the RF model to construct the ORBMO-RF model;

[0055] Step S6: Input the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing to complete the classification of ginseng seeds.

[0056] Existing technologies lack methods for classifying ginseng seeds based on their image and spectral characteristics.

[0057] To address the technical problems existing in the current technology, this embodiment proposes a ginseng seed classification method based on the image and spectral characteristics of ginseng seeds, including the following steps:

[0058] This study primarily targets four types of ginseng seeds used in actual ginseng production and cultivation. The ginseng seed samples were purchased from ginseng seed sales companies and accurately classified by experts. These include cultivated ginseng seeds, Korean ginseng seeds, forest-grown ginseng seeds, and American ginseng seeds. Figure 1 As shown.

[0059] To ensure sample quality, manual screening was used during collection to remove broken, insect-damaged, and impurity seeds, retaining only plump, moderately sized high-quality ginseng seeds. A total of 2000 seeds from each variety were ultimately selected for the study.

[0060] Step S1, collect image data of ginseng seeds, specifically:

[0061] like Figure 2 As shown, the image data acquisition device for ginseng seeds includes a camera, computer, light source, ginseng seeds, and a black box. To ensure consistent environmental conditions during image acquisition, avoid interference from external light sources, and minimize the impact of environmental factors on image quality, all ginseng seeds were photographed within the same black box. During camera shooting, the ginseng seeds were placed on a black background, and the camera was vertically fixed using a bracket to ensure consistent shooting height and position. Two stable LED (light-emitting diode) lights were used to maintain uniform illumination. Each type of ginseng seed was arranged in a random direction, with 100 seeds photographed per group, resulting in 20 groups of images for each variety. The resolution of all images was set to 3024*4032 pixels.

[0062] The hyperspectral data of ginseng seeds were collected, specifically:

[0063] like Figure 3As shown, the hyperspectral data acquisition device for ginseng seeds includes a black box, a halogen lamp, an integrating sphere, a computer, ginseng seeds, a probe, and a spectrometer, covering a measurement wavelength range of 350–2500 nm. During testing, the distance between the hyperspectral probe and the surface of the ginseng seeds was maintained at 10 cm. The instrument's wavelength accuracy was 0.5 nm, and its repeatability was 0.1 nm. A 20W halogen lamp was used as the light source. Before formal measurements, hyperspectral calibration was performed using a standard white board. Each hyperspectral data point was obtained through an average of 10 scans, with the integration time set to 100 ms. One tray of ginseng seeds was used as a group, rotating 30 degrees clockwise each time, for a total of 13 scans. Each group collected 130 scans (0–129), for a total of two groups. The spectrometer was recalibrated before each measurement to ensure data consistency and accuracy. All measurements were performed in the same laboratory environment to minimize interference from ambient light sources.

[0064] Step S2 involves preprocessing the ginseng seed image data and then performing feature filtering on the preprocessed ginseng seed image data. Specifically:

[0065] To fully preserve the image data of ginseng seeds, such as Figure 4 As shown, the ginseng seed image data is first converted into a grayscale image, and Gaussian filtering is used to denoise the grayscale image. Next, Otsu's Adaptive Thresholding Method is used to determine the binarization threshold of the denoised grayscale image, generating a binary image. Then, an opening operation is used to remove small holes from the binary image. Subsequently, a boundary tracking algorithm is used to extract the contour of each ginseng seed, and its minimum bounding rectangle is calculated. Based on this, the contour region of each ginseng seed is extended outward by 15 pixels to ensure that the ginseng seed image information is completely preserved.

[0066] Image processing techniques were used to extract geometric and textural features from 2000 ginseng seeds of each variety to characterize their morphological features. Geometric features, as key indicators reflecting the genetic and biological characteristics of ginseng seeds, included 16 main parameters: S (perimeter), A (area), L (major axis length), W (minor axis length), r (inscribed circle radius), K (aspect ratio), e (dispersion), C (circularity), E (elongation), R (rectangularity), Ed (equivalent circle diameter), and Hu (invariant diameter). Textural features were used to describe the overall properties of the image surface structure, including 16 main parameters: Contrast, Dissimilarity, Homogeneity, ASM (angular second moment), Energy, Correlation, and LBP (Local Binary Pattern), to comprehensively capture the textural information of ginseng seeds.

[0067] Thirty-two morphological characteristics were extracted from ginseng seeds, which clearly show that... Figure 5 The left side of the middle section shows the average texture characteristics of different seed types. American ginseng seeds show lower contrast and dissimilarity, while Korean ginseng seeds show higher average values ​​on hist0 (uniform pattern 0), hist1 (uniform pattern 1), and hist2 (uniform pattern 2). Figure 5 The right side of the image shows the average geometric characteristics of different seed types. Compared to other categories, forest ginseng seeds have significantly smaller geometric characteristics, while American ginseng seeds have larger characteristics. Therefore, it is feasible to distinguish different ginseng seed varieties based on morphological characteristics.

[0068] The hyperspectral data of ginseng seeds were preprocessed, and feature filtering was performed on the preprocessed hyperspectral data of ginseng seeds. Specifically:

[0069] Diffuse reflection, light scattering, and other factors on the surface of ginseng seeds can cause interference during hyperspectral data acquisition, leading to differences in hyperspectral data among similar ginseng seeds and affecting the accuracy and stability of the classification model. Although the original hyperspectral data covers the 350–2500 nm band, significant noise and insufficient detector response occur below 400 nm and above 2400 nm. Therefore, only the effective band of 400–2400 nm is retained for subsequent analysis to improve signal quality and model robustness. Thus, hyperspectral preprocessing is necessary to effectively reduce noise, improve data quality, and enhance the model's classification performance. This implementation preprocesses the hyperspectral data using SG (Savitzky–Golay smoothing filter), MSC (multivariate scattering correction), and a combination of SG and MSC methods, effectively reducing noise interference. The experimental results are shown in Table 1. It was found that among the three classification models, namely RF model, SVM model (Support Vector Machine model) and KNN model (K Nearest Neighbor model), the classification performance of RF model (Random Forest classification model) combined with SG processing is the best. Therefore, RF is used as the basic model.

[0070] Table 1 Comparison of preprocessing methods under different models

[0071]

[0072] Step S3: Fuse the image data of ginseng seeds after feature screening with the hyperspectral data of ginseng seeds;

[0073] Step S4: After improving the RBMO algorithm (Red-billed Blue Magpie Optimization Algorithm), it is combined with the RF model to construct the ORBMO-RF model (RBMO model-driven random forest optimization model).

[0074] Step S5: Input the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing to complete the classification of ginseng seeds.

[0075] Therefore, to achieve effective classification of ginseng seeds of different varieties, this implementation method first extracts morphological features of ginseng seeds from image data. Subsequently, the extracted morphological features and hyperspectral data are preprocessed, and key features are further screened from the image information and spectral bands. The morphological and spectral features of ginseng seeds are used as input to the classification model, and the output results are fused, thereby not only achieving high-precision classification of ginseng seeds but also filling a gap in the field of ginseng seed classification.

[0076] Implementation Method Two: This implementation method further defines the non-destructive classification method for ginseng seeds described in Implementation Method One. In step S5, the improvement of the RBMO algorithm specifically involves:

[0077] An improved circle chaotic mapping mechanism is introduced in the population initialization phase of the RBMO algorithm.

[0078] An improved golden sine search strategy is introduced in the prey attack phase of the RBMO algorithm.

[0079] In the later search phase of the RBMO algorithm, adaptive simulated annealing is introduced.

[0080] In this embodiment, the improved circle chaotic mapping mechanism is specifically as follows:

[0081] ;

[0082] Among them, parameters ,parameter , For the next chaotic value, For the current chaos, This is a modulo operation.

[0083] In this embodiment, the improved golden sine search strategy is specifically as follows:

[0084] The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy.

[0085] In this embodiment, the improvement of the golden sine search strategy by introducing the Lévy Flight perturbation mechanism is specifically as follows:

[0086] ;

[0087] in, Let Lévy distribution step size be , For the disturbance intensity, It is the golden ratio constant. Uniformly distributed random numbers, The angle of the sinusoidal disturbance. The position of the current optimal individual. For the first The updated position of each individual For the first The current location of each individual. for Individual position vectors.

[0088] In this embodiment, the adaptive simulated annealing specifically refers to:

[0089] ;

[0090] in, The current temperature. The initial temperature, To control the cooling rate, This represents the current iteration number.

[0091] In this implementation, the RBMO algorithm is chosen because it is an intelligent optimization method that simulates the group behavior of the red-billed blue magpie. This algorithm is inspired by the red-billed blue magpie's searching, chasing, attacking, and food storage behaviors during foraging. Its optimization process includes four stages: population initialization, group foraging, cooperative hunting, and food storage.

[0092] The RBMO algorithm's advantages lie in its efficient global search capability and dynamic competition-cooperation mechanism. However, in the later stages of the algorithm's iteration, the red-billed blue magpie population is susceptible to the influence of inertial search patterns, which may lead to uneven population distribution, getting trapped in local optima, and in complex classification tasks, a mismatch between the search direction and the topological structure of the feature space.

[0093] To address the aforementioned technical problems, this implementation improves the RBMO algorithm by proposing the ORBMO algorithm and further enhancing it by incorporating the following strategies.

[0094] In the population initialization phase of the RBMO algorithm, the individual positions are randomly distributed, which may lead to an uneven distribution of the search space.

[0095] To address the aforementioned technical issues and enhance the initial diversity of the population, this implementation introduces a circle chaotic mapping mechanism (a two-dimensional chaotic mapping mechanism). This mapping ensures a uniform distribution of the population under constraints and possesses good ergodicity, guaranteeing a relatively uniform initial distribution of the population in the search space. This improves the algorithm's global exploration capability in the early stages of the search and helps in finding the global optimum. Its mathematical expression is as follows:

[0096] ;

[0097] Among them, parameters ,parameter This mapping generates a sequence with chaotic properties within the interval [0,1], which is used to initialize the positions of individuals in the population. The next chaotic state value, This represents the current chaotic state value. This is a modulo operation.

[0098] from Figure 6 (a) and Figure 6 (c) It can be seen that the initial particles generated by the circle chaotic mapping mechanism are mainly concentrated in the interval [0.2, 0.5]. However, the overly concentrated distribution of initial candidate solutions will significantly reduce the population diversity of the RBMO algorithm.

[0099] To address the aforementioned technical problems, this embodiment improves the circle chaotic mapping mechanism, and its mathematical expression is as follows:

[0100] ;

[0101] Among them, parameters ,parameter This mapping generates a sequence with chaotic properties within the interval [0,1], which is used to initialize the positions of individual populations.

[0102] Therefore, by introducing the improved circle chaotic mapping operator, the RBMO algorithm can generate a more uniform initial population, effectively improving the diversity of individual distributions in the search space, thereby significantly enhancing the algorithm's global search capability.

[0103] It should be noted that the improved mathematical expression of the circle chaotic mapping mechanism in this implementation method cannot be obtained through simple adjustments or a limited number of experiments. Instead, this improved mapping is obtained through a complete and innovative process based on nonlinear dynamics theory → bio-feature space matching → orthogonal experimental optimization → industrial field verification, which solves the limitation of traditional methods that rely on empirical parameter tuning.

[0104] In the prey attack phase of the RBMO algorithm, the ability to develop search paths plays a crucial role in the accuracy of the solution.

[0105] To address the aforementioned technical issues and enhance both local search accuracy and global search capability, this implementation introduces a golden sinusoidal search strategy. This strategy combines the golden ratio coefficient with a sinusoidal perturbation mechanism, ensuring both the accuracy of the search direction and introducing nonlinear perturbations to improve diversity. The position update formula is as follows:

[0106] ;

[0107] in, It is the golden ratio constant. Uniformly distributed random numbers, The angle of the sinusoidal disturbance. The position of the current optimal individual. For the first The updated position of each individual For the first The current location of each individual. for Individual position vectors.

[0108] Although the golden sinusoidal search strategy has a certain leaping ability, it is still prone to getting stuck in repeated searches of local regions when approaching the optimal solution. For example... Figure 7 As shown in the figure, the search path of the golden sine search strategy, represented by the solid line, indicates that it still exhibits problems such as a short path and limited search range after approaching the target area.

[0109] To address the aforementioned technical issues and enhance its ability to escape boundary regions and local extremum traps, this implementation introduces a Lévy Flight perturbation mechanism and constructs a hybrid update strategy as follows:

[0110] ;

[0111] in, represent Distribution step size, The disturbance intensity. The distribution has a long tail characteristic, enabling it to achieve intermittent large jumps.

[0112] Figure 7The image shows the search paths (dashed lines) of the Golden Sine Search Strategy and the Golden Sine Search Strategy with Lévy Flight perturbation (with Lévy Flight perturbation) in a two-dimensional objective function space. It can be seen that while the Golden Sine Search Strategy converges to near the optimal region relatively quickly, its path tends towards regular contraction. In contrast, the Golden Sine Search Strategy with Lévy Flight perturbation exhibits stronger spatial exploration capabilities; its trajectory maintains jumps near the optimal solution, thus possessing refined search capabilities. From an algorithm performance perspective, this means that the Lévy Flight perturbation mechanism does not disrupt the original convergence trend of the Golden Sine Search Strategy, but rather continuously improves boundary exploration and local refinement capabilities in later stages by controlling the jump probability or perturbation amplitude. Therefore, introducing the Golden Sine Search Strategy with Lévy Flight perturbation into the Golden Sine stage of the RBMO algorithm has good algorithmic compatibility and integration, and is expected to improve overall optimization accuracy and stability.

[0113] Furthermore, to enhance the RBMO algorithm's ability to escape local optima in later search phases, this implementation introduces a simulated annealing strategy as a perturbation mechanism. This mechanism references the Metropolis criterion (the acceptance-rejection criterion used in Monte Carlo simulations) in physical annealing. When the new fitness value of the current individual is inferior to the original solution after updating, the inferior solution is accepted with a certain probability, thereby preserving the diversity of the search space. Its acceptance probability function is as follows:

[0114] ;

[0115] in, The probability of accepting a suboptimal solution is the probability that the current individual accepts a new, suboptimal solution. , The new and old solutions have poor adaptability. At the current temperature, a linear annealing process is satisfied:

[0116] ;

[0117] in, The initial temperature, This represents the current iteration number. This represents the maximum number of iterations. Simulated annealing enables the algorithm to effectively escape local optima during the convergence phase, increasing the diversity of the final solution and the probability of a global optimum, thereby improving overall optimization performance.

[0118] However, directly introducing the simulated annealing strategy into the RBMO algorithm framework has a problem: the temperature decay strategy is fixed and it is difficult to adapt to the search rhythm at different stages.

[0119] To address the aforementioned technical issues, this implementation method employs adaptive simulated annealing instead of the traditional simulated annealing strategy. Adaptive simulated annealing introduces a dynamic adjustment mechanism for temperature updates, allowing the temperature decay rate to automatically adjust based on the current search state. Specifically, adaptive simulated annealing dynamically adjusts the annealing temperature by considering the difference between the current individual fitness and the global optimal solution.

[0120] ;

[0121] in, To control the cooling rate and avoid early convergence.

[0122] Therefore, adaptive simulated annealing retains more feasible solution paths during the global exploration phase and avoids premature freezing during the local convergence phase compared to traditional simulated annealing, resulting in a more stable and robust overall optimization process. Especially in image classification scenarios, adaptive simulated annealing effectively enhances the diversity of solutions in the high-dimensional parameter space, significantly improving the generalization ability of the classifier. Combined with the RBMO algorithm, adaptive simulated annealing complements the Blue Magpie behavior model, effectively avoiding problems such as early convergence and insufficient jump amplitude, validating its fusion potential and performance improvement value in complex classification tasks.

[0123] This implementation introduces three mechanisms into the RBMO algorithm: an improved circle chaotic mapping mechanism, an improved golden sine search strategy, and adaptive simulated annealing, to construct an ORBMO-RF model. Experiments were conducted on the three strategies individually or in pairs to compare the classification accuracy of the model under different strategy configurations, ultimately determining the optimal combination scheme. Specific optimization results are detailed in Table 2.

[0124] Table 2 Comparison of Optimization Combinations of Three Strategy Mechanisms

[0125]

[0126] As shown in Table 2, the combination of three strategies performed best among all strategies. Its A (accuracy), P (precision), R (recall), and F1 scores on the test set reached 0.9750, 0.9757, 0.9750, and 0.9750, respectively. This indicates that by introducing the improved circle chaotic mapping mechanism, the improved golden sine search strategy, and adaptive simulated annealing, and combining them appropriately, the global search capability and optimization efficiency of the RBMO algorithm are effectively improved. In particular, high accuracy was achieved in combinations such as "improved golden sine search strategy + adaptive simulated annealing" and "improved circle chaotic mapping mechanism + improved golden sine search strategy," further verifying the important role of multi-strategy collaborative optimization in improving the model's generalization ability. Therefore, the ORBMO-RF model can be considered a more stable and robust optimization model scheme for ginseng seed classification tasks.

[0127] Therefore, the three mechanisms described above optimize the search capability and stability of the RBMO algorithm at different stages: the improved circle chaotic mapping mechanism enhances the distribution quality of the initial population, the improved golden sine search strategy strengthens local exploitation and path diversity, and adaptive simulated annealing effectively improves the algorithm's ability to escape local optima. Overall, these mechanisms significantly improve the global optimization capability and convergence accuracy of the RBMO algorithm.

[0128] Randomization (RF) models, with their random sampling strategy and voting-based decision-making mechanism in ensemble learning, have demonstrated excellent performance in classification tasks. Existing research indicates that the classification accuracy of RF models largely depends on two key hyperparameters: the number of learners (i.e., the number of decision trees) and the sampling dimension of the feature space (i.e., the maximum proportion of features available to each tree). However, the optimal configuration of these hyperparameters typically depends on the specific application scenario. Too few decision trees may lead to insufficient model diversity, making it difficult to effectively characterize complex data distributions; while too many trees significantly increase computational overhead and reduce operational efficiency. Similarly, the setting of the feature subset dimension requires a trade-off between information preservation and feature redundancy: too low a sampling ratio may lead to the loss of key information, while too high a ratio may reduce the differences between sub-models, thereby increasing model bias and affecting classification performance.

[0129] To address the aforementioned technical problems, this implementation method uses the RBMO algorithm to achieve adaptive optimization of hyperparameters and constructs an ORBMO-RF model, including the following steps:

[0130] Step S301: Initialize the population and set the population size. Maximum number of iterations Dimensions of the problem The lower limit of the search range and upper limit .

[0131] Step S302: Initialize the population position using the improved circle chaotic mapping mechanism, generate a chaotic sequence in the interval [0,1], map it to the interval corresponding to each dimension parameter, achieve uniform coverage of the parameter space and guarantee initial diversity, calculate the fitness of each individual, and record the current best individual.

[0132] Step S303: Based on the hierarchical cooperation mechanism of the red-billed blue magpie, the population is divided into "leaders" and "followers". The search direction is dynamically adjusted through the position update formula to simulate the cooperative prey search behavior of the leaders and followers in the population.

[0133] Step S304: To prevent premature convergence of the search, a golden sine search strategy combined with the Lévy Flight perturbation mechanism is introduced based on the adaptive switching probability to refine the neighborhood of the current optimal solution, thereby enhancing the local search capability and improving the convergence accuracy.

[0134] Step S305: Boundary constraints are applied to the updated individual positions to ensure that all hyperparameter values ​​are always within the predefined search range, preventing illegal solutions from appearing.

[0135] Step S306: Adaptive simulated annealing is added to the current global best individual. By superimposing Gaussian perturbation through dynamic temperature control, the individual is guided to accept the worse solution in order to escape the local optimum, thereby enhancing the fine search capability in the later stage and the global optimization capability of the algorithm.

[0136] Step S307: If the fitness of the new individual after perturbation is better than the original global optimum, then update it; otherwise, retain the original solution to prevent excessive perturbation from destroying the existing optimal solution and to maintain convergence stability.

[0137] Step S308: Execute the "food storage" mechanism: record the optimal hyperparameter combination and its fitness value obtained in the current iteration, and update the set of historical optimal solutions.

[0138] Step S309: Repeat steps S303 to S308 until the maximum number of iterations is reached, or until there is no significant improvement in fitness for several consecutive generations, triggering the early stopping criterion.

[0139] Step S310: Terminate the optimization process, output the optimal RF model hyperparameters, construct a high-performance random forest classification model, and improve classification accuracy and generalization ability.

[0140] As shown in Table 3, the ORBMO-RF model demonstrates better recognition ability than the RF model in distinguishing highly similar seed samples, indicating its strong application potential and development prospects in non-destructive seed recognition tasks.

[0141] Table 3 Comparison of the classification performance of RF model and ORBMO-RF model for ginseng seed varieties

[0142]

[0143] Therefore, this implementation provides theoretical and methodological support for classifying seed varieties with subtle morphological differences. Its successful application confirms the feasibility of multi-source data fusion strategies in solving seed classification problems, provides a new paradigm for addressing the insufficient discriminative power of single features, and promotes the development of related classification theories. The proposed RBMO algorithm effectively improves the efficiency and stability of the RBMO algorithm by introducing an improved circle chaotic mapping mechanism, an improved golden sine search strategy, and modulus adaptive simulated annealing. Its design concept provides a new theoretical perspective for the field of model parameter optimization and has universality, which can be extended to more classification tasks. The research results have important practical value for the ginseng industry and agricultural breeding. The constructed high-precision non-destructive classification method directly serves the key need to ensure the purity of ginseng seed varieties, and variety purity is the foundation for standardized planting, stability of medicinal components, and high yield. The ORBMO-RF model enables rapid and accurate seed variety identification, effectively avoiding problems such as decreased germination rate, uneven plant growth, and inconsistent medicinal components caused by variety mixing. At the same time, it can ensure seedling survival rate and growth consistency, optimize resource utilization efficiency, and ultimately improve yield and economic benefits, while reducing the time, cost, and professional dependence of manual feature screening and model parameter tuning.

[0144] Implementation Method 3: A non-destructive ginseng seed classification system as described in this implementation method is implemented using the non-destructive ginseng seed classification method described in Implementation Method 1, and includes the following modules:

[0145] The acquisition module collects image data and hyperspectral data of ginseng seeds, respectively;

[0146] The preprocessing module performs preprocessing on the image data and hyperspectral data of ginseng seeds respectively;

[0147] The filtering module performs feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively;

[0148] The fusion module fuses the image data of ginseng seeds after feature screening with the hyperspectral data of ginseng seeds;

[0149] The module improves the RBMO algorithm and combines it with the RF model to construct the ORBMO-RF model;

[0150] The classification module inputs the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thus completing the classification of ginseng seeds.

[0151] The above provides a detailed description of the non-destructive classification method and system for ginseng seeds proposed in this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A non-destructive classification method for ginseng seeds, characterized in that, Includes the following steps: Step S1: Collect image data and hyperspectral data of ginseng seeds respectively; Step S2: Preprocess the image data and hyperspectral data of ginseng seeds respectively; Step S3: Perform feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively; Step S4: Fuse the image data of the ginseng seeds after feature screening with the hyperspectral data of the ginseng seeds; Step S5: After improving the RBMO algorithm, combine it with the RF model to construct the ORBMO-RF model; Step S501: Initialize the population; Step S502: The improved circle chaotic mapping mechanism initializes the population position. The improved circle chaotic mapping mechanism is as follows: ; Among them, parameters ,parameter , For the next chaotic value, For the current chaos, For modulo operation; Step S503: Based on the hierarchical cooperation mechanism of the red-billed blue magpie, the population is divided into "leaders" and "followers". The search direction is dynamically adjusted through the position update formula to simulate the cooperative prey search behavior of the leaders and followers in the population. Step S504: In the prey attack phase of the RBMO algorithm, an improved golden sine search strategy is introduced, specifically as follows: The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy; The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy, specifically as follows: ; in, for Distribution step size, For the disturbance intensity, It is the golden ratio constant. Uniformly distributed random numbers, The angle of the sinusoidal disturbance. The position of the current optimal individual. For the first The updated position of each individual For the first The current location of each individual. for Individual position vectors; Step S505: Boundary constraints are applied to the updated individual positions to ensure that all hyperparameter values ​​are always within the predefined search range, preventing illegal solutions from appearing; Step S506: Add adaptive simulated annealing to the current global optimal individual, and guide the individual to accept the poor solution in order to escape the local optimum by superimposing Gaussian perturbation through dynamic temperature control. Step S507: If the fitness of the new individual after perturbation is better than the original global optimum, then update it; otherwise, retain the original solution to prevent excessive perturbation from destroying the existing optimal solution and to maintain convergence stability. Step S508, execute the "food storage" mechanism: record the optimal hyperparameter combination and its fitness value obtained in the current iteration, and update the set of historical optimal solutions; Step S509: Repeat steps S503 to S508 until the maximum number of iterations is reached, or until there is no significant improvement in fitness for several consecutive generations, triggering the early stopping criterion. Step S510: Terminate the optimization process, output the optimal RF model hyperparameters, and construct the ORBMO-RF model; Step S6: Input the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing to complete the classification of ginseng seeds.

2. The non-destructive classification method for ginseng seeds according to claim 1, characterized in that, In step S5, the improvement of the RBMO algorithm specifically includes: An improved circle chaotic mapping mechanism is introduced in the population initialization phase of the RBMO algorithm. An improved golden sine search strategy is introduced in the prey attack phase of the RBMO algorithm. In the later search phase of the RBMO algorithm, adaptive simulated annealing is introduced.

3. The non-destructive classification method for ginseng seeds according to claim 1, characterized in that, The aforementioned adaptive simulated annealing specifically refers to: ; in, The current temperature. The initial temperature, To control the cooling rate, This represents the current iteration number.

4. A non-destructive classification system for ginseng seeds, wherein the system is implemented using the non-destructive classification method for ginseng seeds as described in claim 1, characterized in that, Includes the following modules: The acquisition module collects image data and hyperspectral data of ginseng seeds, respectively; The preprocessing module performs preprocessing on the image data and hyperspectral data of ginseng seeds respectively; The filtering module performs feature filtering on the preprocessed ginseng seed image data and ginseng seed hyperspectral data respectively; The fusion module fuses the image data and hyperspectral data of ginseng seeds after feature screening. The module improves the RBMO algorithm and combines it with the RF model to construct the ORBMO-RF model; Module S501 initializes the population; Module S502, the improved circle chaotic mapping mechanism initializes the population position. Specifically, the improved circle chaotic mapping mechanism is as follows: ; Among them, parameters ,parameter , For the next chaotic value, For the current chaos, For modulo operation; Module S503 divides the population into "leaders" and "followers" based on the hierarchical cooperation mechanism of the red-billed blue magpie. It dynamically adjusts the search direction through a position update formula to simulate the cooperative prey search behavior of leaders and followers in the population. Module S504 introduces an improved golden sine search strategy in the prey attack phase of the RBMO algorithm, specifically: The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy; The Lévy Flight perturbation mechanism is introduced to improve the golden sine search strategy, specifically as follows: ; in, for Distribution step size, For the disturbance intensity, It is the golden ratio constant. Uniformly distributed random numbers, The angle of the sinusoidal disturbance is... The position of the current optimal individual. For the first The updated position of each individual For the first The current location of each individual. for Individual position vectors; Module S505 imposes boundary constraints on the updated individual positions to ensure that all hyperparameter values ​​are always within the predefined search range, preventing illegal solutions from appearing. Module S506 adds adaptive simulated annealing to the current global best individual, and guides the individual to accept a worse solution in order to escape the local optimum by superimposing Gaussian perturbation through dynamic temperature control; Module S507: If the fitness of the new individual after perturbation is better than the original global optimum, then update it; otherwise, retain the original solution to prevent excessive perturbation from destroying existing optimal solutions and to maintain convergence stability. Module S508 executes the "food storage" mechanism: records the optimal hyperparameter combination and its fitness value obtained in the current iteration, and updates the set of historical optimal solutions; Module S509 executes modules S503 to S508 repeatedly until the maximum number of iterations is reached, or until there is no significant improvement in fitness for several consecutive generations, triggering the early stopping criterion. Module S510 terminates the optimization process, outputs the optimal RF model hyperparameters, and constructs the ORBMO-RF model; The classification module inputs the fused image data and hyperspectral data of ginseng seeds into the ORBMO-RF model for processing, thus completing the classification of ginseng seeds.

Citation Information

Patent Citations

  • Improved sparrow intelligent optimization method based on chaotic mapping and golden sine strategy

    CN112926139A

  • Network coverage enhancement method and device of sparrow algorithm based on hybrid strategy improvement

    CN117692913A