Family medicine management method and system based on intelligent medicine box, terminal and medium
By using image acquisition and processing technology in smart medicine cabinets, combined with a global drug database and drug recommendation model, intelligent identification, classification, and medication reminders for medicines are achieved, solving the shortcomings of traditional medicine cabinet management and improving management efficiency and security.
Patent Information
- Application Number
- CN202511022300.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional medicine cabinets lack intelligent management functions, making it impossible to achieve intelligent identification, classification management, and medication reminders for drug information. In particular, they rely on manual inspection for drug expiration date management, which poses safety risks.
It uses image acquisition equipment and image processing technology to automatically identify drug information, combines a global drug database for intelligent classification and management, generates a drug expiration list, generates personalized medication plans and reminders through prescription recognition technology, and provides medication advice using a drug recommendation model.
It has improved the efficiency and accuracy of drug information entry, realized the scientific management of drugs, reduced the safety risks of expired drugs, and provided accurate medication reminders and personalized suggestions.
Smart Images

Figure CN120977613A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent devices, in particular to a family medicine management method and system based on an intelligent medicine box, a terminal and a medium. BACKGROUND
[0002] Traditional medicine boxes only have simple storage functions and cannot realize intelligent management of medicines. Related intelligent medicine boxes mostly only have simple compartment storage functions or basic reminding functions and cannot realize intelligent identification, classified management, medication reminders and other complete medicine management closed loops of medicine information. In particular, there are obvious defects in the digitization of medicine information, and in the management of medicine expiration dates, due to the lack of intelligent monitoring means, such as the need for regular manual inspection of medicine expiration dates by users, which cannot realize intelligent management of medicine expiration dates and do not have integrated functions such as medication reminders. SUMMARY
[0003] To solve the above problems, the present application provides a family medicine management method and system based on an intelligent medicine box, a terminal and a medium, which improves the intelligent level of family medicine management, solves the defects of traditional and related intelligent medicine boxes in information digitization, expiration date management, medication matching and reminders, and improves management efficiency and convenience.
[0004] In a first aspect, the technical solution of the present application provides a family medicine management method based on an intelligent medicine box, comprising the following steps: acquiring medicine packaging pictures through an image acquisition device, extracting and storing medicine information from the medicine packaging pictures using image processing technology, including medicine name, medicine efficacy, medicine production date and expiration date; classifying medicines according to the extracted medicine information and displaying the medicines contained in each category on a human-computer interaction interface according to the classification results; generating a medicine expiration list according to the medicine production date and expiration date and displaying the medicine expiration list on a human-computer interaction interface; acquiring prescription or medical record pictures through an image acquisition device, extracting medication information from the prescription or medical record pictures using image processing technology, the medication information containing medication names, detecting whether the required medication is contained in the medicine box according to the medication names, giving a prompt if it is not contained, generating a medication plan according to the medication information, and pushing a medication reminder to the user according to the medication plan; acquiring user input symptom descriptions, analyzing the symptom descriptions according to a pre-trained medicine recommendation model, and generating medication suggestions in combination with stored medicine information.
[0005] In an optional embodiment, medicine packaging pictures are acquired through an image acquisition device, and medicine information is extracted and stored from the medicine packaging pictures using image processing technology, specifically including: Images of drug packaging are acquired using image acquisition equipment, and the images are preprocessed, including noise reduction and enhancement, perspective correction, and region segmentation. OCR recognition is performed on the text area to extract the original text. Key fields in the original text are parsed using regular expressions or natural language processing technology, including drug name, some drug efficacy, drug production date and expiration date. The content of key fields constitutes drug information. If a barcode is detected, the decoding library is called to obtain the code. Based on the code, the drug database is queried to match the detailed information. The matched detailed information is checked to see if it matches the parsed key fields. If they do not match, the extracted key fields are corrected. The extracted or corrected drug names are compared with the built-in global drug database to complete the drug efficacy and obtain drug contraindications, which are then added to the drug information. Generate a unique identifier for the current drug, associate the unique identifier with the drug information, and store the associated unique identifier and drug information.
[0006] In one optional implementation, the drugs are classified according to the extracted drug information, specifically including: Preprocessing drug information to generate structured drug data includes cleaning drug names to remove redundant characters and extracting generic names, parsing drug efficacy text to extract efficacy keywords, converting efficacy keywords into standardized expressions, and combining generic names, standardized efficacy keywords, drug production dates, and expiration dates to form structured drug data. Retrieve pre-stored matching rules, which include the mapping relationship between generic keywords, efficacy keywords and drug types; The generic name in the structured drug data is compared with the generic name keywords in the matching rules. If a matching generic name keyword exists, the drug type of the current drug is obtained according to the matching rules. If no matching generic name keyword exists, the efficacy keywords in the structured drug data are compared with the efficacy keywords in the matching rules to obtain the drug type of the current drug, and the current drug is added to the corresponding drug type list. The drug's indications are retrieved from the global drug database based on its name. The drug's indication type is then added to the corresponding indication type list.
[0007] In one optional implementation, a drug expiration list is generated based on the drug's production date and expiration date, and the drug expiration list is displayed on a human-computer interaction interface, specifically including: Compare the current expiration date of the drug with the existing expiration dates in the drug expiration list; Generate the current drug's sorting number based on the comparison results; The production date and expiration date of the current drug are added to the drug expiration list according to the sorting number. The drugs in the drug expiration list are sorted from front to back according to their expiration dates. The list of expired medications is displayed on the human-computer interaction interface.
[0008] In an optional implementation, a prescription or medical record image is acquired using an image acquisition device, and image processing technology is used to extract medication information from the prescription or medical record image, specifically including: Prescription or medical record images are acquired through image acquisition devices, and the images are preprocessed, including using a text detection model to locate text regions in the images. The text region is subjected to OCR recognition to extract the original text, and keywords are extracted using a medical NLP model, including drug name, dosage, frequency, and duration of use.
[0009] In one optional implementation, a medication plan is generated based on medication information, and medication reminders are pushed to the user based on the medication plan, specifically including: A reminder calendar is generated based on the frequency and duration of medication use; Create a medication plan based on the reminder calendar, including medication time, medication name, and dosage; Check if the most recent medication time has arrived; If so, push the most recent medication plan to the user and mark the most recent medication plan as a reminder.
[0010] In one optional implementation, the drug recommendation model includes a BERT model and a knowledge graph; The system obtains a symptom description input by the user, analyzes the symptom description based on a pre-trained drug recommendation model, and generates medication suggestions by combining stored drug information. Specifically, this includes: Obtain the symptom description input by the user, and preprocess the symptom description, including removing pause words and standardizing expression conversion; The BERT model is used to analyze the preprocessed symptom descriptions to generate disease identification results. Based on the disease identification results, recommend drug types through knowledge graph queries; Based on the recommended drug type, retrieve the specific drug from the stored drug information.
[0011] Secondly, the technical solution of the present invention provides a home medicine management system based on a smart medicine cabinet, comprising: The drug information extraction module is used to acquire images of drug packaging through image acquisition equipment, extract and store drug information from the drug packaging images using image processing technology, including drug name, drug efficacy, drug production date and expiration date; The drug classification module is used to classify drugs based on the extracted drug information and display the drugs included in each category on the human-computer interaction interface according to the classification results. The drug expiration date display module is used to generate a list of drugs expiring based on their production date and expiration date, and then display the list of drugs expiring on the human-computer interaction interface. The medication plan management module is used to acquire prescription or medical record images through image acquisition devices, extract medication information from the prescription or medical record images using image processing technology, and the medication information includes the medication name. The module checks whether the medicine box contains the required medication based on the medication name. If it does not contain the medication, a prompt is given. At the same time, a medication plan is generated based on the medication information, and medication reminders are pushed to the user based on the medication plan. The medication recommendation generation module is used to obtain the symptom description input by the user, analyze the symptom description according to the pre-trained drug recommendation model, and generate medication recommendations in combination with the stored drug information.
[0012] Thirdly, the technical solution of the present invention provides a terminal, comprising: Memory for storing home medicine management programs based on smart medicine cabinets; A processor is configured to implement the steps of the smart medicine cabinet-based home medicine management method as described in any of the preceding claims when executing the smart medicine cabinet-based home medicine management program.
[0013] Fourthly, the present invention provides a computer-readable storage medium storing a home medicine management program based on a smart medicine cabinet, wherein the home medicine management program based on a smart medicine cabinet, when executed by a processor, implements the steps of the home medicine management method based on a smart medicine cabinet as described in any of the above claims.
[0014] As can be seen from the above technical solutions, this application has the following advantages: 1. This application uses image acquisition equipment and image processing technology to automatically identify key information on drug packaging (including drug name, efficacy, production date and expiration date, etc.), changing the traditional manual data entry method, improving the efficiency and accuracy of drug information entry, and solving the shortcomings of traditional medicine boxes in terms of drug information digitization.
[0015] 2. Based on the built-in global drug database, this application can intelligently classify the identified drugs and display them intuitively on the human-computer interaction interface according to multiple classification methods, overcoming the limitations of traditional medicine boxes that only have simple compartment storage, and realizing the scientific management of drugs.
[0016] 3. This application can automatically generate a list of expired drugs based on the drug production date and expiration date, and provide prompts on the human-computer interaction interface, solving the drawback of traditional medicine cabinets that rely entirely on manual inspection for expiration date management, and reducing the safety risks of using expired drugs.
[0017] 4. This application utilizes prescription recognition technology to automatically extract medication information and generate personalized medication plans, achieving accurate medication reminders and overcoming the shortcomings of traditional medicine cabinets that lack intelligent reminder functions. Attached Figure Description
[0018] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a home medicine management method based on a smart medicine cabinet, provided as an embodiment of the present invention.
[0020] Figure 2 This is a schematic block diagram of a home medicine management system based on a smart medicine cabinet, provided as an embodiment of the present invention.
[0021] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0024] Figure 1 This is a schematic flowchart illustrating a home medicine management method based on a smart medicine cabinet, provided as an embodiment of the present invention. Figure 1The executing entity can be a home medication management system based on a smart medicine cabinet. The home medication management method based on a smart medicine cabinet provided in this embodiment of the invention is executed by a computer device; correspondingly, the home medication management system based on a smart medicine cabinet runs on the computer device. Depending on different needs, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0025] like Figure 1 As shown, the method includes the following steps.
[0026] S1. Acquire images of drug packaging using an image acquisition device, and extract and store drug information from the drug packaging images using image processing technology, including drug name, drug efficacy, drug production date, and expiration date.
[0027] S2, classify the drugs according to the extracted drug information, and display the drugs included in each category on the human-computer interaction interface according to the classification results.
[0028] S3 generates a list of expired drugs based on the drug production date and expiration date, and displays the list on the human-computer interaction interface.
[0029] S4. Acquire prescription or medical record images through image acquisition devices, extract medication information from the prescription or medical record images using image processing technology, the medication information including the medication name, detect whether the medicine box contains the required medication based on the medication name, and give a prompt if it does not contain it, generate a medication plan based on the medication information, and push medication reminders to the user based on the medication plan.
[0030] S5. Obtain the symptom description input by the user, analyze the symptom description according to the pre-trained drug recommendation model, and generate medication suggestions in combination with the stored drug information.
[0031] As a refinement and extension of the specific implementation of the above embodiments, in order to fully explain the specific implementation process of this embodiment, the following will provide possible embodiments to describe the specific implementation of the above steps in a non-limiting manner.
[0032] Step S1 involves acquiring images of drug packaging using an image acquisition device, extracting and storing drug information from the images using image processing technology, and automatically identifying key information on the drug packaging (such as name, efficacy, production date, and expiration date) using computer vision technology. This replaces traditional manual input, improving management efficiency and reducing human error. Specifically, this includes the following steps.
[0033] S101 acquires images of drug packaging through an image acquisition device and preprocesses the drug packaging images, including noise reduction and enhancement, perspective correction, and region segmentation.
[0034] Users can take clear photos of medicine packaging using the smart medicine cabinet's built-in camera (such as a smartphone camera or a dedicated image acquisition module). The photos must include the entire front of the packaging or key information areas (such as labels and instructions), avoiding glare or obstructions. For example, using an industrial-grade camera with 16 megapixels or higher can accurately scan medicine labels and prescription documents, extracting key information such as the medicine name, production date, expiration date, dosage, and barcode. The camera can have a built-in autofocus mechanism, optimizing the scanning area by adjusting the angle, eliminating the need for manual adjustment by the user, ensuring efficient scanning and preventing information loss.
[0035] In some optional implementations, a multispectral scanner can also be provided, which can analyze text or graphic information that is difficult to read due to fading, blurring or damage by using spectral scanning technologies such as visible light and ultraviolet light, and can adapt to various forms of pharmaceutical packaging.
[0036] The images captured by the camera are transmitted to the backend for further processing, including preprocessing and storage.
[0037] Preprocessing of drug packaging images includes denoising and enhancement, perspective correction, and region segmentation. Denoising and enhancement are used to adjust brightness and contrast, reducing noise interference during shooting. Perspective correction is used to correct the viewing angle when the image is tilted, such as adjusting a tilted label to a rectangle. Region segmentation locates text areas on the drug packaging, such as distinguishing the label background from the text through edge detection or color segmentation.
[0038] S102, perform OCR recognition on the text area to extract the original text, and parse the key fields in the original text through regular expressions or natural language processing technology, including drug name, some efficacy of the drug, drug production date and expiration date. The content of the key fields constitutes the drug information.
[0039] The text region is subjected to OCR recognition to extract the original text, such as "Production Date: 2023-05-01", and then the key fields in the text are parsed through regular expressions or natural language processing (NLP).
[0040] S103. If a barcode is detected, the decoding library is called to obtain the code. The drug database is queried according to the code to match the detailed information. The matched detailed information is checked to see if it is consistent with the parsed key fields. If they are inconsistent, the extracted key fields are corrected.
[0041] S104 compares the extracted or corrected drug name with the built-in global drug database, completes the drug efficacy, obtains the drug contraindications, and adds the drug contraindications to the drug information.
[0042] S105 generates a unique identifier for the current drug, associates the unique identifier with the drug information, and stores the associated unique identifier and drug information.
[0043] The global drug database includes a multilingual drug information database covering drug data tables from multiple regions, capable of recognizing drug labels from different countries and regions. The global drug database contains basic drug information (generic name, brand name, dosage form, strength, cost, manufacturer), drug classification and coding, clinical and efficacy information (indications, contraindications, side effects, drug interactions), and medication instructions (dosage, route of administration, and timing of administration).
[0044] To ensure data accuracy, when a barcode is detected, the detailed information contained within the barcode is obtained, and the information extracted in step S102 is corrected. Then, based on the extracted (if no correction is needed) or corrected drug name, it is compared with the built-in global drug database to obtain the full range of drug efficacy. This is because the drug efficacy listed on the drug packaging may not be comprehensive enough, so the full range of drug efficacy is obtained through the global database, along with contraindications, etc.
[0045] To facilitate storage, a unique identifier is generated for each drug, and this unique identifier is associated with the drug information. The associated unique identifier and drug information are then stored locally or in the cloud.
[0046] Step S2 classifies the drugs based on the extracted drug information and displays the drugs included in each category on the human-computer interaction interface according to the classification results. Based on the basic information such as drug name, efficacy, production date, and expiration date, the drug type (such as antibiotics, topical drugs) and applicable symptoms (such as colds, fever, stomach pain) are automatically inferred for intelligent classification and medication recommendations, which facilitates drug management and provides users with effective information. The specific steps include the following steps.
[0047] S201, preprocess drug information to generate structured drug data, including cleaning the drug name to remove redundant characters and extracting the generic name, parsing the drug efficacy text to extract efficacy keywords, converting the efficacy keywords into standardized expressions, and combining the generic name, standardized efficacy keywords, drug production date and expiration date to form structured drug data.
[0048] Drug name cleaning includes removing redundant characters such as "tablets" and "capsules," and extracting the core generic name, such as "amoxicillin." Parsing the drug efficacy text includes extracting keywords, such as extracting "bacterial infection" from "used to treat bacterial infections," and standardizing the expression, such as converting "fever reducer" to "antipyretic." The output is structured drug data, for example: { Drug Name: Amoxicillin "Efficacy": "Treatment of bacterial infections" Production Date: 2023-01-01 "Valid until": "2025-12-31"} S202, retrieve the pre-stored matching rules, which include the mapping relationship between generic keywords, efficacy keywords and drug types.
[0049] The drug type is obtained by matching keywords. Table 1 below shows an example of the matching rules.
[0050] Table 1: Examples of Matching Rules
[0051] S203: Compare the generic name in the structured drug data with the generic name keywords in the matching rules. If a matching generic name keyword exists, the drug type of the current drug is obtained according to the matching rules. If no matching generic name keyword exists, the efficacy keywords in the structured drug data are compared with the efficacy keywords in the matching rules to obtain the drug type of the current drug, and the current drug is added to the corresponding drug type list.
[0052] According to the matching rules, the drug name is matched first. If the name contains "mycin", "cephalosporin" or "cillin", the matched drug type is antibiotic. If the name contains "ointment", "eye drops" or "spray", the matched drug type is topical medicine.
[0053] If no match can be found by drug name, further matching will be performed by efficacy. For example, if the efficacy includes "fever reduction" or "analgesia", the matched drug type will be antipyretic analgesic.
[0054] It should be noted that a list of each type of drug is pre-built. After a drug type is matched, the unique identifier and drug information of the current drug are filled into the corresponding drug type list.
[0055] S204. Based on the drug name, query the indications of the current drug from the global drug database to obtain the indication type of the current drug, and add the current drug to the corresponding indication type list.
[0056] In addition to categorizing by drug type, the drugs are also categorized by indication. A global drug database is consulted, and the drug names are matched against a standard classification system. For example, "ibuprofen" matches the indication "fever, pain." A list for each indication type is pre-built. Once an indication is matched, the drug's unique identifier and other drug information are entered into the corresponding indication list.
[0057] Step S3 generates a drug expiration list based on the drug production date and expiration date, and displays the drug expiration list on the human-computer interaction interface to help users understand the drug expiration status. This includes the following steps.
[0058] S301 compares the current expiration date of the drug with the existing expiration dates in the drug expiration list.
[0059] S302, Generate the current drug's sorting number based on the comparison results.
[0060] S303, add the production date and expiration date of the current drug to the drug expiration list according to the sorting number. The drugs in the drug expiration list are sorted from front to back according to their expiration dates.
[0061] S304 Displays the list of expired drugs on the human-computer interaction interface.
[0062] The expiration list includes the unique identifier of each drug, its name, production date, and expiration date. The list is sorted by expiration date from earliest to latest and displayed on a user-friendly interface. It's worth noting that the medicine cabinet is equipped with a touchscreen, which serves as the human-machine interface, displaying the expiration list. For example, the medicine cabinet may feature a 7- to 10-inch high-resolution color touchscreen displaying real-time drug information, inventory status, and medication plans. Users can view detailed drug categories, expiration reminders, daily medication lists, and health analysis reports through touch operation.
[0063] In some optional implementations, the current status of medications is marked in the medication expiration list, such as "expiring soon" or "must be used first," further improving management efficiency. A built-in expiration reminder function monitors medication expiration dates and reminds users to dispose of medications that are about to expire, preventing misuse or loss of efficacy. For example, based on medication expiration data, a notification is sent seven days before the expiration date to remind users to dispose of them promptly. Users can view a detailed list of expired medications via the medicine cabinet touchscreen, including medication name, expiration date, and remaining quantity. For important medications (such as commonly used chronic disease medications), the system will send multiple reminders to ensure users take timely action. The system can also provide suggested disposal methods, recommending nearby medication recycling points to support the environmentally friendly disposal of waste medications.
[0064] In some optional implementations, the smart medicine cabinet is equipped with a mobile app, which allows users to view the list of expired medications and receive notifications of expired medications.
[0065] Step S4 involves acquiring prescription or medical record images using an image acquisition device, extracting medication information from these images using image processing technology. This medication information includes the medication name. The system checks if the required medication is present in the medicine cabinet based on the name; if not, a prompt is given. Simultaneously, a medication plan is generated based on the medication information, and a medication reminder is pushed to the user according to the plan. First, image processing technology automatically identifies key medication information (such as drug name, dosage, and usage) in the prescription or medical record image and converts it into structured data for medication reminders or inventory management. Then, a medication plan is generated based on the medication information.
[0066] In some optional implementations, prescription or medical record images are acquired through an image acquisition device, and medication information is extracted from the prescription or medical record images using image processing technology, specifically including the following steps.
[0067] S401 acquires prescription or medical record images through an image acquisition device, and preprocesses the prescription or medical record images, including using a text detection model to locate text regions in the images.
[0068] The smart medicine cabinet uses a camera to photograph prescriptions or medical records, obtaining images of these documents. These images contain medication information provided by the doctor, and the prescription or medical record images can be analyzed to generate medication plans to remind users to take their medication on time.
[0069] Preprocessing of prescription or medical record images involves using text detection models to locate text regions within the image. This can begin with image quality enhancement, including adjusting brightness and contrast, reducing glare / shadow interference, and perspective correction. Then, text detection models (such as EAST or CRAFT) are used to locate text regions in the image, excluding irrelevant areas such as hospital logos and decorative borders, resulting in clear images of the text regions.
[0070] S402, perform OCR recognition on the text area to extract the original text, and use a medical NLP model to extract keywords, including drug name, dosage, frequency, and duration of use.
[0071] The original text is extracted using OCR technology, and then keywords are extracted using a medical NLP model, such as BERT-Med or BioClinicalBERT. Keywords include drug name, dosage, frequency, and duration of use.
[0072] For example, the following keywords are proposed: Drug name ("Amoxicillin") Dosage ("0.5g") Frequency ("bid" means twice a day) Duration of medication ("×7 days") After obtaining the required medication from the patient's medical record or prescription, the system checks if the medicine box contains the necessary medication based on the medication name. If not, it provides a prompt to facilitate the user's purchase. Specifically, the system stores a list of all medications in the medicine box, including their names. The system compares the required medication name with the names in this list to check if the medicine box contains the necessary medication.
[0073] In some optional implementations, a medication plan is generated based on medication information, and medication reminders are pushed to the user based on the medication plan, specifically including the following steps.
[0074] S403, Generate a reminder calendar based on the frequency and duration of medication use.
[0075] S404, build a medication plan based on the reminder calendar, including medication time, medication name, and medication dosage.
[0076] S405, detects whether the most recent medication time has been reached.
[0077] S406, if so, push the most recent medication plan to the user and mark the most recent medication plan as a reminder.
[0078] The system automatically generates a reminder calendar based on frequency and duration, such as "Amoxicillin, taken at 8:00 AM and 8:00 PM daily." Then, it generates a daily medication plan based on the calendar and proactively reminds users when the scheduled times arrive, for example, by sending a reminder to the user's mobile app. The system also marks pushed reminders to improve management efficiency. In some optional implementations, the system can provide reminders through various means, including a mobile app, a medicine cabinet touchscreen, and a voice assistant, to ensure strict adherence to the medication plan.
[0079] Step S5 obtains the symptom description input by the user, analyzes the symptom description according to a pre-trained drug recommendation model, and generates medication suggestions by combining stored drug information. The process can begin by determining the disease based on the symptom description, then retrieving the medication type from the associated database, and finally selecting a medication from the medicine box based on the medication type. If the corresponding medication is not available, a prompt is given.
[0080] In some optional implementations, the drug recommendation model includes a BERT model and a knowledge graph. Based on this model, step S5 specifically includes the following steps.
[0081] S501, Obtain the symptom description input by the user, and preprocess the symptom description, including removing pause words and standardizing expression conversion.
[0082] The user inputs symptom descriptions through the App or by voice, such as "feeling headache, cough", etc. The system analyzes the user's health condition based on the built-in knowledge graph and AI recommendation algorithm, and provides suggestions on suitable medications and dosages.
[0083] Preprocessing includes removing stop words, such as "de", "le", and converting standardized expressions, such as converting "low fever" to "fever".
[0084] S502. Use the BERT model to analyze the preprocessed symptom descriptions to generate disease recognition results.
[0085] The BERT model encodes the symptom text into vectors and outputs the disease probability distribution, such as "tonsillitis: 70%", "cold: 25%". Only diseases with a probability > 50% are retained to avoid over-recommendation.
[0086] The symptom text is encoded into vectors through word embedding, and the word embedding is expressed as , where represents the i-th word of the symptom description, and E represents the context embedding vector of the symptom.
[0087] The fully connected layer maps the symptoms to disease categories based on the context embedding vector, expressed as
[0088] where, W d represents the disease classification weight matrix, b d represents the bias term, represents the probability distribution of disease d.
[0089] S503. According to the disease recognition results, query the recommended drug types through the knowledge graph.
[0090] The nodes of the knowledge graph are diseases, drugs, and drug types (such as "antibiotics"), and the edges are relationships (such as "treatment", "belong to").
[0091] Use the TransR model to learn entity relationships, expressed as , where is the embedding of the head entity (disease), is the embedding of the relationship ("treatment"), is the embedding of the tail entity (drug).
[0092] For example, input the disease "tonsillitis" and query the recommended drug types for "tonsillitis", such as "antibiotics", "antipyretic analgesics".
[0093] S504. According to the recommended drug types, obtain specific drugs from the stored drug information.
[0094] Enter the recommended medication type and check if the medication exists in the medicine cabinet database. If it exists, the medication information will be returned, such as "Amoxicillin Capsules, 500mg, twice daily". If it does not exist, the message "Amoxicillin is not available in the medicine cabinet. We recommend purchasing or using an alternative medication" will be displayed.
[0095] In some optional implementations, the system automatically records users' medication history, symptom changes, and health feedback to generate personalized health records. Based on this health data, the system intelligently analyzes and generates dynamic trend reports, such as medication frequency and changes in health indicators, and flags any abnormalities. It supports independent health record management for multiple family members, providing customized health services for each user while ensuring data privacy and independence. Family members can share medication plans with each other via the app.
[0096] In some optional implementations, AES-256 level encryption technology is used to ensure the security of local and cloud data during storage and transmission, preventing data theft or tampering. Users can customize permission settings to allow designated family members or doctors to access their personal health records, ensuring privacy control. The system records the time and type of each data access, providing users with complete access record traceability.
[0097] The foregoing has described in detail an embodiment of a home medicine management method based on a smart medicine box. Based on the home medicine management method based on a smart medicine box described in the above embodiment, this invention also provides a home medicine management system based on a smart medicine box corresponding to the method.
[0098] Figure 2 This is a schematic block diagram of a home medicine management system based on a smart medicine cabinet, provided as an embodiment of the present invention. In this embodiment, the home medicine management system 200 based on the smart medicine cabinet can be divided into multiple functional modules according to the functions it performs. A module, as referred to in this invention, is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory.
[0099] The drug information extraction module 210 is used to acquire drug packaging images through image acquisition equipment, extract drug information from the drug packaging images using image processing technology, and store the drug name, drug efficacy, drug production date, and expiration date.
[0100] The drug classification module 220 is used to classify drugs according to the extracted drug information and display the drugs included in each category on the human-computer interaction interface according to the classification results.
[0101] The drug expiration date display module 230 is used to generate a list of drugs expiring based on the drug production date and expiration date, and then display the list of drugs expiring on the human-computer interaction interface.
[0102] The medication plan management module 240 is used to acquire prescription or medical record images through image acquisition devices, extract medication information from the prescription or medical record images using image processing technology, the medication information including the medication name, detect whether the medicine box contains the required medication based on the medication name, and give a prompt if it does not contain it, and generate a medication plan based on the medication information, and push medication reminders to the user based on the medication plan.
[0103] The medication recommendation generation module 250 is used to obtain the symptom description input by the user, analyze the symptom description according to the pre-trained drug recommendation model, and generate medication recommendations in combination with the stored drug information.
[0104] The smart medicine cabinet-based home medicine management system of this embodiment is used to implement the aforementioned smart medicine cabinet-based home medicine management method. Therefore, the specific implementation of this system can be found in the embodiment section of the smart medicine cabinet-based home medicine management method above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.
[0105] Furthermore, since the smart medicine cabinet-based home medicine management system in this embodiment is used to implement the aforementioned smart medicine cabinet-based home medicine management method, its function corresponds to the function of the above method, and will not be repeated here.
[0106] Figure 3 A schematic diagram of a terminal 300 provided in an embodiment of the present invention includes: a processor 310, a memory 320, and a communication unit 330. The processor 310 is used to implement the following steps when executing a home medicine management program based on a smart medicine cabinet stored in the memory 320: The image acquisition device is used to acquire images of drug packaging, and image processing technology is used to extract and store drug information from the drug packaging images, including drug name, drug efficacy, drug production date and expiration date. The drugs are classified according to the extracted drug information, and the drugs included in each category are displayed on the human-computer interaction interface according to the classification results. A list of expired drugs is generated based on the drug production date and expiration date, and the list is displayed on the human-computer interaction interface. Prescription or medical record images are acquired through image acquisition devices. Medication information is extracted from the prescription or medical record images using image processing technology. The medication information includes the name of the medication. The medicine cabinet is checked to see if the required medication is contained based on the name of the medication. If not, a prompt is given. At the same time, a medication plan is generated based on the medication information. Medication reminders are pushed to the user based on the medication plan. The system obtains symptom descriptions input by the user, analyzes the symptom descriptions based on a pre-trained drug recommendation model, and generates medication recommendations by combining them with stored drug information.
[0107] The terminal 300 includes a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It can be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0108] The memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile memory terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 is able to perform some or all of the steps in the above method embodiments.
[0109] The processor 310 serves as the control center of the storage terminal, connecting various parts of the electronic terminal via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.
[0110] The communication unit 330 is used to establish a communication channel, enabling the storage terminal to communicate with other terminals. It can receive user data sent by other terminals or send user data to other terminals.
[0111] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0112] The present invention also provides a computer storage medium, which may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0113] The computer storage medium stores a home medicine management program based on a smart medicine cabinet. When the home medicine management program based on a smart medicine cabinet is executed by the processor, it performs the following steps: The image acquisition device is used to acquire images of drug packaging, and image processing technology is used to extract and store drug information from the drug packaging images, including drug name, drug efficacy, drug production date and expiration date. The drugs are classified according to the extracted drug information, and the drugs included in each category are displayed on the human-computer interaction interface according to the classification results. A list of expired drugs is generated based on the drug production date and expiration date, and the list is displayed on the human-computer interaction interface. Prescription or medical record images are acquired through image acquisition devices. Medication information is extracted from the prescription or medical record images using image processing technology. The medication information includes the name of the medication. The medicine cabinet is checked to see if the required medication is contained based on the name of the medication. If not, a prompt is given. At the same time, a medication plan is generated based on the medication information. Medication reminders are pushed to the user based on the medication plan. The system obtains symptom descriptions input by the user, analyzes the symptom descriptions based on a pre-trained drug recommendation model, and generates medication recommendations by combining them with stored drug information.
[0114] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0115] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0116] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0117] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0118] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A home medicine management method based on a smart medicine cabinet, characterized in that, Includes the following steps: The image acquisition device is used to acquire images of drug packaging, and image processing technology is used to extract and store drug information from the drug packaging images, including drug name, drug efficacy, drug production date and expiration date. The drugs are classified according to the extracted drug information, and the drugs included in each category are displayed on the human-computer interaction interface according to the classification results. A list of expired drugs is generated based on the drug production date and expiration date, and the list is displayed on the human-computer interaction interface. Prescription or medical record images are acquired through image acquisition devices. Medication information is extracted from the prescription or medical record images using image processing technology. The medication information includes the name of the medication. The medicine cabinet is checked to see if the required medication is contained based on the name of the medication. If not, a prompt is given. At the same time, a medication plan is generated based on the medication information. Medication reminders are pushed to the user based on the medication plan. The system obtains symptom descriptions input by the user, analyzes the symptom descriptions based on a pre-trained drug recommendation model, and generates medication recommendations by combining them with stored drug information.
2. The home medicine management method based on a smart medicine cabinet according to claim 1, characterized in that, The process involves acquiring images of drug packaging using an image acquisition device, extracting drug information from the images using image processing technology, and storing the information. Specifically, this includes: Images of drug packaging are acquired using image acquisition equipment, and the images are preprocessed, including noise reduction and enhancement, perspective correction, and region segmentation. OCR recognition is performed on the text area to extract the original text. Key fields in the original text are parsed using regular expressions or natural language processing technology, including drug name, some drug efficacy, drug production date and expiration date. The content of key fields constitutes drug information. If a barcode is detected, the decoding library is called to obtain the code. Based on the code, the drug database is queried to match the detailed information. The matched detailed information is checked to see if it matches the parsed key fields. If they do not match, the extracted key fields are corrected. The extracted or corrected drug names are compared with the built-in global drug database to complete the drug efficacy and obtain drug contraindications, which are then added to the drug information. Generate a unique identifier for the current drug, associate the unique identifier with the drug information, and store the associated unique identifier and drug information.
3. The home medicine management method based on a smart medicine cabinet according to claim 1, characterized in that, The drugs are categorized based on the extracted drug information, specifically including: Preprocessing drug information to generate structured drug data includes cleaning drug names to remove redundant characters and extracting generic names, parsing drug efficacy text to extract efficacy keywords, converting efficacy keywords into standardized expressions, and combining generic names, standardized efficacy keywords, drug production dates, and expiration dates to form structured drug data. Retrieve pre-stored matching rules, which include the mapping relationship between generic keywords, efficacy keywords and drug types; The generic name in the structured drug data is compared with the generic name keywords in the matching rules. If a matching generic name keyword exists, the drug type of the current drug is obtained according to the matching rules. If no matching generic name keyword exists, the efficacy keywords in the structured drug data are compared with the efficacy keywords in the matching rules to obtain the drug type of the current drug, and the current drug is added to the corresponding drug type list. The drug's indications are retrieved from the global drug database based on its name. The drug's indication type is then added to the corresponding indication type list.
4. The home medicine management method based on a smart medicine cabinet according to claim 1, characterized in that, A list of expired drugs is generated based on their production date and expiration date. This list is then displayed on a user-friendly interface, including: Compare the current expiration date of the drug with the existing expiration dates in the drug expiration list; Generate the current drug's sorting number based on the comparison results; The production date and expiration date of the current drug are added to the drug expiration list according to the sorting number. The drugs in the drug expiration list are sorted from front to back according to their expiration dates. The list of expired medications is displayed on the human-computer interaction interface.
5. The home medicine management method based on a smart medicine cabinet according to claim 1, characterized in that, Acquire prescription or medical record images using image acquisition devices, and extract medication information from the prescription or medical record images using image processing technology, specifically including: Prescription or medical record images are acquired through image acquisition devices, and the images are preprocessed, including using a text detection model to locate text regions in the images. The text region is subjected to OCR recognition to extract the original text, and keywords are extracted using a medical NLP model, including drug name, dosage, frequency, and duration of use.
6. The home medicine management method based on a smart medicine cabinet according to claim 5, characterized in that, A medication plan is generated based on medication information, and medication reminders are pushed to the user based on the medication plan. Specifically, this includes: A reminder calendar is generated based on the frequency and duration of medication use; Create a medication plan based on the reminder calendar, including medication time, medication name, and dosage; Check if the most recent medication time has arrived; If so, push the most recent medication plan to the user and mark the most recent medication plan as a reminder.
7. The home medicine management method based on a smart medicine cabinet according to claim 1, characterized in that, Drug recommendation models include BERT models and knowledge graphs; The system obtains a symptom description input by the user, analyzes the symptom description based on a pre-trained drug recommendation model, and generates medication suggestions by combining stored drug information. Specifically, this includes: Obtain the symptom description input by the user, and preprocess the symptom description, including removing pause words and standardizing expression conversion; The BERT model is used to analyze the preprocessed symptom descriptions to generate disease identification results. Based on the disease identification results, recommend drug types through knowledge graph queries; Based on the recommended drug type, retrieve the specific drug from the stored drug information.
8. A home medicine management system based on a smart medicine cabinet, characterized in that, include: The drug information extraction module is used to acquire images of drug packaging through image acquisition equipment, extract and store drug information from the drug packaging images using image processing technology, including drug name, drug efficacy, drug production date and expiration date; The drug classification module is used to classify drugs based on the extracted drug information and display the drugs included in each category on the human-computer interaction interface according to the classification results. The drug expiration date display module is used to generate a list of drugs expiring based on their production date and expiration date, and then display the list of drugs expiring on the human-computer interaction interface. The medication plan management module is used to acquire prescription or medical record images through image acquisition devices, extract medication information from the prescription or medical record images using image processing technology, and the medication information includes the medication name. The module checks whether the medicine box contains the required medication based on the medication name. If it does not contain the medication, a prompt is given. At the same time, a medication plan is generated based on the medication information, and medication reminders are pushed to the user based on the medication plan. The medication recommendation generation module is used to obtain the symptom description input by the user, analyze the symptom description according to the pre-trained drug recommendation model, and generate medication recommendations in combination with the stored drug information.
9. A terminal, characterized in that, include: Memory for storing home medicine management programs based on smart medicine cabinets; A processor is configured to implement the steps of the smart medicine cabinet-based home medicine management method as described in any one of claims 1 to 7 when executing the smart medicine cabinet-based home medicine management program.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a home medicine management program based on a smart medicine box, which, when executed by a processor, implements the steps of the home medicine management method based on a smart medicine box as described in any one of claims 1 to 7.