Traditional chinese medicine detection system and method therefor, and computer-readable storage medium
By using image recognition and weight analysis technology to automatically verify traditional Chinese medicine prescriptions, the problem of inaccurate verification of the types and contents of Chinese medicinal herbs after dispensing is solved, thus improving the accuracy and safety of Chinese medicine use.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-24
- Publication Date
- 2026-03-05
AI Technical Summary
Existing technologies make it difficult to automatically verify the dispensing of traditional Chinese medicine prescriptions, resulting in the inability to accurately check the types and contents of medicinal materials, which affects the accuracy and safety of traditional Chinese medicine use.
Using image recognition and weight analysis technology, images of Chinese medicinal herbs are acquired through an image acquisition module. The types and weights of Chinese medicinal herbs are identified and analyzed using a medicinal herb identification unit and a weight analysis unit. Combined with a Chinese medicinal herb detection model, quantitative analysis is performed to provide the detection results.
It enables automatic verification of Chinese medicine prescriptions after dispensing, improving the accuracy and safety of Chinese medicine prescriptions and ensuring the effectiveness of Chinese medicine use.
Smart Images

Figure CN2024114387_05032026_PF_FP_ABST
Abstract
Description
A traditional Chinese medicine detection system and method, and a computer-readable storage medium Technical Field
[0001] This invention relates to the technical field of intelligent medical information processing, and in particular to a traditional Chinese medicine detection system and method, and a computer-readable storage medium. Background Technology
[0002] With the continuous development of traditional medicine, traditional medicine is receiving more and more attention. The demand for traditional Chinese medicine is growing worldwide, and the development space for Chinese medicine is also expanding. Chinese medicine has entered a period of rapid development.
[0003] With the increasingly widespread use of traditional Chinese medicine (TCM), ensuring the accuracy of the composition and content of TCM herbs after dispensing according to prescriptions is fundamental to guaranteeing the accuracy, safety, and effectiveness of TCM medication. Because TCM prescriptions are composed of a mixture of various TCM herbs, and these herbs vary greatly in form due to differences in type, medicinal part, color, origin, size, and processing methods, the resulting prescriptions are highly complex, making it difficult to manually verify the types and weights of the herbs. Therefore, traditional Chinese medicine (TCM) testing can usually only perform individual tests on each herb before dispensing to manage the quality of the herbs themselves. However, it is difficult to test the composition and content of the herbs after dispensing. Even if the dispensing herbs are manually checked, it can only be checked whether the types dispensed match the prescription. This is inefficient and prone to human error. Furthermore, it cannot detect whether the weight of each herb in each prescription is accurate. As a result, various dispensing errors that occur during the dispensing process are difficult to detect, and the quality of TCM prescriptions cannot be effectively guaranteed, posing potential risks to the safety and efficacy of TCM for patients.
[0004] Therefore, there is an urgent need for a traditional Chinese medicine (TCM) testing system and method, as well as a computer-readable storage medium, to conduct multi-faceted testing on TCM prescriptions after dispensing, including image recognition, spectral analysis, and odor analysis. This system can quantitatively analyze the types and contents of medicinal materials contained in the prescription, provide comprehensive test results, and verify the dispensing of TCM prescriptions to ensure the accuracy, safety, and effectiveness of TCM medication.
[0005] Summary of the Invention
[0006] The main objective of this invention is to address the problem that the types and contents of medicinal herbs in a dispensed traditional Chinese medicine (TCM) prescription cannot be automatically verified to ensure their consistency with the original prescription, thus compromising the accuracy and safety of TCM use. This invention provides a TCM detection system and method, along with a computer-readable storage medium. Through image recognition and other detection methods, the system quantitatively analyzes the types and contents of medicinal herbs in a dispensed TCM prescription, providing comprehensive detection results. This allows for the verification of dispensed TCM prescriptions, improving the accuracy, safety, and effectiveness of TCM use for patients.
[0007] To achieve the above objectives, the present invention provides a traditional Chinese medicine detection system, the system comprising: a workbench, an image acquisition module, an analysis module, and a detection module.
[0008] The workbench is used to hold the Chinese medicine to be tested. The workbench includes a leveling device for leveling the Chinese medicine to be tested on the workbench.
[0009] The image acquisition module is used to acquire images of the Chinese medicine on the workbench;
[0010] The analysis module is used to analyze images of traditional Chinese medicine, and the analysis module includes: a medicinal material identification unit and a weight analysis unit;
[0011] The medicinal material identification unit is used to perform image recognition on Chinese medicine images, analyze the various Chinese medicines contained in the Chinese medicine images, and extract images of various different Chinese medicines from the Chinese medicine images;
[0012] The weight analysis unit is used to analyze the weight of various Chinese medicines based on their images.
[0013] The detection module is used to provide the detection results of traditional Chinese medicine based on the types of Chinese medicine contained in the analyzed prescription and the weight of each Chinese medicine.
[0014] The traditional Chinese medicine (TCM) detection system described above further includes a model module for storing TCM detection models. These models are used to identify TCM and analyze its weight, including image features corresponding to various TCMs, as well as the correspondence between TCM volume and weight and / or the correspondence between TCM area and weight.
[0015] As described above, in a traditional Chinese medicine testing system, the image acquisition module acquires images of the traditional Chinese medicine on the workbench by acquiring images of the flattened traditional Chinese medicine from both the top and bottom surfaces. The image acquisition module includes one or more image acquisition devices.
[0016] The traditional Chinese medicine detection system described above further includes a transmission belt. The transmission belt passes over a worktable, flattens the traditional Chinese medicine to be detected on the transmission belt, and carries the flattened traditional Chinese medicine forward. When the transmission belt passes over the worktable, the image acquisition module acquires an image of the flattened traditional Chinese medicine.
[0017] As described above, in a traditional Chinese medicine detection system, the weight analysis unit analyzes the weight of the traditional Chinese medicine by: analyzing the volume or surface area of the traditional Chinese medicine based on its size and shape in the image, and then determining the weight of the traditional Chinese medicine based on the correspondence between its volume and weight or the correspondence between its surface area and weight.
[0018] The traditional Chinese medicine detection system described above further includes an electronic nose for detecting the odor data of the traditional Chinese medicine to be detected, and the odor data is used to analyze the traditional Chinese medicine contained in the prescription to be detected.
[0019] As described above, the traditional Chinese medicine (TCM) detection system also includes grading standards for various TCM materials, images of different grades of each material, and their corresponding characteristics. After analyzing the various TCM materials contained in the TCM to be detected, the TCM detection system further analyzes the origin, processing method, grade, and other information of the various TCM materials contained in the TCM to be detected based on one or more of the image data, spectral data, and odor data of the TCM.
[0020] The traditional Chinese medicine detection method can also be used to analyze the composition and weight of mixtures of other items that can establish an image-weight correspondence, including fruits, vegetables, meat, fish, meat products, pasta, candy, grains, minerals, and building materials.
[0021] The present invention also provides a method for using the traditional Chinese medicine detection system as described above, characterized in that the method includes:
[0022] Step 1: Spread the Chinese medicine to be tested evenly;
[0023] Step 2: Acquire images of the Chinese medicinal herbs;
[0024] Step 3: Perform image recognition on the Chinese medicine image, analyze the various Chinese medicines contained in the image, and extract the images of different Chinese medicines from the image;
[0025] Step 4: Analyze the weight of each Chinese herb based on its image;
[0026] Step 5: Based on the types of Chinese herbs contained in the analyzed Chinese herbal prescription and the weight of each herb, provide the results of the Chinese herbal medicine test.
[0027] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method of using the traditional Chinese medicine detection system as described above.
[0028] This invention discloses a traditional Chinese medicine (TCM) testing system and method, and a computer-readable storage medium. The system includes a workbench, an image acquisition module, an analysis module, and a detection module. The method includes: flattening the TCM to be tested; acquiring an image of the TCM; performing image recognition on the TCM image to analyze the various TCMs contained in the image and extracting images of different TCMs from the image; analyzing the weight of each TCM based on the images; and providing TCM testing results based on the analyzed types of TCMs and their weights in the TCM prescription. This invention provides a TCM testing system and method, and a computer-readable storage medium, which, through image recognition and other detection methods, quantitatively analyzes the types and contents of TCM slices in a prepared TCM prescription, providing comprehensive testing results. It allows for the verification of prepared TCM prescriptions, improving the accuracy, safety, and effectiveness of TCM prescriptions used by patients. Attached Figure Description
[0029] Figure 1 is a schematic diagram of the traditional Chinese medicine detection system of the present invention.
[0030] Figure 2 is a flowchart of the traditional Chinese medicine detection method of the present invention. Detailed Implementation
[0031] To further illustrate the technical means and effects adopted to achieve the intended purpose of this application, the specific implementation methods of this application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are merely for explaining this application and are not intended to limit this application.
[0032] The first embodiment of the present invention is shown in Figure 1. Figure 1 is a schematic diagram of the traditional Chinese medicine detection system of the present invention. As shown in the figure, the traditional Chinese medicine detection system of the present invention includes: a workbench, an image acquisition module 101, an analysis module 102, and a detection module 103.
[0033] The workbench is used to hold the Chinese herbal medicine (TCM) to be tested. Here, "TCM to be tested" refers to the completed dispensing of TCM – that is, the preparation of TCM herbs or herbal decoctions into a prescription according to a physician's prescription. The workbench can be a horizontal platform of a certain size. The size of the workbench is related to the amount of TCM to be tested. Generally speaking, a TCM prescription includes several or a dozen herbs, weighing approximately 70-120 grams. In this case, a 60cm x 40cm workbench is generally sufficient to allow the herbs to be spread out on the workbench. Of course, the weight of the herbs varies depending on the prescription and the types of herbs; the larger the amount of herbs, the larger the area of the workbench required. Spreading the herbs to be tested on the workbench can be done manually or automatically by the TCM testing system.
[0034] When the traditional Chinese medicine (TCM) testing system automatically flattens the items, the worktable may include a flattening device. This device flattens the items to be tested on the worktable, preventing / reducing mutual obstruction and facilitating the image acquisition module to obtain a comprehensive image of the items. The flattening device can be either a moving flattening method or a shaking flattening method. A moving flattening device may include a drive motor, a moving guide rod, and a scraper. The moving guide rod is connected to both the drive motor and the scraper. The drive motor drives the moving guide rod to move, which in turn moves the scraper above the worktable to flatten the TCM. A shaking flattening device may include a shaking motor, which shakes the worktable to flatten the items placed on it.
[0035] When the leveling device is a moving leveling method, the height difference between the leveling component and the worktable directly affects the height of the item to be inspected after leveling. For different combinations of items, considering the size, height, and shape of the items to be inspected, different leveling heights are required to achieve a good leveling effect and better acquire images of the items after leveling. Therefore, the leveling height of the moving leveling device of this invention should be adjustable. After knowing the range of item combinations and the dimensions of various items, the height between the leveling component and the worktable is adjusted according to the combination of items to be inspected. This allows the image acquisition module to acquire the required images for subsequent analysis after different mixtures of items undergo appropriate leveling processing. The leveling height can be adjusted through system analysis or training, or it can be set manually; this invention does not impose any limitations. If the correspondence between the range of item combinations and the leveling height is established through system analysis or training, it is necessary to comprehensively analyze and design factors such as the size, thickness, height, and shape of different items. Then, a series of experiments can be conducted to verify and optimize the relevant rules. Large-scale models can also be used to conduct related virtual experiments to simulate the leveling effect and image quality of various item combinations at different leveling heights until the training achieves satisfactory results. The relevant rules can also be dynamic, meaning the leveling height is not fixed during a single operation but depends on the size and height of the item the leveling component will soon contact. Furthermore, the leveling height adjustment can be combined with the image acquisition module. On one hand, the approximate composition of the item can be analyzed from images of the unequalized item captured by the image acquisition device, and then relevant rules can be retrieved to adjust the device to a suitable leveling height. In another application scenario, the image acquisition module can obtain information about the item the leveling component will soon contact, dynamically adjusting the leveling component's height based on the item in front of it to achieve more precise leveling, resulting in better image acquisition and improved item detection accuracy.
[0036] The leveling component of the mobile leveling device can be a rod, brush, soft sheet, hard sheet, air brush, etc., and the present invention does not impose any restrictions.
[0037] The image acquisition module 101 is used to acquire images of the Chinese medicinal herbs on the workbench. The Chinese medicinal herb detection system of this invention needs to identify the medicinal herbs contained in a Chinese herbal formula and analyze the weight of each herb through the acquired images. Since analyzing the weight of each herb through images is very difficult and requires highly accurate images, the conventional method of simply taking pictures from above the workbench using a camera is ineffective. In this invention's Chinese medicinal herb detection system, the image acquisition module 101 acquires images of the Chinese medicinal herbs on the workbench by capturing images of the flattened herbs from both the top and bottom. The image acquisition module includes one or more image acquisition devices, such as cameras or scanners. Furthermore, by flattening the herbs to be tested on the workbench before acquiring images, and then capturing images of the flattened herbs from both the top and bottom using the camera and scanner, the weight of each herb can be analyzed more accurately through the images. In this invention, the image acquisition module 101 may include a camera and / or a scanner. The camera is used to capture images of the herbs from above, and the scanner is used to scan the herbs from below after they have been flattened. The image acquisition module 101 can have one or more cameras, which capture images of the Chinese herbal medicine to be tested from different angles above the worktable, including top, bottom, and side angles, to generate a three-dimensional image of the medicine. To improve image quality, the Chinese herbal medicine detection system can also include an illumination module, which can include light sources of different wavelengths, including infrared, ultraviolet, and visible light, for supplementary lighting, enabling the image acquisition module 101 to acquire better quality images.
[0038] The traditional Chinese medicine (TCM) detection system of the present invention may also include a conveyor belt. The conveyor belt passes over a worktable, flattening the TCM to be tested on it. The flattened TCM is carried along by the conveyor belt, and an image acquisition module captures an image of the flattened TCM as it passes the worktable. The advantage of this is that if the amount of TCM is too large to fit on the worktable after flattening, a conveyor belt can be used. As the TCM passes the worktable, the image acquisition module 101 captures images of different parts of the TCM multiple times and combines them to form a complete image of the TCM. With a conventional worktable, the length and width of the flattened TCM cannot exceed the length and width of the worktable; however, with a conveyor belt, there is no limitation on the length of the flattened TCM, allowing for a smaller worktable and miniaturizing the overall size of the TCM detection system of the present invention, while maintaining the same functionality.
[0039] By employing a conveyor belt, the length of the spread-out Chinese herbal medicine is unlimited, allowing it to be fully spread out even with a limited worktable area. This prevents / reduces overlap and increases the accuracy and completeness of image acquisition. In this configuration, the image acquisition module's acquisition time can be calculated based on the worktable length and the conveyor belt speed as the medicine passes over the worktable. Furthermore, the required number of images can be calculated based on the worktable length and the length of the medicine spread on the conveyor belt. For example, if the worktable length is 60cm and the conveyor belt speed is 1.2m / s, then the conveyor belt takes 0.5s to move 60cm, and the image acquisition module's acquisition time interval is 0.5s. If the length of the medicine spread on the conveyor belt is 1.8m, then 3 images are required. In this invention, the conveyor belt can roll continuously or intermittently, depending on the image acquisition method. When identifying Chinese herbal medicine and its weight, analysis and identification can be performed on continuous images or on a series of static images; this invention does not impose any limitations. To facilitate image acquisition from below, both the worktable and the conveyor belt can be transparent.
[0040] In the traditional Chinese medicine (TCM) testing system of this invention, the worktable can also be a conveyor belt instead of a fixed platform. The worktable itself is a conveyor belt, on which the TCM to be tested is spread out and moved by the conveyor belt. The image acquisition module can acquire images of the spread-out TCM in one or multiple sessions.
[0041] The traditional Chinese medicine detection system of the present invention allows the image acquisition module to collect image data in a manner that can be static or dynamic. Dynamic image data can be collected while the traditional Chinese medicine is moving along the conveyor belt, or the acquisition interval can be set so that when image acquisition is needed, the conveyor belt is stopped first, and then static image acquisition is performed on the stopped traditional Chinese medicine. The present invention does not impose any limitations on this method.
[0042] The traditional Chinese medicine detection system of this invention can also acquire image data by means of the medicinal material being tested falling from a height, specifically by the material falling down an inclined slope or from a high step to a low step. During the fall, 3D scanning technology is used to obtain the volume of each medicinal material as it passes the image acquisition module, which is then used as data for subsequent analysis.
[0043] After acquiring the image of the Chinese herbal medicine to be tested, the analysis module 102 analyzes the image. In this invention, the analysis of the Chinese herbal medicine image mainly involves analyzing what medicinal materials are contained in the Chinese herbal medicine to be tested, and the amount of each medicinal material. Based on the medicinal materials and their contents contained in the Chinese herbal medicine prescription, it is determined whether the Chinese herbal medicine to be tested is qualified, that is, whether the ingredients and contents of the Chinese herbal medicine prescription conform to the Chinese herbal medicine formula.
[0044] The analysis module 102 may include a medicinal material identification unit and a weight analysis unit.
[0045] The herbal medicine identification unit is used to perform image recognition on images of Chinese medicinal herbs, analyze the various Chinese medicinal herbs contained in the images, and extract images of different Chinese medicinal herbs from the images. The weight analysis unit is used to analyze the weight of various Chinese medicinal herbs based on their images.
[0046] The detection and identification of medicinal materials can utilize techniques such as SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), HOG (Histogram of Oriented Gradients), Convolutional Neural Networks (CNN), and object detection frameworks (R-CNN / Fast R-CNN / Faster R-CNN, You Only Look Once, Single Shot MultiBox Detector, Mask R-CNN).
[0047] The medicinal herb recognition unit identifies various Chinese medicinal herbs contained in an image of Chinese medicinal herbs using the following method:
[0048] First, a traditional Chinese medicine (TCM) detection model is established. This model is used to identify TCM herbs and analyze their weight, including the image features corresponding to various herbs, as well as the correspondence between herb volume and weight, and / or the correspondence between herb area and weight. Here, area refers to the projected area of the TCM herb acquired by the image acquisition module from above or below the worktable; that is, the area of the image captured or scanned by the two-dimensional image acquisition device. For devices that acquire images simultaneously in both the upper and lower directions, the projected areas acquired in the upper and lower directions can be mutually corrected according to the different shapes of the herbs to obtain a more accurate area for each herb. The method for establishing a traditional Chinese medicine (TCM) detection model is as follows: A pre-defined neural network model is trained based on a TCM raw material dataset. This includes: acquiring images of TCM raw materials and corresponding labels for their names, where the labels are pre-labeled names of the herbs on the images; then, the images are input into the pre-defined neural network model for training, where the model calculates the probability value along the label dimension and records the model's parameter features; the model is trained iteratively until the corresponding probability value and the model's parameter features meet a pre-defined standard. This standard can be user-defined, such as a probability value greater than 98%. Because many herbs have significant features in images, model training allows for the differentiation of various herbs from images, especially when the scope of the items to be identified is limited. This training continuously improves the accuracy of the identification results. These image features may include color, pattern, gloss, size, thickness, length, shape, properties, texture, translucency, and combinations / arrangements of these values. The training process can be direct training or step-by-step training. For example, first train the model to distinguish the roots, stems, leaves, branches, bark, flowers, fruits, seeds, shells, and tendrils of different plant materials. Then train the model to identify the differences between the above parts of different plants, as well as the types, processing methods, and grades of medicinal materials corresponding to different combinations.
[0049] Then, the traditional Chinese medicine (TCM) detection model is used to identify the medicinal materials in the TCM images, yielding the identification results. The identification results show the various medicinal materials contained in the TCM images, and images of different medicinal materials can be extracted from the TCM images. These results are used for subsequent weight analysis of each medicinal material.
[0050] After identifying the Chinese medicinal materials, the weight of each Chinese medicinal material is then analyzed.
[0051] The weight analysis unit can analyze the weight of various Chinese medicines using the following methods:
[0052] First, the traditional Chinese medicine (TCM) detection model is further trained to identify the weight of TCM herbs. The specific method includes: training the model based on a TCM herb dataset, including: obtaining images of herbs and corresponding weight labels for those images, where the weight labels are pre-labeled weights of the herbs in the images; then training the model based on the herb images, calculating the probability value along the label dimension using the model, and recording the model's parameter features; iteratively training the model until the corresponding probability value and the corresponding model parameter features meet a preset standard.
[0053] In this invention, the traditional Chinese medicine (TCM) detection model can be established by training the TCM detection system of this invention using the methods described above, or it can be established by directly using a pre-existing model. Model training can be performed directly on mixed medicinal materials, or it can be performed first on single medicinal materials, and then, based on the single medicinal materials, on mixed medicinal materials. The training process can proceed from a small number of materials to a larger number, gradually increasing the complexity of the medicinal material mixture.
[0054] Then, the weight of each medicinal herb is obtained by weight recognition analysis of the images of various medicinal materials extracted from the images of traditional Chinese medicine using a traditional Chinese medicine detection model.
[0055] The weight analysis unit can also analyze the weight of various Chinese medicines using the following methods:
[0056] By extracting various medicinal materials from images of traditional Chinese medicine (TCM) herbs and creating 3D models, the volume of each herb is calculated based on its size and shape. Then, the density of the herb is obtained from pre-stored data based on its type, and its weight is derived from the analyzed volume and density. Alternatively, a pre-established correspondence between the volume and weight of various TCM herbs can be established. After analyzing and calculating the volume of each herb, its weight can be calculated based on this correspondence.
[0057] In this invention, since the medicinal materials selected for dispensing traditional Chinese medicine are all processed, each material must adhere to specific rules during processing. For example, after processing, a certain medicinal material is formed into slices. Materials from the same manufacturer / batch share certain commonalities in shape, properties, and size. Therefore, the thickness and density of the slices can be considered constant. Thus, when analyzing the weight of the medicinal material, the area can be used instead of volume. That is, assuming the thickness of the slices is fixed (or calculated by testing the raw materials to determine the average thickness), the area of the material determines its volume, and since the density of the slices is fixed, the area determines its weight. Therefore, a correspondence between the area and weight of the medicinal material can be established beforehand. The area of the medicinal material can be analyzed based on its size in an image, and then the weight can be derived from this correspondence.
[0058] Similarly, for leaf-shaped medicinal materials, a pre-established relationship between the area and weight of the material can be used. The area of the material can be analyzed based on its size in an image, and then the weight can be calculated using this relationship. For medicinal materials where the relationship between area and volume is difficult to determine, it can be established based on the material's shape. For example, for spherical medicinal materials, the relationship between the projected area and volume can be obtained using the formulas for the volume of a sphere and the area of a circle. Then, combined with density, the weight can be calculated. For branches, roots, and stems, the material can be approximated as a cylinder / cone to analyze the relationship between its projected area and volume, thus calculating the approximate volume and weight using the projected area. For medicinal materials in block, fruit, granule, or powder form, a relationship between the volume and weight of various Chinese medicines can be established in advance. After analyzing and calculating the volume of each Chinese medicine, the weight of each Chinese medicine can be calculated based on the relationship between the volume and weight of different Chinese medicines.
[0059] Calculating weight by the area of medicinal materials can also be achieved by directly measuring / training the projected area and weight of different medicinal materials through the same analysis path, thus obtaining a direct correspondence between the area and weight of medicinal materials, simplifying the calculation method from area to volume and volume to weight.
[0060] Furthermore, the model can be trained directly by combining different combinations of medicinal materials (including types and weights of each type) with images of the mixtures, even images that are not fully flattened and have some mutual occlusion. This allows the model to directly infer the relevant components and the weight or ratio of each component from the images. The specific principle is that a mixture of medicinal materials, due to differences in size, projected area, shape, weight, and friction, will produce images with certain commonalities after being flattened to a certain thickness by a flattening device of a certain height. Especially when the same / similar mixtures of medicinal materials are repeatedly mixed / flattened, image characteristics of this type of mixture will be obtained. These characteristics are reflected in the probability that the way and degree of mutual occlusion between different combinations of medicinal materials matches the shape, size, density, and other attributes of the medicinal materials. When the model, after training, analyzes the probability of the relationship between the images of various combinations of medicinal materials and the attributes of the medicinal materials, this method can be used to analyze images of insufficiently flattened mixtures of medicinal materials to obtain approximate results of the medicinal material combination analysis.
[0061] After analyzing the weight of each medicinal material, the detection module 103 provides the traditional Chinese medicine (TCM) detection results based on the analyzed medicinal materials and their weights. The TCM detection results refer to comparing the analyzed TCM prescription's ingredients and their weights with the prescription information to verify whether it conforms to the TCM formula. The provided TCM detection results can be either "qualified" or "unqualified," or they can specify the individual medicinal materials and their weights.
[0062] Thresholds (allowable error ranges) can be preset to determine the results of traditional Chinese medicine (TCM) testing. For example, the threshold for the type of medicinal material can be set to 1, meaning the detected medicinal material must be exactly the same as the material that should be present in the TCM formula; no more and no less is allowed. Otherwise, the TCM test result is considered unqualified. The threshold for the weight of medicinal materials can be set between 0.8 and 1.2, meaning the test result is considered qualified if the ratio between the actual weight of each medicinal material and the weight that should be in the TCM formula is not less than 0.8 and not greater than 1.2. If the weight threshold of any medicinal material is less than 0.8 or greater than 1.2, the TCM test result is considered unqualified. The threshold, i.e., the allowable error range, can be set for all medicinal materials or for a single medicinal material individually. For example, if a certain Chinese medicine consists of 8 ingredients, one of which is toxic, then the allowable error range for that ingredient can be set to 0.03, meaning the allowable error range is very small, ensuring that the use of that ingredient is very accurate. The error range for other ingredients can be set to a normal 0.2, thus allowing for strict verification and limitation of the accurate use of ingredients with significant toxic side effects.
[0063] In this invention, the traditional Chinese medicine (TCM) detection system further includes a model module for storing TCM detection models. The TCM detection system may also include a model building and optimization module, which is used to train and optimize the TCM detection model based on a TCM raw material dataset. The TCM raw material dataset includes images of various TCM raw materials and their corresponding labels. In the actual use of the TCM detection system, the TCM data and results from each detection can be added to the TCM raw material dataset as TCM raw material data for optimizing the TCM detection model.
[0064] In this invention, the correspondence between the volume and weight of various medicinal materials, the correspondence between the area and weight of various medicinal materials, the density of various medicinal materials, and the formulas of various traditional Chinese medicines are established in advance. These can be stored in the model module as part of the traditional Chinese medicine detection model, or they can be stored in a network server and retrieved from the server via the network when needed. In this case, the traditional Chinese medicine detection system can also include a data transmission module for acquiring or sending information.
[0065] In this invention, the traditional Chinese medicine testing model or related database can be established based on the production standards / quality standards of the medicinal material manufacturers, or it can be established according to the actual quality of different batches of medicinal materials. This invention does not impose any restrictions.
[0066] The traditional Chinese medicine (TCM) testing system of this invention can, when a TCM formula is available, analyze and identify whether the content of each medicinal material identified in the TCM conforms to the formula and provide the test results. Alternatively, even without a TCM formula, it can automatically analyze and determine the corresponding TCM formula based on the identified medicinal materials and their content, combined with TCM formula data contained in the model module, or TCM formula data obtained through a network server. Furthermore, it can review TCM formulas, comprehensively examining their applicability, contraindications, interactions, allergies, adverse reactions, medical insurance control, and administrative management to determine the safety, suitability, effectiveness, and cost-effectiveness of TCM use.
[0067] The traditional Chinese medicine (TCM) detection system of the present invention can also automatically analyze and match relevant usage guidelines for the TCM to be tested based on the TCM formula, combined with the TCM usage guidance data contained in the model module, or the TCM usage guidance data obtained through the network server. These guidelines include medication time, dosage, method of administration, drug storage, missed doses, self-monitoring, drug ineffectiveness, drug allergy, medication protection measures, dietary precautions, rest precautions, exercise precautions, precautions for childbirth / sexual life, precautions for breastfeeding, and emotional precautions, and output them to the user.
[0068] The traditional Chinese medicine detection system of the present invention can analyze the medicinal materials and their contents in the Chinese medicine to be tested through image recognition, as well as through the spectrum of the medicinal materials, the types of medicinal materials in the Chinese medicine to be tested through odor, and even take advantage of the fact that different weights of medicinal materials have different volatile totals, resulting in different odor concentrations, to analyze the content of each medicinal material in the Chinese medicine to be tested through odor.
[0069] The traditional Chinese medicine (TCM) testing system may also include a spectrometer for measuring the spectral data of the TCM to be tested. This spectral data is used to analyze the medicinal materials and their content within the TCM. In this invention, the near-infrared spectrum of the TCM to be tested can be collected for qualitative and quantitative analysis of the medicinal materials and their content. The diffuse reflectance method can be used to collect the spectrum. Spectroscopic analysis of TCM has the advantages of high efficiency, speed, and non-destructive properties. Based on near-infrared spectroscopy, not only can the identification of TCM formula granules be achieved, but also the rapid determination of indicator components can be realized, enabling effective control and evaluation of the quality of TCM materials.
[0070] The traditional Chinese medicine (TCM) detection system of this invention may further include an electronic nose for detecting the odor data of the TCM to be detected. This odor data is used to analyze the types of medicinal materials contained in the TCM to be detected. The electronic nose is an electronic system that uses the response patterns of a gas sensor array to identify odors. The electronic nose mainly consists of three parts: a gas-sensitive sensor array, signal preprocessing, and pattern recognition. When an odor is presented to a sensor of an active material, the sensor converts the chemical input into an electrical signal. The responses of multiple sensors to an odor constitute the response spectrum of the sensor array to that odor. Obviously, various chemical components in the odor will interact with the sensitive material, so this response spectrum is a broad-spectrum response spectrum for that odor. The electronic nose utilizes the characteristic that each gas-sensitive device responds to complex but distinct gas components, and uses data processing methods to identify multiple odors, thereby analyzing and evaluating the odor quality. For example, gas one may produce a high response on one sensor but a low response on others; similarly, a sensor that produces a high response to gas two may be insensitive to gas one. Ultimately, the response patterns of the entire sensor array to different gases are different, and it is this difference that enables the system to identify gases based on the sensor response patterns.
[0071] By utilizing the different aromas of various Chinese medicinal herbs and the varying volatile concentrations resulting from different weights of herbs, an appropriate array of gas-sensitive sensors for an electronic nose can be designed based on the herbs that should be included in the formula of the Chinese medicine to be tested and their respective weights. This allows the electronic nose to analyze and detect the herbs contained in the Chinese medicine to be tested and their content.
[0072] The traditional Chinese medicine (TCM) detection system acquires spectral data of the TCM to be tested using a spectrometer and odor data using an electronic nose. Then, the analysis module 102 analyzes the spectral and odor data to determine the medicinal materials contained in the TCM and their content. The detection module 103 provides the TCM detection results based on the analyzed medicinal materials and their weights. Therefore, the TCM detection model can also include spectral and odor data of various TCM materials and their corresponding characteristics, used by the TCM detection system to analyze the spectral and / or odor data to determine the medicinal materials contained in the TCM and their weights. The spectral data can be spectral data under infrared, ultraviolet, or ultrasonic light sources.
[0073] In this invention, the traditional Chinese medicine (TCM) testing system can also analyze and test the grade of each medicinal material in the TCM to be tested, and directly add the grade of the medicinal material to the TCM testing results, or give the TCM testing results based on the grade of the medicinal material. For example: the medicinal material Rehmannia glutinosa is the dried tuberous root of Rehmannia glutinosa, a plant of the Scrophulariaceae family. Specifications and standards:
[0074] Grade 1: Dried goods. Spindle-shaped or strip-shaped round roots. Grayish-white or grayish-brown surface. Dark brown or yellowish-brown cross-section, oily. No more than 16 pieces per kilogram. Free from rootlets, old mother roots, raw cores, scorched or withered parts, impurities, insect damage, and mold.
[0075] Grade 2: Dried goods. Spindle-shaped or strip-shaped round roots. Surface grayish-white or grayish-brown. Cross-section dark brown or yellowish-brown, oily. No more than 32 pieces per kilogram. Free from rhizomes, old mother roots, raw cores, scorched or withered parts, impurities, insect damage, and mold.
[0076] Grade 3: Dried goods. Spindle-shaped or strip-shaped round roots. Grayish-white or grayish-brown surface. Dark brown or yellowish-brown cross-section, oily. Less than 60 pieces per kilogram. Free from rootlets, old mother roots, raw cores, scorched or withered parts, impurities, insect damage, and mold.
[0077] Grade 4: Dried goods. Spindle-shaped or strip-shaped round roots. Grayish-white or grayish-brown surface. Dark brown or yellowish-brown cross-section, oily. Less than 100 pieces per kilogram. Free from rootlets, old mother roots, raw cores, scorched, insect-damaged, and moldy parts.
[0078] Grade 5: Dried goods. Spindle-shaped or strip-shaped round roots. Surface grayish-white or grayish-brown. Cross-section dark brown or yellowish-brown, oily, but with less oil and thinner branch roots. More than 100 roots per kilogram, with the smallest diameter exceeding 1 cm. Free from rhizomes, old mother roots, raw cores, scorched or withered parts, impurities, insect damage, and mold.
[0079] The grade of medicinal materials can be directly included as part of the test results, such as: Chinese medicine includes medicinal material A, the grade of medicinal material A, the weight of medicinal material A, medicinal material B, the grade of medicinal material B, the weight of medicinal material B, etc.
[0080] Alternatively, the result of the Chinese medicine test can be given as qualified or unqualified based on the grade of the medicinal material. For example, if the Rehmannia glutinosa detected in the Chinese medicine to be tested is grade 2, but the prescription of the Chinese medicine to be tested contains Rehmannia glutinosa with a grade requirement of grade 1, then the test result is unqualified because the actual grade of the Rehmannia glutinosa does not meet the Chinese medicine standard.
[0081] In this invention, in order to analyze and detect the grade of Chinese medicinal materials, the Chinese medicinal material detection model may also include grading standards for various Chinese medicinal materials and images and corresponding characteristics of different grades of medicinal materials. After analyzing the various Chinese medicinal materials contained in the Chinese medicinal materials to be detected, the Chinese medicinal material detection system further analyzes the grade of the various Chinese medicinal materials contained in the Chinese medicinal materials to be detected based on one or more of the image data, spectral data, and odor data of the Chinese medicinal materials.
[0082] Grading tests can include whether the color, size, and shape meet the standards for each grade. They can also be conducted by examining the characteristic odors and various spectral features of different grades to determine the grade of Chinese medicinal materials.
[0083] The growth of Chinese medicinal herbs is closely related to their living environment. my country has a vast territory with complex terrain and diverse climates, and each medicinal herb has its own specific suitable growing environment. Medicinal herbs produced in specific regions possess unique medicinal effects. Different regions' terrain, soil, and climate conditions create different authentic medicinal herbs. Authentic medicinal herbs are high-quality, genuine medicinal herbs from specific producing areas, such as ginseng from Changbai Mountain in Northeast China, wolfberry from Ningxia, coptis from Sichuan, and gastrodia from Guizhou.
[0084] The traditional Chinese medicine (TCM) detection system of this invention can also analyze and detect the origin of TCM herbs. Different origins of herbs can lead to differences in their image characteristics, including size, shape, and color. Different origins can also result in differences in their spectral and odor data characteristics. Therefore, the TCM detection model can include images, spectral data, odor data, and their corresponding characteristics of TCM herbs from various origins. After analyzing the various TCM herbs contained in the TCM to be tested, the system further analyzes one or more of the image, spectral, and odor data to determine the origin of each herb. The origin of the herbs can be directly added to the TCM detection results, or the results can be given based on the origin of the herbs. For example, if the actual detected origin of the herbs differs from the origin of the herbs in the formula, the TCM detection result is unqualified.
[0085] The traditional Chinese medicine testing system of the present invention may further include a weighing device. The weighing device can be used to weigh the traditional Chinese medicine to be tested.
[0086] The traditional Chinese medicine (TCM) detection system of this invention can also obtain the weight of some medicinal materials that are difficult to analyze and identify by image recognition, spectral recognition, odor recognition, etc., by weighing them separately. In the process of TCM preparation and verification, the remaining medicinal materials are first mixed together, and then the TCM detection system of this invention is used to check that the types and contents of the remaining medicinal materials are qualified. Next, the types and weights of the separately weighed medicinal materials are checked to see if they conform to the TCM formula. After passing the tests, the separately weighed medicinal materials are then mixed together with the other mixed medicinal materials.
[0087] The traditional Chinese medicine (TCM) testing system of this invention performs multi-faceted testing on prepared TCM through image recognition, spectral analysis, odor analysis, etc., to quantitatively analyze the components, medicinal materials, and content of TCM, providing comprehensive test results. This system enables quality control of the prepared TCM, ensuring its quality and therapeutic efficacy, and enhancing the persuasiveness and credibility of TCM.
[0088] In this invention, the traditional Chinese medicine testing system can be used as a standalone unit, or it can be used by users via external hardware such as a mobile hard drive, box, or card. It can also be installed on a local server to support local users, installed on a private cloud server to support private cloud users, or installed on the Internet to provide services to Internet users.
[0089] The second embodiment of the present invention is shown in Figure 2. Figure 2 is a flowchart of the traditional Chinese medicine detection method of the present invention. As shown in the figure, the method of using the traditional Chinese medicine detection system of the present invention includes:
[0090] Step 1: Spread the Chinese medicine to be tested evenly;
[0091] Step 2: Acquire images of the Chinese medicinal herbs;
[0092] Step 3: Perform image recognition on the Chinese medicine image, analyze the various Chinese medicines contained in the image, and extract the images of different Chinese medicines from the image;
[0093] Step 4: Analyze the weight of each Chinese herb based on its image;
[0094] Step 5: Based on the types of Chinese herbs contained in the analyzed Chinese herbal prescription and the weight of each herb, provide the results of the Chinese herbal medicine test.
[0095] The method of using the traditional Chinese medicine detection system of the present invention may further include establishing a traditional Chinese medicine detection model and optimizing the model.
[0096] The method of using the traditional Chinese medicine detection system of the present invention may further include acquiring spectral data and / or odor data of the traditional Chinese medicine to be tested, analyzing the medicinal materials and their contents in the traditional Chinese medicine to be tested through the spectral data, analyzing the types of medicinal materials in the traditional Chinese medicine to be tested through the odor, or even utilizing the characteristic that different weights of medicinal materials result in different odor concentrations to analyze the content of each medicinal material in the traditional Chinese medicine to be tested through the odor, and then providing the detection result of the traditional Chinese medicine based on the above-analyzed medicinal materials and their weights.
[0097] The method of using the traditional Chinese medicine detection system of the present invention may further include analyzing and detecting the grade and / or origin of each medicinal material in the traditional Chinese medicine to be tested, and directly adding the grade and / or origin of the medicinal materials to the traditional Chinese medicine detection results or giving the traditional Chinese medicine detection results based on the grade and / or origin of the medicinal materials.
[0098] This invention can be applied not only to the analysis of the types and weights of mixed medicinal materials contained in traditional Chinese medicine prescriptions, but also to the identification of the types and / or weight detection of single medicinal materials.
[0099] This invention can also be applied to the analysis of the types and weights of other mixed items, including fruits, vegetables, meat, fish, meat products, bread, pastries, candy, grains, minerals, building materials, etc. As long as the projected area and volume of the mixed items can be correlated, and the density of the items can be measured, or the correlation between projected area and weight can be directly established, this invention can be used to detect the types and weights of the mixed items.
[0100] For example, to analyze the weight or ratio of various grains in a mixed grain mixture including millet, mung beans, and corn, this system can be used for measurement. First, the external characteristics of each item to be tested are analyzed in the model, including color, shape, gloss, size, and pattern. Then, based on the shape of different items, the volume conversion relationship corresponding to the projected area of the item is analyzed, and the density of the item is obtained. After the model is established, the mixture to be tested is passed through the worktable of this invention and appropriately unfolded. Then, an image of the mixture is acquired, and the model is used to process the image of the mixture to analyze its composition and the weight of each item.
[0101] The method of using the traditional Chinese medicine detection system of the present invention corresponds one-to-one with the technical features of the traditional Chinese medicine detection system of the present invention. Please refer to the description of the aforementioned traditional Chinese medicine detection system, which will not be repeated here.
[0102] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method of using the traditional Chinese medicine detection system as described above.
[0103] In summary, the present invention provides a traditional Chinese medicine (TCM) detection system and method, and a computer-readable storage medium. The system includes a workbench, an image acquisition module, an analysis module, and a detection module. The method includes: flattening the TCM to be tested; acquiring an image of the TCM; performing image recognition on the TCM image to analyze the various TCMs contained in the image and extracting images of different TCMs from the image; analyzing the weight of each TCM based on the images; and providing TCM detection results based on the analyzed types of TCMs contained in the TCM prescription and the weight of each TCM. The present invention provides a TCM detection system and method, and a computer-readable storage medium, which, through image recognition and other detection methods, quantitatively analyzes the types and contents of TCM slices in a prepared TCM prescription, providing comprehensive detection results. This allows for the verification of prepared TCM prescriptions, improving the accuracy, safety, and effectiveness of TCM prescriptions used by patients.
[0104] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A traditional Chinese medicine detection system, characterized in that, The system includes: a workbench, an image acquisition module, an analysis module, and a detection module. The workbench is used to hold the Chinese medicine to be tested. The workbench includes a leveling device for leveling the Chinese medicine to be tested on the workbench. The image acquisition module is used to acquire images of the Chinese medicine on the workbench; The analysis module is used to analyze images of traditional Chinese medicine, and the analysis module includes: a medicinal material identification unit and a weight analysis unit; The medicinal material identification unit is used to perform image recognition on Chinese medicine images, analyze the various Chinese medicines contained in the Chinese medicine images, and extract images of various different Chinese medicines from the Chinese medicine images; The weight analysis unit is used to analyze the weight of various Chinese medicines based on their images. The detection module is used to provide the detection results of traditional Chinese medicine based on the types of Chinese medicine contained in the analyzed prescription and the weight of each Chinese medicine.
2. The traditional Chinese medicine detection system according to claim 1, characterized in that, The traditional Chinese medicine detection system also includes a model module, which stores traditional Chinese medicine detection models. These models are used to identify traditional Chinese medicines and analyze their weight, including image features corresponding to various traditional Chinese medicines, as well as the correspondence between the volume and weight of traditional Chinese medicines and / or the correspondence between the area and weight of traditional Chinese medicines.
3. The traditional Chinese medicine detection system according to claim 1, characterized in that: The image acquisition module acquires images of the Chinese medicine on the workbench by capturing images of the flattened Chinese medicine from both the top and bottom surfaces. The image acquisition module includes one or more image acquisition devices.
4. The traditional Chinese medicine detection system according to claim 1, characterized in that: The traditional Chinese medicine testing system also includes a transmission belt. The transmission belt passes over a workbench, flattens the traditional Chinese medicine to be tested on the transmission belt, and carries the flattened traditional Chinese medicine forward. When it passes over the workbench, the image acquisition module acquires an image of the flattened traditional Chinese medicine.
5. The traditional Chinese medicine detection system according to claim 1, characterized in that, The weight analysis unit analyzes the weight of Chinese medicine by: analyzing the size and shape of the Chinese medicine in the image to determine its volume or surface area, and then determining the weight of the Chinese medicine based on the correspondence between the volume and weight of the Chinese medicine or the correspondence between the area and weight of the Chinese medicine.
6. The traditional Chinese medicine detection system according to claim 1, characterized in that, The traditional Chinese medicine detection system also includes an electronic nose for detecting the odor data of the traditional Chinese medicine to be tested. The odor data is used to analyze the traditional Chinese medicine contained in the prescription to be tested.
7. A traditional Chinese medicine detection system according to claim 2, characterized in that, The Chinese medicine detection model also includes grading standards for various Chinese medicinal materials and images and corresponding characteristics of different grades of medicinal materials. After analyzing the various Chinese medicinal materials contained in the Chinese medicine to be detected, the Chinese medicine detection system further analyzes the origin, grade, processing method and other information of the various Chinese medicinal materials contained in the Chinese medicine to be detected based on one or more of the image data, spectral data and odor data of the Chinese medicine.
8. A detection system according to claims 1 and 2, characterized in that, The detection method can also be used to analyze the composition of mixtures of other items that can establish an image-weight correspondence, as well as the weight of each component item, including fruits, vegetables, meat, fish, meat products, pasta, candy, grains, minerals, and building materials.
9. A method of using the traditional Chinese medicine detection system as described in any one of claims 1-8, characterized in that, The method includes: Step 1: Spread the Chinese medicine to be tested out evenly; Step 2: Acquire images of the Chinese medicinal herbs; Step 3: Perform image recognition on the Chinese herbal medicine images, analyze the various Chinese herbal medicines contained in the images, and extract the images of different Chinese herbal medicines from the images; Step 4: Analyze the weight of each Chinese herb based on its image; Step 5: Based on the types of Chinese herbs contained in the analyzed Chinese herbal prescriptions and the weight of each herb, provide the results of the Chinese herbal medicine testing.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method of using the traditional Chinese medicine detection system as described in claim 9.
Citation Information
Patent Citations
Medication verification and dispensing
CN103025301A
Automatic detection system for traditional-Chinese-medicine quality
CN105973858A
Intelligent medicine rechecking machine based on fusion of computer vision and sensor
CN115063821A
Traditional Chinese medicine decoction piece image recognition method and recognition system based on convolutional neural network
CN115661580A
Food weight measuring system and method based on single photographing of smart phone
CN115808229A