An intelligent screening method for Chinese herbal medicine pieces
Through multi-dimensional data collection and analysis, the appearance deviation coefficient, weight deviation rate and water content deviation rate of Chinese herbal medicine tablets are calculated, and combined with the proportion of component content deviation, the shortcomings of traditional Chinese herbal medicine screening methods are solved, and the quality of Chinese herbal medicines is achieved is comprehensive and accurate. Evaluation and classification management.
Patent Information
- Application Number
- CN202411432938.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2044-10-15
AI Technical Summary
Traditional Chinese herbal medicine screening methods rely on manual experience, making it difficult to comprehensively and accurately evaluate appearance characteristics and weight, and the efficiency and accuracy of component content and moisture content detection are insufficient, making it difficult to quickly and accurately screen out products that meet quality requirements.
The multi-dimensional data acquisition method is adopted, including appearance image data, weight data, component content data and moisture content. Through image preprocessing, data analysis and screening analysis, the appearance deviation coefficient, weight deviation rate, moisture content deviation rate and component content are calculated. The deviation ratio is calculated by combining the weight coefficient to calculate the screening evaluation value, and the quality grade classification is performed.
It has achieved a comprehensive and objective evaluation of the quality of traditional Chinese herbal medicines, avoided misjudgment of single factor judgments, improved the accuracy and consistency of quality control, and is suitable for quality management in the procurement, production and sales of traditional Chinese herbal medicines.
Smart Images

Figure CN118964873B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of screening, and in particular to an intelligent screening method for Chinese herbal medicine pieces. Background Art
[0002] Chinese herbal medicine pieces occupy an important position in the field of traditional Chinese medicine. With the widespread application and development of traditional Chinese medicine, the requirements for the quality of Chinese herbal medicine pieces are increasing. The traditional screening method of Chinese herbal medicine pieces mainly relies on manual experience and has many limitations.
[0003] In terms of appearance inspection, manual visual inspection is difficult to comprehensively and accurately evaluate the appearance characteristics of Chinese herbal medicines. Due to individual subjective differences, the judgment standards for whether the appearance is qualified or not are not unified, and it is difficult to quantify the slight differences in appearance. For example, subtle changes in color, texture, etc. may affect the quality of the pieces, but it is difficult for humans to accurately distinguish them. In terms of weight, manual weighing operations are inefficient and have relatively large errors, which cannot meet the needs of large-scale production and high-precision quality control. At the same time, there is a lack of effective means for quantitative analysis of the relationship between weight deviation and the overall quality of the pieces. Ingredient content and water content are also key factors in measuring the quality of Chinese herbal medicines. Traditional detection methods are often time-consuming and labor-intensive, and the chemical analysis method is complicated to determine the component content, and it is difficult to achieve rapid detection. For the determination of water content, conventional methods are also difficult to balance accuracy and efficiency. As a result, it is difficult to quickly and accurately screen out products that meet quality requirements in the production, processing and circulation of Chinese herbal medicines.
[0004] With the development of modern science and technology, intelligent technology has provided a new way to solve these problems. The advancement of technologies such as image acquisition, spectral analysis, high-precision weighing and moisture determination has made it possible to accurately obtain the data characteristics of Chinese herbal medicine pieces from multiple dimensions. By integrating these advanced technologies and constructing intelligent screening methods, we can overcome the shortcomings of traditional methods and improve the efficiency and accuracy of quality control of Chinese herbal medicine pieces. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes an intelligent screening method for Chinese herbal medicine slices.
[0006] An intelligent screening method for Chinese herbal medicine pieces comprises the following steps:
[0007] Step 1: Data Collection
[0008] Collect multiple data features of Chinese herbal medicine pieces, the multiple data features include appearance photos corresponding to appearance image data, actual weight corresponding to weight data, actual component content of various active ingredients corresponding to component content data, and actual water content corresponding to water content data;
[0009] Step 2: Data preprocessing
[0010] Preprocessing the collected appearance image data, segmenting the background of the appearance photo through preprocessing, and obtaining a main image containing only Chinese herbal medicine pieces, and then normalizing the pixel values of the main image;
[0011] Step 3: Data Analysis
[0012] Screen and analyze Chinese herbal medicines based on multiple data features, and obtain the appearance deviation coefficient, weight deviation rate, and water content deviation rate of Chinese herbal medicines;
[0013] Step 4: Evaluation and classification
[0014] According to the screening and analysis results, the Chinese herbal medicines are screened and classified, and the quality grade of the Chinese herbal medicines is determined.
[0015] As a further solution of the present invention: wherein the appearance image data is an appearance photo of a Chinese herbal medicine piece;
[0016] The weight data is the actual weight of the Chinese herbal medicine pieces;
[0017] The ingredient content data are the actual content of various active ingredients in Chinese herbal medicine pieces;
[0018] The water content data is the actual water content of Chinese herbal medicines.
[0019] As a further solution of the present invention: the pretreatment method is as follows:
[0020] SS1. Acquisition of background and appearance photos
[0021] Obtain background photos without Chinese herbal medicine pieces, and extract appearance photos containing Chinese herbal medicine pieces;
[0022] The background photo and the exterior photo are photos taken at the same fixed angle under the same light source environment, and the resolution of the background photo and the exterior photo are the same;
[0023] SS2, Background Removal
[0024] In the background photo and the appearance photo, the RGB value of the same pixel coordinate point is extracted, and then the two sets of RGB values are compared in combination with a preset threshold factor, and based on the comparison result, the background image in the appearance photo is eliminated, while retaining the main image containing only the Chinese herbal beverage;
[0025] SS3, main image construction
[0026] This process is repeated in this way until all the same pixel coordinate points are compared, and then the retained pixel points are used to form the main image of the Chinese herbal beverage;
[0027] SS4, grayscale image conversion and extreme value extraction
[0028] Then, the main body of the Chinese herbal medicine slices is converted into a grayscale image, and the grayscale value of each pixel in the grayscale image is obtained;
[0029] At the same time, extract the grayscale values with the maximum and minimum values from all pixels;
[0030] SS5, grayscale value normalization
[0031] Subtract the grayscale value with the largest value from the grayscale value with the smallest value, and mark the result as the maximum difference. Then subtract the grayscale value with the smallest value from the grayscale value of each pixel, and mark the result as the pixel difference. Then divide each pixel difference by the maximum difference, and then obtain the normalized value of each pixel in the main image.
[0032] As a further solution of the present invention: the specific method in SS2 is as follows:
[0033] If |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By are all established, the pixel coordinate point in the appearance photo is determined to be a pixel point of the background image, and the pixel point is removed;
[0034] If at least one of |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By is not true, the pixel coordinate point in the appearance photo is determined to be a pixel point of the main image, and the pixel point is retained;
[0035] Among them, R1 is the pixel value of the red channel at the same pixel coordinate point in the background photo, R2 is the pixel value of the red channel at the same pixel coordinate point in the appearance photo, Ry is the threshold factor preset on the red channel, G1 is the pixel value of the green channel at the same pixel coordinate point in the background photo, G2 is the pixel value of the green channel at the same pixel coordinate point in the appearance photo, Gy is the threshold factor preset on the green channel, B1 is the pixel value of the blue channel at the same pixel coordinate point in the background photo, B2 is the pixel value of the blue channel at the same pixel coordinate point in the appearance photo, and By is the threshold factor preset on the blue channel.
[0036] As a further solution of the present invention: the screening analysis method is as follows:
[0037] Step 1. Determine the appearance deviation coefficient
[0038] Calculate the average value of the normalized value corresponding to each pixel in the subject image;
[0039] Then, the normalized value corresponding to each pixel point is combined with its corresponding average value to calculate the standard deviation of all normalized values;
[0040] Then, the standard deviation is compared with the corresponding preset threshold coefficient, and the appearance deviation coefficient of the Chinese herbal medicine slices is determined according to the comparison result;
[0041] Step 2: Determine the weight deviation rate
[0042] Extract the actual weight of Chinese herbal medicine pieces and their corresponding preset standard weight range;
[0043] Then the actual weight is compared with the standard weight range, and the weight deviation rate of the Chinese herbal medicine slices is determined based on the comparison result;
[0044] Step 3: Determine the deviation ratio of active ingredients
[0045] Extract the actual content of each active ingredient in the Chinese herbal medicine slice and its corresponding preset standard content, and determine the content deviation ratio of each active ingredient in the Chinese herbal medicine slice based on the actual content of each active ingredient and the standard content;
[0046] Step 4. Determination of moisture content deviation rate
[0047] Extract the actual water content of Chinese herbal medicine pieces and its corresponding preset standard water content range;
[0048] Then the actual water content is compared with the standard water content range, and the water content deviation rate of the Chinese herbal medicine slices is determined based on the comparison results.
[0049] As a further solution of the present invention: the appearance deviation coefficient in Step 1 is determined as follows:
[0050] If Kb≥Kr, delete the corresponding Ki values in descending order according to |Ki-Ku|, and then continue to calculate the average and standard deviation of the normalized value based on the Ki that has not been deleted, and continue to compare its standard deviation Kb with the corresponding preset threshold coefficient Kr until Kb<Kr;
[0051] Where Kr is the threshold coefficient, Ku is the average value of the normalized value, Kb is the standard deviation of the normalized value, and Ki is the normalized value of each pixel in the subject image;
[0052] Then, when Kb<Kr, the number of all undeleted Ki is obtained and marked as v. Then, D=(nv) / n is used to obtain the abnormal pixel ratio D of the main image.
[0053] Then, the abnormal proportion threshold Dy of the main image is extracted, and the abnormal pixel proportion D is compared with the abnormal proportion threshold Dy:
[0054] If the abnormal pixel ratio D is greater than the abnormal ratio threshold Dy, the abnormal pixel ratio D is subtracted from the abnormal ratio threshold Dy, and the result is divided by the abnormal ratio threshold, and then the appearance deviation coefficient of the Chinese herbal medicine slice is obtained;
[0055] If the abnormal pixel ratio D is less than or equal to the abnormal ratio threshold Dy, the appearance deviation coefficient of the Chinese herbal medicine is recorded as 0.
[0056] As a further solution of the present invention: the weight deviation rate in Step 2 is determined as follows:
[0057] If the actual weight is not within the standard weight range, and the actual weight is greater than the maximum value within the standard weight range, the absolute value between the actual weight and the maximum value within the standard weight range is calculated, and the absolute value is divided by the maximum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices;
[0058] If the actual weight is not within the standard weight range, and the actual weight is less than the minimum value within the standard weight range, the absolute value between the actual weight and the minimum value within the standard weight range is calculated, and the absolute value is divided by the minimum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices;
[0059] If the actual weight is within the standard weight range, the weight deviation rate of the Chinese herbal medicine is 0.
[0060] As a further solution of the present invention: the method for determining the component content deviation ratio in Step 3 is:
[0061] Select an active ingredient in a Chinese herbal medicine;
[0062] The actual content of the active ingredient corresponding to the active ingredient is divided by the standard content of the active ingredient, and the result is used as the deviation ratio of the content of the active ingredient of the Chinese herbal medicine slice;
[0063] And so on, the deviation ratio of the content of each active ingredient is calculated.
[0064] As a further solution of the present invention: the water content deviation rate in Step 4 is determined as follows:
[0065] If the actual water content is not within the standard water content range, and the actual water content is greater than the maximum value within the standard water content range, the absolute value between the actual water content and the maximum value within the standard water content range is calculated, and the absolute value is divided by the maximum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices;
[0066] If the actual water content is not within the standard water content range, and the actual water content is less than the minimum value within the standard water content range, then the absolute value between the actual water content and the minimum value within the standard water content range is calculated, and the absolute value is divided by the minimum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices;
[0067] If the actual water content is within the standard water content range, the water content deviation rate of the Chinese herbal medicine is 0.
[0068] As a further solution of the present invention: the screening and classification processing method is as follows:
[0069] Extract the appearance deviation coefficient, weight deviation rate, and water content deviation rate of Chinese herbal medicine pieces and mark them as Ej, j=1, 2, 3;
[0070] At the same time, the component content deviation ratio of each effective component in the Chinese herbal medicine slices is extracted and marked as Cr, r = 1, 2, ... m, m represents the number of effective components;
[0071] Then through , calculate the screening evaluation value EP of Chinese herbal medicine pieces;
[0072] Wherein, αj and βr are corresponding preset weight coefficients, which are used to control the proportion of appearance deviation coefficient, weight deviation rate, water content deviation rate and component content deviation ratio when calculating the screening evaluation value of Chinese herbal medicine pieces;
[0073] The screening evaluation value of the Chinese herbal medicine slices is then compared with the predetermined qualified threshold set, and the quality grade of the Chinese herbal medicine slices is determined based on the comparison result.
[0074] As a further solution of the present invention: wherein the qualified threshold set is F∈[F1, F2, F3], and F1>F2>F3;
[0075] If EP>F1, the quality of the Chinese herbal medicine slice is judged to be unqualified;
[0076] If F1≥EP>F2, the quality of the Chinese herbal medicine slices is judged to be average;
[0077] If F2≥EP>F3, the quality of the Chinese herbal medicine slices is judged to be medium;
[0078] If EP≤F3, the quality of the Chinese herbal medicine slices is judged to be excellent.
[0079] Compared with the prior art, the present invention has the following beneficial effects:
[0080] The present invention collects multiple data features of Chinese herbal medicine pieces, such as appearance image data, weight data, component content data, and water content data. This multi-dimensional data collection method can comprehensively describe the characteristics of Chinese herbal medicine pieces, avoiding the one-sidedness that may occur when evaluating Chinese herbal medicine pieces based on only a single data.
[0081] The present invention can effectively remove the background image in the appearance photo and retain the main image containing only the Chinese herbal medicine drink by preprocessing the appearance image data. This precise background removal method can reduce background interference and make the subsequent analysis of the main image of the Chinese herbal medicine slice more accurate.
[0082] The present invention converts the main body of the Chinese herbal medicine slice into a grayscale image after removing the background image, and further performs normalization processing. By calculating the normalized value of each pixel in the main image, this normalization processing can convert images with different grayscale ranges into numerical values with a unified standard, which is convenient for subsequent data analysis and comparison.
[0083] The present invention can accurately identify abnormal pixels in the subject image by obtaining the average value and standard deviation of the normalized value corresponding to each pixel in the subject image and comparing them with the preset threshold coefficient. By gradually deleting the abnormal pixels and recalculating, an accurate appearance deviation coefficient is finally obtained, which provides a quantitative basis for evaluating its appearance quality.
[0084] The present invention performs detailed and reasonable calculations on the weight deviation rate, component content deviation ratio and water content deviation rate. For the weight deviation rate, by comparing the actual weight with the standard weight range and calculating the deviation rate according to different situations, it can accurately reflect whether the weight of the Chinese herbal medicine slices meets the standard, and can comprehensively evaluate the compliance of the Chinese herbal medicine slices with the standard in different aspects.
[0085] The present invention calculates the screening evaluation value of the Chinese herbal medicine slices by extracting the appearance deviation coefficient, weight deviation rate, component content deviation ratio and water content deviation rate. This method of calculating the evaluation value by integrating multiple factors can comprehensively and objectively evaluate the quality of the Chinese herbal medicine slices. It avoids the misjudgment that may be caused by judging the quality of the Chinese herbal medicine slices based on only a single factor, thereby more accurately reflecting the overall quality status of the Chinese herbal medicine slices.
[0086] The present invention compares the calculated screening evaluation value with a predetermined qualified threshold set, and divides the Chinese herbal medicine pieces into four grades: high-quality, medium-quality, general and unqualified. This clear classification method is helpful for the classification management of Chinese herbal medicine pieces. For example, in the process of purchasing, producing and selling Chinese herbal medicines, corresponding processing can be carried out according to different quality grades to ensure the quality stability and safety of Chinese herbal medicines, and also provides a clear standard for the quality control of Chinese herbal medicine pieces. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a schematic diagram of the process of the present invention;
[0088] Figure 2 It is a schematic diagram of the process of data preprocessing in the present invention;
[0089] Figure 3 Schematic diagram of the data analysis process in the present invention. DETAILED DESCRIPTION
[0090] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0091] Embodiment 1
[0092] See also Figures 1 to 3 As shown, the present invention is an intelligent screening method for Chinese herbal medicine pieces, comprising the following steps:
[0093] Step 1: Data Collection
[0094] Collect appearance image data of Chinese herbal medicine pieces;
[0095] Among them, the appearance image data is obtained by taking photos of Chinese herbal medicine pieces from multiple angles using high-definition image acquisition equipment to obtain complete appearance photos;
[0096] Step 2: Data preprocessing
[0097] Preprocessing the collected appearance image data of Chinese herbal medicine pieces;
[0098] The specific preprocessing method is as follows:
[0099] SS1, obtain background photos without Chinese herbal medicine pieces, and extract appearance photos containing Chinese herbal medicine pieces;
[0100] The background photo and the exterior photo are photos taken at the same fixed angle under the same light source environment, and the resolution of the background photo and the exterior photo are the same;
[0101] SS2. Extract the RGB value of the same pixel coordinate point in the background photo and the appearance photo, then compare the two sets of RGB values in combination with a preset threshold factor, and based on the comparison result, remove the background image in the appearance photo, while retaining the main image containing only the Chinese herbal beverage;
[0102] The specific method is as follows:
[0103] If |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By are all established, the pixel coordinate point in the appearance photo is determined to be a pixel point of the background image, and the pixel point is removed;
[0104] If at least one of |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By is not true, the pixel coordinate point in the appearance photo is determined to be a pixel point of the main image, and the pixel point is retained;
[0105] Wherein, R1 is the pixel value of the red channel at the same pixel coordinate point in the background photo, R2 is the pixel value of the red channel at the same pixel coordinate point in the appearance photo, Ry is the threshold factor preset on the red channel, G1 is the pixel value of the green channel at the same pixel coordinate point in the background photo, G2 is the pixel value of the green channel at the same pixel coordinate point in the appearance photo, Gy is the threshold factor preset on the green channel, B1 is the pixel value of the blue channel at the same pixel coordinate point in the background photo, B2 is the pixel value of the blue channel at the same pixel coordinate point in the appearance photo, By is the threshold factor preset on the blue channel;
[0106] SS3, and so on, until all the same pixel coordinate points are compared, and then the retained pixel points are used to form the main image of the Chinese herbal beverage;
[0107] SS4, then convert the main body of the Chinese herbal medicine into a grayscale image, obtain the grayscale value of each pixel in the grayscale image, and mark it as Hi, i=1, 2, ... n, n represents the number of all pixels in the main image;
[0108] At the same time, the maximum and minimum grayscale values are extracted from all pixels and marked as Hmax and Hmin respectively;
[0109] SS5, then calculate the normalized value Ki of each pixel in the subject image through Ki= (Hi-Hmin) / (Hmax-Hmin);
[0110] Step 3: Data Analysis
[0111] Screen and analyze Chinese herbal medicine pieces based on their appearance image data;
[0112] The specific method is as follows:
[0113] pass , calculate the average value Ku of the normalized value corresponding to each pixel in the subject image;
[0114] pass , calculate the standard deviation Kb of the normalized value corresponding to each pixel in the subject image;
[0115] Then, the standard deviation Kb is compared with the corresponding preset threshold coefficient Kr, and the appearance deviation coefficient of the Chinese herbal medicine slices is determined according to the comparison result;
[0116] The specific comparison method is as follows:
[0117] If Kb≥Kr, delete the corresponding Ki values in descending order according to |Ki-Ku|, and then continue to calculate the average and standard deviation of the normalized value based on the Ki that has not been deleted, and continue to compare its standard deviation Kb with the corresponding preset threshold coefficient Kr until Kb<Kr;
[0118] Then, when Kb<Kr, the number of all undeleted Ki is obtained and marked as v. Then, D=(nv) / n is used to obtain the abnormal pixel ratio D of the main image.
[0119] Then, the abnormal proportion threshold Dy of the main image is extracted, and the abnormal pixel proportion D is compared with the abnormal proportion threshold Dy:
[0120] If the abnormal pixel ratio D is greater than the abnormal ratio threshold Dy, the abnormal pixel ratio D is subtracted from the abnormal ratio threshold Dy, and the result is divided by the abnormal ratio threshold, and then the appearance deviation coefficient of the Chinese herbal medicine slice is obtained;
[0121] If the abnormal pixel ratio D is less than or equal to the abnormal ratio threshold Dy, the appearance deviation coefficient of the Chinese herbal medicine piece is recorded as 0;
[0122] Step 4: Evaluation and classification
[0123] According to the appearance deviation coefficient of Chinese herbal medicine pieces, the Chinese herbal medicine pieces are screened and classified;
[0124] The specific method is as follows:
[0125] Extract the appearance deviation coefficient and mark it as E1;
[0126] In this embodiment, E1 is the screening evaluation value of the Chinese herbal medicine pieces;
[0127] The screening evaluation value of the Chinese herbal medicine pieces is then compared with the predetermined qualified threshold set:
[0128] Among them, the qualified threshold set is F∈[F11, F12, F13], and F11>F12>F13;
[0129] If E1>F11, the quality of the Chinese herbal medicine slices is judged to be unqualified;
[0130] If F11≥E1>F12, the quality of the Chinese herbal medicine slices is judged to be average;
[0131] If F12≥E1>F13, the quality of the Chinese herbal medicine slices is judged to be medium;
[0132] If E1≤F13, the quality of the Chinese herbal medicine slices is judged to be high quality.
[0133] This embodiment can fully obtain the appearance information of Chinese herbal medicine slices by collecting the appearance image data of Chinese herbal medicine slices from multiple angles. Then, the collected image data is preprocessed to effectively remove the background image, retaining only the main image, thereby improving the accuracy of the subsequent analysis data; the method of removing the background image by comparing the RGB values of the pixel points can more accurately separate the main body from the background, avoiding the interference of the background on the appearance analysis of the slices; grayscale processing is performed on the main image, and the normalized value, average value and standard deviation are calculated, etc., which can accurately analyze the deviation of the appearance of Chinese herbal medicine slices and provide a reliable basis for subsequent quality evaluation; according to the calculated appearance deviation coefficient, the quality of Chinese herbal medicine slices is divided into four levels: unqualified, general, intermediate and high-quality. This data-based evaluation method is objective and scientific, and helps to improve the accuracy and consistency of Chinese herbal medicine slice screening.
[0134] Embodiment 2
[0135] See also Figures 1 to 3 As shown, as the second embodiment of the present invention, when the present application is specifically implemented, compared with the first embodiment, the technical solution of this embodiment is different from that of the first embodiment only in that the present embodiment further includes the following steps:
[0136] The data collection step also collects the weight data of the Chinese herbal medicine pieces; the weight data is measured by a high-precision electronic scale to obtain the accurate actual weight;
[0137] The data analysis step also screens and analyzes the Chinese herbal medicine pieces based on their weight data;
[0138] The specific method is as follows:
[0139] Extract the actual weight of Chinese herbal medicine pieces and their corresponding preset standard weight range;
[0140] Then the actual weight is compared with the standard weight range, and the weight deviation rate of the Chinese herbal medicine slices is determined based on the comparison result;
[0141] The specific comparison method is as follows:
[0142] If the actual weight is not within the standard weight range, and the actual weight is greater than the maximum value within the standard weight range, the absolute value between the actual weight and the maximum value within the standard weight range is calculated, and the absolute value is divided by the maximum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices;
[0143] If the actual weight is not within the standard weight range, and the actual weight is less than the minimum value within the standard weight range, the absolute value between the actual weight and the minimum value within the standard weight range is calculated, and the absolute value is divided by the minimum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices;
[0144] If the actual weight is within the standard weight range, the weight deviation rate of the Chinese herbal medicine is 0;
[0145] The evaluation and classification step also screens and classifies the Chinese herbal medicine pieces according to their weight deviation rate;
[0146] The specific method is as follows:
[0147] Extract the weight deviation rate and mark it as E2;
[0148] In this embodiment, E2 is the screening evaluation value of the Chinese herbal medicine pieces;
[0149] The screening evaluation value of the Chinese herbal medicine pieces is then compared with the predetermined qualified threshold set:
[0150] Among them, the qualified threshold set is F∈[F21, F22, F23], and F21>F22>F23;
[0151] If E2>F21, the quality of the Chinese herbal medicine slice is judged to be unqualified;
[0152] If F21≥E2>F22, the quality of the Chinese herbal medicine slices is judged to be average;
[0153] If F22≥E2>F23, the quality of the Chinese herbal medicine slices is judged to be medium;
[0154] If E2≤F23, the quality of the Chinese herbal medicine slices is judged to be high quality.
[0155] This embodiment adds the collection and analysis of weight data on the basis of the first embodiment, so that the screening of Chinese herbal medicines is no longer solely dependent on appearance, but is evaluated from two dimensions: appearance and weight. This helps to judge the quality of Chinese herbal medicines more comprehensively, because weight is also an important factor in measuring the quality of Chinese herbal medicines. By comparing the actual weight with the standard weight range, determining the weight deviation rate, and grading the quality of Chinese herbal medicines according to the weight deviation rate, Chinese herbal medicines of different quality grades can be screened out more accurately, reducing the misjudgment that may be caused by a single-dimensional evaluation. After combining the weight factor, the evaluation of the quality of Chinese herbal medicines is more comprehensive, which can better meet the needs of actual production and quality control, and improve the accuracy and reliability of the entire screening and classification process.
[0156] Embodiment 3
[0157] See also Figures 1 to 3 As shown, as the third embodiment of the present invention, when the present application is implemented, compared with the first and second embodiments, the technical solution of this embodiment is different from the first and second embodiments only in this embodiment;
[0158] The data collection step also collects the component content data of the Chinese herbal medicine slices; the component content data is detected by using a spectral analysis instrument, such as a near-infrared spectrometer, by performing a spectral scan of the Chinese herbal medicine slices in a specific wavelength range to obtain its component characteristic spectrum, and then analyzing the actual component content of various effective ingredients based on a pre-established component-spectrum database;
[0159] The data analysis step also screens and analyzes the Chinese herbal medicine pieces based on the actual content of each active ingredient in the Chinese herbal medicine pieces;
[0160] The specific method is as follows:
[0161] Extract the actual content of each active ingredient in Chinese herbal medicine pieces and its corresponding preset standard content;
[0162] Take an active ingredient as an example;
[0163] Determine the content deviation ratio of the active ingredient in the Chinese herbal medicine slices based on the actual content of the active ingredient and the standard content of the active ingredient;
[0164] The specific determination method is: divide the actual component content by the standard component content, and then use the result as the component content deviation ratio of the Chinese herbal medicine slices;
[0165] By analogy, the deviation ratio of the content of each active ingredient is calculated;
[0166] The evaluation and classification step also screens and classifies the Chinese herbal medicine pieces according to the deviation ratio of the content of each active ingredient;
[0167] The specific method is as follows:
[0168] The component content deviation ratio of each effective component is extracted and marked as Cr, where r = 1, 2, ... m, and m represents the number of effective components;
[0169] In this embodiment, the , calculate the screening evaluation value C0 of Chinese herbal medicine pieces;
[0170] The screening evaluation value of the Chinese herbal medicine pieces is then compared with the predetermined qualified threshold set:
[0171] Among them, the qualified threshold set is F∈[F01, F02, F03], and F01>F02>F03;
[0172] If C0>F01, the quality of the Chinese herbal medicine slices is judged to be unqualified;
[0173] If F01≥C0>F02, the quality of the Chinese herbal medicine slices is judged to be average;
[0174] If F02≥C0>03, the quality of the Chinese herbal medicine slices is judged to be medium;
[0175] If C0≤F03, the quality of the Chinese herbal medicine slices is judged to be high quality.
[0176] This embodiment adds the collection and analysis of the content data of the ingredients of Chinese herbal medicines on the basis of Embodiment 1 or 2. By obtaining the ingredient content data of Chinese herbal medicines through a spectral analysis instrument, one can have an in-depth understanding of the actual content of the effective ingredients in the Chinese herbal medicines. The deviation ratio of the ingredient content is determined based on the comparison between the actual content of the effective ingredient and the standard content, and the quality grading is performed based on this, making the quality assessment of Chinese herbal medicines more scientific and accurate. Because the efficacy of Chinese herbal medicines mainly depends on the content of the effective ingredients, this analysis helps to screen out high-quality pieces whose effective ingredient content meets the requirements. Comprehensively evaluating the quality of Chinese herbal medicines from three aspects: appearance, weight and ingredient content can more comprehensively reflect the quality status of Chinese herbal medicines, avoid the one-sidedness caused by evaluating only some factors, and thus improve the level of quality control of Chinese herbal medicines.
[0177] Embodiment 4
[0178] See also Figure 1 and Figure 3 As shown, as the fourth embodiment of the present invention, when the present application is implemented, compared with the first embodiment, the second embodiment and the third embodiment, the difference between this embodiment and the first embodiment, the second embodiment and the third embodiment is only that in this embodiment,
[0179] The data collection step also collects the water content data of the Chinese herbal medicine slices; the water content data is measured using a moisture meter, which measures the absorption of electromagnetic waves of a specific frequency by water in the Chinese herbal medicine slices to obtain the actual water content of the Chinese herbal medicine slices:
[0180] The data analysis step also screens and analyzes the Chinese herbal medicine pieces based on their actual water content;
[0181] The specific method is as follows:
[0182] Extract the actual water content of Chinese herbal medicine pieces and its corresponding preset standard water content range;
[0183] Then the actual water content is compared with the standard water content range, and the water content deviation rate of the Chinese herbal medicine slices is determined based on the comparison results;
[0184] The comparison is as follows:
[0185] If the actual water content is not within the standard water content range, and the actual water content is greater than the maximum value within the standard water content range, the absolute value between the actual water content and the maximum value within the standard water content range is calculated, and the absolute value is divided by the maximum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices;
[0186] If the actual water content is not within the standard water content range, and the actual water content is less than the minimum value within the standard water content range, then the absolute value between the actual water content and the minimum value within the standard water content range is calculated, and the absolute value is divided by the minimum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices;
[0187] If the actual water content is within the standard water content range, the water content deviation rate of the Chinese herbal medicine slices is 0;
[0188] The evaluation and classification step also screens and classifies the Chinese herbal medicine pieces according to their water content deviation rate;
[0189] The specific method is as follows:
[0190] Extract the moisture content deviation rate of Chinese herbal medicine pieces and mark it as E3;
[0191] In this embodiment, E3 is the screening evaluation value of the Chinese herbal medicine pieces;
[0192] The screening evaluation value of the Chinese herbal medicine pieces is then compared with the predetermined qualified threshold set:
[0193] Among them, the qualified threshold set is F∈[F31, F32, F33], and F31>F32>F33;
[0194] If E3>F31, the quality of the Chinese herbal medicine slice is judged to be unqualified;
[0195] If F31≥E3>F32, the quality of the Chinese herbal medicine slices is judged to be average;
[0196] If F32≥E3>F33, the quality of the Chinese herbal medicine slices is judged to be medium;
[0197] If E3≤F33, the quality of the Chinese herbal medicine slices is judged to be high quality.
[0198] This embodiment adds the collection and analysis of water content data of Chinese herbal medicine slices on the basis of the previous embodiment. Water content has an important impact on the quality, preservation and efficacy of Chinese herbal medicine slices. By measuring the water content and determining the water content deviation rate, the quality of Chinese herbal medicine slices can be evaluated more comprehensively. Grading the quality of Chinese herbal medicine slices according to the water content deviation rate helps to screen out Chinese herbal medicine slices with appropriate water content, and prevent problems such as mildew caused by excessive water content or efficacy affected by too low water content. Comprehensive evaluation of Chinese herbal medicine slices based on four factors: appearance, weight, ingredient content and water content makes quality control more complete, more in line with the actual needs of quality assurance of Chinese herbal medicine slices, and can more effectively guarantee the quality of Chinese herbal medicine slices entering the market.
[0199] Embodiment 5
[0200] See also Figure 1 and Figure 3 As shown, as the fifth embodiment of the present invention, when the present application is implemented specifically, compared with the first, second, third and fourth embodiments, the technical solution of this embodiment is to combine the solutions of the above-mentioned first, second, third and fourth embodiments for implementation.
[0201] The difference in the combined implementation is that the evaluation and classification step also screens and classifies the Chinese herbal medicine pieces based on the screening and analysis results;
[0202] The specific method is as follows:
[0203] Extract the appearance deviation coefficient, weight deviation rate, and water content deviation rate of Chinese herbal medicine pieces and mark them as Ej, j=1, 2, 3;
[0204] At the same time, the component content deviation ratio of each effective component in the Chinese herbal medicine slices is extracted and marked as Cr, r = 1, 2, ... m, m represents the number of effective components;
[0205] Then through , calculate the screening evaluation value EP of Chinese herbal medicine pieces;
[0206] Wherein, αj and βr are corresponding preset weight coefficients, which are used to control the proportion of appearance deviation coefficient, weight deviation rate, water content deviation rate and component content deviation ratio when calculating the screening evaluation value of Chinese herbal medicine pieces;
[0207] The screening evaluation value of the Chinese herbal medicine pieces is then compared with the predetermined qualified threshold set:
[0208] Among them, the qualified threshold set is F∈[F1, F2, F3], and F1>F2>F3;
[0209] If EP>F1, the quality of the Chinese herbal medicine slice is judged to be unqualified;
[0210] If F1≥EP>F2, the quality of the Chinese herbal medicine slices is judged to be average;
[0211] If F2≥EP>F3, the quality of the Chinese herbal medicine slices is judged to be medium;
[0212] If EP≤F3, the quality of the Chinese herbal medicine slices is judged to be excellent.
[0213] This embodiment combines the appearance deviation coefficient, weight deviation rate, water content deviation rate and ingredient content deviation ratio to calculate the screening evaluation value of Chinese herbal medicine slices, and adjusts the proportion of each factor in the evaluation through a preset weight coefficient, so that the quality of Chinese herbal medicine slices can be evaluated more flexibly and accurately according to actual needs. This comprehensive evaluation method fully considers multiple key factors that affect the quality of Chinese herbal medicine slices, avoids the limitations of single factor evaluation, and makes the quality evaluation results more comprehensive, objective and accurate. By comparing the screening evaluation value obtained by comprehensive calculation with the qualified threshold set, the quality of Chinese herbal medicine slices is graded, which can better meet the quality requirements of Chinese herbal medicine slices in different application scenarios and improve the quality control level of the entire Chinese herbal medicine slice industry.
[0214] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0215] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. An intelligent screening method for Chinese herbal medicine pieces, characterized in that: The following steps are involved: Step 1, collecting multiple data features of Chinese herbal medicine pieces, the multiple data features include appearance photos corresponding to appearance image data, actual weight corresponding to weight data, actual ingredient contents of various active ingredients corresponding to ingredient content data, and actual water content corresponding to water content data; Step 2: preprocessing the collected appearance image data, performing background segmentation on the appearance photo through preprocessing, and obtaining a main image containing only Chinese herbal medicine pieces, and then normalizing the pixel values of the main image; Step 3: Screen and analyze the Chinese herbal medicine pieces according to multiple data features, and obtain the appearance deviation coefficient, weight deviation rate, and water content deviation rate of the Chinese herbal medicine pieces; The screening analysis method is as follows: Step 1, calculate the average value of the normalized value corresponding to each pixel in the subject image; Then, the normalized value corresponding to each pixel is combined with its corresponding average value to calculate the standard deviation of all normalized values; Then, the standard deviation is compared with the corresponding preset threshold coefficient, and the appearance deviation coefficient of the Chinese herbal medicine slices is determined according to the comparison result. The appearance deviation coefficient is determined as follows: If Kb≥Kr, delete the corresponding Ki values in descending order according to |Ki-Ku|, and then continue to calculate the average and standard deviation of the normalized value based on the Ki that has not been deleted, and continue to compare its standard deviation Kb with the corresponding preset threshold coefficient Kr until Kb<Kr; Where Kr is the threshold coefficient, Ku is the average value of the normalized value, Kb is the standard deviation of the normalized value, Ki is the normalized value of each pixel in the subject image, i=1, 2, ...n, n represents the number of all pixels in the subject image; Then, when Kb<Kr, the number of all undeleted Ki is obtained and marked as v. Then, D=(nv) / n is used to obtain the abnormal pixel ratio D of the main image. Then extract the abnormal percentage threshold of the main image and compare the abnormal pixel percentage with the abnormal percentage threshold: If the abnormal pixel ratio is greater than the abnormal ratio threshold, the abnormal pixel ratio minus the abnormal ratio threshold is subtracted, and the result is divided by the abnormal ratio threshold, and then the appearance deviation coefficient of the Chinese herbal medicine piece is obtained; If the abnormal pixel ratio is less than or equal to the abnormal ratio threshold, the appearance deviation coefficient of the Chinese herbal medicine piece is recorded as 0; Step 2, extracting the actual weight of the Chinese herbal medicine pieces and their corresponding preset standard weight range; Then the actual weight is compared with the standard weight range, and the weight deviation rate of the Chinese herbal medicine slices is determined based on the comparison result; Step 3, extracting the actual content of each active ingredient in the Chinese herbal medicine slice and its corresponding preset standard content, and determining the content deviation ratio of each active ingredient in the Chinese herbal medicine slice according to the actual content of each active ingredient and the standard content; Step 4, extracting the actual water content of the Chinese herbal medicine pieces and its corresponding preset standard water content range; Then the actual water content is compared with the standard water content range, and the water content deviation rate of the Chinese herbal medicine slices is determined based on the comparison results; Step 4: Based on the screening and analysis results, screen and classify the Chinese herbal medicines and determine their quality grades.
2. The intelligent screening method for Chinese herbal medicine slices according to claim 1, characterized in that: The preprocessing method is as follows: SS1, obtain background photos without Chinese herbal medicine pieces, and extract appearance photos containing Chinese herbal medicine pieces; The background photo and the exterior photo are photos taken at the same fixed angle under the same light source environment, and the resolution of the background photo and the exterior photo are the same; SS2. Extract the RGB value of the same pixel coordinate point in the background photo and the appearance photo, then compare the two sets of RGB values in combination with a preset threshold factor, and based on the comparison result, remove the background image in the appearance photo, while retaining the main image containing only the Chinese herbal beverage; SS3, and so on, until all the same pixel coordinate points are compared, and then the retained pixel points are used to form the main image of the Chinese herbal beverage; SS4, then convert the main body of the Chinese herbal medicine into a grayscale image, and obtain the grayscale value of each pixel in the grayscale image; At the same time, extract the grayscale values with the maximum and minimum values from all pixels; SS5. Subtract the grayscale value with the largest value from the grayscale value with the smallest value, and mark the result as the maximum difference. Then subtract the grayscale value with the smallest value from the grayscale value of each pixel, and mark the result as the pixel difference. Then divide each pixel difference by the maximum difference, and then obtain the normalized value of each pixel in the main image.
3. The intelligent screening method for Chinese herbal medicine slices according to claim 2, characterized in that: The specific method in SS2 is as follows: If |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By are all established, the pixel coordinate point in the appearance photo is determined to be a pixel point of the background image, and the pixel point is removed; If at least one of |R1-R2|<Ry, |G1-G2|<Gy and |B1-B2|<By is not true, the pixel coordinate point in the appearance photo is determined to be a pixel point of the main image, and the pixel point is retained; Among them, R1 is the pixel value of the red channel at the same pixel coordinate point in the background photo, R2 is the pixel value of the red channel at the same pixel coordinate point in the appearance photo, Ry is the threshold factor preset on the red channel, G1 is the pixel value of the green channel at the same pixel coordinate point in the background photo, G2 is the pixel value of the green channel at the same pixel coordinate point in the appearance photo, Gy is the threshold factor preset on the green channel, B1 is the pixel value of the blue channel at the same pixel coordinate point in the background photo, B2 is the pixel value of the blue channel at the same pixel coordinate point in the appearance photo, and By is the threshold factor preset on the blue channel.
4. The intelligent screening method for Chinese herbal medicine slices according to claim 1, characterized in that: The weight deviation rate in Step 2 is determined as follows: If the actual weight is not within the standard weight range, and the actual weight is greater than the maximum value within the standard weight range, the absolute value between the actual weight and the maximum value within the standard weight range is calculated, and the absolute value is divided by the maximum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices; If the actual weight is not within the standard weight range, and the actual weight is less than the minimum value within the standard weight range, the absolute value between the actual weight and the minimum value within the standard weight range is calculated, and the absolute value is divided by the minimum value within the standard weight range, and the result is used as the weight deviation rate of the Chinese herbal medicine slices; If the actual weight is within the standard weight range, the weight deviation rate of the Chinese herbal medicine is 0.
5. The intelligent screening method for Chinese herbal medicine slices according to claim 1, characterized in that: The method for determining the deviation ratio of ingredient content in Step 3 is: Select an active ingredient in a Chinese herbal medicine; The actual content of the active ingredient corresponding to the active ingredient is divided by the standard content of the active ingredient, and the result is used as the deviation ratio of the content of the active ingredient of the Chinese herbal medicine slice; And so on, the deviation ratio of the content of each active ingredient is calculated.
6. The intelligent screening method for Chinese herbal medicine slices according to claim 1, characterized in that: The moisture content deviation rate in Step 4 is determined as follows: If the actual water content is not within the standard water content range, and the actual water content is greater than the maximum value within the standard water content range, the absolute value between the actual water content and the maximum value within the standard water content range is calculated, and the absolute value is divided by the maximum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices; If the actual water content is not within the standard water content range, and the actual water content is less than the minimum value within the standard water content range, then the absolute value between the actual water content and the minimum value within the standard water content range is calculated, and the absolute value is divided by the minimum value within the standard water content range, and the result is used as the water content deviation rate of the Chinese herbal medicine slices; If the actual water content is within the standard water content range, the water content deviation rate of the Chinese herbal medicine is 0.
7. The intelligent screening method for Chinese herbal medicine slices according to claim 1, characterized in that: The screening and classification process is as follows: Extract the appearance deviation coefficient, weight deviation rate, and water content deviation rate of Chinese herbal medicine pieces and mark them as Ej, j=1, 2, 3; At the same time, the component content deviation ratio of each effective component in the Chinese herbal medicine slices is extracted and marked as Cr, r = 1, 2, ... m, m represents the number of effective components; Then through , calculate the screening evaluation value EP of Chinese herbal medicine pieces; Wherein, αj and βr are corresponding preset weight coefficients, which are used to control the proportion of appearance deviation coefficient, weight deviation rate, water content deviation rate and component content deviation ratio when calculating the screening evaluation value of Chinese herbal medicine pieces; The screening evaluation value of the Chinese herbal medicine slices is then compared with the predetermined qualified threshold set, and the quality grade of the Chinese herbal medicine slices is determined based on the comparison result.
8. The intelligent screening method for Chinese herbal medicine slices according to claim 7, characterized in that: in, The qualified threshold set is F∈[F1, F2, F3], and F1>F2>F3; If EP>F1, the quality of the Chinese herbal medicine slice is judged to be unqualified; If F1≥EP>F2, the quality of the Chinese herbal medicine slices is judged to be average; If F2≥EP>F3, the quality of the Chinese herbal medicine slices is judged to be medium; If EP≤F3, the quality of the Chinese herbal medicine slices is judged to be excellent.
Citation Information
Patent Citations
Automatic detection system for quality of traditional Chinese medicine
CN102435713A
Traditional Chinese medicine color objectification method and traditional Chinese medicine image acquisition device
CN103308517A