Method and device for determining color scheme of traditional chinese medicine placebo, and placebo preparation method
The color matching prediction scheme trained by the four-color system and clustering model solves the problems of low efficiency and insufficient accuracy in color matching of traditional Chinese medicine placebos, and achieves precise adjustment of the color similarity between traditional Chinese medicine placebos and drugs, thus meeting the needs of clinical trials.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAIHE LAB OF MODERN CHINESE MEDICINE
- Filing Date
- 2024-06-05
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies suffer from low efficiency and insufficient accuracy in color matching for placebos of traditional Chinese medicine, making it difficult to meet the requirements of clinical trials of traditional Chinese medicine.
A color scheme is constructed using a four-color system. Combining a traditional Chinese medicine color clustering model and a color prediction model, clusters are divided using a training sample set and corresponding color prediction models are trained. The brightness and darkness are adjusted using the three primary colors of red, yellow, and blue plus a background color to achieve precise adjustment.
It improves the accuracy and efficiency of placebo color matching, ensures that the color similarity between placebo and traditional Chinese medicine preparations meets the requirements of clinical trials, and has broad applicability and scalability.
Smart Images

Figure CN118864626B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of traditional Chinese medicine, and in particular to the determination of color matching schemes for placebos and the preparation of placebos. Background Technology
[0002] The statements in this section are merely to provide background information related to the technical solutions of this application to aid understanding, and do not necessarily constitute prior art for the technical solutions of this application.
[0003] A placebo is a simulant formulation of the investigational drug that looks and tastes similar to the real drug but does not contain the active pharmaceutical ingredient and has no toxic side effects. It is typically used as a control group or control condition in medical research to compare the efficacy of the investigational formulation. In double-blind clinical trials, the placebo's mimicry effect determines the possibility of unblinding, thus affecting the overall quality of the clinical trial and the objectivity and accuracy of the efficacy evaluation.
[0004] With the rapid development of new traditional Chinese medicine (TCM) drugs and the huge incremental demand for them in clinical practice, standardized clinical trials are increasingly needed to evaluate the efficacy of TCM. In clinical trials of new TCM drugs, placebos are used in controlled trials to reflect the independent, real-world efficacy of the drugs and to help assess their safety. Therefore, placebos play a crucial role in clinical trials of new TCM drugs; their similarity directly affects the effectiveness and reliability of the clinical trial protocol and is a key factor in ensuring the smooth progress of clinical trials.
[0005] Visual perception is the primary sensory basis for subjects to evaluate drugs and placebos. Traditional Chinese medicine (TCM) preparations can be in solid or liquid form, but are typically made from TCM powder, with colors primarily derived from the natural pigments of the herbs themselves. For ease of description, the TCM preparations described below will be in powder form; however, this is merely illustrative and not intended as a limitation. In clinical trials, the color similarity between the TCM preparation and the placebo is a primary characteristic for determining unblinding. Subjects' visual perception of the drug and placebo directly influences their subjective evaluation of treatment efficacy. Improving the color similarity between the TCM placebo and its corresponding drug helps maintain the blinding process, thereby reducing the influence of subjective factors on the results. This requires accurately determining the color scheme of the corresponding TCM placebo for the target TCM preparation to be used in the clinical trial, ensuring color similarity during preparation.
[0006] Currently, the preparation of traditional Chinese medicine placebos typically relies on experienced personnel for rough color estimation. This is followed by multiple color trials, comparisons, and corrections to gradually approximate the expected standard color, ultimately determining the placebo's color scheme. However, due to differences in individual perception and judgment, subjective evaluations vary significantly between individuals, posing a risk of bias and error. During preparation, manufacturers may need to experiment with different formulations and proportions multiple times, comparing the prepared samples with the expected standard color and making adjustments based on the comparison results. This iterative trial-and-error process consumes considerable time and resources and may still contain unavoidable errors and biases. To address this, researchers have attempted to use computer color matching technology to simulate the color of traditional Chinese medicine placebos, minimizing the interference of subjective human factors. This has shortened the color matching cycle and improved efficiency to some extent, but the accuracy still needs improvement. Summary of the Invention
[0007] With the rapid development of big data and artificial intelligence technologies, the inventors also attempted to improve color matching accuracy using a color matching prediction model trained on a large-scale training dataset. The input to this color matching prediction model is the color information of the target traditional Chinese medicine preparation, and the output is the color scheme of a placebo corresponding to the target traditional Chinese medicine preparation. This color scheme may include, for example, the color components that make up the placebo and their proportions. Such a color matching prediction model can be trained on a large number of placebo samples. Each placebo sample may include the placebo's color information and its color components and their proportions. During training, the placebo's color information in each sample is provided as input to the color matching prediction model, while the color components and their proportions in each sample are used as sample labels to compare with the output of the color matching prediction model, calculate the corresponding loss function, and adjust the relevant parameters of the color matching prediction model.
[0008] However, after numerous experiments and tests, the inventors discovered that this method of directly using machine learning models to predict the color scheme of traditional Chinese medicine placebos is similar in effect to the method mentioned above that uses computer color matching technology to simulate the color of traditional Chinese medicine placebos. Although it shortens the color matching cycle and improves the color matching efficiency to some extent, the color matching accuracy has not been truly improved. Therefore, the color difference between the placebo prepared using such predicted color matching schemes and its corresponding drugs is still difficult to meet the requirements of clinical trials, thus lacking practicality and promotional value.
[0009] The purpose of this application is to provide a new solution for rapidly and accurately determining the placebo color scheme for a target traditional Chinese medicine preparation, which can not only improve color matching efficiency but also improve color matching accuracy.
[0010] The inventors discovered through research and practice that existing computer color matching schemes often only use the three primary colors of red, yellow, and blue. All other colors can be mixed by blending these three primary colors in certain proportions. However, the color matching of traditional Chinese medicine (TCM) has its own unique characteristics. The colors of most TCM preparations are brownish-red, and the visual differences between different TCM preparations are mostly subtle variations in the shade of brown. The existing three-primary-color scheme is insufficient to meet the needs of fine-tuning TCM color matching. Therefore, in the embodiments of this application, a four-color system is used to construct the color matching scheme. A background color for adjusting brightness and darkness is added to the three primary colors of red, yellow, and blue to achieve precise adjustment of color depth, thereby more accurately achieving the desired hue and color effect. This background color can be a specific color selected from the brown or tan color family.
[0011] According to a first aspect of the embodiments of this application, a method for determining a color scheme for a traditional Chinese medicine placebo is provided, comprising: extracting color information from an image of a target traditional Chinese medicine preparation; providing the extracted color information to a pre-trained color clustering model of traditional Chinese medicine to determine a cluster corresponding to the target traditional Chinese medicine preparation; selecting a color prediction model corresponding to the determined cluster from a plurality of pre-trained color prediction models; and providing the extracted color information to the selected color prediction model to determine a color scheme for a placebo corresponding to the target traditional Chinese medicine preparation.
[0012] As can be seen, unlike the previously mentioned method of using a single machine learning model for prediction, the solution in this application first uses a clustering model to divide the various colors of existing Chinese medicine preparations into multiple color clusters from light to dark, and then divides the placebo sample set into multiple sub-training sets based on the clustering model, thereby training the corresponding color prediction for each cluster separately. This not only improves the color matching efficiency, but also effectively improves the color matching accuracy.
[0013] In some embodiments, the method may further include: training a color prediction model corresponding to each cluster based on a training set containing multiple traditional Chinese medicine placebo samples for each cluster of a pre-trained traditional Chinese medicine color clustering model.
[0014] In some embodiments, each traditional Chinese medicine placebo sample may include color information and color scheme of the traditional Chinese medicine placebo, and the multiple color prediction models may be trained by the following steps: based on the color information of each traditional Chinese medicine placebo sample in the training set, a pre-trained traditional Chinese medicine color clustering model is used to determine the cluster corresponding to each traditional Chinese medicine placebo sample; a sub-training set of the cluster is constructed using all traditional Chinese medicine placebo samples corresponding to the same cluster; and a color prediction model corresponding to each cluster is trained based on the constructed sub-training sets of each cluster, wherein each color prediction model takes the color information of the traditional Chinese medicine placebo sample as input and outputs a color scheme prediction for the input traditional Chinese medicine placebo sample.
[0015] In some embodiments, the color prediction model corresponding to each cluster can be trained by the following steps: dividing the sub-training set corresponding to the cluster into a training dataset and a test set; training multiple color prediction models with different model structures using the same training dataset; evaluating the performance of the multiple trained color prediction models based on the test set, and selecting the color prediction model with the best performance as the color prediction model corresponding to the cluster.
[0016] In some embodiments, the color scheme of a placebo may include at least the color components that constitute the placebo and their proportions.
[0017] In some embodiments, the color scheme may include at least four color components, namely the three primary colors and a base color, wherein the base color is used to adjust the brightness.
[0018] In some embodiments, the color clustering model of traditional Chinese medicine can be a K-means clustering model, which can be trained through the following steps: acquiring images of various existing traditional Chinese medicine preparations and extracting color information; constructing a clustering sample set based on the extracted color information of the traditional Chinese medicine preparations; using the K-means algorithm to cluster the clustering sample set for each of a preset number of clusters; and calculating the silhouette coefficient of each clustering result corresponding to each number of clusters, and using the K-means model corresponding to the clustering result with the largest silhouette coefficient as the traditional Chinese medicine color clustering model.
[0019] In some embodiments, the step of training the color clustering model of traditional Chinese medicine may further include: acquiring images of various newly produced traditional Chinese medicine preparations and extracting color information; updating the clustering sample set using the extracted color information of various newly produced traditional Chinese medicine preparations; and retraining the color clustering model of traditional Chinese medicine in response to the update of the clustering sample set. In this way, as the sample set of traditional Chinese medicine preparations is continuously updated, the trained color clustering model of traditional Chinese medicine can be continuously expanded to cover a wider range of color data, making the solution of this application more scalable and adaptable.
[0020] According to a second aspect of the present application, a method for preparing a traditional Chinese medicine placebo is provided, comprising: acquiring an image of a target traditional Chinese medicine preparation; determining a color scheme for a placebo corresponding to the target traditional Chinese medicine preparation based on the acquired image using the method described in the first aspect of the present application; and preparing a placebo corresponding to the target traditional Chinese medicine preparation according to the determined color scheme.
[0021] According to a third aspect of the embodiments of this application, an apparatus for determining a color scheme for a placebo of traditional Chinese medicine is provided, comprising a color value extraction module, a model selection module, and a color matching module. The color value extraction module is used to extract color information from an image of a target traditional Chinese medicine preparation. The model selection module is used to provide the extracted color information to a pre-trained color clustering model of traditional Chinese medicine to determine the cluster corresponding to the target traditional Chinese medicine preparation, and to select a color prediction model corresponding to the determined cluster from a plurality of pre-trained color prediction models. The color matching module is used to provide the extracted color information to the selected color prediction model to determine the color scheme of a placebo corresponding to the target traditional Chinese medicine preparation.
[0022] According to a fourth aspect of the present application, a computer-readable medium is provided that stores computer instructions thereon, which, when executed by a processor, implement the steps of the method described according to a first aspect of the present application.
[0023] According to a fifth aspect of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described according to a first aspect of the present application.
[0024] According to a sixth aspect of the present application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the method described according to a first aspect of the present application.
[0025] The technical solutions of this application embodiment may include the following beneficial effects:
[0026] First, a color clustering model for traditional Chinese medicine (TCM) preparations is trained using a sample set of TCM formulations. Then, a color prediction model is trained for each cluster of this TCM color clustering model using a placebo sample set. Finally, these two different types of models work together to predict the placebo color scheme. This not only improves color matching efficiency but also accuracy, meeting the needs for refined adjustment of TCM color matching. The placebo prepared according to the predicted color scheme has a color similarity to its corresponding drug that fully meets the requirements of TCM clinical trials, demonstrating high practicality and promotional value. Furthermore, the proposed solution is not limited to specific TCM categories; it has comprehensive and broad applicability to various existing TCM formulations and also exhibits good scalability, compatible with newly developed TCM products.
[0027] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0028] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0029] Figure 1 This is a flowchart illustrating a method for determining a color matching scheme for a traditional Chinese medicine placebo according to an embodiment of this application.
[0030] Figure 2 This is a schematic diagram of the structure of an apparatus for determining a color scheme for a placebo of traditional Chinese medicine according to an embodiment of this application.
[0031] Figures 3 to 8 This is a schematic diagram comparing the visual effects of various placebos prepared according to the embodiments of this application with their corresponding drugs. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description, in conjunction with the accompanying drawings and specific embodiments, further illustrates this application. It should be understood that the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0033] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0034] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0035] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0036] As mentioned above, during their research on predicting placebo color schemes for traditional Chinese medicine using machine learning methods, the inventors discovered that the accuracy of color schemes generated by color prediction models trained on large-scale placebo sample datasets needs improvement. Placebos prepared using such color schemes cannot meet the requirements of clinical trials for traditional Chinese medicine. The inventors found that the main reason affecting the prediction effect is the large color difference range from light to dark for various existing placebo colors for different traditional Chinese medicines, making it difficult to provide accurate color matching for placebos using a single machine learning model.
[0037] In response, the inventors provide a novel solution in this application for predicting the color scheme of a placebo from traditional Chinese medicine (TCM) using machine learning. This solution can quickly and accurately provide the placebo color scheme for a target TCM preparation. The solution employs two different types of training sample sets: one is a TCM preparation sample set constructed by collecting color information from various existing TCM preparations; the other is a placebo sample set composed of various placebo samples, where each placebo sample may include the placebo's color information and its color components and proportions. In the embodiments of this application, a TCM color clustering model is first trained based on the TCM preparation sample set. Then, this TCM color clustering model is used to determine the cluster to which each placebo sample in the placebo sample set belongs, thus constructing a sub-training set of all placebo samples belonging to the same cluster. Next, based on these sub-training sets, corresponding color prediction models are trained for each cluster of the TCM color clustering model. Finally, the TCM color clustering model and the corresponding color prediction models for each cluster work together to predict the placebo color scheme.
[0038] Unlike the previously mentioned method of using a single machine learning model for prediction, the solution in this application first uses a clustering model to divide the various colors of existing traditional Chinese medicine preparations into multiple color clusters from light to dark. Based on this clustering model, the placebo sample set is also divided into multiple sub-training sets, thereby training corresponding color predictions for each cluster separately. This not only improves color matching efficiency but also effectively improves color matching accuracy. Results from multiple experiments and tests conducted by the inventors show that the placebo prepared according to the color matching scheme provided in this application fully meets the requirements of traditional Chinese medicine clinical trials in terms of color similarity to its corresponding drug, thus possessing high practicality and promotional value.
[0039] Furthermore, as mentioned above, the colors of most traditional Chinese medicine (TCM) preparations are brownish-red, and the visual differences between different TCM preparations are mostly minor variations in the shades of brown. Existing three-primary-color schemes are insufficient to meet the needs of fine-tuning color matching in TCM. Therefore, this application employs a four-color system to construct color schemes. A background color for adjusting brightness is added to the three primary colors of red, yellow, and blue to achieve precise adjustment of color depth, thereby more accurately achieving the desired hue and color effect. This background color can be a specific color selected from the brown or tan color family. Unless otherwise stated, all color schemes below are constructed based on this four-color system.
[0040] The solution of this application will be described in more detail below with reference to the accompanying drawings and specific embodiments.
[0041] Figure 1A method for determining a color scheme for a placebo according to an embodiment of this application is illustrated. The method mainly includes: step S1, extracting color information from an image of a target traditional Chinese medicine preparation; step S2, providing the extracted color information to a pre-trained color clustering model for traditional Chinese medicine to determine the cluster corresponding to the target traditional Chinese medicine preparation; step S3, selecting a color prediction model corresponding to the determined cluster from a plurality of pre-trained color prediction models; and step S4, providing the extracted color information to the selected color prediction model to determine the color scheme for a placebo corresponding to the target traditional Chinese medicine preparation.
[0042] The target traditional Chinese medicine (TCM) preparation refers to any TCM preparation for which the placebo color scheme needs to be determined using the scheme of this application. In the embodiments of this application, TCM preparation refers to any form of TCM preparation, such as solid preparations like granules, capsules, and tablets, as well as liquid preparations like oral liquids. Different forms of TCM preparations are essentially made based on TCM powder, and their colors mainly originate from the natural pigments of the TCM itself. The placebo corresponding to the TCM preparation is usually composed of a base material and various pigments mixed in a certain proportion. The base material can typically be starch, lactose, dextrin, cornmeal, etc. The pigments are mostly edible natural pigments and / or synthetic pigments.
[0043] This application involves determining a placebo color scheme to simulate the color of a target traditional Chinese medicine (TCM) preparation. Therefore, the placebo color scheme can be understood as the various color components (i.e., the specific colors of the various pigments contained) used to constitute the final color of the placebo and their proportions in a unit weight (e.g., 10g, 100g, etc.) (simply referred to as percentage). For ease of explanation, the target TCM preparation and each sample in the TCM preparation sample set and placebo sample set are in powder form and have a uniform unit weight (e.g., 10g). It should be understood that the unit weight can be adjusted according to actual circumstances or needs. The unit weight of the placebo refers to the sum of the pigment weight of each color component and the base weight. The base weight is a preset fixed value; therefore, the sum of the pigment weights of each color component in a unit weight of placebo is also a fixed value. Accordingly, the predicted color scheme can give the percentage of each color component in a unit weight, or the percentage of each color component relative to the sum of the pigment weights of each color component (i.e., excluding the base weight). In another embodiment, the predicted color scheme may also be in the form of the proportion of each color component relative to the base material, that is, the ratio of the pigment weight of each color component to the preset weight of the base material.
[0044] In some embodiments of this application, the color scheme of the traditional Chinese medicine placebo includes four types of color components: red, yellow, blue, and a color used to adjust brightness (referred to herein as the base color). The red, yellow, and blue can be corresponding colors derived from edible natural pigments and / or synthetic pigments, such as amaranth, carmine, gardenia red, sunset yellow, lemon yellow, bright blue, indigo, etc. The color used to adjust brightness is actually used to simulate the basic hue of traditional Chinese medicine; it can be caramel color derived from pigments obtained through the caramelization reaction of sugars, or derived from malt pigments, cocoa pigments, coffee pigments, etc.
[0045] refer to Figure 1 In step S1, color information is extracted from the image of the target traditional Chinese medicine preparation. As mentioned above, although traditional Chinese medicine preparations can take the form of granules, capsules, tablets, oral liquids, etc., they are essentially made based on traditional Chinese medicine powder. Therefore, the following description will focus on powdered traditional Chinese medicine preparations. For example, if the target traditional Chinese medicine preparation is in solid form, to extract color information more accurately, before acquiring the image of the target traditional Chinese medicine preparation, it can be ground into powder using a mortar and pestle, and can also be passed through a pharmacopoeia sieve to make the powder finer and more uniform. Then, images of these target traditional Chinese medicine preparation powders can be acquired, and the corresponding color information can be extracted from the acquired images. In this way, the influence of particle non-uniformity on the simulation and prediction of the color matching process can be avoided.
[0046] For ease of description, the color information of the image in the embodiments of this application is illustrated using the RGB color model, where RGB represents red, green, and blue. These three colors of light can be combined to produce other colors. However, it should be understood that the color information of the image can also be represented by color models such as CMY (cyan, magenta, and yellow), CMYK (cyan, magenta, yellow, and black), XYZ (X represents the perceptual range from red to green, Y component represents brightness or lightness, and Z represents the perceptual range from blue to yellow), and this application does not impose any particular limitation on this.
[0047] Color information of the target traditional Chinese medicine preparation can be extracted from the acquired image in various ways. For example, the RGB color value of each pixel in the image can be calculated and averaged as the color information of the target traditional Chinese medicine preparation. Alternatively, a central region of a predetermined size can be cropped from the acquired image, and the RGB color value of each pixel in that central region can be calculated and averaged as the color information of the target traditional Chinese medicine preparation. Or, preferably, a pre-trained traditional Chinese medicine powder recognition model can be used to identify the region where the traditional Chinese medicine powder is located from the acquired image, crop that region, and use the average RGB color value of all pixels in that region as the color information of the target traditional Chinese medicine preparation.
[0048] Step S2 involves using the color information related to the target traditional Chinese medicine preparation extracted from the acquired image as input to a pre-trained traditional Chinese medicine color clustering model, which then identifies or determines the cluster corresponding to the target traditional Chinese medicine preparation.
[0049] The color clustering model for traditional Chinese medicine (TCM) preparations is pre-trained on a sample set of TCM preparations. This sample set is constructed by collecting images of various existing TCM preparations and extracting their corresponding color information. To extract color information more accurately, as described above in conjunction with step S1, the TCM preparations can be ground into powder before collecting images of each sample. The sample set of TCM preparations can include different types of TCM preparations or different models of the same type of TCM preparation. In the embodiments of this application, various existing clustering models can be used as the color clustering model for TCM preparations. The trained color clustering model can divide the various colors of existing TCM preparations into multiple color clusters from light to dark.
[0050] In some embodiments, a K-means clustering model is used as the color clustering model for traditional Chinese medicine (TCM) preparations. This differs from existing K-means clustering that performs clustering according to a predetermined number of clusters. In this embodiment, to more accurately represent the color distribution of existing TCM preparations, the range of cluster numbers (e.g., 2-11) or multiple preset cluster numbers (continuous or discontinuous) are first determined based on user settings or system configuration files. Each cluster number indicates the number of clusters to be generated in the clustering results. Next, for each cluster number within the range or each of the preset cluster numbers, the K-means algorithm is used to cluster the TCM preparation sample set. During the clustering process, optimization is performed by minimizing the sum of squared distances between each data point and its cluster center. Then, the K-means model that produces the best clustering effect is selected as the trained TCM color clustering model. For example, the silhouette coefficient of each clustering result is calculated. The silhouette coefficient measures the quality of the clustering result; a value closer to 1 indicates a better clustering result. After calculating the silhouette coefficients of all clustering results corresponding to each number of clusters, the number of clusters corresponding to the largest silhouette coefficient is determined as the optimal number of clusters. The clusters obtained by using the KMeans algorithm with this optimal number of clusters to cluster the traditional Chinese medicine preparation sample set are considered the best clustering results. The K-means model corresponding to the clustering result with the largest silhouette coefficient is used as the color clustering model for traditional Chinese medicine.
[0051] In some embodiments, considering the continuous emergence of new traditional Chinese medicine (TCM) drugs, the steps for training the TCM color clustering model may further include: acquiring images of various newly produced TCM preparations and extracting color information; updating the TCM preparation sample set using the extracted color information of the various newly produced TCM preparations; and retraining the TCM color clustering model in response to the update of the TCM preparation sample set. In this way, as the TCM preparation sample set is continuously updated, the trained TCM color clustering model can be continuously expanded to cover a wider range of color data, making the solution of this application more scalable and adaptable.
[0052] In some embodiments, after training the traditional Chinese medicine (TCM) color clustering model, for each cluster of the trained TCM color clustering model, a color prediction model corresponding to each cluster is trained based on a training set containing multiple TCM placebo samples (hereinafter referred to as the placebo sample set). Each TCM placebo sample includes the color information of the TCM placebo and its color scheme (i.e., the color components and their proportions). The color information of the TCM placebo is also in the form of RGB color values, and its extraction method is similar to the color information extraction method described above in conjunction with step S1. When acquiring images of each TCM placebo as a sample, the TCM placebo can be ground into powder first. Before starting to train the color prediction model, it is first necessary to determine the cluster corresponding to each TCM placebo sample based on the color information of each TCM placebo sample in the placebo sample set using the previously trained TCM color clustering model; and construct a sub-training set for that cluster using all TCM placebo samples corresponding to the same cluster. Therefore, the placebo sample set can be divided into multiple sub-training sets, the number of which is the same as the number of clusters in the Chinese herbal medicine color clustering model.
[0053] Next, color prediction models corresponding to each cluster are trained separately based on the sub-training sets of the constructed clusters. Each color prediction model takes the color information of the placebo sample as input and outputs a color scheme prediction for the input placebo sample. During training, the color components and proportions of the placebo in each sample are used as sample labels to compare with the output of the color prediction model, calculate the corresponding loss function, and adjust the relevant parameters of the color prediction model. In some embodiments, the color prediction model corresponding to each cluster can be trained through the following steps:
[0054] i) Divide the sub-training set corresponding to the cluster into a training dataset and a test set.
[0055] ii) Train multiple color prediction models with different model structures using the training dataset. The learning model used for color prediction may include at least two or more of the following combinations: linear regression model, random forest model, gradient boosting model, support vector regression model, ridge regression model, convolutional neural network, deep neural network, recurrent neural network, etc.
[0056] iii) Evaluate the performance of the trained color prediction models based on the test set, and select the best-performing color prediction model as the color prediction model corresponding to the cluster. The metrics used for model evaluation can be accuracy, recall, etc.
[0057] It should be understood that although the above description of the training process of the color clustering model for traditional Chinese medicine based on K-means clustering is for illustrative purposes only and not for limiting purposes. In other embodiments, step S2 can also employ unsupervised clustering models such as principal component analysis, hierarchical clustering, expectation-maximization clustering, and density-based spatial clustering of applications with noise (DBSCAN), or supervised clustering models such as spectral clustering, constrained clustering, and ensemble clustering. In some embodiments, a combination of unsupervised and supervised clustering can also be used. For example, in actual production, some traditional Chinese medicine preparations may not be classified or assigned to clusters obtained through unsupervised clustering models (i.e., they do not conform to the original clustering rules). In such cases, supervised clustering can be used to classify them into the correct clusters.
[0058] Now back Figure 1 After step S2, which uses a color clustering model to determine the cluster corresponding to the target traditional Chinese medicine preparation, in step S3, a color prediction model corresponding to the determined cluster is selected from the pre-trained color prediction models described above. Then, in step S4, the color information of the target traditional Chinese medicine preparation is provided to the selected color prediction model, thus obtaining the color scheme for the placebo corresponding to the target traditional Chinese medicine preparation.
[0059] In the above embodiment, a clustering model is first used to divide the various colors of existing traditional Chinese medicine preparations into multiple color clusters from light to dark. Based on this clustering model, the placebo sample set is also divided into multiple sub-training sets. Corresponding color predictions are then trained for each cluster. This not only improves color matching efficiency but also effectively enhances color matching accuracy, meeting the needs for refined adjustment of traditional Chinese medicine color matching. Furthermore, the method in the above embodiment is not limited to a specific type of traditional Chinese medicine but can be applied to any type of traditional Chinese medicine preparation. As new traditional Chinese medicine products continuously emerge, the model's coverage can be continuously expanded by updating the sample set and retraining the clustering model.
[0060] In another embodiment of this application, an electronic device is also provided, including a processor and a memory, wherein the memory is used to store executable instructions that can be executed by the processor, wherein the processor is configured to execute the executable instructions stored in the memory, and the executable instructions, when executed, implement the technical solutions described in any of the foregoing embodiments, which will not be repeated here.
[0061] Figure 2 A schematic diagram of a device for determining the color scheme of a placebo according to an embodiment of this application is provided. The device 200 mainly includes a color value extraction module 201, a model selection module 202, and a color matching module 203. The color value extraction module 201 is used to extract color information from an image of the target traditional Chinese medicine preparation; details can be found above in conjunction with step S1. The model selection module is used to provide the extracted color information to a pre-trained traditional Chinese medicine color clustering model to determine the cluster corresponding to the target traditional Chinese medicine preparation, and to select a color prediction model corresponding to the determined cluster from multiple pre-trained color prediction models (details can be found above in conjunction with steps S2 and S3, and will not be repeated here). The color matching module 203 is used to provide the extracted color information to the selected color prediction model to determine the color scheme of the placebo corresponding to the target traditional Chinese medicine preparation. The device 200 may also include an input and output module (not shown) for receiving an image of the target traditional Chinese medicine preparation and outputting the color scheme of the placebo.
[0062] In some embodiments, the device 200 may further include an image sensor for acquiring images of the target traditional Chinese medicine preparation. In still other embodiments, the device 200 may further include a model training module, which, in conjunction with the above... Figure 1The training method described herein trains a color clustering model for traditional Chinese medicine (TCM) and a color prediction model corresponding to each cluster. In some embodiments, the model training module can also retrain the TCM color clustering model in response to updates to the TCM preparation sample set. In still other embodiments, the model training module may be located on an external computing device communicatively coupled to the device 200, which, after completing model training, provides the trained TCM color clustering model and the color prediction model corresponding to each cluster to the device 200.
[0063] It should be understood that, although Figure 2 The structure of device 200 is described in terms of functionally separate modules, but this description is for illustrative purposes only. The modules shown in the figure can be arbitrarily combined or divided into independent software, firmware, and / or hardware devices. Moreover, regardless of how such modules are combined or divided, they can run on the same host or multiple hosts, which may be connected by one or more networks.
[0064] In some further embodiments of this application, a method for preparing a traditional Chinese medicine placebo is also provided. This method mainly includes acquiring images of the target traditional Chinese medicine preparation; based on the acquired images, using the methods described above... Figure 1 The methods or Figure 2 The device described determines the color scheme of a placebo corresponding to the target traditional Chinese medicine preparation; then, a placebo corresponding to the target traditional Chinese medicine preparation is prepared based on the determined color scheme.
[0065] The inventors' numerous experiments and tests have shown that the placebo prepared according to the color matching scheme provided in this application fully meets the requirements of clinical trials of traditional Chinese medicine in terms of color similarity to its corresponding drug, thus possessing high practicality and promotional value. Some experimental examples and their results are provided below for reference.
[0066] In the following trials, the color schemes for the placebos are illustrated using caramel, lemon yellow, gardenia red, and brilliant blue as examples. The placebo base is a mixture of lactose and dextrin in a 4:1 mass ratio, and 20g was used in each of the following trials.
[0067] Experiment 1
[0068] Take the herbal granules to be predicted (No. 1), grind one bag of granules (no less than 10g) into powder using a mortar and pestle, and pass it through a No. 5 pharmacopoeia sieve. Place the sample powder of the herbal granules in a round, lidded container, place it under a scanning camera to capture an image, extract the RGB color information of the herbal granules from the image, and provide it to a pre-trained herbal color clustering model. The herbal color clustering model determines the cluster with the most similar color to No. 1 granules. Then, automatically substitute the RGB color information of the herbal granules into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 1.
[0069] Table 1. Prediction results of placebo color matching for particle #1
[0070]
[0071] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 3 The diagram illustrates a visual color contrast between the prepared particle No. 1 placebo and its corresponding drug. Figure 3 The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ① were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The ΔE between particle ① and its placebo is 2.0000, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0072] Table 2. Color data of particle #1 and its placebo
[0073]
[0074] Experiment 2
[0075] Take the granules of herbal medicine No. 2 to be predicted, take one bag of granules (no less than 10g), grind them into powder using a mortar and pestle, and pass them through a No. 5 pharmacopoeia sieve. Place the sample powder of the herbal medicine granules in a round, lidded container, place it under a scanning camera to take a picture, extract the RGB color information of the herbal medicine granules from the image, and provide it to a pre-trained herbal medicine color clustering model. The herbal medicine color clustering model determines the cluster with the most similar color to granules No. 2. Then, automatically substitute the RGB color information of the herbal medicine granules into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 3.
[0076] Table 3.2 Placebo Color Matching Prediction Results
[0077]
[0078] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 4 The diagram illustrates a visual color contrast between the prepared particle No. 2 placebo and its corresponding drug. Figure 4 The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ② were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The color difference value ΔE between particle ② and its placebo is 3.6056, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0079] Table 4. Color data of particle No. 2 and its placebo
[0080]
[0081] Experiment 3
[0082] Take the herbal granules (No. 3) to be predicted, and grind one bag of granules (no less than 10g) into powder using a mortar and pestle, then pass it through a No. 5 pharmacopoeia sieve. Place the sample powder of the herbal granules in a round, lidded container, and place it under a scanning camera to capture an image. Extract the RGB color information of the herbal granules from the image and provide it to a pre-trained herbal color clustering model. The herbal color clustering model determines the cluster with the most similar color to No. 3 granules. Then, automatically substitute the RGB color information of the herbal granules into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 5.
[0083] Table 5. Prediction results of placebo color matching for particle No. 3
[0084]
[0085] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 5 The diagram illustrates a visual color contrast between the prepared particle No. 3 placebo and its corresponding drug. Figure 5The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ③ were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The color difference value ΔE between particle ③ and its placebo is 1.6984, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0086] Table 6. Color data of particle number ③ and its placebo
[0087]
[0088] Experiment 4
[0089] Take the granules of herbal medicine No. 4 to be predicted, take one bag of granules (no less than 10g), grind them into powder using a mortar and pestle, and pass them through a No. 5 pharmacopoeia sieve. Place the sample powder of the herbal medicine granules in a round, lidded container, place it under a scanning camera to take a picture, extract the RGB color information of the herbal medicine granules from the image, and provide it to a pre-trained herbal medicine color clustering model. The herbal medicine color clustering model determines the cluster with the most similar color to granules No. 4. Then, automatically substitute the RGB color information of the herbal medicine granules into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 7.
[0090] Table 7.4 Placebo Color Matching Prediction Results
[0091]
[0092] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 6 The diagram illustrates a visual color contrast between the prepared particle No. 4 placebo and its corresponding drug. Figure 6 The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ④ were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The color difference value ΔE between particle ④ and its placebo is 3.6056, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0093] Table 8.4 Color Data of Particle No. 4 and its Placebo
[0094]
[0095]
[0096] Experiment 5
[0097] Take the granules of herbal medicine No. 5 to be predicted, take one bag of granules (no less than 10g), grind them into powder using a mortar and pestle, and pass them through a No. 5 pharmacopoeia sieve. Place the sample powder of the herbal medicine granules in a round, lidded container, place it under a scanning camera to take a picture, extract the RGB color information of the herbal medicine granules from the image, and provide it to a pre-trained herbal medicine color clustering model. The herbal medicine color clustering model determines the cluster with the most similar color to granules No. 5. Then, automatically substitute the RGB color information of the herbal medicine granules into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 9.
[0098] Table 9.5 Placebo Color Matching Prediction Results
[0099]
[0100] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 7 The diagram illustrates a visual color contrast between the prepared particle No. 5 placebo and its corresponding drug. Figure 7 The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ⑤ were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The color difference value ΔE between particle ⑤ and its placebo is 3.0000, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0101] Table 105: Color Data of Particle No. 5 and its Placebo
[0102]
[0103] Experiment 6
[0104] Take the granule to be predicted (No. 6), take one bag of granules (no less than 10g), grind it into powder using a mortar and pestle, and pass it through a No. 5 pharmacopoeia sieve. Place the sample powder of the granule in a round, lidded container, place it under a scanning camera to capture an image, extract the RGB color information of the granule from the image, and provide it to a pre-trained granule color clustering model. The granule color clustering model determines the cluster with the most similar color to No. 6. Then, automatically substitute the RGB color information of the granule into the pre-trained color prediction model of the cluster to obtain the prediction result of the corresponding placebo color scheme. The specific addition amount of each color component and its proportion in the placebo color scheme output by the color prediction model is shown in Table 11.
[0105] Table 11⑥ Placebo Color Prediction Results
[0106]
[0107] Placebo granules were prepared using the pigments and base materials according to the data in Table 1. Figure 8 The diagram illustrates a visual color contrast between the prepared particle #6 placebo and its corresponding drug. Figure 8 The two are very similar. To evaluate the color simulation effect of the placebo, images of the prepared placebo were further acquired, and RGB color information was extracted from them. Simultaneously, the RGB color information of the placebo and its corresponding particle ⑥ were converted to Lab colors, and the color difference value ΔE was calculated, as shown in Table 2. The color difference value ΔE between particle ⑥ and its placebo is 2.4495, proving that the color difference between the two is small and the simulation effect is highly accurate.
[0108] Table 126 Color Data of Particle and Placebo
[0109]
[0110] In some further embodiments of this application, a computer-readable medium is provided, on which computer instructions are stored. When these computer instructions are executed by a processor, they implement the technical solutions described in the foregoing embodiments, which will not be repeated here. In the embodiments of this application, the computer-readable storage medium can be any tangible medium capable of storing data and readable by a computing device. Examples of computer-readable storage media include hard disk drives, network attached storage (NAS), read-only memory, random access memory, CD-ROM, CD-R, CD-RW, magnetic tape, and other optical or non-optical data storage devices. The computer-readable storage medium may also include computer-readable media distributed across a network-coupled computer system so that computer programs or instructions can be stored and executed in a distributed manner.
[0111] In some other embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the technical solutions described in the foregoing embodiments, which will not be repeated here.
[0112] References to "various embodiments," "some embodiments," "one embodiment," or "embodiment," etc., in this specification refer to a specific feature, structure, or property described in connection with the said embodiment, included in at least one embodiment. Therefore, the appearance of the phrases "in various embodiments," "in some embodiments," "in one embodiment," or "in an embodiment," etc., throughout this specification does not necessarily refer to the same embodiment. Furthermore, specific features, structures, or properties can be combined in any suitable manner in one or more embodiments. Therefore, a specific feature, structure, or property shown or described in connection with one embodiment can be combined, in whole or in part, with features, structures, or properties of one or more other embodiments without limitation, provided that the combination is not illogical or inoperable.
[0113] The terms "comprising," "having," and similar expressions used in this specification are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus. "A" or "an" does not exclude multiple instances. Furthermore, the elements in the accompanying drawings are for illustrative purposes only and are not drawn to scale.
[0114] Although this application has been described through the above embodiments, this application is not limited to the embodiments described herein, and includes various changes and variations without departing from the scope of this application.
Claims
1. A method for determining a color matching scheme for a placebo of traditional Chinese medicine, characterized in that, Includes the following steps: Extract color information from the image of the target traditional Chinese medicine preparation; The extracted color information is fed into a pre-trained Chinese herbal medicine color clustering model to determine the cluster corresponding to the target Chinese herbal medicine preparation. The Chinese herbal medicine color clustering model is trained based on a sample set of Chinese herbal medicine preparations constructed by collecting color information of various existing Chinese herbal medicine preparations. Based on the determined cluster, a color prediction model corresponding to the cluster is selected from multiple pre-trained color prediction models. Each color prediction model is trained on a corresponding sub-training set of a placebo sample set consisting of various placebo samples. Each placebo sample includes the color information of the placebo and its color scheme. The extracted color information is fed into the selected color prediction model to determine the color scheme of the placebo corresponding to the target traditional Chinese medicine preparation. as well as The method further includes: The traditional Chinese medicine (TCM) color clustering model is trained based on the TCM preparation sample set, thereby dividing the various colors of existing TCM preparations into multiple color clusters from light to dark; based on the color information of each placebo sample in the placebo sample set, the TCM color clustering model is used to determine the cluster corresponding to each placebo sample; A sub-training set for a cluster is constructed using all placebo samples corresponding to the same cluster. Based on the sub-training sets of each constructed cluster, a color prediction model corresponding to each cluster is trained. Each color prediction model takes the color information of the placebo sample as input and outputs a color scheme prediction for the input placebo sample.
2. The method according to claim 1, characterized in that, The color prediction model for each cluster is trained through the following steps: The sub-training set corresponding to the cluster is divided into a training dataset and a test set; Multiple color prediction models with different model structures were trained using the same training dataset. The performance of various trained color prediction models is evaluated based on the test set, and the best-performing color prediction model is selected as the color prediction model corresponding to the cluster.
3. The method according to any one of claims 1-2, characterized in that, The color scheme for a placebo should include at least the color components that make up the placebo and their proportions.
4. The method according to claim 3, characterized in that, The color scheme includes at least four color components: the three primary colors and a base color, wherein the base color is used to adjust the brightness.
5. The method according to any one of claims 1-2, characterized in that, The color clustering model for Chinese medicinal herbs is a K-means clustering model, which is trained through the following steps: Collect images of various existing traditional Chinese medicine preparations and extract color information; A clustered sample set was constructed using the extracted color information of the traditional Chinese medicine preparations; For each of the preset multiple clustering numbers, the K-means algorithm is used to cluster the clustering sample set; The silhouette coefficients of each cluster result corresponding to the number of clusters are calculated, and the K-means model corresponding to the cluster result with the largest silhouette coefficient is used as the color clustering model of Chinese medicine.
6. The method according to claim 5, characterized in that, The steps for training a color clustering model for traditional Chinese medicine also include: Collect images of newly produced Chinese herbal medicine preparations and extract color information; The color information of various newly produced Chinese medicine preparations is extracted to update the clustering sample set; In response to an update of the clustered sample set, the Chinese herbal medicine color clustering model is retrained.
7. A method for preparing a placebo of traditional Chinese medicine, characterized in that, include: Acquire images of the target traditional Chinese medicine preparation; Based on the acquired images, the color scheme of the placebo corresponding to the target traditional Chinese medicine preparation is determined using the method described in any one of claims 1-6; A placebo corresponding to the target traditional Chinese medicine preparation was prepared according to the determined color scheme.
8. An apparatus for determining a colorimetric scheme for a placebo of traditional Chinese medicine, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-6.
9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.