Traditional Chinese medicine quality identification and analysis method based on two-dimensional code

Through the QR code-based Chinese medicine quality identification and analysis method, combined with image recognition and physical and chemical identification, the problem of low reliability of the identification results of doped medicinal materials is solved, the accuracy and efficiency of the identification of Chinese medicinal materials is improved, and the purity of the medicinal materials is ensured. The efficacy of the medicine has achieved a reliable record of the quality of the medicinal materials.

CN119090821AInactive Publication Date: 2024-12-06LUQINGGE (GANSU) PHARMACEUTICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411112223.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When faced with doped medicinal materials, the existing Chinese medicinal materials quality identification methods have low reliability, resulting in a decrease in the pass rate, making it difficult to effectively identify and filter out the doped medicinal materials, affecting the purity and efficacy of the overall medicinal materials.

Method used

Using the QR code-based Chinese medicine quality identification and analysis method, the quality identification report of Chinese medicine is generated by obtaining the medicinal materials category, image collection data identification, baking simulation, shape comparison, and surface feature judgment of Chinese medicine materials, combined with physical and chemical identification, the medicinal materials quality identification report is generated and the QR code is used. Formal storage to ensure the accuracy and credibility of the identification results.

Benefits of technology

Improve the accuracy and effectiveness of Chinese medicinal materials identification, ensure the authenticity and efficacy of medicinal materials, record results through QR codes, ensure the reliability and authority of medicinal materials quality, reduce data source matching, and improve identification efficiency .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090821A_ABST
    Figure CN119090821A_ABST
Patent Text Reader

Abstract

The invention discloses a traditional Chinese medicine quality identification and analysis method based on a two-dimensional code, and relates to the field of traditional Chinese medicine quality identification, and the method comprises the steps: obtaining the medicinal material category of a to-be-identified traditional Chinese medicinal material, and carrying out information matching in a medicinal material library to obtain initial medicinal material information; acquiring image acquisition data of a to-be-identified traditional Chinese medicinal material; identifying the types of the medicinal materials based on the image acquisition data to obtain an identification result corresponding to the image acquisition data, and comparing the identification result with the initial medicinal material information to screen to obtain to-be-identified image data; performing baking effect identification on the to-be-identified image data to obtain baking effect data corresponding to the to-be-identified image data; performing physical and chemical identification on the traditional Chinese medicinal materials corresponding to the to-be-identified image data to obtain physical and chemical information; and based on the physicochemical information and the baking effect data, determining a medicinal material quality identification report, and converting the medicinal material quality identification report into corresponding two-dimensional code information. The method has the effect of improving the effectiveness of the identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of quality identification of traditional Chinese medicine, and in particular to a quality identification and analysis method of traditional Chinese medicine based on a two-dimensional code. Background Art

[0002] TCM identification refers to the inspection of TCM varieties and quality. Due to the particularity of TCM, the efficacy of the same TCM materials from different origins varies greatly, and the sources of many TCM materials are also different, which affects the efficacy of TCM materials to a certain extent. At the same time, due to the gradual increase in the price of TCM materials in recent years, some lawless elements have deliberately counterfeited TCM materials by adulterating them and passing off fake products as real ones. Therefore, it is necessary to strengthen the strict inspection of TCM to prevent counterfeit and inferior TCM materials from entering TCM warehouses.

[0003] In the prior art, most of the methods are to learn different Chinese medicinal materials through neural network learning. When users need to identify the quality of Chinese medicinal materials, the quality identification process of the corresponding Chinese medicinal materials in the system is matched according to the category of the Chinese medicinal materials, so as to achieve high efficiency in the quality identification of Chinese medicinal materials.

[0004] With respect to the above technical solution, when users collect and purchase Chinese medicinal materials, there will be some medicinal materials that are similar to the purchased Chinese medicinal materials. In the above technology, when the quality of Chinese medicinal materials is identified, the corresponding Chinese medicinal materials are identified through the set Chinese medicinal material categories, so that the reliability of the identification result is low. For example, medicinal material B is a similar medicinal material mixed into medicinal material A. When the quality of medicinal material B is identified, since the identification process of medicinal material A is adopted, the identification result of medicinal material B is unqualified, which affects the overall identification result of the batch of medicinal materials A. For example, the qualified rate is required to be 90%, and the qualified rate is reduced to 80% due to the reasons of medicinal material B. There is room for improvement. Summary of the invention

[0005] In order to improve the effectiveness of identification results, the present application provides a method for quality identification and analysis of traditional Chinese medicine based on QR codes.

[0006] In the first aspect, the present application provides a method for quality identification and analysis of traditional Chinese medicine based on a QR code, which adopts the following technical solution:

[0007] A method for quality identification and analysis of traditional Chinese medicine based on QR code, comprising:

[0008] Obtain the medicinal material category of the Chinese medicinal material to be identified, and match the information with the medicinal material library in the system according to the medicinal material category to obtain the initial medicinal material information of the corresponding medicinal material category;

[0009] Perform image acquisition on the Chinese medicinal materials to be identified to obtain image acquisition data of the corresponding Chinese medicinal materials;

[0010] Identify the medicinal material category based on the image acquisition data, obtain the identification result of the corresponding image acquisition data, and compare the identification result with the initial medicinal material information to screen out the image acquisition data with the same initial medicinal material information and record it as the image data to be identified;

[0011] Based on the category of medicinal materials corresponding to the image data to be identified, determining the baked image data of the medicinal materials in the medicinal material library;

[0012] Based on the baked image data and the image data to be identified, determining the perspective relationship between the baked image data and the image data to be identified, and performing perspective simulation on the baked image data based on the perspective relationship to obtain baked simulated image data having the same perspective direction and perspective degree as the image data to be identified;

[0013] Performing color comparison between the baking simulation image data and the image data to be identified to obtain first baking effect data;

[0014] Performing shape comparison between the baking simulation image data and the image data to be identified to determine whether the edge contour image data in the image data to be identified has regularity, and performing baking effect judgment on the image data to be identified according to the regularity to obtain second baking effect data;

[0015] Performing surface feature judgment on the image data to be identified to obtain third baking effect data;

[0016] Determine baking effect data of the image data to be identified in a comprehensive state based on the first baking effect data, the second baking effect data, and the third baking effect data;

[0017] Perform physical and chemical identification on the Chinese medicinal materials corresponding to the image data to be identified to obtain physical and chemical information;

[0018] Based on the physical and chemical information and baking effect data, the medicinal material quality identification report is determined, and the medicinal material quality identification report is converted into corresponding QR code information.

[0019] Preferably, the medicinal material category information of the Chinese medicinal material input by the user is obtained, and the medicinal material category information is judged by the database to determine the information level of the Chinese medicinal material input by the user; the information level is the detail level of the medicinal material category information;

[0020] The medicinal material library is matched based on the medicinal material category information and information level to determine the initial medicinal material information of the corresponding Chinese medicinal material; the initial medicinal material information includes the medicinal material name, medicinal material origin, medicinal material image data and baking image data.

[0021] Preferably, the collected image acquisition data is matched with the medicinal material image data in the medicinal material library to identify the medicinal material category of the collected image acquisition data, and a recognition result is output accordingly; the recognition result is the medicinal material category of the collected image acquisition data;

[0022] Match the identification result with the initial medicinal material information to determine whether the identification result is the same as the user's Chinese medicinal material to be identified;

[0023] If the recognition result successfully matches the initial medicinal material information, it is determined that the recognition result is the same as the user's Chinese medicinal material to be identified;

[0024] If the identification result fails to match the initial medicinal material information, it is determined that the identification result is different from the user's Chinese medicinal material to be identified;

[0025] The medicinal materials whose recognition results are different from the user's to-be-identified Chinese medicinal materials are filtered out, and the image acquisition data corresponding to the medicinal materials whose recognition results are the same as the user's to-be-identified Chinese medicinal materials are recorded as the image data to be identified.

[0026] Preferably, if the matched initial medicinal material information has multiple matching items, the recognition result is matched with the multiple initial medicinal material information, and the matching results of each initial medicinal material information are counted to obtain matching result data corresponding to the initial medicinal material information;

[0027] The matching result data of each initial medicinal material information is judged to determine the data relationship between the matching quantities of each initial medicinal material information;

[0028] If the matching quantity distribution of each initial medicinal material information is uniform, the Chinese medicinal materials to be identified are classified according to the matching results, and the roasting effect of the classified Chinese medicinal materials to be identified is identified;

[0029] If the matching quantity distribution of each initial medicinal material information is not uniform, the Chinese medicinal materials to be identified are classified according to the matching results, and the Chinese medicinal materials to be identified with the smallest matching data after classification are filtered and screened.

[0030] Preferably, image similarity matching is performed on the medicinal material library based on the initial medicinal material information to obtain similar medicinal material information with similarity;

[0031] Acquire color data in the image acquisition data, and perform color matching on the color data with the color data in the initial medicinal material information and the similar medicinal material information;

[0032] If the color data fails to match the initial medicinal material information, it is determined that the medicinal material identification result corresponding to the image acquisition data is empty;

[0033] If the color data successfully matches the initial medicinal material information and / or similar medicinal material information, the texture data of the successfully matched initial medicinal material information and similar medicinal material information are obtained;

[0034] Matching the texture data in the image acquisition data with the texture data of the successfully matched initial medicinal material information and similar medicinal material information to determine whether the texture data in the image acquisition data belongs to the initial medicinal material information and similar medicinal material information;

[0035] If it is determined that the texture data in the image acquisition data fails to match the initial medicinal material information, then the medicinal material identification result corresponding to the image acquisition data is determined to be empty;

[0036] If it is determined that the texture data in the image acquisition data successfully matches the texture data of only one medicinal material in the initial medicinal material information and the similar medicinal material information, the category of the successfully matched medicinal material is determined as the recognition result of the medicinal material corresponding to the image acquisition data;

[0037] If it is determined that the texture data in the image acquisition data successfully matches the initial medicinal material information and the similar medicinal material information, a texture data comparison is performed on the initial medicinal material information and the similar medicinal material information whose texture data successfully matches, so as to determine the difference points in texture data between the initial medicinal material information and the similar medicinal material information;

[0038] The texture data in the image acquisition data is compared based on the difference points on the texture data to determine the medicinal material category corresponding to the image acquisition data, and the corresponding recognition result is output.

[0039] Preferably, texture data in the initial medicinal material information and the similar medicinal material information are obtained, and the original texture data are compared with each other to determine the difference between the texture data, thereby obtaining a first difference;

[0040] Performing perspective processing to different degrees on the texture data in the initial medicinal material information and similar medicinal material information to obtain corresponding perspective texture image data;

[0041] Perform similarity matching between the perspective texture image data of the initial medicinal material information and the perspective texture image data of the similar medicinal material information and the medicinal material texture data in the medicinal material library, and obtain medicinal materials with a certain degree of similarity to the initial medicinal material information and the similar medicinal material information, and record them as perspective similar medicinal material information;

[0042] The initial medicinal material information, the perspective texture image data of similar medicinal material information, and the texture data of the perspective similar medicinal material information are compared with each other to determine the difference between the perspective texture image data of the initial medicinal material information and the perspective texture image data of similar medicinal material information and the texture data of the perspective similar medicinal material information, and record them as the second difference points.

[0043] Preferably, determining whether the baked simulated image data contains edge stereo annotation data based on the baked simulated image data;

[0044] If the baking simulation image data does not include the edge stereo annotation data, the baking simulation image data and the image data to be identified are directly compared to obtain second baking effect data;

[0045] If the baked simulation image data contains edge stereo annotation data, images at different positions in the image data to be identified are read to obtain edge image information and intermediate image information;

[0046] The edge image information is compared with the intermediate image information to determine the edge image characteristics, and the image data to be identified is divided according to the edge image characteristics to obtain edge contour image data and non-edge contour image data;

[0047] Performing edge contour judgment on the edge contour image data to determine whether the outer contour and the inner contour of the edge contour image data are regular;

[0048] If it is determined that both the outer contour and the inner contour of the edge contour image data are regular, the edge image data is determined to be not three-dimensional, and the baking simulation image data is compared with the non-edge contour image data for similarity to obtain second baking effect data;

[0049] If it is determined that the outer contour and / or inner contour of the edge contour image data are irregular, a shadow judgment is performed on the outer contour and / or inner contour to determine whether there is a shadow in the edge contour image data and / or the non-edge contour image data at a position corresponding to the irregular outer contour and / or inner contour;

[0050] If it is determined that the edge contour data and / or non-edge contour image data at the corresponding position have a shadow, the edge contour image data is determined to be three-dimensional, and the baking simulation image data is judged to be similar to the edge contour image data and the non-edge contour image data to obtain second baking effect data.

[0051] Preferably, the physical and chemical information and baking effect data are converted into text information to obtain a corresponding medicinal material quality identification report;

[0052] Convert the medicinal material quality identification report into digital form to obtain digital information;

[0053] A QR code is randomly generated, and the digitized information is input into the QR code to obtain a QR code with a medicinal material quality identification report;

[0054] The staff will match and bind the QR code information with the corresponding identified Chinese medicinal materials, and paste it on the packaging of the corresponding Chinese medicinal materials.

[0055] In summary, the present application includes at least one of the following beneficial technical effects:

[0056] 1. By obtaining the medicinal material category of the Chinese medicinal material to be identified input by the user and matching the corresponding identification information, the data source matching is reduced, the data volume is reduced, and the identification efficiency is improved. By performing medicinal material identification on the image acquisition data of the Chinese medicinal material to be identified, it is determined whether the Chinese medicinal material currently being identified is the Chinese medicinal material to be identified input by the user, thereby ensuring the authenticity of the medicinal material and the accuracy of the identification results. By performing baking effect and physical and chemical effect identification on the Chinese medicinal materials to be identified that meet the conditions, the authenticity of the appearance of the Chinese medicinal materials to be identified and the effectiveness of the efficacy are ensured. Finally, by pasting the identification report on the Chinese medicinal material in the form of a QR code, it is ensured that the user can view the quality identification report of the Chinese medicinal material by scanning the QR code, thereby ensuring the authenticity and authority of the medicinal material quality results;

[0057] 2. By counting the number of matches of different medicinal material information of the batch of Chinese medicinal materials, it is determined whether the medicinal materials with multiple different medicinal material information are adulterated with other medicinal materials. If the number of successful matches of each medicinal material information in the initial medicinal material information is evenly distributed, it indicates that the medicinal materials with different medicinal material information are all medicinal materials to be identified, and corresponding classification identification is performed according to the matching results; if the number of matches of each medicinal material information in the initial medicinal material information is unbalanced, it indicates that the medicinal materials with a small number of successful matches are adulterated with other medicinal materials, so the adulterated medicinal materials need to be eliminated to ensure the purity of the medicinal materials, thereby ensuring the effectiveness of medicinal material identification;

[0058] 3. By analyzing and judging the edge contour image data in the image data to be identified, it is possible to perform two-dimensional image judgment and three-dimensional image judgment on the image data to be identified, making the judgment result more credible and accurate, thereby enhancing the effectiveness and authority of the quality identification results of the medicinal materials. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a flow chart of the steps of the method for quality identification and analysis of traditional Chinese medicine based on QR codes in this embodiment. DETAILED DESCRIPTION

[0060] The following is combined with Figure 1 This application is described in further detail.

[0061] The embodiment of the present application discloses a method for analyzing the quality of traditional Chinese medicine based on a QR code.

[0062] Example: Figure 1 As shown, the present invention provides a method for analyzing the quality of traditional Chinese medicine based on a two-dimensional code, comprising:

[0063] S100, obtaining the medicinal material category of the Chinese medicinal material to be identified, and matching the information with the medicinal material library in the system according to the medicinal material category to obtain the initial medicinal material information of the corresponding medicinal material category;

[0064] S200, performing image acquisition on the Chinese medicinal material to be identified to obtain image acquisition data of the corresponding Chinese medicinal material;

[0065] S300, identifying the medicinal material category based on the image acquisition data, obtaining an identification result corresponding to the image acquisition data, and comparing the identification result with the initial medicinal material information to screen out the image acquisition data that is the same as the initial medicinal material information, and recording it as the image data to be identified;

[0066] S400, based on the medicinal material category corresponding to the image data to be identified, determining the baked image data of the medicinal material in the medicinal material library;

[0067] S500, based on the baked image data and the image data to be identified, determine the perspective relationship between the baked image data and the image data to be identified, and perform perspective simulation on the baked image data based on the perspective relationship to obtain the baked simulation image data with the same perspective direction and perspective degree as the image data to be identified; wherein, when judging the baking effect of Chinese medicinal materials, the perspective relationship between the baked image data in the medicinal materials library and the image data to be identified is determined, and the perspective simulation of the baked image data is performed according to the perspective relationship, so that the image relationship between the baked image data and the image data to be identified is consistent, so that the identification result when the image data to be identified is identified according to the baked image data after perspective simulation is more accurate, thereby improving the accuracy of judgment.

[0068] For example, the baked image data is a circle, but the image data of the medicinal material to be identified is an ellipse due to the slicing angle. Therefore, the baked image data is processed to a certain extent in a perspective manner so that the baked image data also appears to be an ellipse. Therefore, when judging the image data to be identified based on the adjusted elliptical baked image data, the comparison basis is more referenced and authoritative, thereby making the identification result more accurate and credible.

[0069] S600, performing color comparison between the baking simulation image data and the image data to be identified to obtain first baking effect data;

[0070] S700, performing shape comparison between the baking simulation image data and the image data to be identified to determine whether the edge contour image data in the image data to be identified has regularity, and performing baking effect judgment on the image data to be identified according to the regularity to obtain second baking effect data; wherein the regularity is a common regular pattern, such as a circle, an ellipse, etc. In the process of identifying Chinese medicinal materials, a circle and an ellipse are often used as the main shapes, and the corresponding regular pattern can be determined by performing image analysis on the baking simulation image data.

[0071] S800, performing surface feature judgment on the image data to be identified to obtain third baking effect data;

[0072] S900, determining baking effect data of the image data to be identified in a comprehensive state based on the first baking effect data, the second baking effect data, and the third baking effect data;

[0073] S1000, performing physical and chemical identification on the Chinese medicinal materials corresponding to the image data to be identified, and obtaining physical and chemical information;

[0074] S1100, based on the physical and chemical information and the baking effect data, determine the medicinal material quality identification report, and convert the medicinal material quality identification report into corresponding QR code information.

[0075] In this embodiment, the medicinal material category of the Chinese medicinal material to be identified input by the user is matched with the corresponding identification information to reduce data source matching, reduce the amount of data and improve identification efficiency. The medicinal material recognition is performed on the image acquisition data of the Chinese medicinal material to be identified, so as to determine whether the Chinese medicinal material currently being identified is the Chinese medicinal material to be identified input by the user, thereby ensuring the authenticity of the medicinal material and the accuracy of the identification results. The baking effect and physical and chemical effect of the Chinese medicinal material to be identified that meets the conditions are identified to ensure the authenticity of the appearance of the Chinese medicinal material to be identified and the effectiveness of the efficacy. Finally, the identification report is pasted on the Chinese medicinal material in the form of a QR code, so as to ensure that the user can view the quality identification report of the Chinese medicinal material by scanning the QR code, thereby ensuring the authenticity and authority of the medicinal material quality results.

[0076] Exemplarily, the Chinese medicinal material that the user needs to identify is medicinal material A. Since medicinal material A and medicinal material B have external similarities, the user may mix medicinal material B with medicinal material A during the purchase process. Therefore, the Chinese medicinal material that needs to be identified is identified to determine whether the Chinese medicinal material is the target Chinese medicinal material to be purchased, thereby ensuring the accuracy of the identification, and then performing a pharmacological judgment on the successfully matched image data to determine whether the Chinese medicinal material has pharmacological defects. By identifying the baking effect of the image data to be identified, it is determined whether the baked Chinese medicinal material has problems such as mold, and then a physical and chemical identification is performed to determine the effective content of the drug contained in the baked Chinese medicinal material, thereby making the identification result more accurate and improving the accuracy of the identification result.

[0077] In step S100, the medicinal material category of the Chinese medicinal material to be identified is obtained, and information matching is performed on the medicinal material library in the system according to the medicinal material category to obtain initial medicinal material information corresponding to the medicinal material category, including the following steps:

[0078] S110, obtaining the medicinal material category information of the Chinese medicinal material input by the user, and performing database judgment on the medicinal material category information to determine the information level of the Chinese medicinal material input by the user; the information level is the degree of detail of the medicinal material category information; for example: "Danggui", "Zanggui".

[0079] S120, matching the medicinal material library based on the medicinal material category information and information level to determine the initial medicinal material information corresponding to the Chinese medicinal material; the initial medicinal material information includes the medicinal material name, medicinal material origin, medicinal material image data and baking image data. The initial medicinal material information obtained by matching can be multiple medicinal material information.

[0080] In this embodiment, when determining the category of the Chinese medicinal material to be identified, the specific category of the medicinal material is determined by matching the medicinal material information input by the user, thereby ensuring that the initial medicinal material information matched according to the medicinal material library has identification accuracy.

[0081] For example, the medicinal material category information of the Chinese medicinal material input by the user is "Danggui", and the medicinal material library includes "Eastern Angelica", "European Angelica", "Yunnan Wild Angelica", etc., which belong to the "Danggui" category. The initial medicinal material information matched is all the varieties in the "Danggui" category. If the medicinal material category of the Chinese medicinal material input by the user is "European Angelica", the initial medicinal material information matched is only the medicinal material information of "European Angelica".

[0082] In step S300, the medicinal material category is identified based on the image acquisition data to obtain an identification result corresponding to the image acquisition data, and the identification result is compared with the initial medicinal material information to screen out the image acquisition data that is the same as the initial medicinal material information and record it as the image data to be identified, including the following steps:

[0083] S310, matching the collected image data with the medicinal material image data in the medicinal material library to identify the medicinal material category of the collected image data, and outputting a recognition result accordingly; the recognition result is the medicinal material category of the collected image data;

[0084] S320, matching the recognition result with the initial medicinal material information to determine whether the recognition result is the same as the Chinese medicinal material to be identified by the user;

[0085] S330, if the recognition result successfully matches the initial medicinal material information, it is determined that the recognition result is the same as the user's Chinese medicinal material to be identified;

[0086] S340, if the recognition result fails to match the initial medicinal material information, it is determined that the recognition result is different from the user's Chinese medicinal material to be identified;

[0087] S350, filtering the medicinal materials whose recognition results are different from the user's to-be-identified Chinese medicinal materials, and recording the image acquisition data corresponding to the medicinal materials whose recognition results are the same as the user's to-be-identified Chinese medicinal materials as the to-be-identified image data.

[0088] In this embodiment, when conducting quality appraisal of Chinese medicinal materials, the image acquisition data of the Chinese medicinal materials to be appraised is matched for the first time with the medicinal materials image data in the medicinal materials library to determine the identification category of the image acquisition data in the medicinal materials library, and then the identified medicinal materials category is matched with the initial medicinal materials information matched with the medicinal materials category input by the user, so as to determine whether the medicinal materials are the medicinal materials that the user needs to appraise, thereby improving the recognition of the medicinal materials to be appraised, and further ensuring the accuracy and effectiveness of the medicinal materials appraisal results.

[0089] For example, when a user is purchasing medicinal materials, due to the similarities between multiple medicinal materials, the purchased medicinal materials are mixed with other medicinal materials. For example, the medicinal material purchased by the user is medicinal material A, and the mixed medicinal material is medicinal material B. If the medicinal material to be identified is not identified, it is possible that the medicinal material to be identified is medicinal material B, and medicinal material B is evaluated using the evaluation method for medicinal material A, which will lead to incorrect evaluation results. At the same time, due to the difference in medicinal materials, adverse consequences will occur when using the medicinal materials, increasing the risk.

[0090] In step S300, the medicinal material category is identified based on the image acquisition data to obtain an identification result corresponding to the image acquisition data, and the identification result is compared with the initial medicinal material information to screen out the image acquisition data that is the same as the initial medicinal material information and record it as the image data to be identified, including the following steps:

[0091] S360, if the matched initial medicinal material information has multiple matching items, then match the recognition result with the multiple initial medicinal material information, and collect statistics on the matching results of each initial medicinal material information to obtain matching result data corresponding to the initial medicinal material information;

[0092] S370, judging the matching result data of each initial medicinal material information to determine the data relationship between the matching quantities of each initial medicinal material information;

[0093] S380, if the matching quantity distribution of each initial medicinal material information is uniform, classify the Chinese medicinal materials to be identified according to the matching results, and identify the baking effect of the classified Chinese medicinal materials to be identified;

[0094] S390, if the matching quantity distribution of each initial medicinal material information is not uniform, the Chinese medicinal materials to be identified are classified according to the matching results, and the Chinese medicinal materials to be identified with the smallest matching data after classification are filtered and screened.

[0095] In this embodiment, when the medicinal material category input by the user is a major category of medicinal materials, the medicinal materials obtained by matching the medicinal material library include multiple varieties, so the initial medicinal material information contains multiple matching items. Therefore, when matching the initial medicinal material information according to the recognition result, there may be multiple recognition results corresponding to multiple medicinal material information in the initial medicinal material information. Therefore, by counting the number of matches of different medicinal material information for this batch of Chinese medicinal materials, it is determined whether the medicinal materials with multiple different medicinal material information are mixed with other medicinal materials. If the number of successful matches of each medicinal material information in the initial medicinal material information is evenly distributed, it indicates that the medicinal materials with different medicinal material information are all medicinal materials to be identified, and corresponding classification identification is performed according to the matching results; if the number of matches of each medicinal material information in the initial medicinal material information is unbalanced, it indicates that the medicinal materials with a small number of successful matches are mixed with other medicinal materials, so the mixed medicinal materials need to be eliminated to ensure the purity of the medicinal materials, thereby ensuring the accuracy of the medicinal material identification.

[0096] Exemplary, for example, there are multiple matching items in the initial medicinal material information, namely medicinal material A, medicinal material B, and medicinal material C. When identifying the Chinese medicinal materials to be identified, if there is a batch of 100 medicinal materials, the number of successful matches of medicinal material A is 30, the number of successful matches of medicinal material B is 35, and the number of successful matches of medicinal material C is 25, then it is determined that the number of successful matches of medicinal materials A, B, and C is in a uniform distribution state, that is, medicinal materials A, B, and C are all Chinese medicinal materials to be identified, and medicinal materials A, B, and C are identified respectively; and if the number of successful matches of medicinal material A is 70, the number of successful matches of medicinal material B is 10, and the number of successful matches of medicinal material C is 5, then it is determined that the number of successful matches of medicinal materials A, B, and C is not in a uniform distribution state, then only medicinal material A is determined as the Chinese medicinal material to be identified for medicinal material quality identification, and medicinal materials B and C are determined as adulterated impurity medicinal materials, and the medicinal materials are removed.

[0097] In step S310, the collected image data is matched with the medicinal material image data in the medicinal material library to identify the medicinal material category of the collected image data, and the recognition result is output accordingly, including the following steps:

[0098] S311, performing image similarity matching on the medicinal material library based on the initial medicinal material information to obtain similar medicinal material information with similarity;

[0099] S312, obtaining color data in the image acquisition data, and color matching the color data with the color data in the initial medicinal material information and the similar medicinal material information respectively;

[0100] S313, if the color data fails to match the initial medicinal material information, it is determined that the medicinal material identification result corresponding to the image acquisition data is empty;

[0101] S314, if the color data successfully matches the initial medicinal material information and / or similar medicinal material information, then the texture data of the successfully matched initial medicinal material information and similar medicinal material information are obtained;

[0102] S315, matching the texture data in the image acquisition data with the texture data of the successfully matched initial medicinal material information and similar medicinal material information to determine whether the texture data in the image acquisition data belongs to the initial medicinal material information and similar medicinal material information;

[0103] S316, if it is determined that the texture data in the image acquisition data fails to match the initial medicinal material information, then it is determined that the medicinal material identification result corresponding to the image acquisition data is empty;

[0104] S317, if it is determined that the texture data in the image acquisition data successfully matches the texture data of only one medicinal material in the initial medicinal material information and the similar medicinal material information, the category of the successfully matched medicinal material is determined as the recognition result of the medicinal material corresponding to the image acquisition data;

[0105] S318, if it is determined that the texture data in the image acquisition data successfully matches the initial medicinal material information and the similar medicinal material information, then a texture data comparison is performed on the initial medicinal material information and the similar medicinal material information whose texture data successfully matches, so as to determine the difference points in texture data between the initial medicinal material information and the similar medicinal material information;

[0106] S319, comparing the texture data in the image acquisition data based on the distinguishing points on the texture data to determine the medicinal material category corresponding to the image acquisition data, and outputting the corresponding recognition result.

[0107] In this embodiment, after using the existing image recognition technology to determine the medicinal material category corresponding to the image acquisition data, the identified medicinal material category is matched with the initial medicinal material information and the similar medicinal material information to determine whether the identified medicinal material information belongs to the initial medicinal material information or the similar medicinal material information. The recognition result is then verified based on the color data and texture data in the image acquisition data to determine the correctness of the recognition result. When the image acquisition data has the same similarity with the initial medicinal material information and the similar medicinal material information during texture data recognition, the initial medicinal material information and the similar medicinal material information are compared to determine the difference between the initial medicinal material information and the similar medicinal material information. The image acquisition data is then verified again based on the difference to determine the category of the image acquisition data, thereby improving the accuracy of the medicinal material category recognition of the image acquisition data and thereby improving the validity of the identification result of the medicinal material.

[0108] For example, in the medicinal material library, there are medicinal materials B and C that are similar to the initial medicinal material information (medicine A). Therefore, when performing medicinal material identification on the image acquisition data, it is possible that medicinal material A is identified as medicinal material B or C, or medicinal material B is identified as medicinal material A. Therefore, when performing medicinal material identification on the medicinal material to be identified based on the image acquisition data, it is necessary to compare the image acquisition data with the initial medicinal material information and similar medicinal material information, that is, to compare the image information of the medicinal material to be identified with the image information of medicinal materials A, B, and C. First, a first preliminary identification is performed based on the color of the medicinal material after baking to determine whether the medicinal material is one of medicinal materials A, B, and C. However, due to different baking environments, there are certain differences in the baked colors. When the difference between the baked color and the color in the medicinal material library is too large, , even if it is the medicinal material category of the initial medicinal material information, the corresponding medicinal material has poor efficacy, so only the medicinal materials to be identified with similar colors need to be identified. After the first identification through color data, the texture of the medicinal material is further accurately identified to determine the specific category of the medicinal material. After comparing the texture data, the specific category of the medicinal material to be identified is determined. When the recognition result is that the texture data has the same similarity with medicinal materials A and B, the difference points of medicinal materials A and B are identified, and then the medicinal material to be identified is determined according to the identification points. For example, medicinal material A has feature a, and medicinal material B has feature b. Therefore, the corresponding medicinal material category is judged by whether there are features a and b in the image acquisition data, which further improves the accuracy of the recognition result.

[0109] In step S318, the texture data of the initial medicinal material information and the similar medicinal material information whose texture data are successfully matched are compared to determine the difference points in texture data between the initial medicinal material information and the similar medicinal material information, including the following steps:

[0110] S318a, obtaining texture data in the initial medicinal material information and the similar medicinal material information, and comparing the original texture data with each other to determine the difference point between the texture data, and obtain a first difference point;

[0111] S318b, performing perspective processing of different degrees on the texture data in the initial medicinal material information and the similar medicinal material information to obtain corresponding perspective texture image data;

[0112] S318c, performing similarity matching of the perspective texture image data of the initial medicinal material information and the perspective texture image data of the similar medicinal material information with the medicinal material texture data in the medicinal material library, obtaining medicinal materials having a certain similarity with the initial medicinal material information and the similar medicinal material information, and recording them as perspective similar medicinal material information;

[0113] S318d, compare the initial medicinal material information, the perspective texture image data of the similar medicinal material information, and the texture data of the perspective similar medicinal material information, determine the difference between the perspective texture image data of the initial medicinal material information and the perspective texture image data of the similar medicinal material information, and the texture data of the perspective similar medicinal material information, and record them as the second difference points.

[0114] In this embodiment, the texture data in the original image data is first compared to determine the difference points in the original state, and then the texture data is perspectively analyzed to different degrees and angles to magnify the originally small difference items, thereby making the judgment result more accurate when judging the difference points. At the same time, the perspective texture image data of the initial medicinal material information and the similar medicinal material information is used to re-match the medicinal material library to further expand the possible recognition interference items in the image acquisition data, thereby further ensuring the accuracy of the recognition result. The difference points between the initial medicinal material information, the perspective texture image data of the similar medicinal material information, and the perspective texture data of the similar medicinal material information are determined, thereby making the recognition result more accurate.

[0115] Exemplarily, when identifying the distinguishing points, the initial medicinal material information and similar medicinal material information are directly compared to determine the distinguishing points on the texture data, and then the image data of the initial medicinal material information and the similar medicinal material information are transformed to determine the distinguishing points after the transformation, thereby ensuring the accuracy of the recognition, and then similar images are screened for the transformed image data to ensure the comprehensiveness of the recognition object of the image acquisition data, thereby further improving the accuracy of the recognition result.

[0116] In step S700, the baking simulation image data and the image data to be identified are compared in shape to determine whether the edge contour image data in the image data to be identified has regularity, and the baking effect of the image data to be identified is judged according to the regularity to obtain the second baking effect data, including the following steps:

[0117] S710, determining whether the baking simulation image data contains edge stereoscopic annotation data based on the baking simulation image data; wherein the edge stereoscopic annotation data may be curling, bending, etc., which is the result of the staff annotating the baking image of the medicinal material when entering the baking effect of the medicinal material.

[0118] S720, if the baking simulation image data does not include the edge stereo annotation data, directly comparing the baking simulation image data with the image data to be identified to obtain second baking effect data;

[0119] S730, if the baked simulation image data includes edge stereo annotation data, then read images at different positions in the image data to be identified to obtain edge image information and intermediate image information;

[0120] S740, comparing the edge image information with the intermediate image information to determine edge image features, and dividing the image data to be identified according to the edge image features to obtain edge contour image data and non-edge contour image data;

[0121] S750, performing edge contour judgment on the edge contour image data to determine whether the outer contour and the inner contour of the edge contour image data are regular;

[0122] S760, if it is determined that both the outer contour and the inner contour of the edge contour image data are regular, the edge image data is determined to be not three-dimensional, and the baking simulation image data is compared with the non-edge contour image data for similarity to obtain second baking effect data;

[0123] S770, if it is determined that the outer contour and / or inner contour of the edge contour image data are irregular, a shadow determination is performed on the outer contour and / or inner contour to determine whether a shadow exists in the edge contour image data and / or the non-edge contour image data at a position corresponding to the irregular outer contour and / or inner contour;

[0124] S780: If it is determined that the edge contour data and / or the non-edge contour image data at the corresponding position have a shadow, the edge contour image data is determined to be three-dimensional, and the baking simulation image data is judged to be similar to the edge contour image data and the non-edge contour image data to obtain second baking effect data.

[0125] In this embodiment, when judging the external shape of the Chinese medicinal materials after baking, not only the baking shape effect of the medicinal materials to be identified is judged on the plane, but also the shape effect of the baking image in the three-dimensional direction is judged, so that the identification effect of the baking image in the shape direction is optimized, thereby making the quality identification result of the Chinese medicinal materials more accurate and effective.

[0126] By reading the three-dimensional annotation data of the baking image data, it is determined whether the Chinese medicinal material will produce an edge three-dimensional effect during the baking process, thereby determining whether it is necessary to perform a shape three-dimensional effect analysis on the image data to be identified, thereby avoiding unnecessary analysis processes and improving analysis efficiency. After determining that a three-dimensional effect analysis is required, the regularity of the edge contour image data of the image data to be identified is judged, so that it is possible to effectively judge whether the medicinal material will have a three-dimensional effect, and then determine the baking effect during baking. After determining that there is no regularity, if a three-dimensional effect occurs, a corresponding shadow effect will be generated at the three-dimensional position. Therefore, the corresponding position shadow judgment is performed on the edge contour image data and the non-edge contour image data, thereby improving the accuracy of judging whether the image data to be identified has a three-dimensional effect, and improving the accuracy of judging the shape of the baking effect of the image data to be identified.

[0127] For example, when Chinese medicinal materials are sliced ​​and then processed and baked, the loss of water in the Chinese medicinal materials will cause the edges of some types of medicinal materials to bend and curl, making the flat slices of medicinal materials become three-dimensional. Therefore, when judging the baking effect of the Chinese medicinal materials, it is possible to determine whether the water separation of the Chinese medicinal materials meets the standard by whether the Chinese medicinal materials have the corresponding curling phenomenon, thereby making a certain judgment on the baking effect and improving the accuracy of the judgment.

[0128] In step S1100, based on the physical and chemical information and the baking effect data, the medicinal material quality identification report is determined, and the medicinal material quality identification report is converted into corresponding QR code information, including the following steps:

[0129] S1110, converting the physical and chemical information and the baking effect data into text information to obtain a corresponding medicinal material quality identification report;

[0130] S1120, converting the medicinal material quality identification report into digital form to obtain digital information;

[0131] S1130, randomly generate a QR code information, and input the digitized information into the QR code to obtain the QR code information with the medicinal material quality identification report;

[0132] S1140, the staff will match and bind the QR code information with the corresponding identified Chinese medicinal materials, and paste it on the packaging of the corresponding Chinese medicinal materials.

[0133] In this embodiment, after being determined by physical and chemical information and baking effects, the corresponding identification results are converted into text information, thereby integrating the corresponding medicinal material quality identification report, and converting the text version of the identification report information into a data stream, and inputting the data stream into a QR code to ensure that buyers can determine the quality information of the purchased medicinal materials by scanning the QR code, thereby ensuring the visibility of the medicinal material identification results and improving the credibility of the store.

[0134] Compared with the existing traditional Chinese medicine quality identification and analysis method based on two-dimensional code, the present invention improves the effectiveness of the identification results.

[0135] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for quality identification and analysis of traditional Chinese medicine based on QR code, characterized in that: include: Obtain the medicinal material category of the Chinese medicinal material to be identified, and match the information with the medicinal material library in the system according to the medicinal material category to obtain the initial medicinal material information of the corresponding medicinal material category; Perform image acquisition on the Chinese medicinal materials to be identified to obtain image acquisition data of the corresponding Chinese medicinal materials; Identify the medicinal material category based on the image acquisition data, obtain the identification result of the corresponding image acquisition data, and compare the identification result with the initial medicinal material information to screen out the image acquisition data with the same initial medicinal material information and record it as the image data to be identified; Based on the category of medicinal materials corresponding to the image data to be identified, determining the baked image data of the medicinal materials in the medicinal material library; Based on the baked image data and the image data to be identified, determining the perspective relationship between the baked image data and the image data to be identified, and performing perspective simulation on the baked image data based on the perspective relationship to obtain baked simulated image data having the same perspective direction and perspective degree as the image data to be identified; Performing color comparison between the baking simulation image data and the image data to be identified to obtain first baking effect data; Performing shape comparison between the baking simulation image data and the image data to be identified to determine whether the edge contour image data in the image data to be identified has regularity, and performing baking effect judgment on the image data to be identified according to the regularity to obtain second baking effect data; Performing surface feature judgment on the image data to be identified to obtain third baking effect data; Determine baking effect data of the image data to be identified in a comprehensive state based on the first baking effect data, the second baking effect data, and the third baking effect data; Perform physical and chemical identification on the Chinese medicinal materials corresponding to the image data to be identified to obtain physical and chemical information; Based on the physical and chemical information and baking effect data, the medicinal material quality identification report is determined, and the medicinal material quality identification report is converted into corresponding QR code information.

2. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 1, characterized in that: The method of obtaining the medicinal material category of the Chinese medicinal material to be identified and matching the information with the medicinal material library in the system according to the medicinal material category to obtain the initial medicinal material information of the corresponding medicinal material category is as follows: Obtaining the medicinal material category information of the Chinese medicinal material input by the user, and performing database judgment on the medicinal material category information to determine the information level of the Chinese medicinal material input by the user; the information level is the degree of detail of the medicinal material category information; The medicinal material library is matched based on the medicinal material category information and information level to determine the initial medicinal material information of the corresponding Chinese medicinal material; the initial medicinal material information includes the medicinal material name, medicinal material origin, medicinal material image data and baking image data.

3. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 1, characterized in that: The medicinal material category is identified based on the image acquisition data to obtain the identification result of the corresponding image acquisition data, and the identification result is compared with the initial medicinal material information to screen out the image acquisition data that is the same as the initial medicinal material information and record it as the image data to be identified, specifically: Matching the collected image data with the medicinal material image data in the medicinal material library to identify the medicinal material category of the collected image data, and outputting the recognition result accordingly; The recognition result is the medicinal material category of the collected image acquisition data; Match the identification result with the initial medicinal material information to determine whether the identification result is the same as the user's Chinese medicinal material to be identified; If the recognition result successfully matches the initial medicinal material information, it is determined that the recognition result is the same as the user's Chinese medicinal material to be identified; If the identification result fails to match the initial medicinal material information, it is determined that the identification result is different from the user's Chinese medicinal material to be identified; The medicinal materials whose recognition results are different from the user's to-be-identified Chinese medicinal materials are filtered out, and the image acquisition data corresponding to the medicinal materials whose recognition results are the same as the user's to-be-identified Chinese medicinal materials are recorded as the image data to be identified.

4. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 3, characterized in that: The method further includes: identifying the medicinal material category based on the image acquisition data, obtaining an identification result corresponding to the image acquisition data, and comparing the identification result with the initial medicinal material information to screen out the image acquisition data that is the same as the initial medicinal material information and recording it as the image data to be identified; If there are multiple matching items in the matched initial medicinal material information, the recognition result is matched with the multiple initial medicinal material information, and the matching results of each initial medicinal material information are counted to obtain the matching result data corresponding to the initial medicinal material information; The matching result data of each initial medicinal material information is judged to determine the data relationship between the matching quantities of each initial medicinal material information; If the matching quantity distribution of each initial medicinal material information is uniform, the Chinese medicinal materials to be identified are classified according to the matching results, and the roasting effect of the classified Chinese medicinal materials to be identified is identified; If the matching quantity distribution of each initial medicinal material information is not uniform, the Chinese medicinal materials to be identified are classified according to the matching results, and the Chinese medicinal materials to be identified with the smallest matching data after classification are filtered and screened.

5. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 3, characterized in that: The identification result is matched with the initial medicinal material information to determine whether the identification result is the same as the user's Chinese medicinal material to be identified, specifically: Based on the initial medicinal material information, image similarity matching is performed on the medicinal material library to obtain similar medicinal material information with similarity; Acquire color data in the image acquisition data, and perform color matching on the color data with the color data in the initial medicinal material information and the similar medicinal material information; If the color data fails to match the initial medicinal material information, it is determined that the medicinal material identification result corresponding to the image acquisition data is empty; If the color data successfully matches the initial medicinal material information and / or similar medicinal material information, the texture data of the successfully matched initial medicinal material information and similar medicinal material information are obtained; Matching the texture data in the image acquisition data with the texture data of the successfully matched initial medicinal material information and similar medicinal material information to determine whether the texture data in the image acquisition data belongs to the initial medicinal material information and similar medicinal material information; If it is determined that the texture data in the image acquisition data fails to match the initial medicinal material information, then the medicinal material identification result corresponding to the image acquisition data is determined to be empty; If it is determined that the texture data in the image acquisition data successfully matches the texture data of only one medicinal material in the initial medicinal material information and the similar medicinal material information, the category of the successfully matched medicinal material is determined as the recognition result of the medicinal material corresponding to the image acquisition data; If it is determined that the texture data in the image acquisition data successfully matches the initial medicinal material information and the similar medicinal material information, a texture data comparison is performed on the initial medicinal material information and the similar medicinal material information whose texture data successfully matches, so as to determine the difference points in texture data between the initial medicinal material information and the similar medicinal material information; The texture data in the image acquisition data is compared based on the difference points on the texture data to determine the medicinal material category corresponding to the image acquisition data, and the corresponding recognition result is output.

6. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 5, characterized in that: The texture data of the initial medicinal material information and the similar medicinal material information whose texture data are successfully matched are compared to determine the difference points in texture data between the initial medicinal material information and the similar medicinal material information, specifically: Acquire texture data in the initial medicinal material information and the similar medicinal material information, compare the original texture data with each other to determine the difference point between the texture data, and obtain the first difference point; Performing perspective processing to different degrees on the texture data in the initial medicinal material information and similar medicinal material information to obtain corresponding perspective texture image data; Perform similarity matching between the perspective texture image data of the initial medicinal material information and the perspective texture image data of the similar medicinal material information and the medicinal material texture data in the medicinal material library, and obtain medicinal materials with a certain degree of similarity to the initial medicinal material information and the similar medicinal material information, and record them as perspective similar medicinal material information; The initial medicinal material information, the perspective texture image data of similar medicinal material information, and the texture data of the perspective similar medicinal material information are compared with each other to determine the difference between the perspective texture image data of the initial medicinal material information and the perspective texture image data of similar medicinal material information and the texture data of the perspective similar medicinal material information, and record them as the second difference points.

7. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 1, characterized in that: The baking simulation image data is compared with the image data to be identified in shape to determine whether the edge contour image data in the image data to be identified has regularity, and the baking effect of the image data to be identified is judged according to the regularity to obtain the second baking effect data, which is specifically: Determining whether the baked simulated image data includes edge stereo annotation data based on the baked simulated image data; If the baking simulation image data does not include the edge stereo annotation data, the baking simulation image data and the image data to be identified are directly compared to obtain second baking effect data; If the baked simulation image data contains edge stereo annotation data, images at different positions in the image data to be identified are read to obtain edge image information and intermediate image information; The edge image information is compared with the intermediate image information to determine the edge image characteristics, and the image data to be identified is divided according to the edge image characteristics to obtain edge contour image data and non-edge contour image data; Performing edge contour judgment on the edge contour image data to determine whether the outer contour and inner contour of the edge contour image data are regular; If it is determined that both the outer contour and the inner contour of the edge contour image data are regular, the edge image data is determined to be not three-dimensional, and the baking simulation image data is compared with the non-edge contour image data for similarity to obtain second baking effect data; If it is determined that the outer contour and / or inner contour of the edge contour image data are irregular, a shadow judgment is performed on the outer contour and / or inner contour to determine whether there is a shadow in the edge contour image data and / or the non-edge contour image data at a position corresponding to the irregular outer contour and / or inner contour; If it is determined that the edge contour data and / or non-edge contour image data at the corresponding position have a shadow, the edge contour image data is determined to be three-dimensional, and the baking simulation image data is judged to be similar to the edge contour image data and the non-edge contour image data to obtain second baking effect data.

8. A method for quality identification and analysis of traditional Chinese medicine based on a two-dimensional code according to claim 1, characterized in that: Based on the physical and chemical information and the baking effect data, the medicinal material quality identification report is determined, and the medicinal material quality identification report is converted into corresponding QR code information, specifically: Convert physical and chemical information and baking effect data into text information to obtain the corresponding medicinal material quality identification report; Convert the medicinal material quality identification report into digital form to obtain digital information; A QR code is randomly generated, and the digitized information is input into the QR code to obtain a QR code with a medicinal material quality identification report; The staff will match and bind the QR code information with the corresponding identified Chinese medicinal materials, and paste it on the packaging of the corresponding Chinese medicinal materials.