CN116403675A - Intelligent medicine cabinet management method, storage medium and electronic equipment - Google Patents

Intelligent medicine cabinet management method, storage medium and electronic equipment Download PDF

Info

Publication number
CN116403675A
CN116403675A CN202310341692.5A CN202310341692A CN116403675A CN 116403675 A CN116403675 A CN 116403675A CN 202310341692 A CN202310341692 A CN 202310341692A CN 116403675 A CN116403675 A CN 116403675A
Authority
CN
China
Prior art keywords
medicine
medicinal material
information
text
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310341692.5A
Other languages
Chinese (zh)
Inventor
徐志红
刘瀚文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202310341692.5A priority Critical patent/CN116403675A/en
Publication of CN116403675A publication Critical patent/CN116403675A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/10ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/24Character recognition characterised by the processing or recognition method
    • G06V30/242Division of the character sequences into groups prior to recognition; Selection of dictionaries
    • G06V30/244Division of the character sequences into groups prior to recognition; Selection of dictionaries using graphical properties, e.g. alphabet type or font
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Abstract

The disclosure relates to an intelligent medicine cabinet management method, a storage medium and electronic equipment. The method comprises the following steps: acquiring a prescription image corresponding to a current prescription by using a first camera arranged on a medicine cabinet, and performing text recognition on the prescription image to acquire corresponding to-be-analyzed medicine information and patient identity information; calling corresponding medical data according to the identity information of the patient; wherein the medical data includes patient medication information, patient disease information; comparing the medicine property of the medicine information to be analyzed and the medicine data with the medicine and the disease to verify the current prescription; and when the verification of the current prescription is successful, carrying out medicinal material matching according to the current medicinal material information of the medicine cabinet and the medicinal material information to be analyzed corresponding to the current prescription, determining the sub medicine cabinet information corresponding to each medicinal material when the medicinal material matching is successful so as to open the corresponding sub medicine cabinet, and pushing the medicinal material use information to the target terminal equipment. According to the scheme, automatic medicine taking and medicine management of the traditional Chinese medicine cabinet based on image recognition can be realized.

Description

Intelligent medicine cabinet management method, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of intelligent control, in particular to an intelligent medicine cabinet management method, a storage medium and electronic equipment.
Background
In a pharmacy or a hospital, traditional Chinese medicine storage generally uses a wooden medicine cabinet to store medicines, and a doctor needs to pull out a drawer to take medicines when taking medicines. And the number of layers of the medicine cabinet is high, so that the medicine taking of the high-rise medicine cabinet is inconvenient. In addition, when taking medicine, a doctor is generally required to configure and weigh the medicine according to the prescription of the patient, and whether the medicine in the prescription is applicable or not can not be checked with the current patient. In addition, patients cannot take medicine by themselves.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the present disclosure and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The disclosure provides an intelligent medicine cabinet management method, a storage medium and an electronic device, which can solve the problems existing in the prior art to a certain extent.
Other features and advantages of the present disclosure will be apparent from the following detailed description, or may be learned in part by the practice of the disclosure.
According to a first aspect of the present disclosure, there is provided an intelligent drug cabinet management method, the method comprising:
Acquiring a prescription image corresponding to a current prescription by using a first camera arranged on a medicine cabinet, and performing text recognition on the prescription image to acquire corresponding to-be-analyzed medicine information and patient identity information;
calling corresponding medical data according to the identity information of the patient; wherein the medical data includes patient medication information and patient disease information;
comparing the medicinal material information to be analyzed and the medical data with each other in terms of medicinal properties and medicinal and disease so as to verify the current prescription;
and when the verification of the current prescription is successful, carrying out medicinal material matching according to the current medicinal material information of the medicine cabinet and the medicinal material information to be analyzed corresponding to the current prescription, determining the sub medicine cabinet information corresponding to each medicinal material when the medicinal material matching is successful so as to open the corresponding sub medicine cabinet, and pushing the medicinal material use information to the target terminal equipment.
In some exemplary embodiments, the method further comprises: the comparing the drug property of the drug information to be analyzed and the medical data and the drug and disease to verify the current prescription comprises:
acquiring first medicine property data corresponding to the medicine information to be analyzed and second medicine property data corresponding to the patient medicine information, carrying out medicine property analysis according to the first medicine property data and the second medicine property data, and comparing according to the first medicine property data and the patient disease information so as to check whether medicine conflict exists among the medicine information to be analyzed, the patient medicine information and the patient disease information;
When the medicine conflict is detected to be absent, carrying out medicine property analysis on each medicine contained in the medicine information to be analyzed so as to detect whether the medicine conflict exists in the medicine information to be analyzed;
if the medicine conflict exists, corresponding medicine prompt information is generated.
In some exemplary embodiments, the text recognition of the prescription image includes:
performing image conversion processing on the prescription image to obtain a corresponding gray level image, and performing binarization processing on the gray level image to obtain a binarized image;
carrying out region communication processing on the binarized image, and acquiring width parameters of each communication region so as to determine the text writing type according to the width parameters;
and calling a corresponding recognition strategy according to the text writing type to perform text recognition so as to acquire a corresponding text recognition result.
In some exemplary embodiments, the method comprises: judging the writing type of the text as a handwriting when the width parameters of the connected areas are different;
the step of calling the corresponding recognition strategy according to the text writing type to perform text recognition so as to obtain the corresponding text recognition result comprises the following steps:
carrying out text region identification on the binarized image corresponding to the prescription image to determine a text region and a non-text region;
Dividing the text region to obtain a line division target;
dividing text blocks based on the text region and the line segmentation target to obtain a text block set;
calculating corresponding average width parameters for the text block set, and performing column segmentation based on the average width parameters to obtain segmentation results;
and performing character matching on the segmentation results by using the trained character matching model so as to obtain character recognition results corresponding to the segmentation results.
In some exemplary embodiments, the method comprises: judging the text writing type as a printing body when the width parameters of the connected areas are the same;
the step of calling the corresponding recognition strategy according to the text writing type to perform text recognition so as to obtain the corresponding text recognition result comprises the following steps:
performing frame marking on the binarized image corresponding to the prescription image, and performing fusion processing on each marked frame to obtain a frame line image;
performing differential operation on the binarized image and the frame line image to obtain a frameless line image;
cutting the frameless line image based on preset medicinal material position pixel point information to obtain a medicinal material data part image;
performing text segmentation on the partial images of the medicinal material data to obtain text segmentation results;
And recognizing the text segmentation results by using the trained text recognition model to obtain text recognition results corresponding to the text segmentation results.
In some exemplary embodiments, the method further comprises:
collecting medicinal material images by using a second camera arranged in each sub-medicine cabinet in the medicine cabinet;
detecting the image content of the medicinal material image by using a trained identification module, marking the medicinal material area through a coordinate frame, and acquiring a corresponding clipping image;
identifying the clipping image by using the trained medicinal material classification model to obtain a corresponding medicinal material classification result;
and comparing the medicinal material classification result with medicinal material information of the sub-drug cabinet, and generating corresponding alarm information when the comparison is inconsistent.
In some exemplary embodiments, the method further comprises:
identifying the medicinal material images by using a trained medicinal material grade classification model corresponding to medicinal material information of the current sub-medicinal chest so as to obtain a corresponding medicinal material grade classification result;
and generating corresponding alarm information when the medicinal material grade classification result is a target result.
In some exemplary embodiments, the method further comprises:
performing identity verification in response to the first triggering operation, and determining a target medicinal material number corresponding to the first triggering operation when the identity verification is successful;
Responding to the input target medicinal material number, generating a corresponding target sub-medicine cabinet opening instruction to open a cabinet door of the target sub-medicine cabinet, and displaying weight record data of the target sub-medicine cabinet in a display;
starting weighing equipment of the target sub-drug cabinet to acquire current weight data of the target sub-drug cabinet; and when the current weight data is zero, updating the weight record data and generating corresponding alarm information.
In some exemplary embodiments, the method further comprises:
creating a medicinal material information database according to medicinal material basic data corresponding to each medicinal material;
reading a medicinal material information database to determine target storage parameters corresponding to each medicinal material; the target storage parameters include: target temperature data, target humidity data;
starting a temperature sensor and a humidity sensor arranged in each sub-medicine cabinet to acquire current temperature data and current humidity data of each sub-medicine cabinet;
if the temperature difference between the current temperature data and the target temperature data is larger than the temperature error parameter, a corresponding temperature adjusting instruction is generated for adjusting the temperature in the sub-drug cabinet to the target temperature data; or alternatively
If the difference value between the current temperature data and the target temperature data is smaller than or equal to the temperature error parameter, calculating the humidity difference value between the current humidity data and the target humidity data;
And when the humidity difference value is larger than the preset humidity error parameter, generating a corresponding humidity adjustment instruction for adjusting the humidity of the sub-drug cabinet to the target humidity.
In some exemplary embodiments, the method further comprises:
obtaining medicine storage aging information corresponding to traditional Chinese medicinal materials of the sub medicine cabinet;
and according to the acquired current time, checking the medicine aging by combining the medicine storage aging information, and generating corresponding alarm information when the checking is out of date.
According to a second aspect of the present disclosure, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the intelligent medicine cabinet management method described above.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to implement the intelligent medicine cabinet management method described above via execution of the executable instructions.
According to the intelligent medicine cabinet management method provided by the embodiment of the disclosure, the medical material information and the identity information of a patient contained in the prescription can be accurately obtained by carrying out image identification and acquisition on the acquired prescription image; by calling corresponding medical data according to the identity information of the patient, the medicine properties of each medicine in the prescription can be compared, and whether the current prescription conflicts with other medicines or diseases of the patient or not can be accurately checked; when the verification is passed, the medicines contained in the prescription can be analyzed, so that whether the prescription content is reasonable or not is judged, and the judgment of two different contents is realized; when the inspection is passed, the corresponding sub medicine cabinets can be automatically opened to take medicine; thereby realizing automatic medicine taking and medicine management of the traditional Chinese medicine cabinet based on image recognition; the management efficiency of the medicines is improved; in some scenarios, patient self-medication according to the prescription may also be achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure. It will be apparent to those of ordinary skill in the art that the drawings in the following description are merely examples of the disclosure and that other drawings may be derived from them without undue effort.
FIG. 1 schematically illustrates a schematic diagram of a method of intelligent drug cabinet management in an exemplary embodiment of the present disclosure;
FIG. 2 schematically illustrates a panel structure diagram of an intelligent medicine cabinet in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 schematically illustrates a schematic structural view of a sub-drug cabinet in accordance with an exemplary embodiment of the present disclosure;
FIG. 4 schematically illustrates a schematic diagram of a system architecture in an exemplary embodiment of the present disclosure;
FIG. 5 schematically illustrates a schematic diagram of a method of controlling temperature, humidity of a drug cabinet in an exemplary embodiment of the disclosure;
FIG. 6 schematically illustrates a schematic diagram of a method of identifying a drug type of a drug cabinet in an exemplary embodiment of the present disclosure;
FIG. 7 schematically illustrates a schematic diagram of a method for recognizing handwritten text in an exemplary embodiment of the present disclosure;
FIG. 8 schematically illustrates a schematic diagram of a method flow for recognizing printed text in an exemplary embodiment of the present disclosure;
FIG. 9 schematically illustrates a schematic composition of an intelligent drug cabinet management system in an exemplary embodiment of the present disclosure;
fig. 10 schematically illustrates a composition diagram of an electronic device in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Aiming at the defects and shortcomings of the prior art, the embodiment provides an intelligent medicine cabinet management method which can be applied to an intelligent medicine cabinet to carry out intelligent medicine management. Referring to fig. 1, an intelligent medicine cabinet management method may include:
step S11, acquiring a prescription image corresponding to a current prescription by using a first camera arranged on a medicine cabinet, and performing text recognition on the prescription image to acquire corresponding medicine information to be analyzed and patient identity information;
step S12, corresponding medical data is called according to the identity information of the patient; wherein the medical data includes patient medication information and patient disease information;
step S13, comparing the medicine properties and the medicines with the diseases of the medicinal materials to be analyzed and the medical data to verify the current prescription;
step S14, when the verification of the current prescription is successful, carrying out medicinal material matching according to the current medicinal material information of the medicinal chest and the medicinal material information to be analyzed corresponding to the current prescription, determining sub-medicinal chest information corresponding to each medicinal material when the medicinal material matching is successful so as to open the corresponding sub-medicinal chest, and pushing medicinal material use information to target terminal equipment.
The intelligent medicine cabinet management method provided by the example embodiment can be applied to an intelligent medicine cabinet, and the medicine information and the identity information of a patient contained in a prescription can be accurately obtained by carrying out image identification and acquisition on an acquired prescription image; by calling corresponding medical data according to the identity information of the patient, the medicine properties of each medicine in the prescription can be compared, and whether the current prescription conflicts with other medicines or diseases of the patient or not can be accurately checked; when the verification is passed, the medicines contained in the prescription can be analyzed, so that whether the prescription content is reasonable or not is judged, and the judgment of two different contents is realized; when the inspection is passed, the corresponding sub medicine cabinets can be automatically opened to take medicine; thereby realizing automatic medicine taking and medicine management of the traditional Chinese medicine cabinet based on image recognition; the management efficiency of the medicines is improved; in some scenarios, patient self-medication according to the prescription may also be achieved.
The steps of the intelligent medicine cabinet management method in the present exemplary embodiment will be described in more detail with reference to the accompanying drawings and examples.
In this exemplary embodiment, referring to fig. 2, the intelligent medicine cabinet includes a cabinet body 1, and a plurality of sub medicine cabinets 2 are sequentially arranged in the cabinet body 1; each sub-drug cabinet 2 may be a drawer type. In addition, the front of the cabinet body 1 can be provided with a face recognition camera 3, a fingerprint recognition component 4 and an iris recognition component 5. The panel of the cabinet body 1 can be further provided with a first camera 10 for collecting prescription images and a display 11 for displaying data contents such as medicinal material information, identity identification information and the like. Referring to fig. 3, inside each sub-cabinet 2, a temperature sensor 6, a humidity sensor 7, and a second camera 8 for capturing an image of the medicinal material are mounted. An electronic weighing device 9 is also mounted on the base plate of the sub-drug cabinet, for example, the weighing device can be mounted in a sandwich of the base plate. In addition, a heat dissipation device and a heating device can be assembled for each sub-medicine cabinet.
In this example embodiment, the storage environment of the medicinal materials can be monitored in real time for the medicinal materials stored in the medicinal cabinet. Referring to fig. 5, the method may include:
step S21, a medicinal material information database is created according to medicinal material basic data corresponding to each medicinal material;
step S22, a medicinal material information database is read to determine target storage parameters corresponding to each medicinal material; the target storage parameters include: target temperature data, target humidity data;
step S23, starting a temperature sensor and a humidity sensor which are arranged in each sub-medicine cabinet to acquire current temperature data and current humidity data of each sub-medicine cabinet;
step S24, if the temperature difference between the current temperature data and the target temperature data is larger than the temperature error parameter, a corresponding temperature adjustment instruction is generated for adjusting the temperature in the sub-drug cabinet to the target temperature data; or alternatively
Step S25, if the difference between the current temperature data and the target temperature data is smaller than or equal to the temperature error parameter, calculating the humidity difference between the current humidity data and the target humidity data;
and S26, when the humidity difference is larger than the preset humidity error parameter, generating a corresponding humidity adjustment instruction for adjusting the humidity of the sub-drug cabinet to the target humidity.
In this example embodiment, the medicinal material information database may be created in advance from medicinal material basic data corresponding to each medicinal material.
Specifically, the traditional Chinese medicine information stored in each sub-medicine cabinet of the medicine cabinet can be recorded at the background management system end of the intelligent application platform, and a medicine information database corresponding to the medicine cabinet is created. The entered medicinal material information can comprise the name, year, function, phase-contrast medicine, medicine attribute, weight, grade, production place and other information of each medicinal material.
For the background management system, communication and data transmission can be carried out between the background management system and the medicine cabinet. For example, alarm information, sensor data, authentication requests, etc. may be received from the drug cabinet. Referring to fig. 4, an intelligent medicine management and control system platform 41 is used as a background management terminal, and can establish data connection and remote communication with a plurality of intelligent medicine cabinet terminals 42.
In this example embodiment, for the traditional Chinese medicinal materials stored in each sub-drug cabinet, the traditional Chinese medicinal materials can be queried in the drug information database to obtain temperature data and humidity data which are suitable for storage and correspond to each drug, and the temperature data and the humidity data are used as target temperature data and target humidity data; for example, the array of temperature data may be set to be A n The array of humidity data is B n . The temperature sensor of each sub-drug cabinet can be started to collect corresponding current temperature data c x . Judging the current temperature c x Whether or not at the target temperature value A n Is within a preset temperature error range; if the current temperature c x If the temperature exceeds the preset temperature error range and is larger than the target temperature value, the wind turbine system can be started to perform heat dissipation treatment; if the current temperature c x And if the temperature exceeds the preset temperature error range and is smaller than the target temperature value, the thermodynamic machine can be started to heat. Or if the current temperature is judged to be within the preset temperature error range, the humidity sensor can be started to read the value d of the humidity sensor x . Judging the current humidity value d x Whether or not at the target temperature data B n Is within a preset humidity error range; if when the humidity d x At the target temperature data B n Indicating that the medicinal material preservation environment is normal within the preset humidity error range; or if the humidity d x Higher than target humidity data B n If the preset humidity error range of the sub-medicine cabinet is higher in current humidity, a fan of the sub-medicine cabinet can be started to dehumidify and dry; or if the humidity d x Below target humidity data B n And (3) indicating that the current environment is dry, and displaying the environment drying alarm information corresponding to the sub-drug cabinet in a display screen.
In this example embodiment, the method may further include: obtaining medicine storage aging information corresponding to traditional Chinese medicinal materials of the sub medicine cabinet; and according to the acquired current time, checking the medicine aging by combining the medicine storage aging information, and generating corresponding alarm information when the checking is out of date.
Specifically, the quality guarantee period of the medicinal materials in the sub-drug cabinet can be monitored. Specifically, a corresponding time-effect monitoring task can be created when a medicinal material is placed in the sub-medicine cabinet, a corresponding timer of the sub-medicine cabinet is started, and the current time T1 is recorded. When a worker takes medicines or responds to other operations, the judgment of the medicine aging in the sub-medicine cabinet can be triggered, and medicine storage aging information corresponding to the traditional Chinese medicines in the sub-medicine cabinet can be obtained from a medicine information database and can comprise a production date T2 and a quality guarantee period T; and calculating according to the current time, the production date and the quality guarantee period time, so as to judge whether the medicinal materials in the sub-medicine cabinet exceed the quality guarantee period. If the medicinal materials are judged to be out of date, corresponding out-of-date alarm information can be generated and displayed on a display screen, and the corresponding alarm information can be sent to a background system end to prompt staff.
In this exemplary embodiment, whether or not confusion occurs in the medicinal materials in each sub-drug cabinet may also be analyzed. Referring to fig. 6, the above method may include:
s31, acquiring medicinal material images by using second cameras arranged in each sub-medicine cabinet in the medicine cabinet;
step S32, detecting the image content of the medicinal material image by using a trained identification module, marking the medicinal material area through a coordinate frame, and acquiring a corresponding clipping image;
step S33, identifying the clipping image by using the trained medicinal material classification model so as to obtain a corresponding medicinal material classification result;
and step S34, comparing the medicinal material classification result with medicinal material information of the sub-drug cabinet, and generating corresponding alarm information when the comparison is inconsistent.
Specifically, a timing task for identifying medicinal materials can be established for each sub-drug cabinet. When the timing task is executed, a second camera in the sub-drug cabinet can be called to acquire the current medical material image; or, the instructions issued by the user at the background management terminal can be executed to collect and identify the medicinal material images; or, when the prescription image added by the user is acquired, the identification of the medicine in the sub-medicine cabinet is triggered, and whether other medicines are mixed in the sub-medicine cabinet or not is judged. The second camera can be a camera with a light supplementing function. For the acquired medicinal material image, whether the image contains medicinal materials can be judged first. Specifically, a drug detection model may be trained in advance. The method comprises the steps that corresponding medicinal material detection models can be trained for each type of medicinal materials respectively, namely, the detection model of the medicinal material A can only detect and identify images of the medicinal material A; or training a comprehensive medicinal material detection model, and can be applied to detection and identification of different medicinal materials. Specifically, the model may be trained according to different training samples used. The training process of the detection model may include: firstly, collecting a certain number of medicinal material images, marking, and performing cutting, fusion, splicing and other treatments on the collected medicinal material images to enrich a data set and serve as training samples; then, the training sample image may be cropped, and the size may be 640 x 640; the model training can be carried out by adopting a target detection model such as yolov5 based on a deep learning model and utilizing a training sample to obtain a medicinal material detection algorithm model. The acquired medicinal material images can be used as input of a medicinal material detection model, the identification result of the medicinal material images is output, and the positions of the medicinal materials in the images are marked by utilizing coordinate frames. If the medicinal material image is identified to contain medicinal materials, the image can be cut according to the coordinate frame, and a small image of the medicinal materials, namely the cut image, is obtained.
In addition, a medicinal material classification model can be trained in advance and used for identifying the type of medicinal materials. Specifically, images of different types of medicinal materials can be collected at first, and marked; the medical material images can be cut, fused, spliced and the like to enrich the data set and serve as training samples. The training samples can be input into a ResNet 18-based classification model for training to obtain a medicinal material classification model. And inputting the acquired clipping image into the trained medicinal material classification model to obtain a corresponding medicinal material classification result.
After the medicinal material classification result is obtained, the medicinal material classification result can be compared with medicinal material information of the sub-drug cabinet; wherein, the medicinal material information can be medicinal material names. If the medicinal material classification result is the same as the medicinal material name of the sub-medicine cabinet, a corresponding identification result 'no other medicinal materials are mixed' can be generated; or if the medicinal material classification result is inconsistent with the medicinal material name, corresponding alarm information can be generated to prompt the staff that other medicinal materials are mixed in the current sub-medicine cabinet.
In this example embodiment, based on the foregoing, the foregoing method may further include:
step S41, identifying the medicinal material image by using a trained medicinal material grade classification model corresponding to medicinal material information of the current sub-medicinal chest so as to obtain a corresponding medicinal material grade classification result;
Step S42, corresponding alarm information is generated when the medicinal material grade classification result is a target result.
Specifically, when the medicine in the sub-medicine cabinet is identified and is not mixed with other medicines, the grade of the medicine can be checked to judge whether the abnormality such as mildew and insect growth occurs. Specifically, a medicinal material grade classification model can be trained in advance, and the collected medicinal material images can be identified by using the model. For example, a corresponding drug class classification model may be trained separately for each drug type, or a generic drug class classification model may be trained; this may be achieved by using different training samples. Taking a single medicinal material grade classification model as an example, for example, the medicinal material is angelica, the model training process may include: corresponding images of different grades of medicinal materials are collected, wherein the images comprise normal medicinal material images, moldy medicinal material images and insect medicinal material images, and corresponding marking information is added to serve as training samples. And inputting the training sample into a classification model based on ResNet18 for training to obtain a medicinal material class classification model of medicinal material angelica. And taking the cut-out image as input of a medicinal material grade classification model to obtain the current medicinal material grade classification result of the medicinal material, wherein the classification result is any one of normal, moldy and vermin.
In step S11, a first camera set on the drug cabinet is used to collect a prescription image corresponding to the current prescription, and text recognition is performed on the prescription image to obtain corresponding information of the drug to be analyzed and patient identity information.
In this example embodiment, when a worker or a patient places a prescription on a platform below the first camera, the first camera may be triggered to capture a current prescription and collect a corresponding prescription image. Then, text recognition OCR (optical character recognition) can be performed on the prescription image to obtain patient identity information corresponding to the current prescription and the name of the medicinal material contained in the current prescription, and the patient identity information is used as medicinal material information to be analyzed. The patient identity information may include identification information such as name, age, number, etc.
In step S12, corresponding medical data is called according to the patient identity information; wherein the medical data includes patient medication information and patient disease information;
in this example embodiment, according to patient identity information identified in the prescription image, medical data corresponding to the patient may be recalled, where patient medication data may include medication information that the patient is currently multiplexing, and medication information that the patient has taken; patient disease information may include incurable disease of the patient, as well as allergy information.
In step S13, the drug property comparison, drug and disease comparison are performed on the information of the to-be-analyzed medicinal materials and the medical data, so as to verify the current prescription.
In this example embodiment, the step S13 may include: acquiring first medicine property data corresponding to the medicine information to be analyzed and second medicine property data corresponding to the patient medicine information, carrying out medicine property analysis according to the first medicine property data and the second medicine property data, and comparing according to the first medicine property data and the patient disease information so as to check whether medicine conflict exists among the medicine information to be analyzed, the patient medicine information and the patient disease information; when the medicine conflict is detected to be absent, carrying out medicine property analysis on each medicine contained in the medicine information to be analyzed so as to detect whether the medicine conflict exists in the medicine information to be analyzed; if the medicine conflict exists, corresponding medicine prompt information is generated.
Specifically, the medicinal material information corresponding to each medicinal material to be analyzed can be obtained from a medicinal material information database to obtain medicinal material property data of each medicinal material, which can include medicinal material compatibility information, medicinal material and disease attention information, etc., firstly, medicinal material properties of each medicinal material to be analyzed in the current prescription can be compared with medicinal materials currently taken by a patient, and whether medicinal material compatibility exists between each medicinal material to be analyzed in the current prescription and the medicinal materials currently taken by the patient is judged; in addition, the method can also compare and analyze the allergy information of each medicinal material to be analyzed in the current prescription with the allergy information of the patient, and judge whether the medicinal material to be analyzed in the current prescription causes allergy of the patient; meanwhile, the medicine properties of the medicines to be analyzed in the previous prescription and the medicines taken by the patient can be compared, and whether the situation of the medicine compatibility exists or not can be judged. Wherein, the taken medicine can be the medicine which is taken by the patient recently but is stopped from taking at present; the medication being taken may be one that the patient is in an in-taking state to treat the currently existing condition. In addition, the medicine to be analyzed in the current prescription can be compared with the current incurable diseases of the patient, whether the medicine to be analyzed in the current prescription is not suitable for the incurable diseases of the patient or not is judged, and whether the patient is suitable for taking the medicine in the prescription or not is further judged. And judging whether the current prescription is suitable for the current illness state of the patient by comparing and analyzing the medicine properties from multiple dimensions. If there is a mismatch in the properties of the drug in any dimension, for example, the drug being taken by the patient is in gram with the drug in the prescription, or the drug in the current prescription is easy to cause allergy of the patient, or the drug in the current prescription is in gram with the patient 'already taken', or the drug in the current prescription is not suitable for the disease of the patient, the patient is judged to be unsuitable for using the drug, prompt information which cannot be taken is generated and displayed in a display screen, and meanwhile, corresponding prescription prompt information is generated and sent to terminal equipment of a corresponding doctor. Or if the judging conditions are matched, judging that the patient is suitable to use the current prescription.
After the first round of judgment process is completed, the second round of judgment can be performed on the current prescription, namely, whether the medicinal materials with the same gram exist in the current prescription or not is judged according to comparison and analysis between the medicinal property information of the medicinal materials to be analyzed in the current prescription. If the prescription prompt information exists, the prescription prompt information can be generated and sent to the corresponding doctor terminal device. Or if the situation that the medicine is not available is judged, judging that the current prescription is reasonable; thereby completing verification of the current prescription.
In step S14, when the verification of the current prescription is successful, performing medicine matching according to the current medicine information of the medicine cabinet and the information of the medicine to be analyzed corresponding to the current prescription, determining the information of the sub medicine cabinets corresponding to the medicines when the medicine matching is successful so as to open the corresponding sub medicine cabinets, and pushing the medicine use information to the target terminal device.
In this exemplary embodiment, when there is no other problem in the current prescription inspection, it may be first determined whether each medicinal material in the current prescription is contained in the current medicine cabinet. Specifically, the first medicinal material sequence of the medicine cabinet can be compared with the second medicinal material sequence corresponding to each medicinal material contained in the current prescription, for example, the first medicinal material sequence can be compared with the second medicinal material sequence through the name and specification of the medicinal material; when the medicinal materials are successfully matched, the medicinal materials in the current prescription are contained in the medicinal cabinet, the position and the code of a specific sub-medicinal cabinet corresponding to the medicinal materials can be determined, the cabinet door of the sub-medicinal cabinet can be lightened, and an opening instruction of the sub-medicinal cabinet is generated and executed, so that the cabinet door of the sub-medicinal cabinet is opened. In addition, the prompt message of 'all medicinal materials are matched' can be displayed in the display screen of the medicine cabinet. Meanwhile, the information of the usage of the medicinal materials such as the eating method, the eating tabu and the like corresponding to the medicinal materials can be obtained from the medicinal material information database and pushed to the terminal equipment of the patient. The terminal equipment information of the patient can be synchronously acquired when the medical information of the patient is called. Or if the first medicinal material sequence of the medicine cabinet is compared with the second medicinal material sequence corresponding to each medicinal material contained in the current prescription, and the medicinal material matching fails, which means that one or more medicinal materials are currently absent in the medicine cabinet, the medicinal material information of the matching failure can be displayed in a display screen, and corresponding prompt information is displayed.
In this example embodiment, in the step S11, the text recognition on the prescription image may specifically include:
step S111, performing image conversion processing on the prescription image to obtain a corresponding gray level image, and performing binarization processing on the gray level image to obtain a binarized image;
step S112, carrying out region connection processing on the binarized image, and acquiring width parameters of each connected region so as to determine the text writing type according to the width parameters;
step S113, calling a corresponding recognition strategy according to the text writing type to perform text recognition so as to acquire a corresponding text recognition result.
Specifically, there are generally printed version prescriptions and handwritten version prescriptions for prescription papers. The printing version prescriptions are obtained by inputting electronic version prescriptions on a computer by a doctor, printing and delivering the electronic version prescriptions to a patient, and the text contents in the prescriptions are printing bodies. The handwritten version of the prescription is that a doctor handwriting the prescription content in a manual manner on a prescription paper. For different text writing types, the identification can be performed, and specific text contents can be identified by using different text identification models, so that the accuracy of prescription text content identification is improved.
Specifically, when identifying the acquired prescription image, the prescription image may be first converted into a corresponding gray-scale image. The threshold value may be preset to 127, and the gray-scale image may be binarized to obtain a corresponding binarized image. The direction correction can also be carried out on the binarized image, specifically, the center point of the character connected domain in a certain subarea of the text image is taken as a characteristic point, and the continuity of the point on the base line is utilized to calculate the direction angle of the corresponding text line, so as to obtain the inclination angle a of the whole page; and rotating the text in the reverse direction by a to obtain a corrected text, thereby realizing the correction of the text direction. For the binarized image, region communication can be performed, and the width of each communication region is calculated; if the width of the communication area is fixed, judging that the prescription is a print prescription, and calling a print prescription identification flow to identify; otherwise, the corresponding handwriting prescription identification flow can be called for identification for the handwriting prescription.
In this exemplary embodiment, if the width parameters of the connected regions are different, it is determined that the text writing type is handwriting.
Correspondingly, the calling the corresponding recognition policy according to the text writing type to perform text recognition to obtain the corresponding text recognition result, referring to fig. 7, may specifically include:
Step S51, carrying out text region identification on the binarized image corresponding to the prescription image to determine a text region and a non-text region;
step S52, dividing the text region to obtain a line division target;
step S53, dividing text blocks based on the text region and the line division target to obtain a text block set;
step S54, calculating corresponding average width parameters for the text block set, and performing column segmentation based on the average width parameters to obtain segmentation results;
and step S55, performing text matching on the segmentation results by using the trained text matching model so as to obtain text recognition results corresponding to the segmentation results.
In particular, for identification as a handwriting prescription, the acquired color image may be converted to a grayscale image. Setting the threshold value to 127, binarizing the gray-scale image to obtain images of 0 and 1, and obtaining a binarized image. And correcting the direction of the text. The text region in the binarized image may then be identified using a text region identification model. In particular, the text region recognition model may be a trained neural network-based recognition model, such as a Faster RCNN-based recognition model. The loss function of the corresponding recognition model may include:
Figure BDA0004159064150000151
The binarized image is input into the recognition model, and the probability of whether a certain position is a text region or not can be obtained, P epsilon (0, 1).
According to the obtained prediction result of the text region, pixels which are non-text regions in the prediction result can be removed, and only row pixels which are the text regions in the prediction result are reserved and used as subsequent input. Specifically, a neural network-based segmentation model, such as a CRNN (Convolutional Recurrent Neural Network ) -based segmentation model, may be trained in advance. Correspondingly, the loss function of the model may include:
L=α·L v%r +β·L dist +γ·L reg
Figure BDA0004159064150000152
Figure BDA0004159064150000153
Figure BDA0004159064150000154
wherein, at the loss function L v%r Wherein C refers to the number of text lines, N c Refers to the number of pixels of the text image, 3 i Representing the feature representation in high-dimensional space of the original image position after high-dimensional feature mapping, while 4 v Can be regarded as each text line cluster in a high-dimensional spaceIs provided for the radius range of (a). At the loss function L dist Wherein C refers to the number of text lines, 4 d The magnitude of the distance from row to row is controlled. Loss function L reg So that the center of the line of the Chinese character in the high-dimensional space can be within a certain range of the space origin.
The predicted text region can be used as input of a segmentation model and mapped into a high-dimensional mapping space to obtain a corresponding line segmentation target. The text area in the high-dimensional space is a point cluster with obvious characteristics, and then a FINCH clustering algorithm is utilized to calculate the similar distance; selecting nearest neighbor points and constructing a nearest neighbor matrix; and obtaining clustering results by the nearest neighbor matrix, wherein the results gathered into one type are one row. And dividing the text block into different text block sets W to be processed according to the region division determined as the text region and the region division determined as the same line. Calculating the average width of the text block set to obtain an average width value t; for text blocks with width > t, performing column segmentation, wherein the column segmentation method can be to use nearest neighbor matrix of binary pixels, and all 1 pixels are single words; the text blocks with the width of < t are adjacently combined and then subjected to column direction cutting, wherein the column direction cutting method is that pixels with adjacent pixel values of 1 are single words; and detecting whether all pixels with the pixel value of 1 have adjacent relation or not for the text block with the width of = t, and if not, performing column-wise cutting on the text block again, wherein the column-wise cutting method is that the pixel set with all binary pixels of 1 is one word.
Additionally, a word matching model may be pre-trained, such as training word matching based on a random decision tree or CTN algorithm; during model training, handwriting texts can be collected in advance and marked to serve as samples, sample data can be rotated, blurred and the like to enrich sample data sets, and the samples are input into a model for model training, so that a character matching model of the handwriting texts is obtained. For the pixel segmentation result, a text matching model can be input to obtain a corresponding text matching result, so that a handwriting prescription recognition result is obtained.
In this example embodiment, the method includes: and when the width parameters of the connected areas are the same, judging that the text writing type is a printing body.
Correspondingly, the step of calling the corresponding recognition strategy according to the text writing type to perform text recognition so as to obtain the corresponding text recognition result comprises the following steps:
step S61, carrying out frame marking on the binarized image corresponding to the prescription image, and carrying out fusion processing on each marked frame to obtain a frame line image;
step S62, performing differential operation on the binarized image and the frame line image to obtain a frameless line image;
Step S63, cutting the frameless line image based on preset medicinal material position pixel point information to obtain a medicinal material data part image;
step S64, performing text segmentation on the partial images of the medicinal material data to obtain text segmentation results;
step S65, the text segmentation results are identified by utilizing the trained text recognition model, so that the text recognition results corresponding to the text segmentation results are obtained.
Specifically, when the text is confirmed as the print text, text content can be recognized by using the corresponding print recognition flow. Specifically, the prescription image can be preprocessed firstly, and the noise of the picture is eliminated by adopting open operation, so that the purpose of removing noise is achieved; next, the denoised image is converted into a grayscale image, 127 is used as a threshold for image binarization, a pixel value exceeding 127 is set to 1, a pixel value lower than 127 is set to 0, and binarization of the image is achieved, thereby obtaining a binarized image. Thirdly, respectively obtaining horizontal frame lines and vertical frame lines of the image by adopting rectangular structural elements, fusing all frame lines in the obtained image, and setting the original image as f 1 (x, y), the frame line image is f 5 (x, y), and obtaining a difference image F (x, y) by performing difference, namely obtaining an image with frame wires removed. The calculation formula may include: f (x, y) = |f 1 (x,y)-f 5 (x, y) |. For the image with the frame line removed, according to the position pixel point information [ x, y, w, h ] of the preset prescription medicinal materials]Cutting the partial image of the prescription medicinal materials to obtain a cut image. Target segmentation is carried out on the preprocessed and cut image, andthe method comprises the steps of positioning the words in the text file and dividing the target words, wherein the method comprises four substeps of column division, row division, word contour extraction, cutting and canvas adjustment.
Specifically, column segmentation may be performed first: and carrying out vertical projection on the images, acquiring positions of vertical cutting lines according to the number of background points in the vertical direction, obtaining the average width of the columns, and if the width of a certain column to be cut is larger than twice the average width, indicating that adhesion exists between the columns, cutting the columns again. Then line segmentation: and carrying out horizontal projection on the cut column images, detecting the images obtained after the line segmentation, detecting adjacent segmented images of the images again if the width of the segmented images is smaller than 1/3 of the average width, merging the images again if the widths of the segmented images are smaller than 1/3, and carrying out line segmentation again. And then extracting and cutting the single-word outline: noise points may exist in the cut single-word image, the outline and the cutting of the single-word image are extracted again for the cut single-word image, noise is further eliminated, and redundant background pixels are cut off; the adjustment canvas is then performed: and respectively filling 20% of background pixels in the upper direction, the lower direction, the left direction and the right direction of the single-word image, so that the recognition target is positioned at the right center of the picture, and uniformly processing the single-word picture into a size of 144x 144.
In addition, the recognition model of the printed text may be trained in advance, for example, the recognition model of the printed text based on the res net50 residual network may be trained. During model training, different printed text images can be collected to serve as training samples, and the training samples can be subjected to rotation, cutting, shifting and other operations to enhance data, so that training data are enriched. The training sample image can be subjected to dimension reduction processing by using a convolution model of a convolution kernel of 1x1, and then a printed body text recognition model based on a ResNet50 residual error network is used for recognizing a single character font, so that the training of the model is completed. The formula for the residual network may include: y=f (x, { W i })+W s x. For the single-word image obtained after cutting, a printing body word recognition model based on a ResNet50 residual error network can be input to obtain a corresponding word recognition result, therebyAnd obtaining the identification result of the prescription image.
In some exemplary embodiments, when a worker or patient places a prescription on a platform below a first camera on a drug cabinet, the first camera may be triggered to collect a corresponding prescription image and the text content of the prescription image may be identified. For the acquired prescription image, whether the prescription is a handwriting prescription or a printing prescription can be judged first, and a corresponding identification flow is called, so that text content contained in the prescription is identified, and corresponding medicinal material information is obtained. Meanwhile, medical data corresponding to the patient can be queried according to the identity information of the patient, and medication information and disease information of the patient are obtained, so that whether medicine phase exists between the current prescription and the patient in the process of multiplexing and whether medicine phase exists between the current prescription and the patient in the process of taking the medicine or not can be analyzed and judged, and meanwhile, whether conflict between the current prescription and the patient in the process of not curing diseases exists or not is analyzed and judged, and whether the current prescription causes allergic symptoms of the patient or not is judged; meanwhile, whether medicine phase g exists among the medicinal materials in the prescription can be analyzed and judged; thereby enabling accurate analysis of the rationality of the current prescription from multiple dimensions. If any judgment is unreasonable, generating corresponding prompt information, and not executing the current prescription; only when the judgment of each dimension is reasonable, whether each medicinal material contained in the current prescription is stored in the medicine cabinet is judged, and if the corresponding medicinal material is stored in the medicine cabinet, the corresponding sub medicine cabinet can be controlled to be opened so as to facilitate the staff or the patient to take the medicine. Meanwhile, the usage tabu information of each medicinal material can be sent to the terminal equipment of the patient.
In addition, when the prescription image is identified, the identity of the person can be authenticated through the face image, the fingerprint and the iris, and each sub-drug cabinet can be opened only when the identity authentication is passed. After the identity authentication is successful, the weight of the medicinal materials in each sub-medicine cabinet can be measured in real time by utilizing the bearing equipment; if the weight is 0, the corresponding medicinal material sequence of the current medicinal material cabinet can be updated; meanwhile, corresponding alarm information can be generated and uploaded to a traditional Chinese medicine management and control system platform. For each sub-medicine cabinet, before medicine taking, a camera in the medicine cabinet can be started, corresponding medicine images are collected, and whether other medicines are mixed in the sub-medicine cabinet is judged by using the medicine images; if the medicine contains other medicines, corresponding alarm information is generated, and the medicine mixed with other medicines is displayed in a display screen; if other medicinal materials are not mixed, the normal state is shown.
In addition, for each sub-medicine cabinet, the camera arranged in the sub-medicine cabinet can be used for collecting the medicine images, identifying the storage state of the medicine, judging whether the medicine is stored normally or has moldy and long worms, and generating corresponding alarm information when the medicine is identified to change.
In addition, the medicinal material information database can be read in advance, and temperature data and humidity data which are stored in the medicine cabinet and are suitable for storing all medicinal materials can be obtained. For each sub-medicine cabinet, the temperature and humidity of the sub-medicine cabinet can be monitored in real time by utilizing the assembled temperature sensor and the assembled humidity sensor, and when the monitored temperature and/or humidity do not meet the preset storage conditions, the temperature and the humidity are automatically regulated, so that the most suitable storage conditions are provided for the medicinal materials.
In addition, corresponding quality guarantee period monitoring tasks can be created for each sub-drug cabinet. The date of manufacture and shelf life of the medicinal material can be obtained when the medicinal material is stored in the drug cabinet. The method comprises the steps of obtaining the current time when each sub-medicine cabinet is opened, and judging whether the quality guarantee period of the medicinal materials in the sub-medicine cabinet is exceeded currently; if the quality guarantee period is exceeded, corresponding alarm prompt information is generated, and the corresponding alarm information can be uploaded to the intelligent traditional Chinese medicine management and control system. Thereby realizing the real-time monitoring of the medicinal material deadline. Realizing intelligent management of medicinal materials.
Furthermore, in some exemplary embodiments of the present disclosure, in some scenarios, the medicinal materials within each sub-drug cabinet may also be pre-packaged into a small package of a certain weight, such as 5g, 3g, or 10g, etc. When a patient takes medicine, the prescription is placed below the first camera of the medicine cabinet to acquire a corresponding prescription image, and when the identification and verification of the prescription of the patient are triggered, the image data of the patient can be synchronously acquired, and the identity of the patient is verified by utilizing the acquired face image of the patient. When the identity of the patient is successfully verified and is matched with the current prescription, the prompt information of the medicinal materials of the prescription and the corresponding dosage can be displayed in the display screen of the medicine cabinet, and the corresponding sub medicine cabinets can be opened one by one so as to weigh the medicinal materials in the sub medicine cabinets and judge whether the weight of the taken medicinal materials is correct or not; when the picking is judged to be correct, the next sub-medicine cabinet is opened; repeating the process until all the medicinal materials are taken out; thereby realizing self-help medicine taking of the traditional Chinese medicine by the patient.
According to the medicine cabinet management method provided by the embodiment of the disclosure, whether other medicines are mixed in each sub medicine cabinet or not is judged in a mode based on computer vision, and if the medicines are moldy, spoiled or grown, an alarm is given and uploaded to an intelligent traditional Chinese medicine management and control system platform. And can realize carrying out automatic weighing, demonstration and record function to the medicinal material, if the medicinal material weight is 0, remind in time to supply the medicinal material to upload this information to intelligent traditional chinese medicine management and control system platform. And temperature sensor, humidity transducer that utilize the interior assembly of son medicine cabinet utilize the real-time temperature and the humidity of control medicine cabinet of artificial intelligence's mode for better preserved medicinal material. The medicine cabinet is characterized in that the medicine cabinet is provided with a medicine cabinet, and the medicine cabinet is provided with a medicine cabinet. After the prescription content is acquired, the read prescription medicine and the current medicine taken in the patient personal database (or the allergic medicine recorded in the electronic medical record list which is issued by the doctor to the patient or the issued medicine taken) can be compared with the incurable disease, if the prescription medicine is conflicted, prompt information generated according to the medicine comparison information is automatically sent to the computer end of the prescribing doctor, and the doctor can continue to dispense after confirming again without errors; therefore, the rationality of the prescription is judged from multiple dimensions, and the situation that the prescription is not suitable for a patient is avoided. In addition, the camera arranged in the sub-drug cabinet is used for collecting images of the medicinal materials, and identifying the images of the medicinal materials periodically or irregularly, so that whether the medicinal materials are out of date can be automatically judged; if the information is out of date, corresponding alarm information is generated, and the corresponding information is uploaded to an intelligent traditional Chinese medicine management and control system platform; realizing the real-time monitoring of the state of the medicinal materials. Identity authentication is performed by utilizing face recognition, fingerprint recognition and iris recognition, so that an identity recognition function is realized, the fact that non-pharmacist personnel cannot open a traditional Chinese medicine cabinet is ensured, and the safety of medicinal materials is ensured. By setting up an internet of things platform of an intelligent traditional Chinese medicine system, the intelligent traditional Chinese medicine cabinet terminal and the intelligent traditional Chinese medicine management and control system platform are included, so that staff can collect medicine storage state information of a plurality of intelligent medicine cabinet terminals and medicine taking information of medicinal materials through the intelligent traditional Chinese medicine management and control system platform; realizing the real-time collection and control of the state of the medicinal materials.
It is noted that the above-described figures are only schematic illustrations of processes involved in a method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Further, referring to fig. 9, in this exemplary embodiment, an intelligent medicine cabinet management system 90 is further provided, which may be applied to the management of an intelligent medicine cabinet; the system comprises: prescription identification module 901, data recall module 902, prescription analysis module 903, sub-drug cabinet control module 904. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the prescription identification module 901 may be configured to collect a prescription image corresponding to a current prescription by using a first camera set on the drug cabinet, and perform text identification on the prescription image to obtain corresponding information of a drug to be analyzed and patient identity information.
The data recall module 902 may be configured to recall corresponding medical data according to patient identity information; wherein the medical data includes patient medication information, patient disease information.
The prescription analysis module 903 may be configured to perform drug property comparison and drug-to-disease comparison on the information of the medical materials to be analyzed and the medical data to verify the current prescription.
The sub-drug cabinet control module 904 may be configured to perform drug matching according to current drug information of a drug cabinet and information of to-be-analyzed drug corresponding to the current prescription when verification of the current prescription is successful, determine sub-drug cabinet information corresponding to each drug to open a corresponding sub-drug cabinet when drug matching is successful, and push drug usage information to a target terminal device.
Since each functional module of the intelligent medicine cabinet management system of the embodiment of the present disclosure is the same as that of the above-described embodiment of the intelligent medicine cabinet management method, a detailed description thereof will be omitted herein.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Fig. 10 shows a schematic diagram of an electronic device suitable for use in implementing embodiments of the invention.
It should be noted that, the electronic device 1000 shown in fig. 10 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present disclosure.
As shown in fig. 10, the electronic apparatus 1000 includes a central processing unit (Central Processing Unit, CPU) 1001 that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a random access Memory (Random Access Memory, RAM) 1003. For example, the central processing unit 101 may perform the steps as shown in fig. 1. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other by a bus 1004. An Input/Output (I/O) interface 1005 is also connected to bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed on the drive 1010 as needed, so that a computer program read out therefrom is installed into the storage section 1008 as needed.
In particular, according to embodiments of the present invention, the processes described below with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program loaded on a storage medium, the computer program comprising program code for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011. When executed by a Central Processing Unit (CPU) 1001, the computer program performs various functions defined in the system of the present application.
Specifically, the electronic device may be an intelligent device such as a server, a tablet computer or a notebook computer, and may execute the method for interaction management of the internet of things device applied to the proxy server or the internet of things platform. Or, the electronic device may be an internet of things device, and the internet of things device interaction management method applied to the internet of things device can be executed.
It should be noted that, the storage medium shown in the embodiments of the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any storage medium that is not a computer readable storage medium and that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
It should be noted that, as another aspect, the present application further provides a storage medium, which may be included in an electronic device; or may exist alone without being incorporated into the electronic device. The storage medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the methods described in the embodiments below. For example, the electronic device may implement the steps of the method applied to a proxy server, an internet of things platform, or an internet of things device.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. An intelligent medicine cabinet management method, characterized in that the method comprises the following steps:
acquiring a prescription image corresponding to a current prescription by using a first camera arranged on a medicine cabinet, and performing text recognition on the prescription image to acquire corresponding to-be-analyzed medicine information and patient identity information;
calling corresponding medical data according to the identity information of the patient; wherein the medical data includes patient medication information and patient disease information;
comparing the medicinal material information to be analyzed and the medical data with each other in terms of medicinal properties and medicinal and disease so as to verify the current prescription;
and when the verification of the current prescription is successful, carrying out medicinal material matching according to the current medicinal material information of the medicine cabinet and the medicinal material information to be analyzed corresponding to the current prescription, determining the sub medicine cabinet information corresponding to each medicinal material when the medicinal material matching is successful so as to open the corresponding sub medicine cabinet, and pushing the medicinal material use information to the target terminal equipment.
2. The intelligent medicine cabinet management method according to claim 1, wherein the performing medicine property comparison, medicine to disease comparison on the medicine information to be analyzed and the medical data to verify the current prescription comprises:
acquiring first medicine property data corresponding to the medicine information to be analyzed and second medicine property data corresponding to the patient medicine information, carrying out medicine property analysis according to the first medicine property data and the second medicine property data, and comparing according to the first medicine property data and the patient disease information so as to check whether medicine conflict exists among the medicine information to be analyzed, the patient medicine information and the patient disease information;
when the medicine conflict is detected to be absent, carrying out medicine property analysis on each medicine contained in the medicine information to be analyzed so as to detect whether the medicine conflict exists in the medicine information to be analyzed;
if the medicine conflict exists, corresponding medicine prompt information is generated.
3. The intelligent medicine cabinet management method according to claim 1, wherein the text recognition of the prescription image comprises:
Performing image conversion processing on the prescription image to obtain a corresponding gray level image, and performing binarization processing on the gray level image to obtain a binarized image;
carrying out region communication processing on the binarized image, and acquiring width parameters of each communication region so as to determine the text writing type according to the width parameters;
and calling a corresponding recognition strategy according to the text writing type to perform text recognition so as to acquire a corresponding text recognition result.
4. A method of intelligent drug cabinet management as in claim 3, wherein the method comprises: judging the writing type of the text as a handwriting when the width parameters of the connected areas are different;
the step of calling the corresponding recognition strategy according to the text writing type to perform text recognition so as to obtain the corresponding text recognition result comprises the following steps:
carrying out text region identification on the binarized image corresponding to the prescription image to determine a text region and a non-text region;
dividing the text region to obtain a line division target;
dividing text blocks based on the text region and the line segmentation target to obtain a text block set;
calculating corresponding average width parameters for the text block set, and performing column segmentation based on the average width parameters to obtain segmentation results;
And performing character matching on the segmentation results by using the trained character matching model so as to obtain character recognition results corresponding to the segmentation results.
5. A method of intelligent drug cabinet management as in claim 3, wherein the method comprises: judging the text writing type as a printing body when the width parameters of the connected areas are the same;
the step of calling the corresponding recognition strategy according to the text writing type to perform text recognition so as to obtain the corresponding text recognition result comprises the following steps:
performing frame marking on the binarized image corresponding to the prescription image, and performing fusion processing on each marked frame to obtain a frame line image;
performing differential operation on the binarized image and the frame line image to obtain a frameless line image;
cutting the frameless line image based on preset medicinal material position pixel point information to obtain a medicinal material data part image;
performing text segmentation on the partial images of the medicinal material data to obtain text segmentation results;
and recognizing the text segmentation results by using the trained text recognition model to obtain text recognition results corresponding to the text segmentation results.
6. The intelligent medicine cabinet management method of claim 1, wherein the method further comprises:
Collecting medicinal material images by using a second camera arranged in each sub-medicine cabinet in the medicine cabinet;
detecting the image content of the medicinal material image by using a trained identification module, marking the medicinal material area through a coordinate frame, and acquiring a corresponding clipping image;
identifying the clipping image by using the trained medicinal material classification model to obtain a corresponding medicinal material classification result;
and comparing the medicinal material classification result with medicinal material information of the sub-drug cabinet, and generating corresponding alarm information when the comparison is inconsistent.
7. The intelligent medicine cabinet management method of claim 6, wherein the method further comprises:
identifying the medicinal material images by using a trained medicinal material grade classification model corresponding to medicinal material information of the current sub-medicinal chest so as to obtain a corresponding medicinal material grade classification result;
and generating corresponding alarm information when the medicinal material grade classification result is a target result.
8. The intelligent medicine cabinet management method of claim 1, wherein the method further comprises:
performing identity verification in response to the first triggering operation, and determining a target medicinal material number corresponding to the first triggering operation when the identity verification is successful;
Responding to the input target medicinal material number, generating a corresponding target sub-medicine cabinet opening instruction to open a cabinet door of the target sub-medicine cabinet, and displaying weight record data of the target sub-medicine cabinet in a display;
starting weighing equipment of the target sub-drug cabinet to acquire current weight data of the target sub-drug cabinet; and when the current weight data is zero, updating the weight record data and generating corresponding alarm information.
9. The intelligent medicine cabinet management method of claim 1, wherein the method further comprises:
creating a medicinal material information database according to medicinal material basic data corresponding to each medicinal material;
reading a medicinal material information database to determine target storage parameters corresponding to each medicinal material; the target storage parameters include: target temperature data, target humidity data;
starting a temperature sensor and a humidity sensor arranged in each sub-medicine cabinet to acquire current temperature data and current humidity data of each sub-medicine cabinet;
if the temperature difference between the current temperature data and the target temperature data is larger than the temperature error parameter, a corresponding temperature adjusting instruction is generated for adjusting the temperature in the sub-drug cabinet to the target temperature data; or alternatively
If the difference value between the current temperature data and the target temperature data is smaller than or equal to the temperature error parameter, calculating the humidity difference value between the current humidity data and the target humidity data;
and when the humidity difference value is larger than the preset humidity error parameter, generating a corresponding humidity adjustment instruction for adjusting the humidity of the sub-drug cabinet to the target humidity.
10. A storage medium having stored thereon a computer program which, when executed by a processor, implements the intelligent medicine cabinet management method of any one of claims 1 to 9.
11. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the intelligent medicine cabinet management method of any one of claims 1-9 via execution of the executable instructions.
CN202310341692.5A 2023-03-31 2023-03-31 Intelligent medicine cabinet management method, storage medium and electronic equipment Pending CN116403675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310341692.5A CN116403675A (en) 2023-03-31 2023-03-31 Intelligent medicine cabinet management method, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310341692.5A CN116403675A (en) 2023-03-31 2023-03-31 Intelligent medicine cabinet management method, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116403675A true CN116403675A (en) 2023-07-07

Family

ID=87017293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310341692.5A Pending CN116403675A (en) 2023-03-31 2023-03-31 Intelligent medicine cabinet management method, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116403675A (en)

Similar Documents

Publication Publication Date Title
US11636550B2 (en) Using machine learning to classify insurance card information
US11259718B1 (en) Systems and methods for automated body mass index calculation to determine value
US11694776B2 (en) Generating prescription records from a prescription label on a medication package
US10748217B1 (en) Systems and methods for automated body mass index calculation
CN110705419A (en) Emotion recognition method, early warning method, model training method and related device
CN109492595B (en) Behavior prediction method and system suitable for fixed group
WO2020038138A1 (en) Sample labeling method and device, and damage category identification method and device
WO2021082433A1 (en) Digital pathological image quality control method and apparatus
CN111382622A (en) Medicine identification system based on deep learning and implementation method thereof
CN112908443A (en) Medical diagnosis result verification method and device, electronic device and storage medium
US11429934B2 (en) Express tracking for patient flow management in a distributed environment
US20220130047A1 (en) Diagnostic imaging for diabetic retinopathy
US11430236B1 (en) Computer-implemented segmented numeral character recognition and reader
CN116403675A (en) Intelligent medicine cabinet management method, storage medium and electronic equipment
CN111667457A (en) Medical image-based spine information automatic identification method, system, terminal and storage medium
CN111222374A (en) Lie detection data processing method and device, computer equipment and storage medium
CN113707304B (en) Triage data processing method, triage data processing device, triage data processing equipment and storage medium
CN113380380A (en) Intelligent reading device for medical reports
JP2005070908A (en) Method and system for measuring meal intake for hospital
CN112869746B (en) Method and device for detecting muscle force of lifting eyelid
CN113837169B (en) Text data processing method, device, computer equipment and storage medium
KR102550769B1 (en) Pharmaceutical auto-labeling method and device using artificial intelligence
US20230014400A1 (en) Device, system and method for verified self-diagnosis
Ferraz Utilização da câmara smartphone para monitorizar a aderência à terapia inalatória
Chukwude et al. Development of Face Recognition-Based Attendance System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination