A fully automatic integrated traditional Chinese medicine detection method and equipment

Through the combination of high-precision camera and image processing unit, a variety of sensors and robotic arm rolling modules are integrated, and the types and quality of traditional Chinese medicines are realized, and the problems of inefficient and insufficient adaptability of traditional Chinese medicines are solved, the accuracy and efficiency of detection are improved, and the modernization of the traditional Chinese medicine industry is supported.

CN119757775BActive Publication Date: 2025-08-15BEIJING RENWEI TRADITIONAL CHINESE MEDICINE TABLETS FACTORY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510252116.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-08-15
Estimated Expiration
2045-03-05

AI Technical Summary

Technical Problem

The traditional Chinese medicine testing process is cumbersome and depends on the empirical judgment of professionals. It is inefficient and susceptible to subjective factors. The existing automation equipment has a single function and cannot achieve integrated operation from variety identification to quality evaluation. It is not very adaptable to Chinese medicinal materials with diverse forms and different textures.

Method used

A high-precision camera and image processing unit are combined with deep learning algorithms to identify the types of Chinese medicinal materials, integrate multiple sensors for multi-dimensional quality detection, automatically rolling with the robotic arm and the rotating platform, and control modules compare and summarize data to form a detection report.

Benefits of technology

It has achieved rapid and accurate identification of types of traditional Chinese medicinal materials and multi-dimensional quality evaluation, improved detection efficiency and accuracy, reduced human errors, adapted to different types and specifications of traditional Chinese medicinal materials, and provided scientific basis to support the modernization and standardization of the traditional Chinese medicine industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119757775B_ABST
    Figure CN119757775B_ABST
Patent Text Reader

Abstract

The present invention proposes a fully automatic integrated traditional Chinese medicine detection method and equipment. This method belongs to the field of traditional Chinese medicine detection and automation technology. The detection method comprises: using a high-precision camera and image processing unit equipped in a variety screening module to take high-definition photos of traditional Chinese medicines, and automatically identifying the types of traditional Chinese medicines by comparing them with a built-in traditional Chinese medicine image database through a preset algorithm; performing multi-dimensional quality inspection of traditional Chinese medicines through the integration of multiple sensors in a quality inspection module; and combining a high-precision camera with an image processing unit, as well as the application of a deep learning algorithm, enabling rapid and accurate identification of the types of traditional Chinese medicines, thereby improving detection efficiency and reducing the possibility of human error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention provides a fully automatic integrated traditional Chinese medicine detection method and equipment, belonging to the technical field of traditional Chinese medicine detection and automation. Background Art

[0002] The traditional Chinese medicine testing process is cumbersome and relies on the experience and judgment of professionals. This is not only inefficient but also easily influenced by subjective factors, making it difficult to ensure the accuracy and consistency of test results. With the advancement of technology, although some automated testing equipment has become available, these devices often have a single function and cannot achieve an integrated operation from variety identification to quality assessment. They are also not very adaptable to the diverse shapes and textures of Chinese medicinal materials. Therefore, it is particularly important to develop a fully automatic Chinese medicine testing device that can comprehensively solve the above problems and integrate variety screening, quality inspection, automatic tumbling and intelligent control. Summary of the Invention

[0003] The present invention provides a fully automatic integrated traditional Chinese medicine detection method and equipment to solve the problems mentioned in the above background technology:

[0004] The present invention proposes a fully automatic integrated traditional Chinese medicine detection method, which includes:

[0005] S1. The variety screening module is equipped with a high-precision camera and image processing unit to take high-definition photos of Chinese medicinal materials. Then, the preset algorithm is used to compare the photos with the built-in Chinese medicinal material image database to automatically identify the type of Chinese medicinal materials.

[0006] S2. Through the multiple sensors integrated in the quality detection module, multi-dimensional quality detection of Chinese medicinal materials is carried out;

[0007] S3, based on the robotic arm and rotating platform equipped with the tumbling module, the Chinese medicinal materials are automatically tumbled according to the instructions of the control module;

[0008] S4. Receive data from each module through the control module, execute the preset algorithm logic, control the rolling module, compare the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarize the information from the quality inspection module to form a final inspection report.

[0009] The present invention proposes a fully automatic integrated traditional Chinese medicine detection device, which includes:

[0010] Variety screening module: The module takes high-definition photos of Chinese medicinal materials through a high-precision camera and image processing unit, and automatically identifies the types of Chinese medicinal materials by comparing them with the built-in Chinese medicinal material image database through a preset algorithm;

[0011] Quality detection module: Through the integration of multiple sensors, including near-infrared spectrometer, moisture meter and heavy metal detector, multi-dimensional quality detection of Chinese medicinal materials is carried out. The multi-dimensional quality detection includes moisture content, active ingredient content and heavy metal residue;

[0012] Tumbling module: Based on the robotic arm and rotating platform, the system automatically tumbles the Chinese medicinal materials according to the instructions of the control module, ensuring that all sides can be effectively photographed and inspected. It is particularly suitable for Chinese medicinal materials with complex shapes that are difficult to directly observe.

[0013] Control module: responsible for receiving data from each module, executing preset algorithm logic, controlling the tumbling module, comparing the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarizing the information from the quality inspection module to form the final inspection report.

[0014] The beneficial effects of the present invention are as follows: through the combination of high-precision cameras and image processing units, and the application of deep learning algorithms, the types of Chinese medicinal materials can be identified quickly and accurately, the detection efficiency is improved, and the possibility of human error is reduced; the quality detection module integrating multiple sensors can perform multi-dimensional quality assessment of Chinese medicinal materials, including near-infrared spectroscopy analysis, moisture content determination, heavy metal element trace analysis, etc., to ensure the quality and safety of Chinese medicinal materials; the automatic tumbling module based on the robotic arm and the rotating platform can perform comprehensive detection without damaging the Chinese medicinal materials, thereby improving the accuracy and reliability of the detection; the control module can receive and process data from each detection module, and through Preset algorithm logic is used for data analysis, and detailed test reports are automatically generated, allowing users to quickly understand the test results and quality status of Chinese medicinal materials. In the process of species identification, uncertainty processing methods are combined with other features for secondary confirmation, which improves the accuracy and robustness of identification. A virtual model is constructed through 3D modeling software or a physical simulation platform, and a tumbling simulation is performed. The tumbling strategy is optimized based on actual test data to ensure the safety and effectiveness of the tumbling process. Possible quality risks in Chinese medicinal materials are identified and analyzed, and warning thresholds are set. When the test results reach or exceed the warning threshold, a warning signal is issued, which helps to promptly discover and deal with potential quality problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A diagram showing the steps of the method of the present invention;

[0016] Figure 2 This is a module diagram of the device described in the present invention. DETAILED DESCRIPTION

[0017] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0018] One embodiment of the present invention, as Figure 1 As shown, a fully automatic integrated traditional Chinese medicine detection method, the detection method includes:

[0019] S1. The variety screening module is equipped with a high-precision camera and image processing unit to take high-definition photos of Chinese medicinal materials. Then, the preset algorithm is used to compare the photos with the built-in Chinese medicinal material image database to automatically identify the type of Chinese medicinal materials.

[0020] S2. Using a variety of sensors integrated into the quality detection module, including a near-infrared spectrometer, a moisture meter, and a heavy metal detector, to perform multi-dimensional quality detection on the Chinese medicinal materials, including moisture content, active ingredient content, and heavy metal residues;

[0021] S3, based on the robotic arm and rotating platform equipped with the tumbling module, the Chinese medicinal materials are automatically tumbled according to the instructions of the control module;

[0022] S4. Receive data from each module through the control module, execute the preset algorithm logic, control the working rhythm of the tumbling module, compare the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarize the information from the quality inspection module to form the final inspection report.

[0023] The working principle of the above technical solution is as follows: a high-precision camera is used to take high-definition photos of Chinese medicinal materials to ensure that the images are clear and rich in details; the image processing unit pre-processes the taken photos, such as denoising, contrast enhancement, etc., to improve the image quality; the processed images are feature extracted through a preset algorithm and compared with the built-in Chinese medicine image database to automatically identify the type of Chinese medicinal materials; near-infrared spectroscopy technology is used to quickly and non-destructively detect the content of effective ingredients in Chinese medicinal materials; the moisture content of Chinese medicinal materials is accurately measured through specific measurement principles (such as capacitance method, resistance method, etc.); heavy metal residues in Chinese medicinal materials are detected using electrochemical, optical or mass spectrometric principles to ensure that Chinese medicinal materials are safety; according to the instructions of the control module, the robotic arm grabs the Chinese medicinal materials and places them on the rotating platform, and the rotating platform drives the Chinese medicinal materials to roll; the control module sends instructions to the rolling module according to the requirements of the variety screening module and the quality inspection module to ensure that all sides of the Chinese medicinal materials can be effectively photographed and inspected; the control module receives data from the variety screening module, the quality inspection module and the rolling module; executes the preset algorithm logic to process and analyze the received data; according to the processing results, the control module sends instructions to the rolling module to adjust its working rhythm; at the same time, the data from the variety screening module is compared to make a final confirmation of the type of Chinese medicinal materials, and the information from the quality inspection module is summarized to form a final inspection report.

[0024] The effects of the above technical solutions are as follows: through the integration of high-precision cameras, image processing units and multiple sensors, automatic identification and multi-dimensional quality inspection of Chinese medicinal materials are realized, which greatly improves the efficiency and accuracy of inspection; the cooperation of the robotic arm and the rotating platform enables Chinese medicinal materials to roll automatically, ensuring that all sides can be effectively photographed and inspected, reducing the tediousness and errors of manual operation; the variety screening module uses high-precision cameras and preset algorithms to quickly and accurately identify the types of Chinese medicinal materials, avoiding the identification errors caused by human factors in traditional methods; the quality inspection module uses multiple sensors such as near-infrared spectrometers, moisture meters and heavy metal detectors to perform multi-dimensional quality inspections on Chinese medicinal materials, which can comprehensively reflect the quality status of Chinese medicinal materials and ensure the safety and effectiveness of Chinese medicinal materials; this method is particularly suitable for Chinese medicinal materials with complex shapes that are not easy to observe directly. Automatic rolling and all-round shooting can ensure that all sides of Chinese medicinal materials can be effectively inspected, thereby improving the comprehensiveness and accuracy of the inspection; at the same time, the method is also applicable to Chinese medicinal materials of different types and specifications, and has strong versatility and flexibility; the control module can receive data from each module and execute preset algorithm logic to confirm the type of Chinese medicinal materials, while summarizing the information of the quality inspection module to form a final inspection report; this data integration and analysis method not only improves the accuracy and reliability of the inspection, but also provides strong data support for the quality control and traceability of Chinese medicinal materials; the application of this method can promote the modernization and standardization of the Chinese medicine industry, and improve the quality level and market competitiveness of Chinese medicinal materials; at the same time, the method can also provide scientific basis and technical support for the research and development, production, sales and other links of Chinese medicine, and promote the sustainable development of the Chinese medicine industry.

[0025] In one embodiment of the present invention, the S1 includes:

[0026] S11. The variety screening module uses a high-precision camera configured with different light sources to capture subtle surface features of Chinese medicinal materials, such as texture, gloss, and color gradients.

[0027] S12, and preprocessing the collected image through an image processing unit, wherein the preprocessing includes denoising, contrast enhancement, and edge detection;

[0028] S13. Extract features from pre-processed images based on deep learning algorithms to identify key features of Chinese medicinal materials, while using attention mechanisms to enhance focus on key areas.

[0029] S14, inputting the extracted feature vector into the trained deep learning classifier, comparing it with the known Chinese medicinal material features in the built-in Chinese medicinal material image database, and identifying the type of Chinese medicinal material by calculating the similarity between the feature vectors;

[0030] S15. If there are multiple high-matching options in the identification results, a second confirmation is performed using the uncertainty processing method combined with other characteristics of the Chinese medicinal materials.

[0031] The working principle of the above technical solution is as follows: As the core component of the variety screening module, the camera is responsible for capturing subtle surface features of Chinese medicinal materials. To obtain more comprehensive and accurate information about Chinese medicinal materials, the system is equipped with different light sources, such as natural light, ultraviolet light, and infrared light. These light sources can reveal the characteristics of Chinese medicinal materials, such as texture, gloss, and color gradients, under different lighting conditions. The collected images are denoised using algorithms such as Gaussian filtering and median filtering to reduce noise interference and improve image quality. Image contrast is enhanced through methods such as histogram equalization and adaptive contrast adjustment, making the characteristics of the Chinese medicinal materials more distinct and facilitating subsequent feature extraction. Edge detection is performed on the images using algorithms such as Canny edge detection and the Sobel operator to extract edge features of the Chinese medicinal materials, providing a foundation for subsequent feature extraction and recognition. Feature extraction is performed on the preprocessed images using pretrained models such as ResNet and VGG. These pretrained models have been trained on large-scale image datasets and can learn rich image feature representations. By applying these models to feature extraction from TCM images through transfer learning, key features of the herbs can be efficiently extracted. To enhance focus on key regions, the system incorporates an attention mechanism. This mechanism automatically identifies key regions within TCM images and assigns higher weights to these regions, improving both the accuracy and efficiency of feature extraction. The extracted feature vectors are then fed into a trained deep learning classifier and compared with known TCM features in a built-in TCM image database. The classifier can employ models such as support vector machines (SVMs), random forests (RFs), or fully connected layers from deep learning. By calculating similarities between feature vectors (such as cosine similarity and Euclidean distance), the system can identify the herb species. If multiple highly matched candidates are identified, the system employs uncertainty resolution methods for secondary confirmation. These methods include Bayesian classifiers or ensemble learning methods (such as Adaboost and Bagging). By incorporating other characteristics of TCMs (such as smell and touch), the system can further improve recognition accuracy and reliability. In some cases, due to the wide variety and complex characteristics of TCMs, the system may not be able to accurately identify them directly based on image features. In these cases, the system can incorporate additional sensory information (such as smell and touch) for secondary confirmation. This information can be obtained through additional sensors or manual input and combined with uncertainty processing methods for comprehensive analysis to improve recognition accuracy.

[0032] The effects of the above technical solutions are as follows: by configuring high-precision cameras with different light sources, it is possible to capture subtle features on the surface of Chinese medicinal materials, such as texture, gloss and color gradient, providing a rich and accurate information basis for subsequent feature extraction and recognition; the introduction of deep learning algorithms and attention mechanisms enables the system to efficiently extract the key features of Chinese medicinal materials and enhance attention to key areas, thereby improving the accuracy and robustness of recognition; the image preprocessing steps include denoising, contrast enhancement and edge detection, etc. These processes can significantly improve image quality, reduce noise interference, enhance feature recognizability, and provide strong support for subsequent feature extraction and recognition; the system uses a deep learning classifier to identify the types of Chinese medicinal materials, and provides a variety of classifier options (such as SVM, RF or fully connected layers in deep learning), and can select the most suitable classifier for recognition according to actual conditions; when there are multiple high-matching options in the recognition results The system can use uncertainty processing methods for secondary confirmation, and make comprehensive judgments based on other characteristics of Chinese medicinal materials (such as smell and touch), further improving the accuracy and reliability of recognition; this technical solution has good scalability, and can continuously improve the accuracy and generalization ability of recognition by increasing the number of samples in the Chinese medicinal materials image database and improving the training quality of the deep learning model; at the same time, the system can adapt to the identification needs of Chinese medicinal materials of different types and specifications, and has strong versatility and flexibility; this technical solution realizes the automation and intelligence of Chinese medicinal materials identification, reduces the influence of manual intervention and subjective judgment, and improves detection efficiency and accuracy; by improving the accuracy and efficiency of Chinese medicinal materials identification, this technical solution helps to reduce the costs and risks in the production and sales of Chinese medicines; at the same time, it can also provide scientific basis and technical support for the research and development, quality control and market supervision of Chinese medicines, and promote the sustainable development of the Chinese medicine industry.

[0033] In one embodiment of the present invention, the step S13 includes:

[0034] According to the types of Chinese medicinal materials and image characteristics, a deep learning model is selected, and feature extraction is performed to optimize the selected deep learning model;

[0035] Using a deep learning model to extract features from pre-processed Chinese medicinal material images and identify key features of the Chinese medicinal materials, including shape, color, texture, and surface microstructure;

[0036] Combined with near-infrared spectroscopy analysis technology, the spectral characteristics of Chinese medicinal materials are extracted, including absorption peaks and reflectivity; image features and spectral features are fused through multimodal feature fusion methods;

[0037] Introducing the attention mechanism into the deep learning model to enhance the extracted features;

[0038] Principal component analysis was used to reduce the dimensionality of the extracted features, and a feature selection algorithm was used to select the feature subset that contributed most to the identification of Chinese herbal medicine species.

[0039] The feature vectors after dimensionality reduction and selection are concatenated or combined to generate feature vectors for identifying the types of Chinese medicinal materials.

[0040] The working principle of the above technical solution is as follows: Based on the type of Chinese medicinal material and image characteristics, an appropriate deep learning model (such as ResNet, VGG, Inception, etc.) is selected. These models have been pre-trained on large-scale image datasets and have excellent feature extraction capabilities. The selected deep learning model is optimized, including adjusting hyperparameters such as network structure, learning rate, and batch size, and using data augmentation techniques (such as rotation, scaling, and cropping) to expand the training dataset and improve the model's generalization ability. The optimized deep learning model is then used to extract features from the pre-processed Chinese medicinal material images. Through a network structure consisting of convolutional layers and pooling layers, key features such as the shape, color, texture, and surface microstructure of the Chinese medicinal material are gradually extracted. These features are represented as high-dimensional vectors and contain rich information from the Chinese medicinal material images. Combining near-infrared spectroscopy technology, the Chinese medicinal material is spectrally scanned to extract its spectral features. Spectral features, such as absorption peaks and reflectance, can reflect the chemical composition and structure of the Chinese medicinal material. Multimodal feature fusion methods (such as feature concatenation and weighted feature fusion) are used to fuse image features with spectral features. In this way, the system can comprehensively utilize the image and spectral information of Chinese medicinal materials to improve recognition accuracy and robustness. Attention mechanisms, such as channel attention, spatial attention, or self-attention, are introduced into deep learning models. These mechanisms automatically identify key regions and features in Chinese medicinal material images and assign higher weights to them. Through this attention mechanism, the system can more accurately capture subtle features and key information about the Chinese medicinal materials, further improving recognition accuracy. Dimensionality reduction techniques, such as principal component analysis (PCA), are used to reduce the dimensionality of the extracted high-dimensional features. Dimensionality reduction can reduce redundancy and noise between features and improve their expressiveness. Feature selection algorithms, such as mutual information-based feature selection and model-based feature selection, are used to select the feature subsets that most contribute to Chinese medicinal material identification from the reduced dimensionality. These feature subsets can more accurately reflect the Chinese medicinal material species. The feature vectors obtained through dimensionality reduction and selection are concatenated or combined to generate a feature vector for Chinese medicinal material species identification. This feature vector, which contains key information and subtle features of the Chinese medicinal material, serves as the basis for subsequent classification and identification.

[0041] The effects of the above technical solution are as follows: Feature extraction of Chinese herbal medicine images using a deep learning model, combined with near-infrared spectroscopy analysis technology to extract spectral features, achieves multimodal feature fusion. This method can comprehensively utilize the image and spectral information of Chinese herbal medicines, thereby improving the accuracy and robustness of recognition; the introduction of an attention mechanism to enhance features enables the model to more accurately capture the subtle features and key information of Chinese herbal medicines, further improving recognition accuracy; the selection and optimization of appropriate deep learning models based on the type and image characteristics of Chinese herbal medicines improves the model's generalization and feature extraction capabilities; and the model's adaptability and stability are enhanced by adjusting the model structure and hyperparameters, as well as using data augmentation techniques. Principal component analysis (PCA) is used to reduce the dimensionality of the extracted high-dimensional features, reducing the redundancy and noise between features and improving the expressiveness of the features; the feature selection algorithm is used to select the feature subset that contributes most to the identification of Chinese medicinal materials, reducing the computational complexity and improving the recognition efficiency; this technical solution can adapt to the identification needs of Chinese medicinal materials of different types and specifications, and has strong versatility and flexibility; by increasing the number of samples in the Chinese medicinal materials image database and improving the training quality of the deep learning model, the recognition accuracy and generalization ability can be continuously improved, and the scalability of the system can be enhanced; this technical solution provides the Chinese medicine industry with an efficient and accurate method for identifying Chinese medicinal materials, which helps to promote the modernization and standardization of the Chinese medicine industry; by improving the accuracy and efficiency of Chinese medicinal materials identification, the cost and risk in the production and sales of Chinese medicine are reduced, and the sustainable development of the Chinese medicine industry is promoted.

[0042] In one embodiment of the present invention, the S14 includes:

[0043] Before the extracted feature vector is input into the deep learning classifier, it is normalized and each feature in the feature vector is weighted according to the importance of the key features of the Chinese herbal medicine;

[0044] Mapping feature vectors to a high-dimensional or low-dimensional feature space through deep learning algorithms;

[0045] In the feature space, cosine similarity is used to calculate the similarity between the feature vector of the Chinese herbal medicine to be identified and the feature vector of the known Chinese herbal medicine in the Chinese herbal medicine image database;

[0046] According to the similarity calculation results, several Chinese medicinal materials with the highest similarity are selected as candidates for preliminary identification;

[0047] According to the types and characteristics of Chinese medicinal materials, a deep learning classifier is selected and trained using known Chinese medicinal material features in the Chinese medicinal material image database;

[0048] Input the feature vectors of the initially identified candidate objects into the trained deep learning classifier for classification and identification to obtain the type information of the Chinese medicinal materials;

[0049] The working principle of the above technical solution is as follows: before inputting the extracted feature vector into the deep learning classifier, it is first normalized. Normalization is to scale the feature values to a common scale, which helps to eliminate the dimensional differences between different features and improve the performance of the classifier. The features in the feature vector are weighted according to the importance of the key characteristics of the Chinese herbal medicine (such as shape, color, texture, and surface microstructure). The weighting process can emphasize those features that are more critical to the identification of the Chinese herbal medicine species, thereby improving the recognition accuracy. The feature vector is mapped to a high-dimensional or low-dimensional feature space through deep learning algorithms (such as PCA and t-SNE). These algorithms capture the inherent relationships between feature vectors and map them into a more compact, easier-to-classify space. Principal component analysis (PCA) is a commonly used dimensionality reduction technique that reduces the dimensionality of data while preserving as much information as possible by projecting feature vectors onto the principal component directions. t-distributed stochastic neighbor embedding (t-SNE) is a nonlinear dimensionality reduction technique that maps high-dimensional data into a lower-dimensional space while preserving both local and global structure. In the feature space, cosine similarity is used to calculate the similarity between the feature vectors of the Chinese herbal medicine to be identified and the feature vectors of known Chinese herbal medicines in the Chinese herbal medicine image database. Cosine similarity measures the directional similarity between two vectors, regardless of their magnitude. Based on the similarity calculation results, the Chinese herbal medicines with the highest similarity are selected as preliminary identification candidates. This step helps narrow the identification scope and improve the efficiency of subsequent classifiers. Based on the type and characteristics of the Chinese herbal medicine, an appropriate deep learning classifier (such as a support vector machine (SVM), random forest (RF), or a fully connected layer in deep learning) is selected. These classifiers have different characteristics and advantages, making them suitable for different types of TCM identification tasks. Classifiers are trained using known TCM features from a TCM image database. During training, the classifiers learn the mapping between TCM features and species, enabling them to classify and identify new samples. The feature vectors of the initially identified candidate objects are input into the trained deep learning classifier for classification and identification. Based on the input feature vectors, the classifier outputs the TCM species. This output can be the TCM name, number, or other identifying information, which can be used for subsequent processing and management of the TCM.

[0050] The effects of the above technical solution are as follows: normalization processing eliminates the dimensional differences between different features, so that the feature vectors have a uniform scale when input into the classifier, which helps to improve the recognition accuracy of the classifier; feature weighting processing weights the feature vectors according to the importance of the key features of the Chinese medicinal materials, emphasizes the role of key features in the recognition process, and further improves the recognition accuracy; mapping the feature vectors to high-dimensional or low-dimensional feature space through deep learning algorithms (such as PCA, t-SNE, etc.) helps to capture the intrinsic relationship between feature vectors and improve the separability of features; the optimization of feature space makes the similarity calculation between the feature vectors of the Chinese medicinal materials to be identified and the feature vectors of known Chinese medicinal materials in the Chinese medicinal image database more accurate, thereby improving the accuracy of the preliminary identification of candidate objects; cosine similarity calculation is simple and efficient, and can quickly calculate the similarity between feature vectors, reducing the computational complexity; by selecting several Chinese medicinal materials with the highest similarity as the candidate objects, narrowing the recognition scope and improving the recognition efficiency of subsequent classifiers; selecting appropriate deep learning classifiers according to the types and characteristics of Chinese medicinal materials, and using known Chinese medicinal material features in the Chinese medicine image database for training, so that the classifier can better adapt to the needs of Chinese medicinal material identification; the trained deep learning classifier has high recognition accuracy and generalization ability, and can accurately identify the type information of Chinese medicinal materials; this technical solution can adapt to the identification needs of Chinese medicinal materials of different types and specifications, and has strong versatility and flexibility; with the continuous expansion and updating of the Chinese medicine image database, this technical solution can continue to learn and optimize, and continuously improve the accuracy and efficiency of Chinese medicinal material identification; this technical solution provides the Chinese medicine industry with an efficient and accurate Chinese medicinal material identification method, which helps to promote the intelligent development of the Chinese medicine industry; by improving the accuracy and efficiency of Chinese medicinal material identification, it reduces the costs and risks in the production and sales of Chinese medicine, and promotes the sustainable development of the Chinese medicine industry.

[0051] In one embodiment of the present invention, the S15 includes:

[0052] According to the output of the deep learning classifier, the recognition results of Chinese medicinal materials are sorted by matching degree, and the top N options with the highest matching degree are selected as candidates;

[0053] Perform differential analysis on the feature vectors of candidate objects to identify subtle differences in shape, color, texture, and surface microstructure. Use odor sensors or gas chromatography-mass spectrometry (GC-MS) to collect and analyze the odor of traditional Chinese medicines and extract characteristic odor components.

[0054] Using touch sensors or robotic arms to simulate human hands touching Chinese medicinal materials, the tactile characteristics of the materials, such as hardness, elasticity, and roughness, are collected. A Bayesian classifier is used to fuse visual features (shape, color, texture, surface microstructure) with sensory features (smell, touch) to calculate the posterior probability that each candidate belongs to each type of Chinese medicinal material.

[0055] The output results of multiple classifiers are integrated using ensemble learning methods, and the uncertainty of the recognition results is evaluated based on the output results of the Bayesian classifier or ensemble learning method;

[0056] If the uncertainty is high, further verification or adjustment is required. Based on the output of the uncertainty processing method, the most likely type of Chinese medicinal material is selected as the final identification result. Among them, the indicators of high uncertainty are as follows:

[0057] Low classifier confidence: When a deep learning classifier or Bayesian classifier gives a low confidence level (for example, a value of 0-100, a score of 30) to the recognition result of a candidate object, that is, the probability distribution of the recognition result is relatively scattered and has no significant peak, it indicates that the classifier has great uncertainty in identifying the Chinese medicinal material.

[0058] High feature vector dispersion: The feature vectors of candidate objects (including shape, color, texture, surface microstructure, etc.) are relatively discrete in the feature space, with no obvious clustering trend. This indicates that these candidate objects have a high visual similarity (for example, a score of 75 on a scale of 0-100) and are difficult to distinguish effectively through visual features.

[0059] Inconsistent sensory characteristics: There is an obvious inconsistency between the characteristic odor components extracted by the odor sensor or GC-MS and the tactile characteristics collected by the tactile sensor. For example, the types of Chinese medicinal materials indicated by the odor and tactile characteristics are inconsistent, which increases the uncertainty of identification.

[0060] The output results of ensemble learning are scattered: After using the ensemble learning method to integrate the output results of multiple classifiers, the recognition results obtained still have a high degree of dispersion, that is, there are large differences between the recognition results of different classifiers, which shows that the ensemble learning method cannot effectively reduce the uncertainty of recognition.

[0061] Compare the final recognition results with the actual situation and collect feedback data.

[0062] The working principle of the above technical solution is as follows: Based on the output of the deep learning classifier, the recognition results of Chinese medicinal materials are ranked by matching degree. The matching degree generally indicates the degree of similarity between the recognition results and the known characteristics of Chinese medicinal materials; the top N options with the highest matching degree are selected as candidates. These candidates are closest to the Chinese medicinal materials to be identified in terms of visual features; the feature vectors of the candidates are differentially analyzed to identify subtle differences in shape, color, texture, and surface microstructure. These subtle differences help to further distinguish the candidates and improve recognition accuracy; the odor of the Chinese medicinal materials is collected and analyzed using odor sensors or gas chromatography-mass spectrometry (GC-MS) to extract characteristic odor components. As one of the important sensory characteristics of Chinese medicinal materials, odor characteristics help to enhance the reliability of recognition; tactile characteristics such as hardness, elasticity, and roughness are collected by tactile sensors or robotic arms to simulate human hands touching the Chinese medicinal materials. Tactile features provide an additional dimension of information for TCM identification, helping to improve comprehensiveness. A Bayesian classifier is used to integrate visual features (shape, color, texture, and surface microstructure) with sensory features (smell and touch). Based on known features, the Bayesian classifier calculates the posterior probability that each candidate belongs to each TCM category. The posterior probability represents the probability that a candidate belongs to a particular TCM category given the observed data (i.e., visual and sensory features). Comparing posterior probabilities can further narrow the identification scope and improve recognition accuracy. Ensemble learning methods (such as Adaboost, Bagging, and Random Forest) are used to integrate the outputs of multiple classifiers. Ensemble learning methods can combine the advantages of multiple classifiers to improve recognition stability and accuracy. Based on the outputs of the Bayesian classifier or ensemble learning method, the uncertainty of the recognition results is assessed. This uncertainty assessment helps identify candidates that may have been misidentified, allowing for further verification or adjustment. If the uncertainty is high, further verification or adjustment is necessary. Verification can be performed by adding additional observational data (such as more visual and sensory features) or leveraging expert knowledge. Based on the output of the uncertainty handling method, the most likely TCM species is selected as the final recognition result. The final recognition result should have a high degree of confidence and accuracy. The final recognition result is compared with the actual situation, and feedback data is collected. This feedback data includes information on the accuracy of the recognition result, the effectiveness of the uncertainty assessment, and system performance. The feedback data is used to optimize the deep learning model, training dataset, and uncertainty handling method. The optimization process includes adjusting model parameters, adding training samples, and improving the uncertainty assessment algorithm to improve the overall performance and accuracy of the system.

[0063] The effects of the above technical solution are: through the preliminary identification of the deep learning classifier, combined with the matching degree ranking, the candidate objects closest to the Chinese medicinal materials to be identified can be screened out, providing a basis for subsequent feature analysis and fusion; the feature vectors of the candidate objects are differentially analyzed to identify the subtle differences between them, further improving the accuracy of recognition; the introduction of sensory features such as smell and touch, combined with visual features, the use of Bayesian classifiers for feature fusion, and the calculation of posterior probabilities can more comprehensively reflect the characteristics of Chinese medicinal materials, thereby improving the reliability of recognition; the use of ensemble learning methods to integrate the output results of multiple classifiers can combine the advantages of multiple classifiers and improve the stability and robustness of recognition; based on the output results of the Bayesian classifier or the ensemble learning method, the uncertainty of the recognition results is evaluated, and reliable Candidate objects with recognition errors can provide a basis for subsequent verification or adjustment; the final recognition results are compared with the actual situation, and feedback data is collected to timely discover and correct recognition errors, providing data support for system optimization; using feedback data to optimize deep learning models, training data sets and uncertainty processing methods can continuously improve the overall performance and accuracy of the system, making it more adaptable to the needs of actual application scenarios; this technical solution combines multiple advanced technologies such as deep learning, feature fusion, ensemble learning and uncertainty assessment to achieve intelligent and automated identification of Chinese medicinal materials, reducing the cost and difficulty of manual identification; through continuous optimization and improvement, this technical solution is expected to provide more efficient and accurate identification means for the planting, processing, quality control and other links of Chinese medicinal materials, and promote the intelligent upgrading and development of the Chinese medicinal materials industry.

[0064] In one embodiment of the present invention, the S2 includes:

[0065] S21. Activate the near-infrared spectrometer in the quality inspection module to perform non-destructive scanning on the Chinese medicinal materials to obtain near-infrared spectrum data thereof, covering a wavelength range from 780 nm to 2526 nm.

[0066] S22, preprocessing the collected spectral data, wherein the preprocessing includes smoothing, baseline correction, and normalization to eliminate the influence of instrument noise and baseline drift on the analysis results;

[0067] S23. Analyze the pre-processed spectral data using chemometric methods to establish a quantitative determination model for the active ingredients in Chinese medicinal materials;

[0068] S24, drying the Chinese medicinal materials in a constant temperature drying oven, and calculating the moisture content by measuring the mass difference before and after drying;

[0069] S25. Using a capacitive sensor to measure the change in the dielectric constant of the Chinese medicinal material, and determining the moisture content based on the relationship between moisture and the dielectric constant;

[0070] S26. Grind the Chinese medicinal materials to an appropriate particle size, and use acid digestion (such as nitric acid, hydrochloric acid, hydrofluoric acid, etc.) or microwave digestion to convert the heavy metal elements in the Chinese medicinal materials into soluble forms;

[0071] S27. Introducing the digested sample solution into an ICP-MS instrument, using high-energy plasma to atomize the sample and excite it to a high-energy state, and using a mass spectrometer to detect the characteristic mass number of each element to perform trace analysis of heavy metal elements (such as lead, mercury, arsenic, cadmium, etc.);

[0072] S28. Process the data obtained from ICP-MS testing accordingly and evaluate the safety of heavy metal residues in Chinese medicinal materials according to relevant standards.

[0073] The working principle of the above technical solution is as follows: the near-infrared spectrometer in the quality inspection module is activated, and near-infrared spectroscopy is used to perform non-destructive scanning of Chinese medicinal materials. Near-infrared spectroscopy is based on the principle of harmonic and sum-frequency absorption in molecular vibrations. By measuring near-infrared spectral data of Chinese medicinal materials in the wavelength range of 780nm to 2526nm, it can reflect the internal chemical composition of the Chinese medicinal materials. The collected spectral data is then smoothed (such as Savitzky-Golay filtering), baseline corrected, and normalized. Smoothing eliminates high-frequency noise in the spectral data; baseline correction eliminates the impact of baseline drift on the analysis results; and normalization ensures that the spectral data of different samples have a uniform scale. The pre-processed spectral data is then analyzed using chemometric methods (such as partial least squares (PLS) and principal component regression (PCR). These methods extract characteristic information from spectral data to establish mathematical models linking the active ingredients (such as flavonoids, alkaloids, and polysaccharides) in Chinese medicinal materials with the spectral data. The Chinese medicinal materials are dried in a constant-temperature drying oven, and the mass difference before and after drying is measured. The moisture content of the Chinese medicinal materials is calculated based on this mass difference. A capacitive sensor is used to measure the change in the dielectric constant of the Chinese medicinal materials. Because there is a relationship between moisture content and dielectric constant, the change in dielectric constant can be used to indirectly determine the moisture content of the Chinese medicinal materials. The Chinese medicinal materials are then pulverized to an appropriate particle size and digested using acids (such as nitric acid, hydrochloric acid, and hydrofluoric acid) or microwaves to convert the heavy metal elements in the Chinese medicinal materials into soluble forms. This facilitates subsequent heavy metal detection. The digested sample solution is then introduced into an ICP-MS instrument. The ICP-MS instrument uses high-energy plasma to atomize the sample and excite it to high-energy states, where the characteristic mass numbers of each element are detected by a mass spectrometer. Because different elements have different characteristic mass numbers, trace analysis of heavy metals (such as lead, mercury, arsenic, and cadmium) can be performed. ICP-MS data can be processed for baseline correction, peak identification, and quantitative calculations. The safety of heavy metal residues in traditional Chinese medicines can be assessed according to relevant standards (such as national or industry standards).

[0074] The effects of the above technical solution are as follows: non-destructive scanning of Chinese medicinal materials by near-infrared spectrometer avoids sample damage that may be caused by traditional detection methods, which is beneficial to the subsequent use of samples; the rapid scanning characteristics of near-infrared spectroscopy technology make the detection process efficient and fast, which can greatly improve the efficiency of Chinese medicinal materials quality detection; smoothing, baseline correction and normalization in the preprocessing step effectively eliminate the influence of instrument noise and baseline drift on the analysis results, and improve the accuracy of spectral data; chemometric methods (such as PLS, PCR) are used to analyze spectral data, and a quantitative determination model for effective ingredients in Chinese medicinal materials is established, which realizes the rapid and accurate determination of the content of effective ingredients in Chinese medicinal materials; a constant temperature drying oven is used to measure the mass difference before and after drying to calculate the moisture content, which is a classic and accurate moisture determination method; at the same time, a capacitive sensor is introduced to measure the change in the dielectric constant of Chinese medicinal materials to determine the moisture content, providing another rapid and non-destructive moisture detection method, which increases the diversity and flexibility of detection; acid digestion or microwave digestion The method converts heavy metal elements in Chinese medicinal materials into soluble forms, providing good sample pretreatment for subsequent ICP-MS detection. The ICP-MS instrument has the characteristics of high sensitivity, high resolution and low detection limit, which can accurately detect trace heavy metal elements in Chinese medicinal materials, providing strong support for the safety assessment of Chinese medicinal materials. The data obtained by ICP-MS detection are processed through baseline correction, peak identification and quantitative calculation to ensure the accuracy and reliability of the test results. The safety of heavy metal residues in Chinese medicinal materials is evaluated according to relevant standards (such as national standards or industry standards), making the test results legally effective and authoritative, and providing a scientific basis for the quality control of Chinese medicinal materials. This technical solution combines multiple advanced technologies such as near-infrared spectroscopy and ICP-MS to achieve comprehensive quality testing of Chinese medicinal materials, promoting the innovation and development of Chinese medicinal materials quality testing technology. At the same time, this technical solution also provides strong technical support for the cultivation, processing, quality control and other links of Chinese medicinal materials, helping to improve the overall quality and market competitiveness of Chinese medicinal materials.

[0075] In one embodiment of the present invention, the step S23 includes:

[0076] Before using chemometric methods, statistical methods are used to detect outliers in spectral data and process them accordingly;

[0077] The spectral data were selected by continuous projection algorithm to extract the characteristic wavelengths that have the greatest impact on the determination of the effective ingredients in Chinese herbal medicines.

[0078] The pre-processed spectral data were used as independent variables, and the content of active ingredients in Chinese medicinal materials was used as dependent variables. The partial least squares method was used to establish a multiple linear regression model for quantitative determination of the ingredients.

[0079] Principal component analysis was performed on the spectral data to extract the principal components as new independent variables, and a regression method was used to establish a model between the principal components and the content of effective ingredients in Chinese medicinal materials;

[0080] Using the regression version of support vector machine, namely support vector regression, the spectral data is nonlinearly mapped to establish a nonlinear relationship model between the active ingredient content of Chinese herbal medicine and the spectral data;

[0081] K-fold cross validation is used to verify the established model and evaluate the model's predictive performance; and optimization algorithms such as grid search and random search are used to tune the model's parameters;

[0082] Based on the cross-validation results and model performance indicators (such as mean square error (MSE) and coefficient of determination (R²), the advantages and disadvantages of different chemometric methods are compared, and the optimal model is selected for subsequent application.

[0083] The working principle of the above technical solution is as follows: Before applying chemometric methods, statistical methods (such as box plots and Grubbs' tests) are first used to detect outliers in the spectral data. These methods identify outliers by comparing data points with the statistical characteristics of the dataset (such as the median, quartiles, and mean). Once an outlier is detected, appropriate processing is performed, such as deletion, correction (if the correct value is known), or estimation using interpolation methods. Feature selection is performed on the spectral data using the Successive Projection Algorithm (SPA). The SPA algorithm uses iterative projections to extract the characteristic wavelengths that are most influential in determining the content of active ingredients in traditional Chinese medicines. A multivariate linear regression model is constructed using partial least squares (PLS) using the preprocessed spectral data as the independent variable and the active ingredient content in the traditional Chinese medicine as the dependent variable. PLS simultaneously considers information from both the independent and dependent variables to extract the most effective predictive components (i.e., latent variables) to build the model. Principal component analysis (PCA) is performed on the spectral data to extract the principal components as new independent variables. PCA projects high-dimensional data into a low-dimensional space through linear transformation while preserving the data's key information. Regression methods (such as linear regression and ridge regression) are used to establish a model between principal components and the active ingredient content of traditional Chinese medicines. Support vector regression (SVR), a regression version of the support vector machine (SVM), is used to perform nonlinear mapping on spectral data. SVR uses a kernel function to map input data into a high-dimensional feature space and establish a linear regression model within this space. The established model is validated using K-fold cross-validation. K-fold cross-validation divides the dataset into K subsets, rotating one subset as the test set and the remaining subsets as the training set, to evaluate the performance of the K models. Optimization algorithms such as grid search and random search are used to tune the model parameters. These algorithms systematically search the parameter space to find the optimal parameter combination to improve the model's predictive performance. Cross-validation results and model performance metrics (such as mean squared error (MSE) and coefficient of determination (R²)) are used to compare the performance of different chemometric methods. MSE measures the average difference between the model's predicted values and the true values, while R² measures how well the model fits the data. The optimal model is selected for subsequent applications. The optimal model typically has a lower MSE and a higher R² value, taking into account both the model's complexity and generalization ability.

[0084] The effects of the above technical solution are as follows: outliers in spectral data are detected by statistical methods (such as box plots and Grubbs tests) and corresponding processing is performed, which effectively improves the data quality and reduces the impact of noise and errors on subsequent modeling; the continuous projection algorithm (SPA) is used to perform feature selection on spectral data, which can extract the characteristic wavelengths that have the greatest influence on the determination of the content of effective ingredients in traditional Chinese medicines, thereby simplifying the model structure and improving the prediction accuracy and efficiency of the model; a multiple linear regression model is established by partial least squares method, which can comprehensively consider the relationship between multiple characteristic wavelengths of spectral data and the content of effective ingredients in traditional Chinese medicines, and realize the determination of the content of effective ingredients in traditional Chinese medicines. Rapid and accurate quantitative determination of active ingredients in medicinal materials; principal component analysis (PCA) of spectral data, with the extracted principal components used as new independent variables, not only reduces the dimensionality of the data but also helps understand the main structure and sources of variation in the data, enhancing the interpretability of the model; support vector regression (SVR) is used to perform nonlinear mapping of spectral data to establish a nonlinear relationship model between the active ingredient content of Chinese medicinal materials and spectral data, which is suitable for complex data scenarios with strong nonlinear relationships; K-fold cross-validation is used to verify the established model, which can comprehensively evaluate the model's predictive performance and avoid overfitting or underfitting. At the same time, optimization algorithms such as grid search and random search are used to tune the model parameters, further improving the model's predictive accuracy and generalization ability. Based on cross-validation results and model performance indicators (such as mean squared error (MSE) and coefficient of determination (R²), the advantages and disadvantages of different chemometric methods can be compared, enabling the scientific and objective selection of the optimal model for subsequent application, ensuring the accuracy and reliability of the Chinese medicinal material quality testing results.

[0085] In one embodiment of the present invention, S3 includes:

[0086] S31, tumbling the Chinese medicinal materials according to relevant characteristics of the Chinese medicinal materials, including type, shape, and density, based on a preset tumbling strategy, including tumbling speed, angle, number of times, and tumbling path;

[0087] S32. Evaluate and optimize the rollover strategy and adjust the rollover parameters through simulation experiments and actual test data feedback;

[0088] S33. The robotic arm uses visual servo technology or laser navigation technology to accurately grasp and stably place Chinese medicinal materials. The rotating platform rolls according to the instructions of the control module, while the robotic arm maintains a stable grip on the Chinese medicinal materials.

[0089] S34. During the tumbling process, the variety screening module and the quality inspection module continue to work, collecting images and spectral data of the Chinese medicinal materials in real time, and feeding them back to the control module for processing and analysis in real time;

[0090] S35. The control module fuses and processes the collected data, wherein the fusion and processing include image stitching, spectral data correction, and feature extraction to obtain comprehensive detection information of the Chinese medicinal materials.

[0091] The working principle of this technical solution is as follows: Based on the relevant characteristics of the Chinese medicinal materials (such as type, morphology, and density), the system pre-sets a set of tumbling strategies, including tumbling speed, angle, frequency, and path. These strategies are designed to ensure that all surfaces of the Chinese medicinal materials are fully exposed during tumbling, facilitating subsequent inspection and analysis. A robotic arm or rotating platform tumbles the Chinese medicinal materials according to the pre-set tumbling strategies. During tumbling, the system dynamically adjusts the tumbling strategies based on the actual characteristics of the Chinese medicinal materials to ensure tumbling effectiveness and safety. The system evaluates the tumbling strategies through simulation experiments and feedback from actual inspection data. Evaluation metrics may include tumbling effectiveness, inspection accuracy, and the degree of damage to the medicinal materials. Based on the evaluation results, the system adjusts and optimizes the tumbling strategies, including adjusting the tumbling speed, angle, frequency, and path, to improve tumbling effectiveness and inspection accuracy. The robotic arm uses visual servoing or laser navigation technology to precisely grasp the Chinese medicinal materials. During the grasping process, the robotic arm maintains a stable grip on the TCM to prevent damage or detection errors during tumbling. The rotating platform performs tumbling operations according to the control module's instructions, while the robotic arm maintains a stable grip on the TCM. During the tumbling process, the robotic arm and rotating platform must maintain close coordination to avoid collisions and interference, ensuring the stability and safety of the TCM. The variety screening module and quality inspection module operate continuously throughout the tumbling process. The variety screening module may use image recognition technology to identify the type and morphology of the TCM, while the quality inspection module uses spectral analysis and other technologies to assess the quality of the TCM. The system collects image and spectral data of the TCM in real time and feeds this data to the control module for processing and analysis. The control module uses this data to adjust the tumbling strategy and optimize detection parameters. The control module then fuses and processes the collected image and spectral data. This fusion process may include image stitching, spectral data correction, and feature extraction. Through data fusion and processing, the system can obtain comprehensive information on the TCM, including its type, morphology, and quality. This information provides important insights for subsequent analysis and decision-making.

[0092] The effect of the above technical solution is that, based on the characteristics of the Chinese medicinal materials, such as type, shape, and density, a preset tumbling strategy (including tumbling speed, angle, frequency, and path) can be used to tumble the materials in a targeted manner, ensuring that all surfaces of the materials are fully inspected and analyzed. This personalized tumbling strategy not only improves inspection efficiency but also reduces unnecessary tumbling times and the risk of damage to the medicinal materials. Through feedback from simulation experiments and actual inspection data, the system can continuously evaluate and optimize the tumbling strategy and fine-tune the tumbling parameters. This dynamic optimization mechanism ensures that the tumbling strategy always matches the actual characteristics of the Chinese medicinal materials, further improving the accuracy and reliability of inspection. The robotic arm uses visual servoing or laser navigation technology to achieve precise grasping and stable placement of the Chinese medicinal materials. During the tumbling process, the robotic arm maintains a stable grip on the medicinal materials, avoiding damage and inspection errors. The coordinated operation of the rotating platform and the control module ensures a smooth and safe tumbling process. The variety screening and quality inspection modules continuously operate during the tumbling process, collecting real-time image and spectral data of the Chinese medicinal materials and feeding this data to the control module for processing and analysis. This real-time data collection and feedback mechanism enables timely detection and resolution of anomalies, improving detection precision and accuracy. The control module fuses and processes the collected image and spectral data, including image stitching, spectral data correction, and feature extraction. This data fusion and processing technology provides comprehensive information on the Chinese medicinal materials, including detailed data on their species, morphology, and quality, providing strong support for quality control and traceability. The entire technical solution achieves automated and intelligent tumbling inspection of Chinese medicinal materials. By leveraging pre-set tumbling strategies, dynamically optimized parameters, precise gripping and placement, real-time data collection and feedback, and data fusion and processing, the system efficiently and accurately completes Chinese medicinal material inspection tasks, reducing the cost and risk of manual intervention.

[0093] In one embodiment of the present invention, the step S32 includes:

[0094] Using 3D modeling software or physical simulation platforms, construct virtual models of Chinese medicinal materials based on their type, shape, density, and other characteristics. Simulate the movements and interactions of the robotic arm, rotating platform, and control module.

[0095] In the simulation environment, the Chinese medicinal materials are tumbling according to the preset tumbling speed, angle, number of times, and tumbling path strategies. The robot arm movements, the movement trajectory of the Chinese medicinal materials, and possible collisions during the tumbling process are recorded.

[0096] Analyze the results of the simulation experiments to evaluate the effectiveness and safety of the rolling strategy; identify potential collision points, rolling instability areas, and risk points for damage to Chinese medicinal materials;

[0097] During the actual testing process, the Chinese medicinal materials are tumbled according to the preset tumbling strategy, and sensors and testing equipment are used to collect images, spectra, and status data of the Chinese medicinal materials and the robotic arm and rotating platform in real time;

[0098] Preprocess the collected data, compare the actual test data with the simulation results, analyze the performance of the rollover strategy in actual application, and identify differences and potential problems;

[0099] Extract key features of the rollover strategy from simulation experiments and actual test data, such as rollover speed, angle, number of rollovers, path length, and number of collisions. Use feature selection algorithms to identify the features that have the greatest impact on the rollover effect.

[0100] Establish a prediction model between rolling strategies and the rolling effects of Chinese medicinal materials based on machine learning algorithms; adjust and optimize the rolling strategies based on the output of the prediction model;

[0101] Use multi-objective optimization algorithms to find the optimal solution among multiple objectives.

[0102] The working principle of the above technical solution is as follows: First, a virtual model of the Chinese medicinal material is constructed using 3D modeling software or a physical simulation platform based on the characteristics of the Chinese medicinal material, such as its type, shape, and density. Simultaneously, the movements and interactions of the robotic arm, rotating platform, and control module are simulated to create a simulation environment similar to the actual testing environment. Within this simulation environment, the virtual model of the Chinese medicinal material and models of the robotic arm, rotating platform, and other equipment are imported. The Chinese medicinal material is tumbled according to a preset strategy, including tumbling speed, angle, number of times, and tumbling path. The robotic arm's movements, the trajectory of the Chinese medicinal material, and possible collisions during the tumbling process are recorded. The simulation results are analyzed to evaluate the effectiveness and safety of the tumbling strategy. The feasibility of the tumbling strategy in practical application is evaluated by identifying potential collision points, areas of rolling instability, and risk points for damage to the Chinese medicinal material. The trajectory of the Chinese medicinal material, the robotic arm's movements, and collisions during the simulation are analyzed. Based on the analysis results, the effectiveness of the rolling strategy was evaluated, and potential collision points, rolling instability areas, and risk points for damage to the Chinese medicinal materials were identified. During the actual inspection process, the Chinese medicinal materials were rolled according to the preset rolling strategy, and sensors and detection equipment were used to collect real-time images and spectra of the materials, as well as status data of the robotic arm and rotating platform. In the actual inspection environment, sensors and detection equipment, such as cameras and spectrometers, were set up. The Chinese medicinal materials were rolled according to the preset rolling strategy, while data was collected in real time. The collected data was preprocessed, such as through denoising and filtering. The actual inspection data was compared with the simulation results to analyze the performance of the rolling strategy in actual application and identify any differences and potential issues. The preprocessed actual inspection data was then compared with the simulation results to analyze any differences and potential issues in the actual application of the rolling strategy. By comparing the robotic arm motion, the movement trajectory of the Chinese medicinal materials, and the collision data, the shortcomings of the rolling strategy in actual application were identified. Key features of the rolling strategy, such as rolling speed, angle, number of rolls, path length, and number of collisions, were extracted from the simulation and actual inspection data. Use feature selection algorithms to identify the features that most influence the tumbling effect. Extract key features of the tumbling strategy and filter them using feature selection algorithms (such as recursive feature elimination (RFE) and model-based feature selection (MBFS). Through feature selection, identify the features that most influence the tumbling effect. Use machine learning algorithms to establish a predictive model linking the tumbling strategy with the tumbling effect of traditional Chinese medicines. Based on the output of the predictive model, adjust and optimize the tumbling strategy. Select an appropriate machine learning algorithm (such as support vector machine (SVM) or random forest (RF)) to establish a predictive model linking the tumbling strategy with the tumbling effect of traditional Chinese medicines.Use the collected data to train the model and adjust and optimize the rolling strategy based on the prediction results. Use a multi-objective optimization algorithm (such as a genetic algorithm (GA) or particle swarm optimization (PSO)) to find the optimal solution among multiple objectives (such as rolling efficiency, safety, and risk of damage to Chinese medicinal materials). Determine the optimization objective, such as rolling efficiency, safety, and risk of damage to Chinese medicinal materials. Select an appropriate multi-objective optimization algorithm and set its parameters. Use the rolling strategy as the optimization variable and use the multi-objective optimization algorithm to find the optimal solution among these multiple objectives.

[0103] The above technical solution achieves the following: By constructing a virtual model of the Chinese medicinal material using 3D modeling software and a physical simulation platform, and simulating the movements of the robotic arm, rotating platform, and control module, preliminary evaluation and testing of the tumbling strategy can be performed without actually touching the Chinese medicinal material. This significantly reduces experimental costs and mitigates the risk of damage to the Chinese medicinal material due to improper operation. The simulation environment can simulate the movement trajectory and collision conditions of the Chinese medicinal material under different tumbling strategies, helping researchers accurately evaluate the effectiveness and safety of the tumbling strategy. By continuously optimizing the tumbling strategy, the integrity of the Chinese medicinal material can be ensured, while improving detection efficiency and accuracy. During the actual detection process, sensors and testing equipment collect real-time images and spectra of the Chinese medicinal material, as well as status data of the robotic arm and rotating platform, providing rich data support for the evaluation and optimization of the tumbling strategy. By preprocessing and comparatively analyzing this data, differences and potential problems in the actual application of the tumbling strategy can be identified, providing a basis for further optimization. Key features of the tumbling strategy are extracted from the simulation experiment and actual detection data, and feature selection algorithms are used to identify the features that most influence the tumbling effect, significantly improving the accuracy of the prediction model. This helps to more accurately predict the impact of different tumbling strategies on the tumbling effect of Chinese medicinal materials, providing a scientific basis for adjusting and optimizing tumbling strategies. By using a multi-objective optimization algorithm to find the optimal solution between multiple objectives, such as tumbling efficiency, safety, and risk of damage to Chinese medicinal materials, it can ensure that the tumbling strategy achieves the overall optimal effect while satisfying multiple constraints. This helps to improve the overall performance and reliability of Chinese medicinal material tumbling detection. By closely integrating simulation experiments with actual testing, and applying data-driven predictive models and optimization algorithms, the research and development of Chinese medicinal material tumbling detection technology can be significantly accelerated. This will help promote the innovation and development of Chinese medicinal material quality testing technology and enhance the overall competitiveness of the Chinese medicinal materials industry.

[0104] In one embodiment of the present invention, the step S34 includes:

[0105] Using high-resolution cameras or visual sensors, the image data of Chinese medicinal materials is captured in real time during the tumbling process; using spectral detection equipment such as near-infrared spectrometers or Raman spectrometers, the spectral data of Chinese medicinal materials is collected in real time;

[0106] Preprocess the collected image data, perform smoothing, baseline correction, normalization and other preprocessing steps on the spectral data to eliminate the influence of instrument noise and baseline drift on the analysis results;

[0107] Image processing algorithms are used to extract image features of Chinese medicinal materials; chemometric methods are used to extract features from spectral data. Spectral features that are closely related to the content of active ingredients in Chinese medicinal materials are extracted;

[0108] The extracted image features and spectral features are matched and identified with the preset Chinese medicinal material database; by comparing the morphology, color, texture and spectral characteristics of the Chinese medicinal materials, the varieties of Chinese medicinal materials are screened and the quality is tested;

[0109] Use machine learning algorithms to establish an anomaly detection model for Chinese herbal medicines; perform anomaly detection on real-time collected image and spectral data to identify abnormal data that does not match the characteristics of normal Chinese herbal medicines;

[0110] When abnormal data is detected, the early warning mechanism is immediately triggered and a warning signal is sent to the control module; at the same time, the abnormal data and related information are fed back to the operator or the quality inspection module.

[0111] The working principle of the above technical solution is as follows: As the Chinese medicinal materials tumble, a high-resolution camera or visual sensor captures real-time image data of the materials. Simultaneously, spectral data is collected in real time using spectral detection equipment such as a near-infrared spectrometer or Raman spectrometer. The camera or sensor is mounted on a robotic arm or rotating platform and moves with the materials as they tumble, ensuring that images of the materials from all angles are captured. The spectral detection equipment collects spectral data through optical fibers or probes, either in contact with the materials or in a non-contact manner. The collected image data undergoes pre-processing steps such as denoising, contrast enhancement, and image segmentation to remove irrelevant information and improve image quality. The spectral data undergoes pre-processing steps such as smoothing, baseline correction, and normalization to eliminate the effects of instrument noise and baseline drift on the analysis results. Image processing algorithms are used to extract image features of the Chinese medicinal materials, such as edges, texture, and shape. Chemometric methods are also used to extract features from the spectral data, identifying spectral features that are closely related to the active ingredient content in the materials. The extracted image and spectral features are then matched and identified against a pre-set database of Chinese medicinal materials. By comparing TCM morphology, color, texture, and spectral characteristics, the system screens and inspects the quality of the materials. A machine learning algorithm is used to establish an anomaly detection model for TCMs. This system detects anomalies in real-time image and spectral data, identifying data that deviates from normal TCM characteristics. When anomalies are detected, an early warning mechanism is triggered, sending a warning signal to the control module. The abnormal data and related information are then fed back to the operator or the quality inspection module.

[0112] The above technical solution achieves the following: Using high-resolution cameras and spectral detection equipment, real-time image and spectral data are captured during the tumbling of Chinese medicinal materials, ensuring the immediacy and comprehensiveness of the data. This helps promptly detect changes in the materials during tumbling, improving detection accuracy. Preprocessing of the image and spectral data, including denoising, contrast enhancement, image segmentation, smoothing, baseline correction, and normalization, effectively eliminates irrelevant information and instrument noise, improving data reliability and analysis accuracy. Image processing algorithms and chemometric methods are used to extract the image and spectral features of the Chinese medicinal materials, which are then matched and identified against a pre-set Chinese medicinal material database. This method enables rapid and accurate identification of the variety and quality of the Chinese medicinal materials, improving detection efficiency. A machine learning algorithm is used to establish an anomaly detection model for Chinese medicinal materials, enabling anomaly detection in the real-time collected data. When anomalies are detected, an early warning mechanism is triggered, sending a warning signal to the control module and feeding the abnormal data back to the operator or quality inspection module. This helps promptly identify and address problems with Chinese medicinal materials, ensuring their quality and safety. The entire technical solution combines multiple technologies, including high-resolution cameras, spectral detection equipment, image processing algorithms, chemometric methods, and machine learning algorithms, to achieve intelligent and automated detection of Chinese medicinal materials during the tumbling process. This reduces the cost and risk of manual intervention and improves the stability and reliability of detection.

[0113] In one embodiment of the present invention, the S4 includes:

[0114] S41. The control module receives all data from the variety screening module, the quality inspection module, the robotic arm, and the rotating platform, and performs data verification and format conversion; the received data is cleaned and standardized;

[0115] S42. Based on the types and testing standards of Chinese medicinal materials, conduct a quality grade assessment of each quality testing indicator of the Chinese medicinal materials to determine whether they meet the quality standards;

[0116] S43. Identify and analyze potential quality risks in Chinese herbal medicines and set warning thresholds. When the test results reach or exceed the warning thresholds, a warning signal will be issued.

[0117] S44. Automatically generate a detailed test report based on the data analysis results and the report template, and output it to the user in the form of an electronic document through the user interface or network interface.

[0118] The working principle of the above technical solution is as follows: First, the control module verifies the data to ensure its integrity, accuracy, and timeliness. Next, the received data is cleaned to remove duplicate, erroneous, or irrelevant data. Finally, the data format is converted and standardized to enable unified processing and analysis of data from different sources and formats. The cleaned and standardized data is compared with pre-set quality standards to determine whether the Chinese medicinal materials meet the quality standards. Based on the comparison results, the Chinese medicinal materials are classified as qualified, unqualified, or require further testing. Warning thresholds are set. When one or more quality test indicators reach or exceed the warning thresholds, the control module immediately issues a warning signal. The warning signal can be transmitted to the operator or the quality inspection module through audio, light, text, or other means, so that timely action can be taken. Relevant data and results are extracted from the database. Then, these data and results are entered into a report according to a pre-set report template. Finally, the report is output to the user as an electronic document through a user interface or network interface. The user can view or download the test report through a terminal device such as a computer or mobile phone.

[0119] The effect of the above technical solution is that the control module can centrally receive data from multiple modules and devices and perform data verification, format conversion, cleaning, and standardization. This process ensures the accuracy, consistency, and availability of the data, providing a solid foundation for subsequent quality assessment and risk analysis; the quality grade of each quality inspection indicator of the Chinese medicinal materials is evaluated based on the type of Chinese medicinal materials and the preset testing standards. This data-based evaluation method is more objective and accurate than traditional manual evaluation and can promptly detect quality problems in Chinese medicinal materials; by identifying and analyzing potential quality risks in Chinese medicinal materials and setting early warning thresholds, when the test results reach or exceed the early warning threshold, an early warning signal can be immediately issued. This timely early warning mechanism helps to quickly respond to and deal with potential quality issues and avoid adverse consequences; based on the data analysis results and the preset report template, a detailed test report is automatically generated and output to the user in the form of an electronic document through the user interface or network interface. This automated report generation method not only improves work efficiency but also allows users to easily access test results and related information. The entire technical solution combines multiple links, including data integration, quality assessment, risk warning, and report generation. Through intelligent processing, it achieves comprehensive, accurate, and efficient testing of the quality of traditional Chinese medicines. This helps to improve the overall quality and safety of traditional Chinese medicine production, processing, and use.

[0120] In one embodiment of the present invention, the step S43 includes:

[0121] Based on the types and testing standards of Chinese medicinal materials, key quality risk indicators are determined, and the data provided by the quality testing module is compared and analyzed with the preset quality standards to identify possible quality risk points;

[0122] Use machine learning algorithms to build a quality risk assessment model for Chinese herbal medicines; conduct quantitative assessments of the quality risks of Chinese herbal medicines;

[0123] Based on the output of the risk assessment model, the quality risks of Chinese medicinal materials are divided into different levels, such as low risk, medium risk and high risk;

[0124] Set warning thresholds for each quality risk indicator based on quality risk assessment results and industry standards;

[0125] Dynamically adjust the warning threshold based on real-time changes in TCM quality testing data; and continuously optimize the warning threshold using adaptive learning algorithms or online update mechanisms;

[0126] When the quality inspection data reaches or exceeds the warning threshold, the warning mechanism is immediately triggered to send a warning signal to the control module and operators;

[0127] Based on the early warning signals and risk levels, formulate corresponding risk response measures; the measures include but are not limited to the isolation, re-inspection, return, and destruction of Chinese medicinal materials.

[0128] The working principle of the above technical solution is as follows: Based on the type and testing standards of the Chinese medicinal materials, key risk indicators affecting the quality of the Chinese medicinal materials, such as heavy metal content, pesticide residues, and insufficient active ingredient content, are first identified. These indicators form the basis for subsequent risk assessment and early warning. The data provided by the quality inspection module is compared and analyzed with the preset quality standards to identify potential quality risk points. This step aims to preliminarily screen out batches of Chinese medicinal materials with quality issues through data comparison. A Chinese medicinal material quality risk assessment model is constructed using machine learning algorithms (such as logistic regression, decision trees, and random forests). This model can quantitatively assess the quality risk of Chinese medicinal materials based on quality inspection data and output assessment results. Based on the output of the risk assessment model, the quality risk of Chinese medicinal materials is classified into different levels, such as low risk, medium risk, and high risk. This step facilitates the implementation of different response measures for Chinese medicinal materials with different risk levels. Based on the quality risk assessment results and industry standards, early warning thresholds are set for each quality risk indicator. These thresholds are key parameters for triggering the early warning mechanism. When the quality inspection data reaches or exceeds these thresholds, an early warning is triggered. The early warning thresholds are dynamically adjusted based on real-time changes in the quality inspection data of the Chinese medicinal materials. This step aims to ensure the accuracy and flexibility of the early warning mechanism, enabling timely adjustment of warning thresholds based on actual conditions to avoid false positives or missed alerts. The warning thresholds are continuously optimized using adaptive learning algorithms or online update mechanisms. This step aims to continuously improve the accuracy and stability of the early warning mechanism through the learning capabilities of machine learning algorithms. When quality inspection data reaches or exceeds the warning threshold, the early warning mechanism is immediately triggered, sending a warning signal to the control module and operators. The warning signal should include key information such as risk level, risk indicators, and TCM batch, allowing operators to take timely measures to address the risk. Appropriate risk response measures are formulated based on the warning signal and risk level. These measures may include isolation, re-inspection, return, and destruction of TCM materials, aiming to eliminate quality risks and ensure the safety and compliance of TCM materials.

[0129] The above technical solution achieves the following: By identifying key quality risk indicators based on the type and testing standards of Chinese medicinal materials and constructing a quality risk assessment model using machine learning algorithms, it can more accurately quantify the quality risks of Chinese medicinal materials. This data-driven approach offers greater objectivity and accuracy than traditional manual assessments. By monitoring Chinese medicinal material quality test data in real time and triggering an early warning mechanism based on preset warning thresholds, potential quality issues can be detected immediately. This timely warning helps operators take swift action to prevent problems from escalating and minimize losses. By dynamically adjusting the warning thresholds and optimizing them using adaptive learning algorithms or online update mechanisms, the early warning mechanism can adapt to real-time changes in Chinese medicinal material quality test data, improving the accuracy and flexibility of early warnings. The early warning signal contains key information such as risk level, risk indicator, and Chinese medicinal material batch, helping operators quickly understand the risk situation and develop targeted risk response measures. Based on the warning signal and risk level, appropriate risk response measures can be implemented, such as isolation, re-inspection, return, or destruction of the Chinese medicinal materials. These measures help eliminate quality risks and ensure the safety and compliance of traditional Chinese medicines (TCMs). By combining advanced technologies such as machine learning algorithms, adaptive learning algorithms, and online update mechanisms, they enhance the intelligence of the TCM quality testing process. This intelligent testing process improves efficiency and reduces the cost of manual intervention. By promptly identifying and addressing quality issues in TCMs, the S43 technical solution helps ensure the stability and healthy development of the TCM market. This, in turn, helps enhance consumer trust in TCMs and promotes the sustainable development of the TCM industry.

[0130] One embodiment of the present invention, as Figure 2 As shown, a fully automatic integrated traditional Chinese medicine detection device, the device includes:

[0131] Variety screening module: The module takes high-definition photos of Chinese medicinal materials through a high-precision camera and image processing unit, and automatically identifies the types of Chinese medicinal materials by comparing them with the built-in Chinese medicinal material image database through a preset algorithm;

[0132] Quality detection module: Through the integration of multiple sensors, including near-infrared spectrometer, moisture meter and heavy metal detector, multi-dimensional quality detection of Chinese medicinal materials is carried out. The multi-dimensional quality detection includes moisture content, active ingredient content and heavy metal residue;

[0133] Tumbling module: Based on the robotic arm and rotating platform, the system automatically tumbles the Chinese medicinal materials according to the instructions of the control module, ensuring that all sides can be effectively photographed and inspected. It is particularly suitable for Chinese medicinal materials with complex shapes that are difficult to directly observe.

[0134] Control module: responsible for receiving data from each module, executing preset algorithm logic, controlling the working rhythm of the tumbling module, comparing the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarizing the information from the quality inspection module to form the final inspection report.

[0135] The working principle of the above technical solution is as follows: a high-precision camera is used to take high-definition photos of Chinese medicinal materials to ensure that the images are clear and rich in details; the image processing unit pre-processes the taken photos, such as denoising, contrast enhancement, etc., to improve the image quality; the processed images are feature extracted through a preset algorithm and compared with the built-in Chinese medicine image database to automatically identify the type of Chinese medicinal materials; near-infrared spectroscopy technology is used to quickly and non-destructively detect the content of effective ingredients in Chinese medicinal materials; the moisture content of Chinese medicinal materials is accurately measured through specific measurement principles (such as capacitance method, resistance method, etc.); heavy metal residues in Chinese medicinal materials are detected using electrochemical, optical or mass spectrometric principles to ensure that Chinese medicinal materials are safety; according to the instructions of the control module, the robotic arm grabs the Chinese medicinal materials and places them on the rotating platform, and the rotating platform drives the Chinese medicinal materials to roll; the control module sends instructions to the rolling module according to the requirements of the variety screening module and the quality inspection module to ensure that all sides of the Chinese medicinal materials can be effectively photographed and inspected; the control module receives data from the variety screening module, the quality inspection module and the rolling module; executes the preset algorithm logic to process and analyze the received data; according to the processing results, the control module sends instructions to the rolling module to adjust its working rhythm; at the same time, the data from the variety screening module is compared to make a final confirmation of the type of Chinese medicinal materials, and the information from the quality inspection module is summarized to form a final inspection report.

[0136] The effects of the above technical solutions are as follows: through the integration of high-precision cameras, image processing units and multiple sensors, automatic identification and multi-dimensional quality inspection of Chinese medicinal materials are realized, which greatly improves the efficiency and accuracy of inspection; the cooperation of the robotic arm and the rotating platform enables Chinese medicinal materials to roll automatically, ensuring that all sides can be effectively photographed and inspected, reducing the tediousness and errors of manual operation; the variety screening module uses high-precision cameras and preset algorithms to quickly and accurately identify the types of Chinese medicinal materials, avoiding the identification errors caused by human factors in traditional methods; the quality inspection module uses multiple sensors such as near-infrared spectrometers, moisture meters and heavy metal detectors to perform multi-dimensional quality inspections on Chinese medicinal materials, which can comprehensively reflect the quality status of Chinese medicinal materials and ensure the safety and effectiveness of Chinese medicinal materials; this method is particularly suitable for Chinese medicinal materials with complex shapes that are not easy to observe directly. Automatic rolling and all-round shooting can ensure that all sides of Chinese medicinal materials can be effectively inspected, thereby improving the comprehensiveness and accuracy of the inspection; at the same time, the method is also applicable to Chinese medicinal materials of different types and specifications, and has strong versatility and flexibility; the control module can receive data from each module and execute preset algorithm logic to confirm the type of Chinese medicinal materials, while summarizing the information of the quality inspection module to form a final inspection report; this data integration and analysis method not only improves the accuracy and reliability of the inspection, but also provides strong data support for the quality control and traceability of Chinese medicinal materials; the application of this method can promote the modernization and standardization of the Chinese medicine industry, and improve the quality level and market competitiveness of Chinese medicinal materials; at the same time, the method can also provide scientific basis and technical support for the research and development, production, sales and other links of Chinese medicine, and promote the sustainable development of the Chinese medicine industry.

[0137] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.

Claims

1. A fully automatic integrated traditional Chinese medicine detection method, characterized in that: The detection method comprises: S1. The variety screening module is equipped with a high-precision camera and image processing unit to take high-definition photos of Chinese medicinal materials. Then, the preset algorithm is used to compare the photos with the built-in Chinese medicinal material image database to automatically identify the type of Chinese medicinal materials. S2. Through the multiple sensors integrated in the quality detection module, multi-dimensional quality detection of Chinese medicinal materials is carried out; S3, based on the robotic arm and rotating platform equipped with the tumbling module, the Chinese medicinal materials are automatically tumbled according to the instructions of the control module; S4. The control module receives data from each module, executes the preset algorithm logic, controls the tumbling module, compares the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarizes the information from the quality inspection module to form a final inspection report; Said S4 comprises: S41, the control module receives all data and processes it; S42. Conduct quality grade assessment to determine whether it meets quality standards; S43. Conduct quality risk identification and analysis; S44, automatically generate a detailed test report and output it to the user; The S43 includes: Determine key quality risk indicators, compare and analyze them with preset quality standards, and identify quality risk points; Construct a quality risk assessment model for Chinese herbal medicines; conduct quantitative assessment of the quality risks of Chinese herbal medicines; Based on the output of the risk assessment model, the quality risks of Chinese medicinal materials are divided into different levels; Set warning thresholds for each quality risk indicator; Dynamically adjust the warning threshold and continuously optimize the warning threshold; When the quality inspection data reaches or exceeds the warning threshold, the warning mechanism is immediately triggered and a warning signal is issued; Develop corresponding risk response measures based on early warning signals and risk levels; Said S1 comprises: S11. Capture the subtle features of the surface of Chinese medicinal materials; S12, preprocessing the collected images; S13, extracting features from the image, S14. Identify the types of Chinese medicinal materials; S15. If the identification result is not unique, a second confirmation is performed; Said S14 comprises: Before the feature vector is input, normalization is performed; Map the feature vector to a high-dimensional or low-dimensional feature space; Calculate the similarity between the feature vector of the Chinese herbal medicine to be identified and the feature vectors of known Chinese herbal medicines in the Chinese herbal medicine image database; According to the similarity calculation results, several Chinese medicinal materials with the highest similarity are selected as candidates for preliminary identification; Select a deep learning classifier and train it; The feature vectors of the initially identified candidate objects are input into the trained deep learning classifier for classification and identification to obtain the type information of Chinese medicinal materials.

2. A fully automatic integrated traditional Chinese medicine detection method according to claim 1, characterized in that: Said S1 comprises: S11. Use the high-precision camera of the variety screening module and configure different light sources to capture the subtle features on the surface of Chinese medicinal materials; S12, and preprocessing the collected image through an image processing unit, wherein the preprocessing includes denoising, contrast enhancement, and edge detection; S13. Extract features from pre-processed images based on deep learning algorithms to identify key features of Chinese medicinal materials, while using attention mechanisms to enhance focus on key areas. S14, inputting the extracted feature vector into the trained deep learning classifier, comparing it with the known Chinese medicinal material features in the built-in Chinese medicinal material image database, and identifying the type of Chinese medicinal material by calculating the similarity between the feature vectors; S15. If there are multiple high-matching options in the identification results, a second confirmation is performed using the uncertainty processing method combined with other characteristics of the Chinese medicinal materials.

3. A fully automatic integrated traditional Chinese medicine detection method according to claim 2, characterized in that: Said S13 comprises: According to the types of Chinese medicinal materials and image characteristics, a deep learning model is selected, and feature extraction is performed to optimize the selected deep learning model; Use deep learning models to extract features from pre-processed Chinese medicinal material images and identify key features of Chinese medicinal materials; Combined with near-infrared spectroscopy analysis technology, the spectral characteristics of Chinese medicinal materials are extracted, and the image features and spectral features are fused through multimodal feature fusion methods; Introducing the attention mechanism into the deep learning model to enhance the extracted features; Principal component analysis was used to reduce the dimensionality of the extracted features, and a feature selection algorithm was used to select the feature subset that contributed to the identification of Chinese herbal medicine species; The feature vectors after dimensionality reduction and selection are concatenated or combined to generate feature vectors for identifying the types of Chinese medicinal materials.

4. A fully automatic integrated traditional Chinese medicine detection method according to claim 2, characterized in that: Said S15 comprises: According to the output of the deep learning classifier, the recognition results of Chinese medicinal materials are sorted by matching degree, and the top N options with the highest matching degree are selected as candidates; Perform differential analysis on the feature vectors of candidate objects to identify subtle differences; use odor sensors or gas chromatography-mass spectrometry to collect and analyze the odor of traditional Chinese medicines and extract characteristic odor components; Using touch sensors or robotic arms to simulate human hands touching Chinese medicinal materials, the tactile features are collected. A Bayesian classifier is used to fuse visual features with sensory features to calculate the posterior probability that each candidate object belongs to each type of Chinese medicinal material. The output results of multiple classifiers are integrated using ensemble learning methods, and the uncertainty of the recognition results is evaluated based on the output results of the Bayesian classifier or ensemble learning method; If the uncertainty is high, verification or adjustment is performed; based on the output of the uncertainty processing method, the most likely type of Chinese medicinal material is selected as the final identification result; Compare the final recognition results with the actual situation and collect feedback data.

5. A fully automatic integrated traditional Chinese medicine detection method according to claim 1, characterized in that: Said S2 comprises: S21. Activate the near-infrared spectrometer in the quality inspection module to perform non-destructive scanning on the Chinese medicinal materials to obtain near-infrared spectrum data thereof, covering a wavelength range from 780 nm to 2526 nm. S22, preprocessing the collected spectral data, wherein the preprocessing includes smoothing, baseline correction, and normalization to eliminate the influence of instrument noise and baseline drift on the analysis results; S23. Analyze the pre-processed spectral data using chemometric methods to establish a quantitative determination model for the active ingredients in Chinese medicinal materials; S24, drying the Chinese medicinal materials in a constant temperature drying oven, and calculating the moisture content by measuring the mass difference before and after drying; S25. Using a capacitive sensor to measure the change in the dielectric constant of the Chinese medicinal material, and determining the moisture content based on the relationship between moisture and the dielectric constant; S26, crushing the Chinese medicinal materials, and converting the heavy metal elements in the Chinese medicinal materials into soluble forms by acid digestion or microwave digestion; S27. Introducing the digested sample solution into an ICP-MS instrument, atomizing the sample and exciting it to a high-energy state using high-energy plasma, and detecting the characteristic mass number of each element using a mass spectrometer to perform trace analysis of heavy metal elements; S28. Process the data obtained from ICP-MS testing accordingly and evaluate the safety of heavy metal residues in Chinese medicinal materials according to relevant standards.

6. A fully automatic integrated traditional Chinese medicine detection method according to claim 5, characterized in that: Said S23 comprises: Before using chemometric methods, statistical methods are used to detect outliers in spectral data and process them accordingly; The spectral data were selected by continuous projection algorithm to extract the characteristic wavelengths that have the greatest impact on the determination of the effective ingredients in Chinese herbal medicines. The pre-processed spectral data were used as independent variables, and the content of active ingredients in Chinese medicinal materials was used as dependent variables. The partial least squares method was used to establish a multiple linear regression model for quantitative determination of the ingredients. Principal component analysis was performed on the spectral data to extract the principal components as new independent variables, and a regression method was used to establish a model between the principal components and the content of effective ingredients in Chinese medicinal materials; Using the regression version of the support vector machine, the spectral data is nonlinearly mapped to establish a nonlinear relationship model between the active ingredient content of Chinese herbal medicines and the spectral data; K-fold cross validation is used to verify the established model and evaluate the model's predictive performance; and the optimization algorithm is used to tune the model's parameters; Based on the cross-validation results and model performance indicators, the advantages and disadvantages of different chemometric methods were compared, and the optimal model was selected for subsequent application.

7. A fully automatic integrated traditional Chinese medicine detection method according to claim 1, characterized in that: The S3 includes: S31. Tumbling the Chinese medicinal materials based on the relevant characteristics of the Chinese medicinal materials and a preset tumbling strategy; S32. Evaluate and optimize the rollover strategy and adjust the rollover parameters through simulation experiments and actual test data feedback; S33. The robotic arm uses visual servo technology or laser navigation technology to accurately grasp and stably place Chinese medicinal materials. The rotating platform rolls according to the instructions of the control module, while the robotic arm maintains a stable grip on the Chinese medicinal materials. S34. During the tumbling process, the variety screening module and the quality inspection module continue to work, collecting images and spectral data of the Chinese medicinal materials in real time, and feeding them back to the control module for processing and analysis in real time; S35. The control module integrates and processes the collected data to obtain comprehensive detection information of the Chinese medicinal materials.

8. A fully automatic integrated traditional Chinese medicine detection method according to claim 7, characterized in that: The S32 includes: Using 3D modeling software or physical simulation platforms, construct virtual models of Chinese medicinal materials based on their characteristics; at the same time, simulate the movements and interactions of the robotic arm, rotating platform, and control module; In the simulation environment, the Chinese medicinal materials are tumbled according to the preset strategy; the robot arm movements, the movement trajectory of the Chinese medicinal materials, and possible collisions during the tumbling process are recorded; Analyze the results of the simulation experiments to evaluate the effectiveness and safety of the rolling strategy; identify potential collision points, rolling instability areas, and risk points for damage to Chinese medicinal materials; During the actual testing process, the Chinese medicinal materials are tumbled according to the preset tumbling strategy, and sensors and testing equipment are used to collect images, spectra, and status data of the Chinese medicinal materials and the robotic arm and rotating platform in real time; Preprocess the collected data, compare the actual test data with the simulation results, analyze the performance of the rollover strategy in actual application, and identify differences and potential problems; Extract key features of the rollover strategy from simulation experiments and actual test data, and use feature selection algorithms to select the features that have the greatest impact on the rollover effect; Establish a prediction model between rolling strategies and the rolling effects of Chinese medicinal materials based on machine learning algorithms; adjust and optimize the rolling strategies based on the output of the prediction model; Use multi-objective optimization algorithms to find the optimal solution among multiple objectives.

9. A fully automatic integrated traditional Chinese medicine detection method according to claim 1, characterized in that: Said S4 comprises: S41. The control module receives all data from the variety screening module, the quality inspection module, the robotic arm, and the rotating platform, and performs data verification and format conversion; the received data is cleaned and standardized; S42. Based on the types and testing standards of Chinese medicinal materials, conduct a quality grade assessment of each quality testing indicator of the Chinese medicinal materials to determine whether they meet the quality standards; S43. Identify and analyze potential quality risks in Chinese herbal medicines and set warning thresholds. When the test results reach or exceed the warning thresholds, a warning signal will be issued. S44. Automatically generate a detailed test report based on the data analysis results and the report template, and output it to the user in the form of an electronic document through the user interface or network interface.

10. A device for implementing the fully automatic integrated traditional Chinese medicine detection method according to claim 1, characterized in that: The device comprises: Variety screening module: The module takes high-definition photos of Chinese medicinal materials through a high-precision camera and image processing unit, and automatically identifies the types of Chinese medicinal materials by comparing them with the built-in Chinese medicinal material image database through a preset algorithm; Quality detection module: Through the integration of multiple sensors, including near-infrared spectrometer, moisture meter and heavy metal detector, multi-dimensional quality detection of Chinese medicinal materials is carried out. The multi-dimensional quality detection includes moisture content, active ingredient content and heavy metal residue; Tumbling module: Based on the robotic arm and rotating platform, the Chinese medicinal materials are automatically tumbled according to the instructions of the control module; Control module: responsible for receiving data from each module, executing preset algorithm logic, controlling the tumbling module, comparing the data from the variety screening module to confirm the type of Chinese medicinal materials, and summarizing the information from the quality inspection module to form the final inspection report.

Citation Information

Patent Citations

  • Computer visual identification system and method

    CN116958771A

  • Method and system for monitoring stir-frying process of traditional Chinese medicinal materials

    CN119360296A