Traditional Chinese medicine prescription checking method and computer equipment

By identifying the drug information and multiple rounds of verification of the Chinese medicine package images, the problems of low efficiency and poor accuracy of Chinese herbal prescription verification are solved, and automated Chinese medicine prescription verification is realized, improving the quality and safety of medicinal materials.

CN118898853APending Publication Date: 2024-11-05WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410963855.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

The verification process of traditional Chinese herbal medicine prescriptions in the prior art relies on manual comparison, which is inefficient and difficult to ensure accuracy, which affects the quality and safety of medicinal materials.

Method used

By obtaining the Chinese medicine prescription to be checked and the Chinese medicine package images of the medicinal materials that have been captured, the images are identified using drug information recognition technology, and the drug identification results are generated, and multiple rounds of checks are carried out based on the recognition results to determine whether the drug name and dosage match, and output Prompt information to guide the grabbing and adjustment of medicinal materials.

Benefits of technology

The verification of traditional Chinese medicine prescriptions can be completed without manual participation, which improves the quality and efficiency of verification, reduces the risk of errors in the preparation of medicinal materials, and improves the quality of medical care and the safety of patients' medication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898853A_ABST
    Figure CN118898853A_ABST
Patent Text Reader

Abstract

The invention provides a traditional Chinese medicine prescription checking method and computer equipment, and relates to the technical field of traditional Chinese medicine prescription processing, and the method comprises the steps: obtaining a to-be-checked target traditional Chinese medicine prescription; acquiring a plurality of to-be-checked traditional Chinese medicine bag images of the grabbed medicinal materials for multiple times; medicine information identification is carried out on the multiple traditional Chinese medicine bag images, medicine identification results of the multiple traditional Chinese medicine bag images are obtained, and the medicine identification result of each traditional Chinese medicine bag image comprises medicine information of at least one traditional Chinese medicine bag; and checking the target traditional Chinese medicine prescription according to the recognition results of the multiple traditional Chinese medicine bag images, and generating a checking result of the target traditional Chinese medicine prescription. The traditional Chinese medicine prescription checking method does not need manual correction, and the checking quality is improved, so that the medical quality and the medication safety of patients are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of traditional Chinese medicine prescription processing, and in particular, to a traditional Chinese medicine prescription verification method and computer equipment. Background Art

[0002] With the rapid development of modern medicine, the advantages of Chinese herbal medicine in treating diseases have gradually been recognized. However, due to the wide variety of Chinese herbal medicines and their complex efficacy, mistakes can still occur when picking medicines. The size of the site, the dosage of Chinese herbal medicines, dry environment, and human errors can all affect the quality and efficiency of picking medicines, so verification is essential.

[0003] To this end, the traditional method of grabbing mainly relies on another Chinese medicine pharmacist to compare the medicinal materials in the prescription and each piece of information of the Chinese medicine grabbing results one by one after grabbing the medicine, find the matching medicinal materials and record the dosage of the medicinal materials.

[0004] However, Chinese herbal medicines have a wide variety of compositions, and the compatibility of different medicinal materials is complex. Manual comparison of prescriptions alone requires a lot of time and manpower, and is inefficient. During the manual comparison process, it is difficult to ensure accuracy and efficiency due to the large number and variety of medicinal materials. Summary of the invention

[0005] The purpose of this application is to provide a Chinese medicine prescription verification method and computer equipment to address the deficiencies in the above-mentioned prior art. The Chinese medicine prescription verification method in this application does not require manual correction, improves the verification quality, and thus improves the medical quality and patient medication safety.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for checking a Chinese medicine prescription, the method comprising:

[0008] Obtaining a target Chinese medicine prescription to be checked;

[0009] Acquire multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be checked;

[0010] Performing drug information recognition on the plurality of Chinese medicine package images to obtain drug recognition results of the plurality of Chinese medicine package images, wherein the drug recognition result of each Chinese medicine package image includes: drug information of at least one Chinese medicine package;

[0011] According to the recognition results of the multiple Chinese medicine package images, the target Chinese medicine prescription is checked to generate a check result of the target Chinese medicine prescription.

[0012] Optionally, the drug information of each traditional Chinese medicine package includes: drug name and drug specification;

[0013] The method of checking the target Chinese medicine prescription according to the recognition results of the plurality of Chinese medicine package images and generating a checking result of the target Chinese medicine prescription includes:

[0014] Perform multiple rounds of verification on the drug names in the recognition results of the multiple Chinese medicine package images and the target Chinese medicine prescription in turn to obtain multiple rounds of verification results;

[0015] According to the multiple rounds of verification results, determine the drug data of all target Chinese medicine packages that have passed the name verification, and the drug data of each target Chinese medicine package includes: the drug name, drug specification and quantity of the target Chinese medicine package;

[0016] The drug data of all the target Chinese medicine packages are checked against the target Chinese medicine prescription to generate a check result of the target Chinese medicine prescription.

[0017] Optionally, the sequentially performing multiple rounds of verification on the drug names in the recognition results of the multiple Chinese medicine package images and the target Chinese medicine prescription to obtain multiple rounds of verification results includes:

[0018] In each round of verification, determining whether the drug name in the recognition result of a traditional Chinese medicine package image is within the drug range of the target traditional Chinese medicine prescription;

[0019] If the drug name in the recognition result of the one Chinese medicine package image is within the drug range of the target Chinese medicine prescription, storing the recognition result of the one Chinese medicine package image in a preset cache;

[0020] Determining the drug data of all target traditional Chinese medicine packages whose names have passed the name verification based on the multiple rounds of verification results includes:

[0021] After the multiple rounds of verification are completed, the drug data of all the target Chinese medicine packages are determined based on the recognition results of the multiple target Chinese medicine package images in the preset cache.

[0022] Optionally, the checking the drug data of all the target Chinese medicine packages and the target Chinese medicine prescription to generate a checking result of the target Chinese medicine prescription includes:

[0023] In the preset cache, the names of the multiple medicines in the target Chinese medicine prescription are matched with the names of the medicines in all the target Chinese medicine packages to obtain a medicine matching result, and the medicine matching result is used to indicate whether the medicines in the target Chinese medicine prescription are missing from the multiple grabbed medicinal materials;

[0024] Analyze the single dosage of each target medicine in all target Chinese medicine packages corresponding to the target Chinese medicine prescription, the number of doses in the target Chinese medicine prescription, and the drug specifications and quantities of all target Chinese medicine packages to obtain a drug dosage analysis result, which is used to indicate whether the drug dosage of the multiple grabbed medicinal materials matches the drug dosage of the target Chinese medicine prescription;

[0025] The verification result of the target Chinese medicine prescription includes: the drug matching result and the drug dosage analysis result.

[0026] Optionally, the method also includes: if the drug name in the recognition result of the Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, outputting a first prompt message to indicate that the captured medicinal materials corresponding to the Chinese medicine package image are incorrectly captured medicinal materials and need to be re-captured.

[0027] Optionally, the method further includes: if the drug matching result indicates that the first medicinal material of the target Chinese medicine prescription is missing from the multiple grabbed medicinal materials, outputting second prompt information to instruct to grab the first medicinal material;

[0028] If the drug dosage analysis result indicates that there is a second drug whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the multiple grabbed drugs, a third prompt message is output to instruct to adjust the dosage of the second drug.

[0029] Optionally, the method further includes: if the verification result of the target Chinese medicine prescription is successful, storing the target Chinese medicine prescription, the multiple Chinese medicine package images, and the drug recognition results of the multiple Chinese medicine package images in a preset database.

[0030] Optionally, the performing drug information recognition on the plurality of traditional Chinese medicine package images to obtain drug recognition results of the plurality of traditional Chinese medicine package images includes:

[0031] Dividing each of the traditional Chinese medicine package images into medicine package regions to obtain at least one medicine package region image corresponding to each of the traditional Chinese medicine package images;

[0032] Drug information is identified on the at least one medicine package area image to obtain drug information of the at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image.

[0033] Optionally, the performing drug information recognition on the at least one medicine package area image to obtain the drug information of the at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image includes:

[0034] Performing optical character recognition on the at least one medicine package area image to obtain a recognition character corresponding to the at least one medicine package area image;

[0035] Generate drug information of the at least one Chinese medicine package according to a preset Chinese herbal medicine data dictionary and identification characters corresponding to the at least one medicine package area image;

[0036] Alternatively, a preset text detection model is used to perform text detection on the at least one medicine package area image to obtain a recognition text corresponding to the at least one medicine package area image;

[0037] The drug information of the at least one Chinese medicine package is generated according to the preset Chinese herbal medicine data dictionary and the recognition text corresponding to the at least one medicine package area image.

[0038] In a second aspect, another embodiment of the present application provides a Chinese medicine prescription checking device, the device comprising:

[0039] The first acquisition module is used to acquire the target Chinese medicine prescription to be checked;

[0040] The second acquisition module is used to acquire multiple images of Chinese medicine packages of medicinal materials that have been grabbed multiple times to be checked;

[0041] an identification module, configured to identify drug information of the plurality of images of traditional Chinese medicine packages, and obtain drug identification results of the plurality of images of traditional Chinese medicine packages, wherein the drug identification result of each image of traditional Chinese medicine package includes: drug information of at least one traditional Chinese medicine package;

[0042] The verification module is used to verify the target Chinese medicine prescription according to the recognition results of the multiple Chinese medicine package images and generate a verification result of the target Chinese medicine prescription.

[0043] In the third aspect, another embodiment of the present application provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the Chinese medicine prescription verification method as described in any one of the first aspects above.

[0044] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for checking traditional Chinese medicine prescriptions as described in any one of the first aspects above are executed.

[0045] The beneficial effects of this application are:

[0046] The present application provides a method and computer device for checking Chinese medicine prescriptions, which obtains a target Chinese medicine prescription to be checked and multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be checked, identifies drug information on the multiple Chinese medicine package images, obtains drug identification results of the multiple Chinese medicine package images, and checks the target Chinese medicine prescription according to the identification results of the multiple Chinese medicine package images to generate the verification results of the target Chinese medicine prescription. The present application does not require manual participation in the Chinese medicine prescription verification process, and the verification results can be obtained by checking the drug identification results obtained by performing drug information identification on multiple Chinese medicine package images with the target Chinese medicine prescription, thereby reducing the probability of errors due to manual correction, improving the verification quality, thereby improving medical quality and patient medication safety, and helping hospitals reduce the risks caused by herbal medicine grabbing problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A schematic diagram of a flow chart of a method for checking a traditional Chinese medicine prescription provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a flow chart of generating verification results in a method for identifying a traditional Chinese medicine prescription provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of a Chinese medicine package image to be identified provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of a process for determining drug data of a target Chinese medicine package in a Chinese medicine prescription verification method provided in an application embodiment;

[0052] Figure 5 A schematic diagram of a process for determining a verification result in another method for verifying a Chinese medicine prescription is provided for an embodiment of the present application;

[0053] Figure 6 A schematic diagram of outputting prompt information in the first Chinese medicine prescription verification method provided in the application;

[0054] Figure 7 A schematic diagram of outputting prompt information in the second method for checking Chinese medicine prescriptions provided in the application;

[0055] Figure 8 A schematic diagram of outputting prompt information in the third method for checking Chinese medicine prescriptions provided in the application;

[0056] Fig. 9 A schematic diagram of a process for determining drug information in a first method for checking a traditional Chinese medicine prescription provided in an embodiment of the present application;

[0057] Fig.10 A schematic diagram of a process for determining drug information in a second method for checking a traditional Chinese medicine prescription provided in an embodiment of the present application;

[0058] Fig.11 A schematic diagram of a process for determining drug information in a third method for checking a traditional Chinese medicine prescription provided in an embodiment of the present application;

[0059] Fig.12 A schematic diagram of the structure of a Chinese medicine prescription checking device provided in an embodiment of the present application;

[0060] Fig.13 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0062] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0063] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0064] For a long time, the preparation process of Chinese medicine usually involves laying out large and small packaging papers on the counter, and using a small medicine scale to dispense medicine according to the dosage. A prescription generally requires six or seven doses, and one dose contains a few to dozens of medicines. Each medicine must be packaged separately, and the corresponding medicine name must be placed in each small package to ensure that the patient checks it once when decocting the medicine to prevent mistakes. After the medicine is packaged, it must be checked again, and then delivered to the patient after verification. In this process, the size of the site, the dosage of Chinese herbal medicine, the dryness / humidity of the environment, and human errors will affect the quality and efficiency of dispensing medicine, so verification is an indispensable link. With the development of the times, Chinese herbal medicines are now vacuum-packed into different doses of 3 grams, 5 grams, 6 grams, etc., reducing the influence of factors such as the environment of Chinese herbal medicines. However, since there are many medicines contained in a Chinese herbal medicine, mistakes will still occur in dispensing medicine, and the verification process is indispensable. The verification personnel need to carefully check the dosage and number of doses of the medicine according to the prescription. Since it is a manual verification, the verification is still time-consuming and errors exist. To this end, the present application provides a method for checking Chinese medicine prescriptions, which obtains a target Chinese medicine prescription to be checked and multiple Chinese medicine package images of multiple grabbed medicinal materials to be checked, and obtains drug identification results of multiple Chinese medicine package images by identifying drug information on multiple Chinese medicine package images, and generates a check result by comparing the drug identification results of multiple Chinese medicine package images with the target Chinese medicine prescription. The Chinese medicine prescription checking method in the present application does not require manual correction, improves the checking quality, thereby improving the medical quality and patient medication safety, and helping hospitals reduce the risks caused by herbal medicine grabbing problems.

[0065] Figure 1 A schematic diagram of a method for checking a Chinese medicine prescription provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0066] Step 101: Obtain a target Chinese medicine prescription to be verified.

[0067] Among them, the target Chinese medicine prescription includes drug information, which may be information such as drug name, dosage, number of flavors, single-stick quantity, etc., and the embodiment of the present application does not limit this. The drug name is used to indicate the drugs in the target Chinese medicine prescription, for example, white peony root, cooked rehmannia root, roasted licorice root, stir-fried oxalis, stir-fried mustard, stir-fried fennel, sapodilla thorn, honey ephedra, etc. The embodiment of the present application does not limit the drug name; the dosage is used to indicate the weight or volume parameters corresponding to different drugs, for example, the figure shows that white peony root is 6g, cooked rehmannia root is 12g, etc., and the embodiment of the present application does not limit this; the number of flavors is used to indicate the total number of drugs in the target Chinese medicine prescription; the single-stick quantity is used to indicate the sum of the dosages of all drugs in the target Chinese medicine prescription.

[0068] Optionally, a target Chinese medicine prescription to be checked is obtained. The target Chinese medicine prescription can be a target Chinese medicine pharmacy obtained from the prescribing physician through the hospital information system, or it can be a target Chinese medicine prescription obtained from the patient and then uploaded by the checking personnel. This embodiment of the present application does not impose any restrictions on this.

[0069] Step 102: Acquire multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be verified.

[0070] Among them, the medicinal materials are vacuum-packed into different specifications such as 3 grams, 5 grams, and 6 grams. The corresponding Chinese medicine package is determined according to the captured drug dosage. In the case of excessive drug dosage, a single drug may have multiple Chinese medicine packages. A Chinese medicine package cannot appear in different Chinese medicine package images. For example, Chinese medicine package A has appeared in Chinese medicine package image 1, so Chinese medicine package A cannot appear in other Chinese medicine package images except Chinese medicine package image 1.

[0071] Optionally, in the process of acquiring images, it is not possible to cover all the images of the Chinese medicine packages of the grabbed medicinal materials with one image. To ensure that the images of the Chinese medicine packages of the grabbed medicinal materials are acquired, it is necessary to acquire multiple images of the Chinese medicine packages of the grabbed medicinal materials to be checked.

[0072] Step 103: perform drug information recognition on the multiple Chinese medicine package images to obtain drug recognition results for the multiple Chinese medicine package images.

[0073] The drug recognition result of each Chinese medicine package image includes: drug information of at least one Chinese medicine package. The drug information is used to indicate the drug name, drug efficacy, drug specifications, precautions and other information, which is not limited in the embodiment of the present application.

[0074] Optionally, the drug information on the multiple Chinese medicine package images is recognized by a text recognition method, thereby obtaining drug recognition results of the multiple Chinese medicine package images, and the drug recognition results include at least one Chinese medicine package. The text recognition method can be an optical character recognition method, a deep learning model recognition method, etc., and the embodiment of the present application does not limit this.

[0075] Step 104: Verify the target Chinese medicine prescription based on the recognition results of the multiple Chinese medicine package images, and generate a verification result of the target Chinese medicine prescription.

[0076] Optionally, the drug information in the recognition results of the multiple Chinese medicine package images is compared with the drug information in the target prescription, thereby obtaining a verification result of the target Chinese medicine prescription. If the drug information in the recognition results of the multiple Chinese medicine package images is exactly the same as the drug information in the target Chinese medicine prescription, the verification result is a successful verification; if the drug information in the recognition results of the multiple Chinese medicine package images is different from the drug information in the target Chinese medicine prescription, the verification result is a failed verification.

[0077] The present application provides a method for checking a Chinese medicine prescription, which obtains a target Chinese medicine prescription to be checked and multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be checked, performs drug information recognition on the multiple Chinese medicine package images, obtains drug recognition results of the multiple Chinese medicine package images, and checks the target Chinese medicine prescription according to the recognition results of the multiple Chinese medicine package images to generate a verification result of the target Chinese medicine prescription. The present application does not require manual participation in the Chinese medicine prescription verification process. The drug recognition results obtained by performing drug information recognition on multiple Chinese medicine package images are checked with the target Chinese medicine prescription to obtain a verification result, which reduces the probability of errors due to manual correction, improves the verification quality, and thus improves the medical quality and patient medication safety, and helps hospitals reduce the risks caused by herbal medicine grabbing problems.

[0078] Based on the above embodiment, the drug information of each Chinese medicine package includes: drug name and drug specification. To this end, the present application provides a process for generating verification results in a Chinese medicine prescription recognition method. Figure 2 A schematic diagram of a flow chart of generating verification results in a method for identifying a traditional Chinese medicine prescription provided in an embodiment of the present application, such as Figure 2 As shown, in the above step 104, the target Chinese medicine prescription is checked according to the recognition results of the plurality of Chinese medicine package images, and the check result of the target Chinese medicine prescription is generated, including:

[0079] Step 201 : performing multiple rounds of verification on the drug names and target Chinese medicine prescriptions in the recognition results of multiple Chinese medicine package images in turn to obtain multiple rounds of verification results.

[0080] Among them, the drug name in the recognition result can be a drug name or a drug alias. There is a one-to-many relationship between the drug name and the drug alias. For example, "Coptis chinensis" is the drug name, and the drug aliases include "Chuanlian", "Weilian" and "Yalian".

[0081] For example, Figure 3 A schematic diagram of a Chinese medicine package image to be identified provided in an embodiment of the present application, such as Figure 3 As shown in FIG. 1 , a Chinese medicine package image includes multiple Chinese medicine packages, each of which has a medicine name and medicine specifications. By recognizing the Chinese medicine package image, the medicine names and medicine specifications of different Chinese medicine packages in the Chinese medicine package image can be determined.

[0082] Optionally, the drug names or drug aliases in the recognition results of multiple traditional Chinese medicine packages are compared with the drug names in the target traditional Chinese medicine prescriptions in turn, thereby obtaining multiple rounds of verification results.

[0083] For example, the names of the medicines in the recognition result of a Chinese medicine package image are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, Acorus calamus and Coptis chinensis, and the names of the medicines in the target Chinese medicine prescription are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, Acorus calamus and stir-fried chicken gizzard lining. At this time, the recognition result of the Chinese medicine package image is compared with the names of the medicines in the target Chinese medicine prescription to obtain a verification result. The Chinese medicine package images are verified in turn according to the above method, and all the Chinese medicine package images are verified.

[0084] Step 202: According to the results of multiple rounds of verification, the drug data of all target Chinese medicine packages that have passed the name verification are determined.

[0085] Among them, the drug data of each target Chinese medicine package includes: the drug name, drug specifications and quantity of the target Chinese medicine package.

[0086] Optionally, multiple rounds of verification results are obtained, and images of Chinese medicine packages that have passed the verification are determined from the multiple rounds of verification results, and the drug name, drug specification and quantity of the target Chinese medicine package are determined from the Chinese medicine package images.

[0087] Step 203: Verify the drug data of all target Chinese medicine packages and the target Chinese medicine prescription to generate a verification result of the target Chinese medicine prescription.

[0088] Optionally, the drug name, drug specification and quantity of the target Chinese medicine package are compared with the drug information in the target Chinese medicine prescription to generate a verification result of the target Chinese medicine prescription.

[0089] In an embodiment of the present application, by comparing the drug names in the recognition results of multiple Chinese medicine package images with the target Chinese medicine prescription, the drug data of the verified target Chinese medicine package can be quickly determined, and then the drug data of the verified target Chinese medicine package can be compared with the target Chinese medicine prescription, so that subsequent verification can be carried out more centrally, thereby improving verification efficiency and reducing unnecessary waste of resources.

[0090] Based on the above embodiments, the present application also provides a process for determining drug data of a target Chinese medicine package in a Chinese medicine prescription verification method. Figure 4 A schematic diagram of a process for determining drug data of a target Chinese medicine package in a Chinese medicine prescription verification method provided in an application embodiment, such as Figure 4 As shown, in the above step 201, the drug names in the recognition results of the plurality of images of traditional Chinese medicine packages and the target traditional Chinese medicine prescriptions are checked multiple times in sequence to obtain the multiple rounds of checking results, including:

[0091] Step 401: In each round of verification, determine whether the drug name in the recognition result of a Chinese medicine package image is within the drug range of the target Chinese medicine prescription.

[0092] For example, the names of medicines in the recognition results of a Chinese medicine package image are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, Acorus calamus and Coptis chinensis, and the names of medicines in the target Chinese medicine prescription are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, Acorus calamus and stir-fried chicken gizzard lining. Then, some of the medicine names in the recognition results of the Chinese medicine package image are not included in the drug names of the target Chinese medicine prescription, and the Chinese medicine package image fails the verification.

[0093] For example, the names of the medicines in the recognition results of a certain Chinese medicine package image are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, and Acorus calamus, and the names of the medicines in the target Chinese medicine prescription are: Salvia miltiorrhiza, Astragalus membranaceus, stir-fried Atractylodes macrocephala with bran, processed Polygala tenuifolia root, Acorus calamus, and stir-fried chicken gizzard lining. At this time, the names of the medicines in the recognition results of the Chinese medicine package image are all within the names of the medicines in the target Chinese medicine prescription, and the Chinese medicine package image has passed the verification.

[0094] If the drug name in the recognition result of a Chinese medicine package image is within the drug range of the target Chinese medicine prescription, step 402 is executed.

[0095] Step 402: store the recognition result of a Chinese medicine package image in a preset cache.

[0096] The preset cache may be a fast memory, and the speed of data access and system performance may be improved by setting the preset cache.

[0097] Optionally, before storing the recognition result of a Chinese medicine package image in a preset cache, all the contents stored in the preset cache are cleared. When the drug name in the recognition result of a Chinese medicine package image is within the drug range of the target Chinese medicine prescription, the recognition result of the Chinese medicine package image is stored in the preset cache, and the recognition number is recorded. The recognition number is used to indicate the number of Chinese medicine package images whose drug names in the recognition result of the Chinese medicine package image are within the drug range of the target Chinese medicine prescription during the verification process of the target Chinese medicine prescription to be verified. If the drug name in the recognition result of a Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, it is not stored in the preset cache.

[0098] As in the above step 202, based on the results of multiple rounds of verification, the drug data of all target Chinese medicine packages that have passed the name verification are determined, including:

[0099] Step 403: After multiple rounds of verification are completed, the drug data of all target Chinese medicine packages are determined based on the recognition results of multiple target Chinese medicine package images in the preset cache.

[0100] Optionally, the drug names in the recognition results of the multiple Chinese medicine package images are sequentially compared with the drug range in the target Chinese medicine prescription, and the Chinese medicine package images whose drug names in the recognition results of the Chinese medicine package images are within the drug range of the target Chinese medicine prescription are determined from the multiple Chinese medicine package images, and the Chinese medicine package images whose drug names in the recognition results of the Chinese medicine package images are within the drug range of the target Chinese medicine prescription are stored in the wallpaper preset cache. In this way, the drug name, drug specification and quantity of the target Chinese medicine package in the recognition results of the multiple Chinese medicine package images in the preset cache are respectively determined.

[0101] In an embodiment of the present application, images of Chinese medicine packages whose drug names are within the drug range of a target Chinese medicine prescription in the recognition results are stored in a preset cache, and drug data of the target Chinese medicine package is determined from the preset cache, thereby reducing the operating pressure of the system and avoiding repeated image recognition processes. The recognition results of the Chinese medicine package images that have been recognized are directly obtained from the cache, thereby greatly improving the recognition speed.

[0102] On the basis of the above embodiment, the present application also provides another process for determining the verification result in the traditional Chinese medicine prescription verification method. Figure 5 A schematic diagram of a process for determining a verification result in another method for verifying a Chinese medicine prescription is provided for an embodiment of the present application, such as Figure 5 As shown, in the above step 203, the drug data of all target Chinese medicine packages and the target Chinese medicine prescription are checked to generate the check result of the target Chinese medicine prescription, including:

[0103] Step 501: In a preset cache, the names of multiple medicines in a target Chinese medicine prescription are matched with the names of medicines in all target Chinese medicine packages to obtain a medicine matching result.

[0104] Among them, the drug matching result is used to indicate whether the target Chinese medicine prescription is missing in the multiple captured medicinal materials.

[0105] For example, when the names of multiple medicines in the target Chinese medicine prescription are: white peony root, prepared rehmannia root, roasted licorice, stir-fried milk vetch, stir-fried mustard seed, stir-fried rhizome of Smilax glabra, thorny soapberry, honey ephedra, ginger charcoal, calcined walnut seeds, kelp and antler slices, and the names of the medicines in the target Chinese medicine package are white peony root, prepared rehmannia root, roasted licorice, thorny soapberry, honey ephedra, ginger charcoal, calcined walnut seeds, kelp and antler slices, the matching result of the medicines obtained shows that three medicines, stir-fried milk vetch, stir-fried mustard seed and stir-fried rhizome of Smilax glabra, are missing from the captured medicinal materials in the target Chinese medicine package.

[0106] Step 502: Analyze the single dosage of each target medicine in all target Chinese medicine packages in the target Chinese medicine prescription, the number of doses in the target Chinese medicine prescription, and the drug specifications and quantities of all target Chinese medicine packages to obtain a drug dosage analysis result.

[0107] The drug dosage analysis result is used to indicate whether the drug dosage of the captured medicinal materials matches the drug dosage of the target Chinese medicine prescription. The verification result of the target Chinese medicine prescription includes: drug matching result and drug dosage analysis result. The preset cache also stores the drug name and the dosage corresponding to the drug name of the target Chinese medicine package identified this time.

[0108] Optionally, when the matching results of the names of multiple medicines in the target Chinese medicine prescription and the names of the medicines in all target Chinese medicine packages are completely consistent, the dosages corresponding to different medicine names are determined according to the single-dose quantity of each target medicine in all target Chinese medicine packages in the target Chinese medicine prescription and the number of doses of the target Chinese medicine prescription, and the dosages corresponding to different medicine names in the target Chinese medicine packages are determined according to the drug specifications and quantities of all target Chinese medicine packages, and analysis is performed to obtain the dosage analysis results.

[0109] For example, the single dose of Radix Rehmanniae is 12g, and the target Chinese medicine prescription is 1 dose. At this time, the dose of Radix Rehmanniae in the target Chinese medicine prescription is 12g. The dose of the target Chinese medicine package is determined according to the drug specifications and quantity of all target Chinese medicine packages. For example, the drug specification of the Chinese medicine package of Radix Rehmanniae is 3g, and the number of Chinese medicine packages is 4 packages. At this time, the dose of Radix Rehmanniae in all target Chinese medicine packages is 12g. The dose of 12g of Radix Rehmanniae in the target Chinese medicine prescription is compared with the dose of 12g of Radix Rehmanniae in all target Chinese medicine packages to obtain a comparison result.

[0110] In an embodiment of the present application, the names of multiple drugs in the target Chinese medicine prescription and the drug names of all target Chinese medicine packages are matched in a preset cache to obtain a matching result, and at the same time, the single prescription amount of each target drug corresponding to all target Chinese medicine packages in the target Chinese medicine prescription, the number of doses of the target Chinese medicine prescription, and the drug specifications and quantity of all target Chinese medicine packages are analyzed to obtain a drug quantity analysis result. First, comparison and analysis in the preset cache reduces the retrieval time of data in the memory, thereby speeding up data processing, reducing the system load, and improving the stability and reliability of the system.

[0111] On the basis of the above embodiment, the present application also provides a process of outputting prompt information in the first method for checking a Chinese medicine prescription. On the basis of the above steps 401 to 403, the method further includes:

[0112] If the drug name in the recognition result of a Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, a first prompt message is output to indicate that the captured medicinal material corresponding to the Chinese medicine package image is an erroneous captured medicinal material and needs to be captured again.

[0113] Among them, the first prompt information includes the name and specifications of the medicines that are not within the scope of the target traditional Chinese medicine prescription.

[0114] For example, Figure 6A schematic diagram of outputting prompt information in the first Chinese medicine prescription verification method provided for the application, such as Figure 6 As shown, when the drug name in the image identification result of a traditional Chinese medicine package image is not within the drug range of the target prescription, the first prompt message "Warning; Please verify the drug that is not in the traditional Chinese medicine prescription; Cinnamon specification 3g" is output to indicate that the captured medicinal material corresponding to the traditional Chinese medicine package image is an erroneous captured medicinal material and needs to be re-captured.

[0115] Optionally, if the drug name in the recognition result of a Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, a first prompt message is output to indicate that the captured medicinal materials corresponding to the Chinese medicine package image are incorrectly captured medicinal materials and need to be re-captured. Then, the target Chinese medicine prescription to be verified and the latest multiple Chinese medicine package images of the captured medicinal materials to be verified are obtained, and the Chinese medicine prescription is verified by the above method to obtain the verification result until the verification is successful.

[0116] In another possible implementation, the wrong medicinal materials are removed manually and checked manually until the check is successful.

[0117] Based on the above embodiment, the present application also provides a process for outputting prompt information in a second method for checking a Chinese medicine prescription. Based on the above step 501, the method further includes:

[0118] If the drug matching result indicates that the first medicinal material of the target Chinese medicine prescription is missing from the medicinal materials that have been grabbed multiple times, a second prompt message is output to instruct the grabbing of the first medicinal material.

[0119] Among them, the first medicinal material can be one or more, which is determined according to actual conditions and is not limited in this embodiment of the present application.

[0120] For example, Figure 7 A schematic diagram of outputting prompt information in the second Chinese medicine prescription verification method provided for the application, such as Figure 7 As shown, the white background is the missing medicinal materials, and the grid background is the verified medicinal materials. When the names of multiple medicines in the target Chinese medicine prescription are matched with the names of medicines in all target Chinese medicine packages, the drug matching result indicates that the first medicinal material of the target Chinese medicine prescription is missing from the captured medicinal materials for many times, then the second prompt message "Warning; Identified that the medicine in the Chinese medicine prescription is missing; Processed Polygala root 9.0g; Gleditsia sinensis 6.0g; Taraxacum mongolicum 15.0g; Viola yedoensis 15.0g" is output to indicate that the corresponding captured medicinal materials are missing and the missing first medicinal material needs to be captured.

[0121] Optionally, when the names of multiple medicines in the target Chinese medicine prescription are matched with the names of the medicines in all target Chinese medicine packages, and the medicine matching result indicates that the first medicine in the target Chinese medicine prescription is missing among the multiple grabbed medicines, a second prompt message is output to indicate that the corresponding grabbed medicine is missing, and the missing first medicine needs to be grabbed, and then the names of the medicines in the target Chinese medicine prescription to be checked and all target Chinese medicine packages are obtained. The names of the multiple medicines in the target Chinese medicine prescription and the names of the medicines in all target Chinese medicine packages are matched by the above method until the medicine matching result is correct.

[0122] In another possible implementation, after manually grabbing the missing first medicinal material, the names of multiple medicines in the target Chinese medicine prescription are manually matched with the names of medicines in all target Chinese medicine packages until the medicine matching result is correct.

[0123] Based on the above embodiment, the present application also provides a process for outputting prompt information in a third method for checking a Chinese medicine prescription. Based on the above step 502, the method further includes:

[0124] If the drug dosage analysis result indicates that there is a second medicinal material whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the multiple grabbed medicinal materials, a third prompt information is output to instruct to adjust the dosage of the second medicinal material.

[0125] Among them, the second medicinal material can be one or more, which is determined according to actual conditions and is not limited in this embodiment of the present application.

[0126] For example, Figure 8 A schematic diagram of outputting prompt information in the third Chinese medicine prescription verification method provided for the application, such as Figure 8 As shown, the dark background is the medicinal materials that do not match the drug dosage of the target Chinese medicine prescription, and the grid background is the medicinal materials that have been verified. When the single prescription quantity of each target medicine corresponding to all target Chinese medicine packages in the target Chinese medicine prescription, the number of doses of the target Chinese medicine prescription, and the drug specifications and quantity of all target Chinese medicine packages are analyzed, the drug dosage analysis result is obtained. If the drug dosage analysis result indicates that there is a second medicinal material whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the medicinal materials that have been grabbed for many times, then the third prompt information "Warning; Identified that the drug in the Chinese medicine prescription is missing; 6.0g of processed Polygala root; 9.0g of Gleditsia sinensis; 10.0g of Taraxacum mongolicum; 20.0g of Viola yedoensis" is output to indicate that there is a mismatch between the drug dosage of the target Chinese medicine prescription and the drug dosage of the second medicinal material that does not match the drug dosage among the medicinal materials that have been grabbed for many times, and the dosage of the second medicinal material that does not match the drug dosage needs to be adjusted.

[0127] Optionally, when analysis is performed based on the single dose quantity of each target medicine corresponding to all target Chinese medicine packages in the target Chinese medicine prescription, the number of doses of the target Chinese medicine prescription, and the drug specifications and quantity of all target Chinese medicine packages to obtain a drug dosage analysis result, and the drug dosage analysis result indicates that there is a second medicinal material whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the medicinal materials that have been grabbed multiple times, then a third prompt message is output to indicate that there is a mismatch between the drug dosage of the second medicinal material that has been grabbed multiple times and the drug dosage of the target Chinese medicine prescription, and the dosage of the second medicinal material with the mismatching drug dosage needs to be adjusted. Then, the single dose quantity of each target medicine corresponding to the target Chinese medicine package, the number of doses of the target Chinese medicine prescription, and the drug specifications and quantity of all target Chinese medicine packages are analyzed by the above method until the drug dosage analysis result is correct.

[0128] In another possible implementation, after manually adjusting the dosage of the mismatched second medicinal material, the single-dose quantity of each target medicine in the target Chinese medicine package, the number of doses of the target Chinese medicine prescription, and the drug specifications and quantity of all target Chinese medicine packages are manually analyzed until the dosage analysis results are correct.

[0129] In the embodiment of the present application, by outputting corresponding prompt information according to the drug matching results and the drug analysis results, and re-grabbing the medicinal materials or adjusting the dosage of the unmatched second medicinal materials according to the corresponding prompt information, the accuracy of grabbing the medicinal materials is improved, and the correctness of the drug matching results and the drug analysis results is ensured.

[0130] On the basis of the above embodiment, the present application further provides a process stored in a method for checking a Chinese medicine prescription. On the basis of the above steps 101 to 104, the method further includes:

[0131] If the verification result of the target Chinese medicine prescription is successful, the target Chinese medicine prescription, the multiple Chinese medicine package images, and the drug recognition results of the multiple Chinese medicine package images are stored in a preset database.

[0132] Among them, the preset database stores the target important prescriptions, multiple Chinese medicine package images, and drug recognition results of multiple Chinese medicine package images in each Chinese medicine prescription verification process, and the data in each Chinese medicine prescription verification process can be retrieved from the preset database. The multiple Chinese medicine package images are multiple Chinese medicine package images whose drug names in the recognition results of the Chinese medicine package images are within the drug range of the target Chinese medicine prescription, and the drug recognition results of the multiple Chinese medicine package images are the recognition results of multiple Chinese medicine package images whose drug names in the recognition results of the Chinese medicine package images are within the drug range of the target Chinese medicine prescription.

[0133] In an embodiment of the present application, storing the successfully verified target Chinese medicine prescription, multiple Chinese medicine package images, and drug recognition results of multiple Chinese medicine package images in a preset memory can effectively reduce delays in data access and processing, and trace the source when there are questions about the verification results, thereby ensuring data consistency.

[0134] Based on the above embodiments, the present application also provides a process for determining drug information in a first method for checking a traditional Chinese medicine prescription. Fig. 9 A schematic diagram of a process for determining drug information in a first method for checking a Chinese medicine prescription provided in an embodiment of the present application, such as Fig. 9 As shown, in the above step 103, drug information recognition is performed on multiple images of traditional Chinese medicine packages to obtain drug recognition results of multiple images of traditional Chinese medicine packages, including:

[0135] Step 901: divide each Chinese medicine package image into medicine package regions to obtain at least one medicine package region image corresponding to each Chinese medicine package image.

[0136] Among them, the image of the Chinese medicine package is focused, scanned and captured by an ultra-high-definition camera. An ultra-high-definition camera refers to a camera that can capture and output videos with a resolution of more than 1920×1080 pixels. The resolution of the Chinese medicine package image provided can reach at least 3840×2160 pixels.

[0137] Optionally, an ultra-clear camera is used to focus scan and capture multiple images of Chinese medicine packages, and an artificial intelligence (AI) algorithm is used to divide the medicine package area according to the distribution of the medicine packages in the multiple Chinese medicine package images to obtain at least one medicine package area image corresponding to each Chinese medicine package image. The AI ​​algorithm can use a pre-trained model to identify and segment the medicine package area images in the Chinese medicine package images. When the image of the Chinese medicine package captured by the ultra-clear camera is unclear and cannot be identified by the AI ​​algorithm, the image of the Chinese medicine package is re-acquired.

[0138] Step 902: Perform drug information recognition on at least one medicine package area image to obtain drug information of at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image.

[0139] In an embodiment of the present application, each Chinese medicine package image is divided into medicine package areas to obtain at least one medicine package area image corresponding to each Chinese medicine package image, and drug information is identified in the medicine package area to reduce background interference and improve the accuracy of text recognition. The size of the medicine package area image is smaller than that of the Chinese medicine report image, thereby improving the speed of drug information recognition.

[0140] Based on the above embodiment, the present application also provides a process for determining drug information in a second method for checking a traditional Chinese medicine prescription. Fig.10A schematic diagram of a process for determining drug information in a second method for checking a traditional Chinese medicine prescription provided in an embodiment of the present application, such as Fig.10 As shown, in the above step 902, drug information recognition is performed on at least one medicine package area image to obtain drug information of at least one Chinese medicine package corresponding to each Chinese medicine package image, including:

[0141] Step 1001: Perform optical character recognition on at least one medicine package region image to obtain a recognition character corresponding to at least one medicine package region image.

[0142] Optionally, before performing optical character recognition on at least one medicine package region image, each medicine package region image needs to be preprocessed, wherein the preprocessing includes grayscale, binarization, noise removal, tilt correction and other steps, which are not limited in the embodiment of the present application. Perform optical character recognition on at least one medicine package region image after preprocessing to obtain a recognition character corresponding to at least one medicine package region image.

[0143] Step 1002: Generate drug information of at least one Chinese medicine package according to a preset Chinese herbal medicine data dictionary and recognition characters corresponding to at least one medicine package area image.

[0144] Among them, the preset Chinese herbal medicine data dictionary can be obtained through the hospital information system, and the preset Chinese herbal medicine data dictionary includes drug name, drug alias, drug specification, drug packaging quantity and other drug related information, which is not limited in the present embodiment of the application. There is a one-to-many relationship between the drug name and the alias, such as "Coptis chinensis", whose aliases include "Chuanlian", "Wei Lian" and "Ya Lian".

[0145] Optionally, the identification characters corresponding to the medicine package image area may contain an alias for the medicine, so the medicine information of at least one Chinese medicine package can be generated based on the medicine name, medicine alias and identification characters corresponding to the medicine package area image in a preset Chinese medicine data dictionary.

[0146] Based on the above embodiment, the present application also provides a process for determining drug information in a third method for checking a traditional Chinese medicine prescription. Fig.11 A schematic diagram of a process for determining drug information in a third method for checking a Chinese medicine prescription provided in an embodiment of the present application, such as Fig.11 As shown, in the above step 902, drug information recognition is performed on at least one medicine package area image to obtain drug information of at least one Chinese medicine package corresponding to each Chinese medicine package image, including:

[0147] Step 1101: Use a preset text detection model to perform text detection on at least one medicine package area image to obtain recognized text corresponding to at least one medicine package area image.

[0148] Among them, the preset text detection model is a convolutional neural network model constructed based on a deep learning text detection algorithm, and the deep learning text detection algorithm can be a convolutional neural network's raw feature attention text detection algorithm (Convolutional Raw Feature Attention for Text Detection, referred to as CRAFT) algorithm.

[0149] Optionally, the original feature attention text detection algorithm of the convolutional neural network is used to detect the text area in at least one drug package area image, and the detected text area is feature extracted to extract the feature information of the text sequence. Based on the feature information of the extracted text sequence, the LSTM-based optical character recognition is used to recognize the text of the drug name and specification, and the recognition result is corrected and optimized, including spelling check, grammar correction and other operations, so as to obtain the recognized text.

[0150] Step 1102: Generate drug information of at least one Chinese medicine package based on a preset Chinese herbal medicine data dictionary and recognition text corresponding to at least one medicine package area image.

[0151] In an embodiment of the present application, optical character recognition is performed on at least one medicine package area image or a preset text detection model is used to obtain recognition characters corresponding to at least one medicine package area image, and drug information of at least one Chinese medicine package is generated based on a preset Chinese herbal medicine data dictionary and the recognition characters corresponding to at least one medicine package area image. This ensures that the alias of the drug can be recognized and the accuracy of the recognition characters can be guaranteed, thereby improving the accuracy of the Chinese medicine prescription verification.

[0152] Based on the same inventive concept, a Chinese medicine prescription verification device corresponding to the Chinese medicine prescription verification method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned Chinese medicine prescription verification method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0153] Fig.12 A schematic diagram of the structure of a Chinese medicine prescription checking device provided in an embodiment of the present application is shown in FIG. Fig.12 As shown, the device comprises:

[0154] The first acquisition module 1201 is used to acquire the target Chinese medicine prescription to be checked;

[0155] The second acquisition module 1202 is used to acquire multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be checked;

[0156] The recognition module 1203 is used to recognize drug information of multiple Chinese medicine package images to obtain drug recognition results of the multiple Chinese medicine package images, wherein the drug recognition result of each Chinese medicine package image includes: drug information of at least one Chinese medicine package;

[0157] The verification module 1204 is used to verify the target Chinese medicine prescription according to the recognition results of the multiple Chinese medicine package images, and generate a verification result of the target Chinese medicine prescription.

[0158] In a possible implementation, the drug name and drug specification; the verification module 1204 is specifically used to: sequentially perform multiple rounds of verification on the drug name and the target Chinese medicine prescription in the recognition results of the multiple Chinese medicine package images to obtain multiple rounds of verification results;

[0159] According to the results of multiple rounds of verification, the drug data of all target Chinese medicine packages that have passed the name verification are determined. The drug data of each target Chinese medicine package includes: the drug name, drug specification and quantity of the target Chinese medicine package;

[0160] The drug data of all target Chinese medicine packages and the target Chinese medicine prescription are checked to generate a verification result of the target Chinese medicine prescription.

[0161] In a possible implementation, the verification module 1204 is specifically used to: determine, in each round of verification, whether the drug name in the recognition result of a traditional Chinese medicine package image is within the drug range of the target traditional Chinese medicine prescription;

[0162] If the drug name in the recognition result of a Chinese medicine package image is within the drug range of the target Chinese medicine prescription, the recognition result of the Chinese medicine package image is stored in a preset cache.

[0163] In a possible implementation, the verification module 1204 is specifically used to determine the drug data of all target Chinese medicine packages based on the recognition results of multiple target Chinese medicine package images in a preset cache after multiple rounds of verification are completed.

[0164] In a possible implementation, the checking module 1204 is specifically used to: match the names of multiple medicines in the target Chinese medicine prescription with the names of medicines in all target Chinese medicine packages in a preset cache to obtain a medicine matching result, and the medicine matching result is used to indicate whether the medicines in the target Chinese medicine prescription are missing from the captured medicinal materials for multiple times;

[0165] According to the single dosage of each target medicine in all target Chinese medicine packages corresponding to the target Chinese medicine prescription, the number of doses in the target Chinese medicine prescription, and the drug specifications and quantities of all target Chinese medicine packages, the drug dosage analysis result is obtained. The drug dosage analysis result is used to indicate whether the drug dosage of the medicinal materials that have been grabbed multiple times matches the drug dosage of the target Chinese medicine prescription;

[0166] The verification results of the target Chinese medicine prescription include: drug matching results and drug dosage analysis results.

[0167] In a possible implementation, the verification module 1204 is specifically used to: if the drug name in the recognition result of a Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, then output a first prompt message to indicate that the captured medicinal material corresponding to the Chinese medicine package image is an erroneously captured medicinal material and needs to be re-captured.

[0168] In a possible implementation, the checking module 1204 is specifically configured to: if the drug matching result indicates that the first drug of the target Chinese medicine prescription is missing from the multiple grabbed drugs, output a second prompt message to instruct to grab the first drug;

[0169] If the drug dosage analysis result indicates that there is a second medicinal material whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the multiple grabbed medicinal materials, a third prompt information is output to instruct to adjust the dosage of the second medicinal material.

[0170] In a possible implementation, the Chinese medicine prescription verification device also includes: a storage module, which is specifically used to: if the verification result of the target Chinese medicine prescription is successful, the target Chinese medicine prescription, multiple Chinese medicine package images, and the drug recognition results of the multiple Chinese medicine package images are stored in a preset database.

[0171] In a possible implementation, the identification module 1203 is specifically configured to: divide each Chinese medicine package image into medicine package regions to obtain at least one medicine package region image corresponding to each Chinese medicine package image;

[0172] Drug information is identified on at least one medicine package area image to obtain drug information of at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image.

[0173] In a possible implementation, the recognition module 1203 is specifically configured to: perform optical character recognition on at least one medicine package region image to obtain a recognition character corresponding to at least one medicine package region image;

[0174] Generate drug information of at least one Chinese medicine package according to a preset Chinese herbal medicine data dictionary and recognition characters corresponding to at least one medicine package area image;

[0175] Alternatively, a preset text detection model is used to perform text detection on at least one medicine package area image to obtain a recognition text corresponding to at least one medicine package area image;

[0176] The medicine information of at least one Chinese medicine package is generated according to a preset Chinese herbal medicine data dictionary and recognition text corresponding to at least one medicine package area image.

[0177] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0178] The present application also provides a computer device, Fig.13 A schematic diagram of the structure of a computer device provided in an embodiment of the present application is shown in FIG. Fig.13 As shown, the computer device includes: a processor 1301, a memory 1302, and optionally, a bus 1303. The memory 1302 stores machine-readable instructions executable by the processor 1301. When the computer device 1300 is running, the processor 1301 communicates with the memory 1302 via the bus 1303. When the machine-readable instructions are executed by the processor 1301, the steps of the above-mentioned traditional Chinese medicine prescription verification method are executed.

[0179] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned traditional Chinese medicine prescription verification method are executed.

[0180] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0181] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0182] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for checking a Chinese medicine prescription, characterized in that: The method comprises: Obtaining a target Chinese medicine prescription to be checked; Acquire multiple images of Chinese medicine packages of multiple grabbed medicinal materials to be checked; Performing drug information recognition on the plurality of Chinese medicine package images to obtain drug recognition results of the plurality of Chinese medicine package images, wherein the drug recognition result of each Chinese medicine package image includes: drug information of at least one Chinese medicine package; According to the recognition results of the multiple Chinese medicine package images, the target Chinese medicine prescription is checked to generate a check result of the target Chinese medicine prescription.

2. The method according to claim 1, characterized in that The drug information of each Chinese medicine package includes: drug name and drug specifications; The method of checking the target Chinese medicine prescription according to the recognition results of the plurality of Chinese medicine package images and generating a checking result of the target Chinese medicine prescription includes: Perform multiple rounds of verification on the drug names in the recognition results of the multiple Chinese medicine package images and the target Chinese medicine prescription in turn to obtain multiple rounds of verification results; According to the multiple rounds of verification results, determine the drug data of all target Chinese medicine packages that have passed the name verification, and the drug data of each target Chinese medicine package includes: the drug name, drug specification and quantity of the target Chinese medicine package; The drug data of all the target Chinese medicine packages are checked against the target Chinese medicine prescription to generate a check result of the target Chinese medicine prescription.

3. The method according to claim 2, characterized in that The method of sequentially performing multiple rounds of verification on the drug names in the recognition results of the plurality of images of traditional Chinese medicine packages and the target traditional Chinese medicine prescription to obtain multiple rounds of verification results includes: In each round of verification, determining whether the drug name in the recognition result of a traditional Chinese medicine package image is within the drug range of the target traditional Chinese medicine prescription; If the drug name in the recognition result of the one Chinese medicine package image is within the drug range of the target Chinese medicine prescription, storing the recognition result of the one Chinese medicine package image in a preset cache; Determining the drug data of all target traditional Chinese medicine packages whose names have passed the name verification based on the multiple rounds of verification results includes: After the multiple rounds of verification are completed, the drug data of all the target Chinese medicine packages are determined based on the recognition results of the multiple target Chinese medicine package images in the preset cache.

4. The method according to claim 2, characterized in that: The step of checking the drug data of all target Chinese medicine packages and the target Chinese medicine prescription to generate a checking result of the target Chinese medicine prescription includes: In the preset cache, the names of the multiple medicines in the target Chinese medicine prescription are matched with the names of the medicines in all the target Chinese medicine packages to obtain a medicine matching result, and the medicine matching result is used to indicate whether the medicines in the target Chinese medicine prescription are missing from the multiple grabbed medicinal materials; Analyze the single dosage of each target medicine in all target Chinese medicine packages corresponding to the target Chinese medicine prescription, the number of doses in the target Chinese medicine prescription, and the drug specifications and quantities of all target Chinese medicine packages to obtain a drug dosage analysis result, which is used to indicate whether the drug dosage of the multiple grabbed medicinal materials matches the drug dosage of the target Chinese medicine prescription; The verification result of the target Chinese medicine prescription includes: the drug matching result and the drug dosage analysis result.

5. The method according to claim 3, characterized in that: The method further comprises: If the drug name in the recognition result of the Chinese medicine package image is not within the drug range of the target Chinese medicine prescription, a first prompt message is output to indicate that the captured medicinal materials corresponding to the Chinese medicine package image are incorrectly captured medicinal materials and need to be re-captured.

6. The method according to claim 4, characterized in that The method further comprises: If the drug matching result indicates that the first medicinal material of the target Chinese medicine prescription is missing from the multiple grabbed medicinal materials, outputting a second prompt message to instruct to grab the first medicinal material; If the drug dosage analysis result indicates that there is a second drug whose drug dosage does not match the drug dosage of the target Chinese medicine prescription among the multiple grabbed drugs, a third prompt message is output to instruct to adjust the dosage of the second drug.

7. The method according to claim 1, characterized in that The method further comprises: If the verification result of the target Chinese medicine prescription is successful, the target Chinese medicine prescription, the multiple Chinese medicine package images, and the drug recognition results of the multiple Chinese medicine package images are stored in a preset database.

8. The method according to claim 1, characterized in that The step of performing drug information recognition on the plurality of images of traditional Chinese medicine packages to obtain drug recognition results of the plurality of images of traditional Chinese medicine packages includes: Dividing each of the traditional Chinese medicine package images into medicine package regions to obtain at least one medicine package region image corresponding to each of the traditional Chinese medicine package images; Drug information is identified on the at least one medicine package area image to obtain drug information of the at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image.

9. The method according to claim 8, characterized in that The step of performing drug information recognition on the at least one drug package area image to obtain drug information of the at least one traditional Chinese medicine package corresponding to each traditional Chinese medicine package image includes: Performing optical character recognition on the at least one medicine package area image to obtain a recognition character corresponding to the at least one medicine package area image; Generate drug information of the at least one Chinese medicine package according to a preset Chinese herbal medicine data dictionary and identification characters corresponding to the at least one medicine package area image; Alternatively, a preset text detection model is used to perform text detection on the at least one medicine package area image to obtain a recognition text corresponding to the at least one medicine package area image; The drug information of the at least one Chinese medicine package is generated according to the preset Chinese herbal medicine data dictionary and the recognition text corresponding to the at least one medicine package area image.

10. A computer device characterized by: include: A processor and a storage medium, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium, and the processor executes the program instructions to perform the steps of the traditional Chinese medicine prescription verification method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Intelligent medicinal material taking and checking method and system for traditional Chinese medicine pharmacy

    CN110070680A

  • Prescription auditing method and device based on artificial intelligence, equipment and medium

    CN114550870A

  • Method and system for automatically identifying and checking mixed medicines in pharmacy

    CN117557794A

  • Drug name recognition method and apparatus, and computer device and storage medium

    WO2022227218A1