Automatic medicine dispensing and taking system for intelligent pharmacy

By collecting drug and transportation data, a drug safety prediction model for the automatic drug dispensing and retrieval system in smart pharmacies was established, which solved the problems of manual inspection requirements and insufficient user identity verification when drugs were put into storage, and achieved improved drug storage integrity and user safety.

CN120809117APending Publication Date: 2025-10-17THE FIRST AFFILIATED HOSPITAL OF SUN YAT-SEN UNIV GUANGXI HOSPITAL

Patent Information

Application Number
CN202510918630.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-04
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

The existing smart pharmacy's automatic drug dispensing and retrieval system requires manual batch-by-batch inspection when replenishing drugs into the warehouse, which increases labor and time costs. It also lacks detailed user identity verification, posing risks to drug supervision and threats to user health.

Method used

By collecting drug and transportation data, performing feature vector processing and analysis, establishing a drug safety prediction model, generating hazard warning reports, and conducting mechanical inventory and allocation into warehouses, it supports user multi-factor authentication and reduces the risks of drug flow and user medication.

Benefits of technology

It ensures the integrity of drug storage, reduces economic losses, improves the ability to supervise the flow of drugs and the safety of users, and ensures the accuracy of safety predictions during the drug transportation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120809117A_ABST
    Figure CN120809117A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent pharmacies, and discloses an automatic medicine dispensing and taking system for an intelligent pharmacy. The system comprises a medicine transportation safety prediction module, a danger early warning recording module, a medicine acceptance allocation module and a personalized safety verification module, and is used for analyzing feature vectors to obtain a medicine safety prediction value, analyzing the medicine safety prediction value based on a safety threshold interval, obtaining a danger early warning report according to an analysis result, and checking the risk early warning report according to the analysis result. And according to the danger early warning report, carrying out mechanical counting and distribution warehousing on the medicines to obtain an acceptance and distribution report, supporting a user to log in an intelligent pharmacy system, obtaining a user data set, and analyzing the user data set and the medicine taking data to obtain a medicine safety report. The method has the remarkable advantages of high safety prediction accuracy in the drug transportation process, high drug flow monitoring capability and good user body safety guarantee effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent pharmacies, and more particularly, to an automatic dispensing and taking system for an intelligent pharmacy. BACKGROUND

[0002] A hospital pharmacy is a comprehensive department integrating management, technology, operation and service. The pharmacy not only needs to ensure that accurate and qualified drugs are provided to patients, but also needs to ensure that patients use the drugs safely and effectively, and ensure that medical costs are more economical and reasonable. Thanks to the rapid development of science and technology in China in recent years, intelligent pharmacies have gradually replaced traditional manual pharmacies. Compared with traditional manual pharmacies, intelligent pharmacies not only have great advantages in economy, but also greatly improve the convenience of taking medicine for users, the convenience of inventory replenishment, and the required professionalism of staff.

[0003] The patent with the application publication number CN112897044B discloses an automatic dispensing and taking system for an intelligent pharmacy. A line-patrolling robot is arranged between the automatic dispensing machine and the medicine storage and taking cabinet. The line-patrolling robot can drive the medicine basket to move up and down and horizontally. At least one medicine taking position is located on one side of the trajectory line, so that the extension direction of the trajectory line sequentially passes through each medicine taking position. Therefore, no matter how many automatic dispensing machines are arranged, the line-patrolling robot provided can take any whole medicine on the medicine list. At the same time, the medicine basket can be placed into the corresponding medicine storage and taking cabinet, so that the dispensing and taking processes are all automatically processed. Patients only need to scan the code or use other ways of identity authentication to obtain the whole medicine corresponding to the medicine list, which lays a foundation for unmanned medicine taking windows and remote medicine taking reservation. In addition, the automatic dispensing and taking system for the intelligent pharmacy is also provided with a loose medicine configuration room. The loose medicine is conveyed to the second medicine outlet channel through the annular conveying line. The second medicine outlet channel is located on one side of the trajectory line, so that the line-patrolling robot can take both whole medicine and loose medicine, thereby fundamentally solving the problem in the prior art that the whole medicine and the loose medicine need to be manually compared and then placed in a basket or a bag. That is, the loose medicine and the whole medicine need to be manually integrated at the medicine taking window and then handed over to the patient.

[0004] However, the above-mentioned intelligent pharmacy automatic dispensing and taking system can effectively reduce labor costs during the user's medicine taking process by setting multiple line patrol robots and enabling the line patrol robots to have the functions of obtaining whole medicine and loose medicine. However, during the working process of the intelligent pharmacy automatic dispensing and taking system, the required supplementary medicines still need to be manually checked and stored in batches and one by one when being supplemented into the warehouse, greatly increasing the labor cost and time cost required during the medicine supplementing process. In addition, since the user usually only needs to verify the ID card of the user, there is a lack of more detailed identity verification of the user, which greatly increases the risk of illegal loss of supervised medicines. At the same time, during the user's medicine taking process, the medicine list is manually confirmed and issued by the attending physician, which inevitably leads to the fact that the user has used medicines that interact with the medicines in the issued medicine list in the near future, thereby threatening the health of the user.

[0005] In view of this, the present application provides an intelligent pharmacy automatic dispensing and taking system to solve the above-mentioned problems. SUMMARY

[0006] In order to overcome the above-mentioned defects of the prior art and achieve the above-mentioned purposes, the present application provides the following technical solutions, comprising:

[0007] A medicine data acquisition module for acquiring a medicine data set, the medicine data set including medicine type data, medicine expiration date data, medicine weight data, and medicine sensitivity data;

[0008] A transportation data acquisition module for acquiring a transportation data set, the transportation data set including average temperature data, average humidity data, and impact frequency data;

[0009] A feature vector processing module for preprocessing the medicine data set and the transportation data set to obtain a feature vector;

[0010] Further, the preprocessing step of the medicine data set and the transportation data set includes:

[0011] Q1: Data cleaning and data normalization of the medicine data set and the transportation data set are completed by removing invalid data and scaling the sub-data items of the basic data to the range of [0, 1];

[0012] Q2: The temperature deviation feature data A a is obtained by calculating the average temperature data minus the average value of the standard temperature data;

[0013] Q3: The comprehensive risk feature extraction of the medicine sensitivity data, the temperature deviation feature data, and the average humidity data is performed, and the specific calculation formula of the comprehensive risk feature extraction is:

[0014] A b =Sd × A a + 0.5 × S d × max(0, S f - 60);

[0015] get comprehensive risk feature data A b , wherein S d is drug sensitivity data, max is a maximum function, S f is average humidity data;

[0016] Q4: pack the drug expiration date data, temperature deviation feature data, average humidity data, impact frequency data and comprehensive risk feature data to obtain a feature vector;

[0017] The drug transportation safety prediction module is used to analyze the feature vector to obtain a drug safety prediction value;

[0018] Further, the step of analyzing the feature vector comprises:

[0019] Step one: obtain a set of historical feature vectors stored in the database, and compare the time stamp with the current time, and sort the comparison results from small to large to corresponding group labels, and the label result is L1, L2, L3,..., Ln, and the label result is used as a sample set;

[0020] Step two: divide the sample set into 70% training set, 15% test set and 15% validation set, and establish a drug safety prediction model according to the sample set;

[0021] Step three: based on the historical feature vector, by substituting the calculation formula:

[0022]

[0023] get preliminary drug safety prediction value , wherein σ is a Sigmoid activation function, M is the number of heterogeneous sub-models, α m is the dynamic weight factor of the mth model, GBDT m is the mth gradient boosting decision tree model, F is the feature vector, λ is the attention weight factor, AttnNet is the attention mechanism, F3 is the first three batches of historical feature vectors, N is the number of nearest neighbor similar samples, SimNet is the similarity function, F n is the most similar sample to the feature vector in the nearest neighbor similar sample;

[0024] Step four: based on the historical feature vector and the preliminary drug safety prediction value, three feature verifications are carried out, and the specific calculation formula group of verification is:

[0025]

[0026] respectively, a first verification value B a , a second verification value B b , and a third verification value B c , wherein v is an indicator function, μ k is the mean of the k-th dimension of the historical feature vector, σ k is the standard deviation of the k-th dimension of the historical feature vector, τ is a divergence threshold, is the preliminary drug safety prediction value at time point t-k, δ is a drift threshold;

[0027] Step five: based on the first verification value, the second verification value and the third verification value in step four, when the results of the three verification values are all 1, the drug safety prediction value output is the preliminary drug safety prediction value, when one or more of the results of the three verification values are 0, the output result of the drug safety prediction value is:

[0028]

[0029] Step six: output the drug safety prediction value to the danger warning record module;

[0030] The danger warning record module is used to analyze the drug safety prediction value based on the safety threshold interval, and obtain a danger warning report according to the analysis result;

[0031] Further, the way of analyzing the drug safety prediction value based on the safety threshold interval includes:

[0032] Based on the safety threshold (0.4, 0.7), when the drug safety prediction value is greater than or equal to 0.7, a safety report is generated, when the drug safety prediction value is greater than or equal to 0.4 and less than 0.7, a warning report is generated, and when the drug safety prediction value is less than 0.4, a danger report is generated;

[0033] The safety report includes an explanation that the current drug prediction state is safe and can be directly stored in the warehouse;

[0034] The warning report includes an explanation that the current drug prediction state has hidden dangers, and the staff should perform manual inspection before storing in the warehouse;

[0035] The danger report includes an explanation that the current drug prediction state is dangerous, and the staff should place the batch of drugs in a safe area and start the recall process;

[0036] Packaging the safety report, the warning report and the danger report to obtain a danger warning report;

[0037] The drug acceptance distribution module is used to mechanically count and distribute the drugs in the warehouse according to the danger warning report, and obtain an acceptance distribution report;

[0038] Further, the step of mechanically counting and distributing the medicine into the warehouse according to the danger early warning report comprises:

[0039] W1: detecting the content of the danger early warning report;

[0040] W2: when the danger early warning report is a safety report, collecting the completeness of the medicine shape and the weight value of the medicine by the 3D scanner and the weighing sensor;

[0041] W3: when the completeness of the medicine shape and the weight deviation rate of the medicine are greater than or equal to 5%, generating an abnormal medicine report;

[0042] W4: classifying and storing the remaining medicines after removing the abnormal medicines according to the medicine type data and the storage rule table to obtain a storage operation report;

[0043] W5: packaging the abnormal medicine report and the storage operation report to obtain an acceptance and distribution report;

[0044] A user login module is configured to support user login to the intelligent pharmacy system, obtain a user data set, process the medicine taking data according to the user data set, and obtain a user login report;

[0045] Further, the way of processing the medicine taking data according to the user data set comprises:

[0046] The user data set comprises user portrait data, user fingerprint data, medicine taking data, and user medical record data;

[0047] The medicine taking data is the medicine type data of the medicine required by the user;

[0048] The medicine taking data is compared with the medicine supervision rule library;

[0049] When the content of the medicine taking data is less than the supervision value and less than the supervision threshold, the user login module needs to verify the user ID card password and the portrait data;

[0050] When the medicine taking data contains medicines greater than the supervision threshold, the user login module needs to verify the user ID card password, the portrait data, the fingerprint data, and the user medical record data;

[0051] The medicine taking data, the user login log, and the user ID card number are packaged to obtain a user login report;

[0052] A personalized safety verification module is configured to analyze the user data set and the medicine taking data to obtain a medicine safety report;

[0053] Further, the way of analyzing the user data set and the medicine taking data comprises:

[0054] Based on the user data set, the user medical record data and the medicine taking data, the drug interaction is compared according to the drug interaction rule database, when the drug type data in the user medical record data and the drug type data in the medicine taking data conflict in a preset time unit, a drug safety report is generated, otherwise, it is not processed;

[0055] The drug safety report includes that there is an interaction between the M1 drug currently needed and the M2 drug taken in the past seven days, and the user needs to check with the staff before use;

[0056] The data transmission management module is used to store the storage data set to the database, display the acceptance allocation report through the visual panel, process the danger warning report and the drug safety report, and output according to the processing result;

[0057] Further, the processing of the danger warning report and the drug safety report and the output according to the processing result include:

[0058] Detect the content of the danger warning report;

[0059] When the danger warning report is a warning report, the warning report is sent to the staff mailbox receiving end through the mail mode, and the staff is reminded to check the mail by sending a short message to the staff mobile phone receiving end;

[0060] When the danger warning report is a danger report, the danger report is sent to the staff mailbox receiving end through the mail mode, and the staff is reminded to check the mail by calling the staff mobile phone receiving end;

[0061] The drug safety report is displayed through the system login panel, and sent to the user mobile phone receiving end through the short message mode;

[0062] The storage data set includes the drug data set, the transportation data set, the feature vector, the drug safety prediction value, the danger warning report, the acceptance allocation report, the user login report and the drug safety report;

[0063] Further, S1: collecting the drug data set, the drug data set including drug type data, drug expiration date data, drug weight data and drug sensitivity data;

[0064] S2: collecting the transportation data set, the transportation data set including average temperature data, average humidity data and impact frequency data;

[0065] S3: preprocessing the drug data set and the transportation data set to obtain the feature vector;

[0066] S4: analyzing the feature vector to obtain the drug safety prediction value;

[0067] S5: Analyzing the medicine safety prediction value based on the safety threshold interval, and obtaining a danger early warning report according to the analysis result;

[0068] S6: Carrying out mechanical counting and distribution into a warehouse for the medicine according to the danger early warning report, and obtaining an acceptance distribution report;

[0069] S7: Supporting user login to the intelligent pharmacy system, and obtaining a user data set, processing the medicine taking data according to the user data set, and obtaining a user login report;

[0070] S8: Analyzing the user data set and the medicine taking data, and obtaining a medicine safety report;

[0071] S9: Storing the storage data set to a database, displaying the acceptance distribution report through a visual panel, processing the danger early warning report and the medicine safety report, and outputting according to the processing result.

[0072] The technical effect and advantages of the automatic medicine dispensing and taking system for the intelligent pharmacy are as follows:

[0073] The application collects a medicine data set, the medicine data set includes medicine type data, medicine expiration date data, medicine weight data and medicine sensitivity data, collects a transportation data set, the transportation data set includes average temperature data, average humidity data and impact frequency data, pre-processes the medicine data set and the transportation data set, obtains a feature vector, analyzes the feature vector, obtains a medicine safety prediction value, analyzes the medicine safety prediction value based on a safety threshold interval, obtains a danger early warning report according to the analysis result, mechanically counts and distributes the medicine into the warehouse according to the danger early warning report, obtains an acceptance distribution report, supports user login to an intelligent pharmacy system, and obtains a user data set, processes medicine taking data according to the user data set, obtains a user login report, analyzes the user data set and the medicine taking data, obtains a medicine safety report, stores a storage data set to a database, displays the acceptance distribution report through a visual panel, processes the danger early warning report and the medicine safety report, and outputs according to the processing result, so that the system can accurately predict whether the medicine is damaged in the transportation process under the complex environmental conditions of transportation, so as to effectively guarantee the integrity of the medicine in the warehouse, avoid the entry of substandard medicine into the warehouse, and thus cause economic losses of the pharmacy. In addition, the application also repeatedly verifies the user medicine taking process, so that the system can effectively guarantee the safety of the flow direction of the supervised medicine, thereby effectively reducing the risk of taking medicine only with a user ID card in the traditional medicine taking process. At the same time, by reading the user medicine taking data and the historical medicine type data in the user medical record data, and interacting and comparing, the risk of user medication caused by human negligence is effectively reduced, the safety of the user's body is greatly improved, and the safety of the user's body is greatly improved. Overall, the application has the advantages of high accuracy of medicine transportation process safety prediction, strong supervision of medicine flow direction monitoring capability and good user body safety guarantee effect. BRIEF DESCRIPTION OF DRAWINGS

[0074] Figure 1 It is an automatic medicine dispensing and taking system for an intelligent pharmacy of the application.

[0075] Figure 2 It is an automatic medicine dispensing and taking method for an intelligent pharmacy of the application. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.

[0077] The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0078] As used herein, the terms "if' and "when" can be construed to mean "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if determined" or "if detecting (a stated condition or event)" can be construed to mean "when determined" or "in response to determining" or "when detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)," depending on the context.

[0079] In addition, the sequence of steps in the following method embodiments is only an example, not a strict limitation.

[0080] In fact, the server device deployed by the intelligent pharmacy automatic dispensing and taking system can be composed of one or more devices. The intelligent pharmacy automatic dispensing and taking system can be implemented as a business instance, a virtual machine, or a hardware device. For example, the intelligent pharmacy automatic dispensing and taking system can be implemented as a business instance deployed on one or more devices in a cloud node. In short, the intelligent pharmacy automatic dispensing and taking system can be understood as a software deployed on a cloud node, which is used to provide the intelligent pharmacy automatic dispensing and taking system for each user terminal. Alternatively, the intelligent pharmacy automatic dispensing and taking system can also be implemented as a virtual machine deployed on one or more devices in a cloud node. The virtual machine has application software installed for managing each user terminal. Alternatively, the intelligent pharmacy automatic dispensing and taking system can also be implemented as a server composed of a plurality of same or different types of hardware devices, and one or more hardware devices are provided to provide the intelligent pharmacy automatic dispensing and taking system for each user terminal.

[0081] In terms of implementation, the intelligent pharmacy automatic dispensing and taking system and the user terminal adapt to each other. That is, the intelligent pharmacy automatic dispensing and taking system is an application installed on a cloud service platform, and the user terminal is a client that establishes a communication connection with the application; or the intelligent pharmacy automatic dispensing and taking system is implemented as a website, and the user terminal is implemented as a web page; or the intelligent pharmacy automatic dispensing and taking system is implemented as a cloud service platform, and the user terminal is implemented as an applet in an instant messaging application.

[0082] As shown in Figure 1 FIG. 1 is a system architecture diagram of an intelligent pharmacy automatic dispensing and taking system according to an embodiment of the present application.

[0083] The intelligent pharmacy automatic dispensing and taking system can be set in a cloud server, and in the implementation form, can be used as one or more service devices, can be installed as an application on the cloud (such as a server of a mobile service operator, a server cluster, etc.), or can be developed as a website. According to the functions implemented, the intelligent pharmacy automatic dispensing and taking system can include a request matching module 101, a target platform generation module 102, a transmission sequence generation module 103, a wireless intercom response module 104, a behavior feature extraction module 105, and a TWS switching response module. The modules in the application can also be referred to as units, which refer to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0084] In the embodiment of the application, each of the above modules in the intelligent pharmacy automatic dispensing and taking system can be independently implemented and called by other modules. Here, calling can be understood as connecting a module to multiple modules of another type and providing corresponding services to the connected multiple modules. For example, the sharing evaluation module can call the same information collection module to obtain the information collected by the information collection module. Based on the above characteristics, the intelligent pharmacy automatic dispensing and taking system provided in the embodiment of the application can adjust the application scope of the intelligent pharmacy automatic dispensing and taking system architecture by increasing modules and directly calling without modifying program codes, realize cluster horizontal expansion, and achieve the purpose of quickly and flexibly expanding the intelligent pharmacy automatic dispensing and taking system. In actual application, the above modules can be set in the same device or different devices, or can be set in a virtual device, such as a service instance in a cloud server.

[0085] Embodiment 1

[0086] Please refer to Figure 1 The system includes:

[0087] The medicine data collection module is used to collect a medicine data set, and the medicine data set includes medicine type data, medicine expiration date data, medicine weight data, and medicine sensitivity data.

[0088] It should be explained that the medicine type data is obtained by scanning the medicine supervision code of the specified medicine by the two-dimensional code scanning gun, and the medicine type data is assigned according to the medicine type. The specific expression of the assignment is as follows: The assignment is an example assignment, and the specific monitoring type classification assignment can be performed according to the drug supervision report; through the OCR identification camera, the effective period text on the specified drug packaging is collected, and the current date is subtracted from the effective period to obtain the drug effective period data; through the dynamic weighing sensor, the weight value of the specified drug is collected to obtain the drug weight data; through the preset rule database, the drug type data of the specified drug is collected and matched with the rule database to obtain the environmental sensitivity of the drug type, and the drug sensitivity data is obtained, for example, the environmental sensitivity of insulin drug is 5 levels;

[0089] The transportation data acquisition module is configured to acquire a transportation data set, the transportation data set including average temperature data, average humidity data, and impact frequency data;

[0090] It should be explained that the average temperature data of the specified drug during transportation is collected through the temperature sensor; the average humidity data of the specified drug during transportation is collected through the capacitive humidity sensor; the acceleration value of any axis during the transportation of the drug is collected through the three-axis acceleration sensor, and when the acceleration value is greater than or equal to 5G, the count is once, the total count number during the transportation of the drug is counted, and the impact frequency data is obtained;

[0091] The feature vector processing module is configured to preprocess the drug data set and the transportation data set to obtain a feature vector;

[0092] Further, the preprocessing of the drug data set and the transportation data set includes:

[0093] Q1: Through removing invalid data and scaling the sub-data items of the basic data to the range of [0, 1], the data cleaning and data normalization of the drug data set and the transportation data set are completed;

[0094] It should be explained that the invalid data refers to, for example, negative weight or abnormal temperature value; the basic data includes the drug data set and the transportation data set; the normalization is exemplified by the drug weight data, and the drug weight data is divided by the maximum weight of the drug to obtain the normalized drug weight data;

[0095] Q2: The temperature deviation feature data A is obtained by calculating the average temperature data minus the average value of the standard temperature data a ;

[0096] Q3: The comprehensive risk feature extraction is performed on the drug sensitivity data, the temperature deviation feature data, and the average humidity data, and the specific calculation formula of the comprehensive risk feature extraction is:

[0097] A b =S d ×A a +0.5×Sd max(0, S f -60);

[0098] obtain comprehensive risk feature data A b , wherein S d is drug sensitivity data, max is a maximum function, S f is average humidity data;

[0099] It should be explained that the maximum function is used to filter the maximum value in the immediately adjacent brackets as the output value;

[0100] Q4: pack the drug expiration date data, temperature deviation feature data, average humidity data, impact frequency data and comprehensive risk feature data to obtain a feature vector;

[0101] It should be explained that the drug expiration date data, average humidity data and impact frequency data in the feature vector all use data values after data cleaning and data normalization;

[0102] The drug transportation safety prediction module is configured to analyze the feature vector to obtain a drug safety prediction value;

[0103] Further, the step of analyzing the feature vector includes:

[0104] Step one: obtain a set of historical feature vector sets stored in the database, and compare the time stamp with the current time, and sort the comparison results from small to large to mark the corresponding groups, and the marking result is L1, L2, L3,..., Ln, and the marking result is used as a sample set;

[0105] Step two: divide the sample set into 70% training set, 15% test set and 15% validation set, and establish a drug safety prediction model according to the sample set;

[0106] Step three: based on the historical feature vector, by substituting the calculation formula:

[0107]

[0108] obtain a preliminary drug safety prediction value , wherein σ is a Sigmoid activation function, M is the number of heterogeneous sub-models, α m is the dynamic weight factor of the mth model, GBDT m is the mth gradient boosting decision tree model, F is the feature vector, λ is the attention weight factor, AttnNet is the attention mechanism, F3 is the first three batches of historical feature vectors, N is the number of nearest neighboring similar samples, SimNet is the similarity function, F n is the most similar sample to the feature vector in the nearest neighboring similar samples;

[0109] It needs to be explained that the sigmoid activation function is used to convert the output value immediately inside the parentheses into a probability value of (0, 1); the attention mechanism is used to analyze the trend changes of the historical feature vectors of the last three batches, and the similarity function is used to detect the most similar historical feature vector sample to the current feature vector;

[0110] Step four: based on the historical feature vector and the preliminary drug safety prediction value, triple feature verification is carried out, and the specific calculation formula group of verification is:

[0111]

[0112] respectively get the first verification value B a , the second verification value B b and the third verification value B c , wherein v is an indicator function, μ k is the mean of the kth dimension of the historical feature vector, σ k is the standard deviation of the kth dimension of the historical feature vector, τ is the divergence threshold, is the preliminary drug safety prediction value at time point t-k, and δ is the drift threshold;

[0113] It needs to be explained that the indicator function is used to output value 1 when the comparison result immediately inside the parentheses is true, and output value 0 when the comparison result immediately inside the parentheses is not true; the divergence threshold and the drift threshold are obtained by artificial setting and input;

[0114] Step five: based on the first verification value, the second verification value and the third verification value in step four, when the results of the three verification values are all 1, the drug safety prediction value output is the preliminary drug safety prediction value, when one or more of the three verification value results are 0, the output result of the drug safety prediction value is:

[0115]

[0116] Step six: output the drug safety prediction value to the danger warning record module;

[0117] The danger warning record module is used to analyze the drug safety prediction value based on the safety threshold interval, and obtain a danger warning report according to the analysis result;

[0118] Further, the way of analyzing the drug safety prediction value based on the safety threshold interval includes:

[0119] Based on the safety threshold (0.4, 0.7), when the drug safety prediction value is greater than or equal to 0.7, a safety report is generated, when the drug safety prediction value is greater than or equal to 0.4 and less than 0.7, a warning report is generated, and when the drug safety prediction value is less than 0.4, a danger report is generated;

[0120] The safety report includes a statement that the current drug is predicted to be safe and can be directly stored in the warehouse;

[0121] The warning report includes a description of the potential risks in the current drug prediction status, and asks staff to conduct manual inspection before storage;

[0122] The hazard report includes a statement that the current drug is predicted to be dangerous, and asks staff to place the batch of drugs in a safe area and initiate the recall process;

[0123] Package safety reports, warning reports and hazard reports to obtain hazard warning reports;

[0124] The medicine acceptance and distribution module is used to mechanically count and distribute medicines into the warehouse according to the risk warning report to obtain an acceptance and distribution report;

[0125] Furthermore, the steps of mechanically counting and allocating drugs to storage based on the hazard warning report include:

[0126] W1: Detection of hazard warning report content;

[0127] W2: When the hazard warning report is a safety report, the drug’s appearance integrity and weight values ​​are collected through a 3D scanner and a weighing sensor;

[0128] W3: When the drug appearance integrity and drug weight deviation rate is greater than or equal to 5%, an abnormal drug report is generated;

[0129] It should be explained that the drug weight deviation rate is the value obtained by subtracting the difference between the drug weight value and the drug weight data multiplied by 100%;

[0130] W4: Classify and store the remaining drugs after removing abnormal drugs based on drug type data and storage rule table, and obtain a storage operation report;

[0131] It should be explained that the storage rule table is, for example, that if the drug type data is insulin, when the drug sensitivity data is greater than or equal to 4, the drug is stored in the refrigerated area; when the average humidity data requirement is less than 30, the drug is stored in the dry area; the rest are stored in the normal temperature area;

[0132] W5: Package abnormal drug reports and storage operation reports to obtain acceptance and distribution reports;

[0133] The user login module is used to support users to log in to the smart pharmacy system, obtain user data sets, process medication collection data according to the user data sets, and obtain user login reports;

[0134] Furthermore, the method of processing the medication collection data based on the user data set includes:

[0135] The user dataset includes user portrait data, user fingerprint data, dispensing data, and user medical record data;

[0136] The dispensing data is the drug type data of the drug required by the user;

[0137] The dispensing data is compared with the drug regulatory rule library;

[0138] When the dispensing data content is less than the regulatory value and less than the regulatory threshold, the user login module needs to verify the user ID card password and the portrait data;

[0139] It should be explained that the regulatory threshold is the control degree value obtained according to the degree of drug regulation, and the regulatory threshold is obtained by manual input setting;

[0140] When the dispensing data content exists a drug greater than the regulatory threshold, the user login module needs to verify the user ID card password, the portrait data, the fingerprint data and the user medical record data;

[0141] The dispensing data, the user login log and the user ID card number are packaged to obtain a user login report;

[0142] It should be explained that the user login log is the log record data of the user login success or user login failure in the intelligent pharmacy system;

[0143] The personalized security verification module is used to analyze the user dataset and the dispensing data to obtain a drug safety report;

[0144] Further, the way of analyzing the user dataset and the dispensing data includes:

[0145] Based on the user medical record data in the user dataset and the dispensing data, the drug interaction is compared according to the drug interaction rule database. When the drug type data in the user medical record data and the drug type data in the dispensing data conflict within a preset time unit, a drug safety report is triggered to be generated, otherwise, it is not processed;

[0146] It should be explained that the preset time unit is obtained by manual input, for example, the past seven days; the drug type data conflict is based on the drug interaction rule database, for example, when there is an antibiotic drug in the drug type data in the user medical record data and an anticoagulant drug in the drug type data in the dispensing data within seven days, it is determined as a conflict;

[0147] The drug safety report includes an explanation that the M1 drug currently required for dispensing exists interaction with the M2 drug taken in the past seven days, and the user needs to check with the staff before use;

[0148] The data transmission management module is configured to store the storage data set into a database, display the acceptance allocation report through a visual panel, process the danger warning report and the drug safety report, and output according to the processing result;

[0149] Further, the processing of the danger warning report and the drug safety report and the output according to the processing result include:

[0150] detecting the content of the danger warning report;

[0151] when the danger warning report is a warning report, the warning report is sent to the staff mailbox receiving end through the email mode, and the staff is reminded to check the email by sending a short message to the staff mobile phone receiving end;

[0152] when the danger warning report is a danger report, the danger report is sent to the staff mailbox receiving end through the email mode, and the staff is reminded to check the email by calling the staff mobile phone receiving end;

[0153] the drug safety report is displayed through the system login panel and sent to the user mobile phone receiving end through the short message mode;

[0154] The storage data set includes a drug data set, a transportation data set, a feature vector, a drug safety prediction value, a danger warning report, an acceptance allocation report, a user login report, and a drug safety report;

[0155] The embodiment has the beneficial effects that by collecting a medicine data set including medicine type data, medicine expiration date data, medicine weight data and medicine sensitivity data, collecting a transportation data set including average temperature data, average humidity data and impact frequency data, preprocessing the medicine data set and the transportation data set to obtain a feature vector, analyzing the feature vector to obtain a medicine safety prediction value, analyzing the medicine safety prediction value based on a safety threshold interval, obtaining a danger early warning report according to the analysis result, mechanically counting and distributing the medicine into the warehouse according to the danger early warning report to obtain an acceptance distribution report, supporting user login to an intelligent pharmacy system and obtaining a user data set, processing medicine taking data according to the user data set to obtain a user login report, analyzing the user data set and the medicine taking data to obtain a medicine safety report, storing a storage data set to a database, displaying the acceptance distribution report through a visualization panel, processing the danger early warning report and the medicine safety report, and outputting according to the processing result, so that the system can accurately predict whether the medicine is damaged in the transportation process under complex environmental conditions, thereby effectively guaranteeing the integrity of the medicine when entering the warehouse, avoiding the entry of substandard medicine into the warehouse, and thereby causing economic losses to the pharmacy. In addition, the application also repeatedly verifies the user's medicine taking process, so that the system can effectively guarantee the safety of the flow of regulated medicines, thereby effectively reducing the risk of taking medicine with only one user ID card in the traditional medicine taking process. At the same time, by reading the user's medicine taking data and the historical medicine type data in the user's medical history data and interacting with each other, the risk of user medication caused by human error is effectively reduced, greatly improving the safety of the user's body. Overall, the application has the significant advantages of high accuracy of medicine transportation process safety prediction, strong monitoring ability of regulated medicine flow, and good effect of user body safety guarantee.

[0156] Embodiment 2

[0157] Please refer to Figure 2 The embodiment does not describe some parts in detail, see the description of embodiment 1, and provides an automatic medicine dispensing and taking method for an intelligent pharmacy, which comprises the following steps:

[0158] S2: collecting a transportation data set, the transportation data set including average temperature data, average humidity data and impact frequency data;

[0159] S3: preprocessing the medicine data set and the transportation data set to obtain a feature vector;

[0160] S4: analyzing the feature vector to obtain a medicine safety prediction value;

[0161] S5: Analyzing the drug safety prediction value based on the safety threshold interval, and obtaining a danger early warning report according to an analysis result;

[0162] S6: Carrying out mechanical counting and distribution into a warehouse for the drug according to the danger early warning report, and obtaining an acceptance distribution report;

[0163] S7: Supporting user login to the intelligent pharmacy system, and obtaining a user data set, processing the dispensing data according to the user data set, and obtaining a user login report;

[0164] S8: Analyzing the user data set and the dispensing data, and obtaining a drug safety report;

[0165] S9: Storing the storage data set to a database, displaying the acceptance distribution report through a visual panel, processing the danger early warning report and the drug safety report, and outputting according to a processing result.

[0166] Embodiment 3

[0167] It is apparent for a person skilled in the art that the present application is not limited to the details of the above exemplary embodiments, but can be implemented in other concrete forms without departing from the spirit or essential characteristics of the present application.

[0168] Therefore, the embodiments should be considered in all respects as illustrative and not restrictive, the scope of the present application being defined by the appended claims rather than the above description, and all changes falling within the meaning and range of equivalence of the essential elements of the claims are intended to be embraced therein. Any reference signs in the claims should not be construed as limiting the claims to the figures in which the reference signs are used.

[0169] Embodiments of the present application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (Artificial Intelligence, AI) is to use digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Theory, method, technology and application system.

[0170] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The plurality of units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The first, second, etc. words are used to express the name, and do not express any specific order.

[0171] Finally, it should be noted that the above examples are merely intended to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. An automatic medicine dispensing and taking system for smart pharmacies, characterized by: The system includes: a drug transportation safety prediction module, a hazard warning recording module, a drug acceptance and distribution module, and a personalized safety verification module, wherein: The drug transportation safety prediction module is used to analyze the feature vector to obtain a drug safety prediction value; The risk warning recording module is used to analyze the drug safety prediction value based on the safety threshold interval and obtain a risk warning report based on the analysis results; The medicine acceptance and distribution module is used to mechanically count and distribute medicines into the warehouse according to the risk warning report to obtain an acceptance and distribution report; The personalized safety verification module is used to analyze the user data set and the medication collection data to obtain a medication safety report.

2. The automatic medicine dispensing and taking system for smart pharmacies according to claim 1 is characterized in that: The system further comprises: a drug data acquisition module, a transportation data acquisition module, a feature vector processing module, a user login module and a data communication management module, wherein: The drug data collection module is used to collect drug data sets, which include drug type data, drug expiration date data, drug weight data, and drug sensitivity data; The transport data collection module is used to collect a transport data set, which includes average temperature data, average humidity data and impact number data; The feature vector processing module is used to pre-process the drug data set and the transportation data set to obtain feature vectors; The user login module is used to support users to log in to the smart pharmacy system, obtain user data sets, process medication collection data according to the user data sets, and obtain user login reports; The data communication management module is used to store the stored data set in the database, display the acceptance distribution report through the visual panel, process the hazard warning report and the drug safety report, and output according to the processing results.

3. The automatic medicine dispensing and taking system for smart pharmacies according to claim 2 is characterized in that: The steps for preprocessing the drug dataset and transportation dataset include: Q1: Complete data cleaning and data normalization for the pharmaceutical and transportation datasets by removing invalid data and scaling the sub-data items of the basic data to the range of [0,1]. Q2: By calculating the average temperature data minus the average value of the standard temperature data, we can get the temperature deviation characteristic data A. a ; Q3: Comprehensive risk feature extraction is performed on drug sensitivity data, temperature deviation feature data, and average humidity data. The specific calculation formula for comprehensive risk feature extraction is: A b =S d ×A a +0.5×S d ×max(0,S f -60); Obtain comprehensive risk characteristic data A b , where S d is the drug sensitivity data, max is the maximization function, S f is the average humidity data; Q4: Packaged drug expiration date data, temperature deviation characteristic data, average humidity data, impact number data and comprehensive risk characteristic data to obtain a feature vector.

4. The automatic medicine dispensing and taking system for smart pharmacies according to claim 1 is characterized in that: The steps to analyze the feature vector include: Step 1: Obtain a set of historical feature vectors stored in the database, compare them with the current time based on the timestamp, and group the comparison results into corresponding groups from small to large. The labeled results are L1, L2, L3, ..., Ln, and the labeled results are used as the sample set; Step 2: Divide the sample set into a 70% training set, a 15% test set, and a 15% validation set, and establish a drug safety prediction model based on the sample set; Step 3: Based on the historical feature vector, substitute the calculation formula: Get preliminary drug safety prediction value Among them, σ is the Sigmoid activation function, M is the number of heterogeneous sub-models, α m is the dynamic weight factor of the mth model, GBDT m is the mth gradient boosting decision tree model, F is the feature vector, λ is the attention weight factor, AttnNet is the attention mechanism, F3 is the historical feature vector of the first three batches, N is the number of nearest neighboring similar samples, SimNet is the similarity function, F n is the sample that is most similar to the feature vector among the nearest neighboring similar samples; Step 4: Perform triple feature verification based on historical feature vectors and preliminary drug safety prediction values. The specific calculation formula group for verification is: Get the first verification value B respectively a , second verification value B b and the third verification value B c , where ν is the indicator function, μ k is the mean of the k-th dimension of the historical feature vector, σ k is the standard deviation of the k-th dimension of the historical feature vector, τ is the divergence threshold, is the preliminary drug safety prediction value at time point tk, and δ is the drift threshold; Step 5: Based on the first verification value, the second verification value, and the third verification value in step 4, when the results of the three verification values ​​are all 1, the drug safety prediction value is output as a preliminary drug safety prediction value. When one or more of the three verification value results are 0, the output result of the drug safety prediction value is: Step 6: Output the drug safety prediction value to the hazard warning record module.

5. The automatic medicine dispensing and taking system for smart pharmacies according to claim 1 is characterized in that: Methods for analyzing drug safety prediction values ​​based on safety threshold intervals include: Based on the safety threshold (0.4, 0.7), when the drug safety prediction value is greater than or equal to 0.7, a safety report is generated; when the drug safety prediction value is greater than or equal to 0.4 and less than 0.7, a warning report is generated; when the drug safety prediction value is less than 0.4, a danger report is generated; The safety report includes a statement that the current drug is predicted to be safe and can be directly stored in the warehouse; The warning report includes a description of the potential risks in the current drug prediction status, and asks staff to conduct manual inspection before storage; The hazard report includes a statement that the current drug is predicted to be dangerous, and asks staff to place the batch of drugs in a safe area and initiate the recall process; Package safety reports, warning reports and hazard reports to obtain hazard early warning reports.

6. The automatic medicine dispensing and taking system for smart pharmacies according to claim 1 is characterized in that: The steps for mechanically counting and allocating drugs to storage based on the hazard warning report include: W1: Detection of hazard warning report content; W2: When the hazard warning report is a safety report, the drug’s appearance integrity and weight values ​​are collected through a 3D scanner and a weighing sensor; W3: When the drug appearance integrity and drug weight deviation rate is greater than or equal to 5%, an abnormal drug report is generated; W4: Classify and store the remaining drugs after removing abnormal drugs based on drug type data and storage rule table, and obtain a storage operation report; W5: Package the abnormal drug report and storage operation report to obtain the acceptance and distribution report.

7. The automatic medicine dispensing and taking system for smart pharmacies according to claim 2 is characterized in that: Methods for processing medication collection data based on user data sets include: User data sets include user portrait data, user fingerprint data, medication collection data, and user medical record data; The medication collection data is the medication type data of the medication required by the user; Compare drug collection data with the drug regulatory rules database; When the content of the medication collection data is less than the regulatory value and the regulatory threshold, the user login module needs to verify the user's ID card password and portrait data; When the medication data contains drugs that exceed the regulatory threshold, the user login module needs to verify the user's ID card password, portrait data, fingerprint data and user medical record data; The drug collection data, user login log and user ID card number are packaged to obtain a user login report.

8. The automatic medicine dispensing and taking system for smart pharmacies according to claim 1 is characterized in that: Methods for analyzing user data sets and medication collection data include: Based on the user medical record data and medication data in the user data set, drug interaction comparison is performed according to the drug interaction rule database. When the drug type data in the user medical record data conflicts with the drug type data in the medication data within a preset time unit, a drug safety report is triggered. Otherwise, no processing is performed. The drug safety report includes a statement indicating that the M1 drug currently required for collection interacts with the M2 drug collected within the past seven days. Users are requested to verify with staff before use.

9. The automatic medicine dispensing and taking system for smart pharmacies according to claim 2 is characterized in that: Methods for processing hazard warning reports and drug safety reports and outputting them based on the processing results include: Detect the contents of hazard warning reports; When the danger warning report is a warning report, the warning report will be sent to the staff's mailbox receiving terminal by email, and a text message will be sent to the staff's mobile phone receiving terminal to remind the staff to check the email; When the danger warning report is a danger report, the danger report will be sent to the staff's mailbox receiving terminal by email, and a phone call will be made to the staff's mobile phone receiving terminal to remind the staff to check the email; The drug safety report is displayed on the system login panel and sent to the user's mobile phone via SMS; The stored data sets include drug data sets, transportation data sets, feature vectors, drug safety prediction values, hazard warning reports, acceptance distribution reports, user login reports, and drug safety reports.

10. A method for automatically dispensing and retrieving medicines for a smart pharmacy, implemented by an automatic dispensing and retrieving medicine system for a smart pharmacy according to any one of claims 1 to 9, characterized in that: The following steps are included: S1: Collect drug datasets, which include drug type data, drug expiration date data, drug weight data, and drug sensitivity data; S2: Collect the transportation data set, which includes average temperature data, average humidity data, and impact number data; S3: Preprocess the drug dataset and transportation dataset to obtain feature vectors; S4: Analyze the feature vector to obtain the drug safety prediction value; S5: Analyze the drug safety prediction value based on the safety threshold interval and obtain a hazard warning report based on the analysis results; S6: Carry out mechanical inventory and allocation of drugs into storage according to the hazard warning report, and obtain the acceptance and allocation report; S7: Support users to log in to the smart pharmacy system, obtain user data sets, process medication collection data based on the user data sets, and obtain user login reports; S8: Analyze the user data set and medication collection data to obtain a drug safety report; S9: Store the stored data set in the database, display the acceptance distribution report through the visualization panel, process the hazard warning report and drug safety report, and output them according to the processing results.

Citation Information

Patent Citations

  • An automated dispensing and retrieval system for smart pharmacies

    CN112897044B

Cited By

  • Autonomous medicine delivery and safety monitoring method and robot

    CN121973255A