Treatment method and device for uncovering medicine
The method of opening medicine bottles by means of image recognition and robotic arm control solves the problem of traditional medicine bottle opening relying on manual intervention, realizes automated and efficient medicine bottle opening operation, and ensures accurate and safe opening.
Patent Information
- Application Number
- CN202511239196.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional medicine bottle opening operations rely heavily on manual intervention, resulting in opening speeds that are limited by individual hand strength, coordination, and fatigue, leading to low efficiency.
By using image acquisition and recognition technology to determine the name of the medicine and the target medicine bottle, obtain the bottle information, calculate the optimal opening force value, and use a robotic arm to automatically open the bottle, combined with identity verification and scenario-based security control, the opening accuracy and safety are ensured.
It automates and improves the efficiency of opening medicine bottles, avoiding uneven force and fatigue issues associated with manual operation, and enhancing opening speed and safety.
Smart Images

Figure CN120964703A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of medical automation, in particular to a processing method and device for uncapping of medicine. BACKGROUND
[0002] In the field of medical medicine packaging, as the core carrier, the medicine bottle is cooperatively designed through the material (such as glass, high-density polyethylene HDPE) and the sealing structure (such as a spiral cover, an anti-theft ring and a child-resistant press-and-twist cap), to build a multi-level physical / chemical barrier, effectively isolate the influence of environmental factors such as oxygen, moisture and ultraviolet rays on the activity of the medicine, and ensure the stability of the medicine during storage and transportation.
[0003] When medical staff use a liquid medicine bottle, the medicine bottle needs to be uncapped before use. However, the current uncapping operation of the medicine bottle still highly depends on manual intervention, and the manual uncapping speed is limited by the individual hand strength, coordination and fatigue, resulting in slow uncapping speed.
[0004] Therefore, there is an urgent need for a processing method and device for uncapping of medicine which can solve the above technical problems. SUMMARY
[0005] The application provides a processing method and device for uncapping of medicine, which solves the problem that the traditional uncapping of medicine bottle highly depends on manual intervention, and significantly improves the efficiency.
[0006] In a first aspect, the application provides a processing method for uncapping of medicine, which comprises: receiving a medicine uncapping request sent by a first user, analyzing the medicine uncapping request to obtain a medicine name; determining a target medicine bottle according to the medicine name; obtaining a target video, extracting a plurality of images from the target video, the target video being obtained by using an image acquisition device to shoot the target medicine bottle; identifying the plurality of images to obtain medicine bottle information, the medicine bottle information including cap design information and fit degree information, the fit degree information being the fit degree information of the cap and the bottle body in the target medicine bottle; inputting the medicine bottle information into a preset database for matching to obtain a first uncapping force value; obtaining a first image, the first image being an image obtained by shooting the target medicine bottle; identifying the first image to obtain a first position, the first position being a position corresponding to the target medicine bottle; obtaining a target height, the target height being a height corresponding to the target medicine bottle; adjusting the first position according to the target height to obtain a second position, the second position being a position corresponding to the cap of the target medicine bottle; sending the second position and the first uncapping force value to a mechanical arm so that the mechanical arm moves; after determining that the mechanical arm reaches the second position, controlling the mechanical arm to uncap the target medicine bottle according to the first uncapping force value, and outputting the uncapped target medicine bottle.
[0007] By adopting the technical scheme, the drug name is determined according to the drug opening request sent by the first user, the target drug bottle is determined based on the drug name, multi-frame image collection is performed on the target drug bottle, the target video is obtained, the drug bottle information is obtained by analyzing the target video, the optimal first opening force value is automatically matched according to the drug bottle information, manual operation cannot perceive the difference in matching degree of different drugs, the first position and the target height of the target drug bottle are dynamically calculated, the first position is adjusted according to the target height to obtain the second position, and the second position and the first opening force value are sent to the mechanical arm, so that the mechanical arm reaches the second position to install the first opening force value to open the target drug bottle. The opening action of the mechanical arm is controlled by a preset program, avoiding the problem of uneven force in manual operation. The mechanical arm has no physiological fatigue and can maintain stable force output for a long time. However, the force and coordination of manual operation will decrease significantly after continuous work, thereby solving the problem that the traditional drug bottle opening height depends on manual intervention and significantly improving the opening efficiency.
[0008] Optionally, before the target drug bottle is determined according to the drug name, the method further comprises: determining a drug type according to the drug name, the drug type including an anesthetic type, an emergency drug type, and a chronic disease management drug type; determining a medical scene according to the drug type, the medical scene including an operating room scene, an anesthesiology scene, an emergency room scene, and a general ward scene; determining a target identity verification mode based on the medical scene, and verifying the identity of the first user using the target identity verification mode. After the verification is correct, the target drug bottle is determined according to the drug name.
[0009] By adopting the technical scheme, the drug type is determined according to the drug name, and the drug type is bound with the medical scene. The medical scene can be automatically determined according to the drug type, and the matching identity verification mode can be set according to the medical scene. The scene-based security control and operation efficiency of drug management are improved. By verifying the identity of the first user, unauthorized personnel can be effectively prevented from taking the drug bottle, and medical safety is ensured.
[0010] Optionally, the target identity verification mode includes a first verification mode, a second verification mode, and a third verification mode. The target identity verification mode is determined based on the medical scene, specifically including: when the medical scene is an operating room scene or an anesthesiology scene, the first verification mode is determined to be used, and the first verification mode includes iris information; when the medical scene is an emergency room scene, the second verification mode is determined to be used, and the second verification mode includes fingerprint information, voice information, and password information; and when the medical scene is a general ward scene, the third verification mode is determined to be used, and the third verification mode includes face information and password information.
[0011] By adopting the technical solutions, the corresponding verification mode is selected based on the medical scene, the safety and efficiency are optimized, the verification mode is strongly associated with the medical scene, the user does not need to remember complex rules, the operation complexity is reduced while the medical safety is ensured.
[0012] Optionally, the multiple images are identified to obtain the medicine bottle information, specifically including: a cap region is intercepted from the second image, the cap region is input into a preset cap structure library for query to obtain a target cap design structure, the second image is any one of the multiple images, the target cap design structure is output as cap design information; the second image is detected by a detection algorithm to obtain a thread matching degree and an interference amount, the interference amount is a difference between a first value and a second value of the target medicine bottle, the first value is a value of an inner diameter corresponding to the cap of the target medicine bottle, and the second value is a value of an outer diameter corresponding to a bottle body of the target medicine bottle; the thread matching degree and the interference amount are output as fit degree information.
[0013] By adopting the technical solutions, the cap region is accurately positioned from the second image, the interference information such as the bottle body is excluded, the target cap design structure corresponding to the cap region is matched in the preset cap structure library, compared with manual identification, the identification accuracy is improved, the thread alignment degree of the cap and the bottle body is analyzed by the depth information model, the thread matching degree is output, the inner diameter (the first value) of the cap and the outer diameter (the second value) of the bottle body are obtained by an image measurement algorithm (such as a sub-pixel level edge detection), and the interference amount is calculated, so that the cap design structure and the fit degree parameter are converted into quantifiable data, and accurate decision basis is provided for automatic uncapping.
[0014] Optionally, the medicine bottle information is input into a preset database for matching to obtain a first uncapping force value, specifically including: a preset matching degree and a preset interference interval are determined according to the target cap design structure; it is judged whether the thread matching degree is greater than or equal to the preset matching degree, and whether the interference amount is in the preset interference interval; when the thread matching degree is greater than or equal to the preset matching degree, and the interference amount is in the preset interference interval, it is determined that the target medicine bottle is in a qualified state, the qualified state is that the fit degree of the cap and the bottle body of the target medicine bottle is in a normal state; according to the qualified state, the target cap design structure is input into the preset database for matching to obtain the first uncapping force value.
[0015] By adopting the technical scheme, the preset matching degree and the preset interference interval are determined according to the target bottle cap design structure, then the thread matching degree is compared with the preset matching degree, and the interference value is compared with the preset interference interval, only when the thread matching degree is greater than or equal to the preset matching degree and the interference value is in the preset interference interval, the target medicine bottle is determined to be in the qualified state, avoiding single parameter misjudgment, when the target medicine bottle is determined to be in the qualified state, the corresponding first opening cap force value is extracted from the preset database according to the target bottle cap design structure, which improves the detection accuracy and efficiency and provides accurate force control parameters for the mechanical arm opening cap.
[0016] Optionally, after judging whether the thread matching degree is greater than or equal to the preset matching degree and whether the interference value is in the preset interference interval, the method further comprises: when the thread matching degree is less than the preset matching degree and the interference value is not in the preset interference interval, determining that the target medicine bottle is in an unqualified state, the unqualified state being that the cap and body of the target medicine bottle are in an abnormal state; determining the first opening cap force value corresponding to the target bottle cap design structure; adjusting the first opening cap force value according to the unqualified state to obtain a second opening cap force value; and sending the second opening cap force value to the mechanical arm.
[0017] By adopting the technical scheme, when the thread matching degree is less than the preset matching degree and the interference value is not in the preset interference interval, the target medicine bottle is automatically determined to be in an unqualified state, avoiding equipment damage caused by continuing to use the default parameters to open the cap, dynamically adjusting the default first opening cap force value according to the unqualified state to generate a second opening cap force value, reducing thread wear, cap rupture and other faults caused by excessive torque of the mechanical arm through dynamic torque adjustment, and prolonging the service life of the equipment.
[0018] Optionally, after determining that the mechanical arm reaches the second position and controlling the mechanical arm to open the target medicine bottle according to the first opening cap force value, the method further comprises: acquiring a face image of a second user, the second user being a person currently located in a preset area, and the preset area being an area where the mechanical arm outputs the target medicine bottle; performing similarity calculation on the face image and a preset face image to obtain a target similarity, the preset face image being a face image corresponding to a first user; and when the target similarity is less than a preset similarity, determining that the second user has no permission to take the target medicine bottle, and outputting a pause instruction to the mechanical arm so that the mechanical arm pauses to output the target medicine bottle after opening the cap.
[0019] By adopting the technical scheme, the face image of the second user in the region where the mechanical arm outputs the target medicine bottle is acquired in real time, and similarity calculation is performed on the preset face image to obtain a target similarity, so as to avoid unauthorized personnel from taking the target medicine bottle after the cover is opened, and prevent the medicine from being misused or misused. When the target similarity is less than the preset similarity, the mechanical arm automatically pauses the output of the target medicine bottle, without manual intervention, reduces the medicine distribution error rate caused by identity misjudgment, and improves medical safety.
[0020] In a second aspect of the present application, a processing device for opening a cover of a medicine is provided. The device includes a receiving unit, a processing unit, and an output unit. The receiving unit receives a medicine cover opening request sent by a first user, analyzes the medicine cover opening request, and obtains a medicine name. The processing unit determines a target medicine bottle according to the medicine name. A target video is obtained, and multiple images are extracted from the target video, which is obtained by using an image acquisition device to shoot the target medicine bottle. The multiple images are identified to obtain medicine bottle information, including cap design information and fit degree information, which is the fit degree information of the cap and the bottle body in the target medicine bottle. The medicine bottle information is input into a preset database for matching to obtain a first cover opening force value. A first image is obtained, which is an image obtained by shooting the target medicine bottle. The first image is identified to obtain a first position, which is the position corresponding to the target medicine bottle. A target height is obtained, which is the height corresponding to the target medicine bottle. The first position is adjusted according to the target height to obtain a second position, which is the position corresponding to the cap of the target medicine bottle. The second position and the first cover opening force value are sent to a mechanical arm for movement. The output unit controls the mechanical arm to open the cover of the target medicine bottle according to the first cover opening force value after the mechanical arm reaches the second position, and outputs the target medicine bottle after the cover is opened.
[0021] Optionally, the processing unit is configured to determine a medicine type according to the medicine name, wherein the medicine type includes an anesthetic type, an emergency medicine type, and a chronic disease management medicine type; determine a medical scene according to the medicine type, wherein the medical scene includes an operating room scene, an anesthesiology scene, an emergency room scene, and a general ward scene; determine a target identity verification mode based on the medical scene; and use the target identity verification mode to verify the identity of the first user, and after the verification is correct, determine the target medicine bottle according to the medicine name.
[0022] Optionally, the processing unit is configured to determine a first verification mode when the medical scene is the operating room scene or the anesthesiology scene, wherein the first verification mode includes iris information; determine a second verification mode when the medical scene is the emergency room scene, wherein the second verification mode includes fingerprint information, voice information, and password information; and determine a third verification mode when the medical scene is the general ward scene, wherein the third verification mode includes face information and password information.
[0023] Optionally, the processing unit is configured to crop the bottle cap region from the second image, input the bottle cap region into a preset bottle cap structure library for query, obtain a target bottle cap design structure, the second image is any one of the plurality of images, and output the target bottle cap design structure as the bottle cap design information; detect the second image by using a detection algorithm to obtain a thread matching degree and an interference amount, the interference amount being a difference between a first value and a second value of the target medicine bottle, the first value being a value of an inner diameter corresponding to the bottle cap of the target medicine bottle, and the second value being a value of an outer diameter corresponding to the bottle body of the target medicine bottle; and the output unit is configured to output the thread matching degree and the interference amount as the fit degree information.
[0024] Optionally, the processing unit is configured to determine a preset matching degree and a preset interference interval according to the target bottle cap design structure; determine whether the thread matching degree is greater than or equal to the preset matching degree and whether the interference amount is within the preset interference interval; when the thread matching degree is greater than or equal to the preset matching degree and the interference amount is within the preset interference interval, determine that the target medicine bottle is in a qualified state, the qualified state being that the fit degree of the bottle cap and the bottle body of the target medicine bottle is in a normal state; and input the target bottle cap design structure into a preset database for matching according to the qualified state to obtain a first cap opening force value.
[0025] Optionally, the processing unit is configured to, when the thread matching degree is less than the preset matching degree and the interference amount is not within the preset interference interval, determine that the target medicine bottle is in an unqualified state, the unqualified state being that the fit degree of the bottle cap and the bottle body of the target medicine bottle is in an abnormal state; determine that the target bottle cap design structure corresponds to the first cap opening force value; adjust the first cap opening force value according to the unqualified state to obtain a second cap opening force value; and send the second cap opening force value to the mechanical arm.
[0026] Optionally, the receiving unit is configured to obtain a face image of a second user, the second user being a person currently located in a preset area, and the preset area being an area in which the mechanical arm outputs the target medicine bottle. The processing unit is configured to perform similarity calculation on the face image and a preset face image to obtain a target similarity, the preset face image being a face image of a first user; and the output unit is configured to, when the target similarity is less than a preset similarity, determine that the second user has no right to take the target medicine bottle, and output a pause instruction to the mechanical arm so that the mechanical arm pauses output of the target medicine bottle after opening the cap.
[0027] In a third aspect, an electronic device is provided, which includes a processor, a memory, a user interface, and a network interface. The memory is configured to store instructions, and the user interface and the network interface are configured to communicate with other devices. The processor is configured to execute the instructions stored in the memory, so that the electronic device performs the method of any one of the above aspects.
[0028] In a fourth aspect of the present application, a computer-readable storage medium is provided, and the computer-readable storage medium stores instructions which, when executed, perform the method of any one of the above aspects of the present application.
[0029] In summary, the one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. According to the drug opening request sent by the first user, the drug name is determined, the target drug bottle is determined based on the drug name, and then multiple image acquisition is performed on the target drug bottle to obtain a target video. The target video is analyzed to obtain drug bottle information. The optimal first opening force value is automatically matched according to the drug bottle information. Manual operation cannot perceive the difference in coordination of different drugs. Then, the first position and the target height of the target drug bottle are dynamically calculated. The first position is adjusted according to the target height to obtain a second position. The second position and the first opening force value are sent to the mechanical arm, so that the mechanical arm reaches the second position to install the first opening force value to open the target drug bottle. The opening action of the mechanical arm is controlled by a preset program, avoiding the problem of uneven force in manual operation. The mechanical arm has no physiological fatigue and can maintain stable force output for a long time. However, the force and coordination of manual operation will decrease significantly after continuous work, thereby solving the problem that the traditional drug bottle opening height depends on manual intervention and significantly improving the opening efficiency.
[0030] 2. According to the target bottle cap design structure, the preset matching degree and the preset interference interval are determined. Then, the thread matching degree is compared with the preset matching degree, and the interference value is compared with the preset interference interval. Only when the thread matching degree is greater than or equal to the preset matching degree and the interference value is within the preset interference interval, the target drug bottle is determined to be in a qualified state. Avoiding single parameter misjudgment, when the target drug bottle is determined to be in a qualified state, the corresponding first opening force value is extracted from the preset database according to the target bottle cap design structure, thereby improving the detection accuracy and efficiency and providing accurate force control parameters for the mechanical arm opening. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a flowchart of a processing method for opening a drug provided by an embodiment of the present application; Figure 2 is a structural schematic diagram of a processing device for opening a drug provided by an embodiment of the present application; Figure 3 is a structural schematic diagram of an electronic device disclosed by an embodiment of the present application.
[0032] Legend of reference signs: 201, receiving unit; 202, processing unit; 203, output unit; 300, electronic device; 301, processor; 302, memory; 303, user interface; 304, network interface; 305, communication bus. DETAILED DESCRIPTION
[0033] In order for those skilled in the art to better understand the technical solutions in the specification, the technical solutions in the specification will be clearly and completely described below in combination with the drawings in the specification. Obviously, the described embodiments are only some of the embodiments of the present application, not all.
[0034] In the description of the embodiments of the present application, the words such as "for example" or "for instance" are used to represent an example, illustration or description. Any embodiment or design scheme described as "for example" or "for instance" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words such as "for example" or "for instance" are intended to present the relevant concept in a specific manner.
[0035] In the description of the embodiments of the present application, the term "a plurality of" means two or more. For example, a plurality of systems means two or more systems, and a plurality of screen terminals means two or more screen terminals. In addition, the terms "first" and "second" are used only for descriptive purposes, and should not be construed as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined with "first" and "second" can explicitly or implicitly include one or more features. The terms "include", "contain", "have" and their variants mean "include but are not limited to", unless otherwise specifically emphasized.
[0036] In the field of medical drug packaging, as the core carrier, the drug bottle, through the synergistic design of material (such as glass, high-density polyethylene HDPE) and sealing structure (such as screw cap, anti-theft ring, pressure spin type child-resistant cap), builds a multi-level physical / chemical barrier, effectively isolates the influence of environmental factors such as oxygen, moisture, ultraviolet light on the activity of the drug, and ensures the stability of the drug during storage and transportation.
[0037] When medical personnel use liquid drug bottles, they need to open the cap of the drug bottle before use. However, the current opening operation of the drug bottle still highly depends on manual intervention, and the manual opening speed is limited by individual hand strength, coordination and fatigue, resulting in slow opening speed.
[0038] Therefore, how to solve the problem that the traditional drug bottle opening highly depends on manual intervention. The processing method for opening the drug provided by the embodiments of the present application is applied to a medical opening device, Figure 1 is a flowchart of the processing method for opening the drug provided by the embodiments of the present application, referring to Figure 1 The method comprises the following steps S101-S108.
[0039] S101: receiving a drug opening request sent by a first user, analyzing the drug opening request to obtain a drug name.
[0040] In the above S101, when the medical staff takes the drug, it is necessary to first judge whether there is a liquid medicine bottle in the drug to be taken. If there is a liquid medicine bottle, it is assumed that the medical staff has a drug opening request, which means that the drug in the medicine bottle needs to be opened. The medical staff can send a drug opening request to the server of the medical opening device through the user interface. At this time, the medical staff refers to the first user. The server receives the drug opening request sent by the first user. The first user can also scan the two-dimensional code on the drug packaging through the scanning gun. The server receives the request containing the unique identification of the drug. When the first user has taken the drug to be opened, the server sends the drug opening request first, and then the drug to be opened is input into the medical opening device through the conveying belt, so that the medical opening device can perform subsequent processing on the drug to be opened. In addition to the first user inputting the drug to be opened into the medical opening device through the conveying belt, the drug corresponding to the drug name can also be searched in the drug storage room according to the drug opening request sent by the first medical staff. The specific selection method can be selected based on the actual situation. The drug opening request includes the information of the drug to be opened. The drug opening request is analyzed to obtain the drug name.
[0041] In addition, after obtaining the drug name from the drug opening request, the personnel sending the drug opening request are first authenticated. After the identity authentication is correct, the drug corresponding to the drug name can be taken. Specifically, it includes: According to the drug name, the drug type is determined, and the drug type includes narcotic drug type, first-aid drug type and chronic disease management drug type; according to the drug type, the medical scene is determined, and the medical scene includes operating room scene, anesthesiology department scene, emergency room scene and general ward scene; based on the medical scene, the target identity verification mode is determined, the first user is verified by using the target identity verification mode, and after the verification is correct, the target medicine bottle is determined according to the drug name. Specifically, a preset drug classification rule library is constructed in advance, which contains the mapping relationship between the drug name and the drug type. The drug type includes narcotic drug type, first-aid drug type, chronic disease management drug type and the like. For example, the narcotic drug type includes lidocaine hydrochloride injection and propofol injection. The first-aid drug type includes adrenaline injection and nitroglycerin tablets. The drug name sent by the first user is received, and the drug type is determined by matching in the drug classification rule library. For example, the drug name is lidocaine hydrochloride injection, and the lidocaine hydrochloride injection is input into the drug classification rule library for matching to determine that the drug type is narcotic drug type. Then, the mapping rule of the drug type and the medical scene is constructed, and the medical scene corresponding to different drug types is determined. The medical scene includes operating room scene, anesthesiology department scene, emergency room scene, general ward scene and the like. For example, the narcotic drug type is usually applied to the operating room scene and the anesthesiology department scene, and the first-aid drug type is usually applied to the emergency room scene. According to the drug type, the corresponding medical scene is determined by matching in the medical scene mapping rule. The medical scene also includes other scenes, which are not illustrated one by one here. After the medical scene corresponding to each drug is determined, the mapping rule of the medical scene and the identity verification mode is constructed, and the identity verification mode suitable for different medical scenes is determined. The identity verification mode includes face recognition, fingerprint recognition, card swiping, two-factor authentication (such as password + fingerprint) and the like. According to the medical scene, the target identity verification mode is determined by matching in the body verification mode rule. According to the medical scene corresponding to the drug name, the appropriate verification mode is selected from the target identity verification mode, and then the first user is verified by using the verification mode. After the identity verification is successful, the drug library management system is queried, and the target medicine bottle is matched according to the drug name. For example, when the medical scene is the emergency room scene, the emergency room scene adopts the two-factor verification mode, that is, the fingerprint information and the card information, the fingerprint information of the first user is collected, and then the collected fingerprint information is compared with the preset fingerprint information. When the fingerprint information is consistent with the preset fingerprint information, it is confirmed that the fingerprint verification is successful. Then, a card reading device (such as an RFID card reader) is called to read the card information of the first user, and the read card information is matched with the preset card library to verify the validity of the card. After the card verification is successful, the first user name A corresponding to the successful fingerprint information verification is obtained, and the first user name B corresponding to the successful card information verification is obtained. It is judged whether the first user name and the second user name are the same person. When the first user name and the second user name are the same person, it is determined that the identity verification of the first user is correct.
[0042] Furthermore, based on the sensitivity and risk level of medical scenarios, different target authentication methods are defined for each scenario. These target authentication methods include a first authentication method, a second authentication method, and a third authentication method. The target authentication method is determined based on the medical scenario, specifically: when the medical scenario is an operating room or anesthesiology department, the first authentication method is used, which includes iris information; when the medical scenario is an emergency room, the second authentication method is used, which includes fingerprint, voice, and password information; and when the medical scenario is a general ward, the third authentication method is used, which includes facial information and password information. Specifically, the current medical scenario is determined based on the type of medication. For example, if a user requests to operate on "propofol injection" (an anesthetic), it is identified as an operating room or anesthesiology department scenario. The corresponding authentication method is determined according to the medical scenario mapping rules. When the medical scenario is an operating room or anesthesiology department scenario, the first authentication method, which uses iris information, is used. Because medical personnel in the operating room wear surgical gowns or protective suits, their iris information is collected to verify their identity. Iris recognition devices (such as infrared cameras) are used to capture images of the user's irises. Image processing algorithms extract texture features of the iris (such as minutiae and phase information). The extracted feature vector is compared with features in a pre-set iris database to calculate the similarity. If the similarity is greater than a pre-set threshold, verification is considered successful; if the similarity is less than or equal to the pre-set threshold, verification is considered unsuccessful. For example, if user A faces the device, the device completes iris image acquisition within 1 second. A 2048-bit feature vector of the iris is extracted. The collected feature vector is then compared with a pre-set vector to calculate the similarity. If the similarity is 0.98, and the pre-set threshold is set to 0.95, user A's identity is verified, confirming that the user has permission to take the medication mentioned in the medication opening request. When the medical scenario is an emergency room scenario, a second verification method is used, which includes fingerprint information, voice information, and password information. The system can select any two verification methods from the second verification method for identity verification. If fingerprint and voice verification are selected, the system can collect the first user's fingerprint image, extract fingerprint features (such as minutiae and ridge direction), and compare them with a preset fingerprint database. Then, it can use the first user's voice sample (e.g., "Verification passed"), extract voice features (such as MFCC coefficients), and compare them with a preset voice database. If fingerprint verification is successful and voice verification is correct, the system determines that the first user's identity verification is correct and that the first user has the authority to take the medicine mentioned in the medicine opening request. When the medical scenario is a general ward scenario, the system will use a third verification method, which includes facial information and password information.The system can capture the first user's facial image, extract facial features (such as key points and facial descriptors), and compare them with a preset facial database. The first user enters a password (e.g., "654321"), which is then compared with a preset password database. If both facial information and password verification are successful, the verification is considered successful. Successful verification confirms the first user's authorization to take the medication mentioned in the medication opening request. If only one of the facial information or password verification is successful, the authentication is considered failed, and an alternative verification method can be activated to re-authenticate the first user. If both facial information and password verification fail, the first user's authentication is considered failed, and the medication opening request sent by the first user is stopped. By authenticating the first user, precise access control for medication distribution can be achieved, preventing unauthorized personnel from taking medication and thus avoiding security incidents.
[0043] S102: Determine the target medicine bottle based on the drug name, acquire the target video, and extract multiple images from the target video.
[0044] In step S102 above, after verifying the identity of the first user, the corresponding target medicine bottle can be matched according to the medicine name. At this point, the target medicine bottle refers to the packaging bottle of the medicine corresponding to the medicine name. If multiple medicine bottles exist, the names marked on each bottle must be identified sequentially to determine the target medicine bottle corresponding to the medicine name. The batch number and expiration date of the medicine name are also considered to determine the target medicine bottle. After locating the target medicine bottle, an image acquisition device (such as an industrial camera or depth camera) is used to capture a 360° surround shot of the target medicine bottle, generating a target video (e.g., MP4 format, 1080P resolution, 30FPS frame rate). Keyframes are extracted from the target video at fixed intervals (e.g., every 5 frames) to generate multiple images (e.g., JPEG format). For example, 20 images can be extracted from a 10-second video, covering various angles of the target medicine bottle.
[0045] S103: Recognize multiple images to obtain medicine bottle information, including cap design information and fit information.
[0046] In step S103 above, an object detection algorithm (such as YOLOv8) is used to identify the bottle cap area in the image and extract design features (such as thread type, bottle cap material, and anti-counterfeiting marks). For example, the bottle cap is identified as a "screw-on metal cap with anti-slip texture." Then, the fit between the bottle cap and the bottle body (such as thread matching degree and interference fit) is calculated using 3D reconstruction technology (such as SFM algorithm) or binocular vision. The calculated thread matching degree is 92%, and the interference fit is 0.25mm.
[0047] The process involves recognizing multiple images to obtain bottle information. Specifically, this includes: extracting the bottle cap area from a second image, inputting this area into a pre-defined bottle cap structure database for querying, and obtaining the target bottle cap design structure. The second image can be any one of the multiple images. The target bottle cap design structure is output as the bottle cap design information. A detection algorithm is used to detect the second image, obtaining the thread matching degree and interference fit. The interference fit is the difference between a first value and a second value of the target bottle, where the first value is the inner diameter of the bottle cap and the second value is the outer diameter of the bottle body. The thread matching degree and interference fit are output as fit information. Specifically, one image is selected from multiple images as the second image (any one of the multiple images). The second image (e.g., an RGB image of the medicine packaging) is then subjected to grayscale conversion, noise reduction (e.g., Gaussian filtering), and edge enhancement (e.g., Canny operator) to highlight the contrast between the bottle cap and the background. Next, an object detection algorithm (such as YOLOv8 or Faster R-CNN) is used to locate the bottle cap in the image, outputting the bounding box coordinates. Based on the bounding box coordinates, the bottle cap region is cropped from the original image and adjusted to a uniform size (e.g., 128×128 pixels). A database containing various bottle cap design structures (such as thread type, sealing ring shape, and material) is pre-built, with each structure associated with a unique identifier (e.g., ID) and feature vector. Features (such as texture, shape, and color) of the cropped bottle cap region are extracted, and similarity calculations (e.g., cosine similarity) are performed with the feature vectors in the structure database. Based on the matching results, the target bottle cap design structure is output. Edge detection (such as the Sobel operator) and Hough transform are then used to extract the thread contours of the bottle cap and bottle body, calculating parameters such as thread pitch and thread angle. The differences in thread parameters between the bottle cap and bottle body are compared, and the matching degree is calculated (e.g., 100% is a perfect match). Image segmentation (such as U-Net) or edge detection is then used to extract the pixel dimensions of the inner diameter of the cap and the outer diameter of the bottle body, which are then converted into actual dimensions using calibration coefficients (such as 1 pixel = 0.1 mm). Interference amount = Inner diameter of cap - Outer diameter of bottle body. The thread fit and interference amount are combined to form the fit information, which is the fit between the cap and the bottle body in the target medicine bottle. Besides using edge detection technology to extract the pixel dimensions of the inner diameter of the cap and the outer diameter of the bottle body, the fit between the cap and the bottle body (such as thread fit and interference) can also be calculated using 3D reconstruction technology (such as the SFM algorithm) or binocular vision. The calculated thread fit is 92%, and the interference is 0.25 mm.
[0048] For example, to acquire the second image, it's necessary to ensure that the target medicine bottle is contained within it. First, locate the bottle cap bounding box (100, 150, 300, 350), crop and adjust it to 128×128 pixels to obtain the bottle cap area. Then, input the bottle cap area into a preset bottle cap structure library for querying to obtain a single-line thread. Next, inspect the second image to obtain that the bottle cap pitch = 2.5mm and the bottle body pitch = 2.5mm, thus obtaining a matching degree of 100%. Then, obtain the bottle cap inner diameter = 5.0mm and the bottle body outer diameter = 4.8mm →, thus determining the interference = 0.2mm. At this point, the thread matching degree in the fit information is 100%, the interference is 0.2mm, and the bottle cap design information is a single-line thread.
[0049] S104: Input the medicine bottle information into the preset database for matching to obtain the first opening force value.
[0050] In step S104 above, after obtaining the medicine bottle information, the medicine bottle information is input into a preset database for matching, and the first opening force value is calculated based on the bottle cap design information and fit information. For example, the thread type is helical, the material is metal, the thread fit is 92%, and the interference is 0.25mm; thus, the first opening force value is output as 6.5 N·m.
[0051] Furthermore, to match the calculated first opening force value with the target medicine bottle, the fit between the cap and the bottle body can be assessed, and an appropriate opening force value can be selected based on the fit. The medicine bottle information is input into a preset database for matching to obtain the first opening force value. This process includes: determining a preset fit degree and a preset interference range based on the target cap design structure; determining whether the thread fit degree is greater than or equal to the preset fit degree and whether the interference amount is within the preset interference range; when the thread fit degree is greater than or equal to the preset fit degree and the interference amount is within the preset interference range, the target medicine bottle is determined to be in a qualified state, meaning the fit between the cap and the bottle body is normal; based on the qualified state, the target cap design structure is input into the preset database for matching to obtain the first opening force value. Specifically, the target cap design information corresponding to the target medicine bottle is predetermined. The historical correspondence between cap design structures and thread fit degrees is extracted based on the target cap design information, and the thread fit degree distribution (such as mean and standard deviation) of qualified medicines is statistically analyzed. Based on statistical results, a preset matching degree is set, meaning different cap designs correspond to different preset matching degrees. The sealing performance of the cap and bottle body under different interference fits can be tested using physical experiments (such as a tensile testing machine). The minimum and maximum acceptable interference fits are recorded, and these are then combined to form a preset interference range. The detected thread matching degree of the target medicine bottle is then compared with the preset matching degree. For example, if the detected thread matching degree is 98% and the preset matching degree is 96%, the thread matching degree is greater than the preset matching degree of 96%, confirming that the thread of the target medicine bottle is acceptable. Next, it is checked whether the detected interference fit is within the preset interference range. For example, if the detected interference fit is 0.3mm and the preset interference range is [0.1mm, 0.5mm], the interference fit is within the preset interference range, confirming that the difference between the cap and bottle body in the target medicine bottle is acceptable. Only when both the thread matching degree and the interference fit are acceptable can the target medicine bottle be considered acceptable. At this point, the corresponding opening force value can be directly retrieved from the preset database based on the target bottle cap design structure, and the matched opening force value is output as the first opening force value. The force value corresponding to the target bottle cap design result is set based on the goal of ensuring the fit between the bottle cap and the bottle body in the target medicine bottle is satisfactory. This achieves a comprehensive evaluation of the fit between the bottle cap and the bottle body and precise control of the opening force value.
[0052] Furthermore, when the thread matching degree is less than the preset matching degree and the interference fit is not within the preset interference range, the target medicine bottle is determined to be in a non-conforming state. The non-conforming state indicates that the fit between the bottle cap and the bottle body is abnormal. The first opening force value corresponding to the target bottle cap design structure is determined. The first opening force value is adjusted according to the non-conforming state to obtain a second opening force value. The second opening force value is then sent to the robotic arm. Specifically, the detected thread matching degree is compared with the preset matching degree. For example, if the detected thread matching degree is 90% and the preset matching degree is 96%, the thread matching degree is less than the preset matching degree, confirming that the thread of the target medicine bottle is non-conforming. Next, it is checked whether the detected interference fit is within the preset interference range. For example, if the detected interference fit is 0.6mm and the preset interference range is [0.1mm, 0.5mm], the interference fit is not within the preset interference range, determining that the interference fit of the target medicine bottle is non-conforming. When the thread fit is less than the preset fit or the interference fit is not within the preset interference range, the target medicine bottle is determined to be unqualified. Based on the target bottle cap design structure (e.g., double-thread + X-ring + high-density polyethylene material), the corresponding opening force value (first opening force value) is retrieved from the preset database. For example, if the target bottle cap design structure is double-thread + X-ring + high-density polyethylene material, the preset database outputs a first opening force value of 20N. The first opening force value is adjusted based on the reason for the unqualification. When the thread fit is insufficient, the opening force value needs to be increased, for example, by increasing it by 0.5N for every 1% decrease in fit. When the interference fit is too large, the opening force value is increased, for example, by increasing it by 1N for every 0.1mm excess. When the interference fit is too small, the opening force value is decreased, for example, by decreasing it by 1N for every 0.1mm decrease. When multiple factors are unqualified, the adjustment values can be combined. For example, if the thread fit is 90% and the preset fit is 96%, the thread fit is insufficient, with a difference of 6%. The interference is 0.6mm, and the preset interference range is [0.1mm, 0.5mm]. The interference is too large, exceeding the limit by 0.1mm. The thread fit is adjusted to 6% * 0.5N = 3N, and the interference is adjusted to 0.1mm * 1N = 1N, for a total adjustment of 3N + 1N = 4N. If the first opening force is 15N, the total adjustment is added to the first opening force to obtain the second opening force: second opening force = first opening force + total adjustment. This second opening force is then sent to the robotic arm to open the target bottle. Through defect determination, dynamic opening force adjustment, and real-time communication, automated handling of abnormal cap-bottle fit is achieved.
[0053] S105: Acquire the first image, identify the first image, and obtain the first position.
[0054] In step S105 above, after calculating the first opening force value corresponding to the target medicine bottle, an image containing the target medicine bottle, i.e., the first image, can be captured using a fixedly installed camera. For example, top-down and bottom-up images of the target medicine bottle on the conveyor belt can be captured, with a resolution of 1920×1080 pixels. Then, the bounding box of the medicine bottle is identified using an object detection algorithm (such as Faster R-CNN), and the coordinates of its bottom center point (e.g., pixel coordinates (x, y)) are calculated. The bottom center point coordinates are then output as the first position, where the first position refers to the center point coordinates corresponding to the bottom contour of the target medicine bottle.
[0055] S106: Obtain the target height, adjust the first position according to the target height, and obtain the second position.
[0056] In step S106 above, a depth camera or laser rangefinder is used to measure the height (target height) of the top (cap) of the medicine bottle. Then, based on the first position and the target height, the second position of the target medicine bottle is calculated. The second position refers to the position corresponding to the cap of the target medicine bottle, that is, the coordinate position corresponding to the center point of the cap. The first position can be converted into three-dimensional coordinates first. Since the cap is located on top of the medicine bottle, the second position of the top of the medicine bottle can be derived from the first position and the target height. For example, if the coordinates corresponding to the first position are (x, y, z), and the target height is determined to be h, then the coordinates corresponding to the second position are (x, y, z + h). This calculation formula is only applicable when the medicine bottle has a regular shape, such as a cylinder. When the medicine has other irregular shapes, a suitable calculation formula can be selected based on the actual situation; no further limitations are imposed here.
[0057] S107: Send the second position and the first opening force value to the robotic arm so that the robotic arm can move.
[0058] In step S107 above, after obtaining the second position and the first opening force value, the coordinates and torque value (first opening force value) corresponding to the second position can be sent to the robotic arm controller via an industrial communication protocol (such as Modbus TCP or EtherCAT). The robotic arm moves to the second position according to the received coordinates and adjusts the torque output of the end effector.
[0059] S108: After determining that the robotic arm has reached the second position, control the robotic arm to open the target medicine bottle according to the first opening force value, and output the opened target medicine bottle.
[0060] In step S108 above, after the robotic arm moves, its current third position is obtained. This third position is compared with the second position. When the third position is the same as the second position, it is determined that the robotic arm has reached the second position. The end effector of the robotic arm (such as an electric gripper) then clamps the bottle cap and rotates it with a first opening force value (such as 6.5 N·m). For example, the gripper rotates the bottle cap 90° clockwise with a torque of 6.5 N·m to complete the opening. After determining that the end effector of the robotic arm has opened the target medicine bottle according to the first opening force value, to ensure that the robotic arm has successfully opened the bottle cap, a vision sensor can be used to collect the color information of the target medicine bottle. The color information is then identified to determine whether the bottle cap has been opened. Specifically, the identification process is as follows: First, a vision sensor is installed on the robotic arm. After determining that the robotic arm has reached the third position, the vision sensor is used to collect an image of the target medicine bottle. The color of the collected first image of the medicine bottle is then identified to obtain the first color information. After the robotic arm's end effector rotates the cap of the target medicine bottle according to the first opening force value, confirming the completion of the opening operation, a vision sensor is used to acquire an image of the opened target medicine bottle. Color recognition is performed on the acquired image of the second medicine bottle to obtain second color information. To ensure the accuracy of the second color information, the target medicine bottle after the opening operation is completed can be captured three times, and color recognition is performed on each of the three acquired images. The obtained color information is compared sequentially. When the comparison results show that the color information is consistent, the color information of any one image is selected as the second color information. Then, the first color information is compared with the second color information. If the first color information and the second color information are inconsistent, it is determined that the opening operation of the target medicine bottle has been completed. If the first color information and the second color information are inconsistent, it is determined that the robotic arm has failed to open the target medicine bottle, i.e., the opening operation has failed, and the opening operation of the target medicine bottle is repeated following the above opening process.
[0061] Furthermore, after the robotic arm completes the opening operation of the target medicine bottle, before moving the opened bottle to the designated output position, the identity of the user who took the bottle must be verified again to ensure that the person taking the bottle is the same as the person who requested the opening, thus preventing the medicine from being misused if the person taking the bottle changes. The system acquires the facial image of the second user, who is currently located in a preset area (the area where the robotic arm outputs the target medicine bottle). A similarity calculation is performed between the second user's facial image and a preset facial image (the image corresponding to the first user). If the target similarity is less than the preset similarity, it is determined that the second user does not have permission to take the target medicine bottle, and a pause command is sent to the robotic arm to stop outputting the opened target medicine bottle.
[0062] Specifically, cameras can be installed around the workstation where the robotic arm outputs the target medicine bottle, and a physical area (such as a circular area with a radius of 1 meter) can be designated as a preset area. The preset area is monitored in real time by the installed cameras, and when a person is detected entering, facial image acquisition is triggered. If a second user enters the preset area, the second user's facial image is used. When receiving a medicine bottle opening request from the first user, the facial image corresponding to the first user needs to be acquired, because the robotic arm is currently opening the medicine bottle requested by the first user. Therefore, the facial image corresponding to the first user needs to be used as the preset facial image. The preset facial image can be understood as the facial image corresponding to the user whose medicine bottle the robotic arm is opening. A pre-trained facial recognition model is then used to extract the facial feature vectors of the second user and the first user, and the cosine similarity between the two facial feature vectors is calculated to obtain the target similarity. A preset similarity threshold is set based on the actual application scenario. The target similarity is compared with the preset similarity. When the target similarity is greater than or equal to the preset similarity, it is determined that the first user and the second user are the same person, meaning the person who took the opened target medicine bottle has not changed from the person who initiated the medicine opening request. The robotic arm can continue to send the opened target medicine bottle to the first user. When the target similarity is less than the preset similarity, it is determined that the second user and the first user are not the same person, meaning the second user does not have permission to take the target medicine bottle requested by the first user. A pause command is sent to the robotic arm via the industrial protocol so that the robotic arm stops outputting the opened target medicine bottle.
[0063] This application also provides a device for opening medicine caps. Figure 2 This is a schematic diagram of a device for opening medicine caps provided in an embodiment of this application. (Refer to...) Figure 2 The device includes a receiving unit 201, a processing unit 202, and an output unit 203.
[0064] The receiving unit 201 receives the drug opening request sent by the first user, analyzes the drug opening request, and obtains the drug name.
[0065] Processing unit 202 determines the target medicine bottle based on the medicine name; acquires a target video, extracts multiple images from the target video (the video is captured by an image acquisition device on the target medicine bottle); identifies the multiple images to obtain medicine bottle information, including cap design information and fit information (the fit information is the fit between the cap and the body of the target medicine bottle); inputs the medicine bottle information into a preset database for matching to obtain a first opening force value; acquires a first image (the image captured on the target medicine bottle); identifies the first image to obtain a first position (the position corresponding to the target medicine bottle); acquires a target height (the height corresponding to the target medicine bottle); adjusts the first position according to the target height to obtain a second position (the position corresponding to the cap of the target medicine bottle); and sends the second position and the first opening force value to the robotic arm for movement. Output unit 203, after determining that the robotic arm has reached the second position, controls the robotic arm to open the target medicine bottle according to the first opening force value and outputs the opened target medicine bottle.
[0066] In one possible implementation, the processing unit 202 is used to determine the drug type based on the drug name, including anesthetic drugs, emergency drugs, and chronic disease management drugs; determine the medical scenario based on the drug type, including operating room scenario, anesthesiology department scenario, emergency room scenario, and general ward scenario; determine the target authentication method based on the medical scenario, use the target authentication method to authenticate the first user, and after successful authentication, determine the target medicine bottle based on the drug name.
[0067] In one possible implementation, the processing unit 202 is configured to determine the use of a first verification method when the medical scenario is an operating room scenario or an anesthesiology department scenario, the first verification method including iris information; determine the use of a second verification method when the medical scenario is an emergency room scenario, the second verification method including fingerprint information, voice information and password information; and determine the use of a third verification method when the medical scenario is a general ward scenario, the third verification method including facial information and password information.
[0068] In one possible implementation, the processing unit 202 is used to extract the bottle cap area from the second image, input the bottle cap area into a preset bottle cap structure library for querying, and obtain the target bottle cap design structure. The second image is any one of multiple images. The target bottle cap design structure is output as bottle cap design information. The second image is detected by a detection algorithm to obtain the thread matching degree and interference amount. The interference amount is the difference between a first value and a second value of the target medicine bottle. The first value is the inner diameter value corresponding to the bottle cap of the target medicine bottle, and the second value is the outer diameter value corresponding to the bottle body of the target medicine bottle. The output unit 203 is used to output the thread matching degree and interference amount as fit information.
[0069] In one possible implementation, the processing unit 202 is used to determine a preset matching degree and a preset interference range based on the target bottle cap design structure; determine whether the thread matching degree is greater than or equal to the preset matching degree, and determine whether the interference amount is within the preset interference range; when the thread matching degree is greater than or equal to the preset matching degree and the interference amount is within the preset interference range, the target medicine bottle is determined to be in a qualified state, and the qualified state is that the fit between the bottle cap and the bottle body of the target medicine bottle is in a normal state; based on the qualified state, the target bottle cap design structure is input into a preset database for matching to obtain a first opening force value.
[0070] In one possible implementation, the processing unit 202 is used to determine that the target medicine bottle is in a non-conforming state when the thread matching degree is less than the preset matching degree and the interference is not within the preset interference range. The non-conforming state is that the fit between the cap and the body of the target medicine bottle is abnormal. The processing unit 202 determines the first opening force value corresponding to the design structure of the target cap. The processing unit 202 adjusts the first opening force value according to the non-conforming state to obtain a second opening force value. The processing unit 202 sends the second opening force value to the robotic arm.
[0071] In one possible implementation, the receiving unit 201 is used to acquire the face image corresponding to the second user, the second user being the person currently located in the preset area, the preset area being the area where the robotic arm outputs the target medicine bottle; the processing unit 202 is used to calculate the similarity between the face image and the preset face image, the preset face image being the face image corresponding to the first user; the output unit 203 is used to determine that the second user does not have permission to take the target medicine bottle when the target similarity is less than the preset similarity, and to output a pause command to the robotic arm so that the robotic arm pauses outputting the target medicine bottle after it has been opened.
[0072] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0073] This application also discloses an electronic device. (See reference...) Figure 3 , Figure 3 This application provides a schematic diagram of the structure of an electronic device. The electronic device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 302, and at least one communication bus 305.
[0074] The communication bus 305 is used to enable communication between these components.
[0075] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.
[0076] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0077] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 302, and by calling data stored in memory 302. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and application requests; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.
[0078] The memory 302 may include random access memory (RAM) or read-only memory. Optionally, the memory 302 may include a non-transitory computer-readable storage medium. The memory 302 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 302 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc. The data storage area may store data involved in the various method embodiments described above. Optionally, the memory 302 may also be at least one storage device located remotely from the aforementioned processor 301.
[0079] like Figure 3 As shown, the memory 302, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for processing the opening of medicines.
[0080] exist Figure 3 In the electronic device 300 shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call the application program stored in the memory 302 for the processing of opening the medicine cap. When executed by one or more processors, the electronic device performs one or more of the methods described in the above embodiments.
[0081] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0082] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed apparatus 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 displayed or discussed mutual couplings, direct couplings, or communication connections may be through some service interfaces; indirect couplings or communication connections between devices or units may be electrical or other forms.
[0084] 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.
[0085] Furthermore, the functional units in the various embodiments of this application 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. The integrated unit can be implemented in hardware or as a software functional unit.
[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, portable hard drives, magnetic disks, or optical disks.
[0087] The above description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of other embodiments of this disclosure upon considering the specification and the disclosure of practical truths. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure.
Claims
1. A method for processing opened medicines, characterized in that, The method includes: Receive a request from the first user to open a medicine cap, analyze the request, and obtain the name of the medicine. The target medicine bottle is determined based on the name of the medicine. Acquire a target video and extract multiple images from the target video, wherein the target video is obtained by taking a picture of the target medicine bottle using an image acquisition device; Multiple images are identified to obtain medicine bottle information, which includes cap design information and fit information, wherein the fit information is the fit between the cap and the body of the target medicine bottle. The information of the medicine bottle is entered into a preset database for matching to obtain the first opening force value; Acquire a first image, which is an image obtained by photographing the target medicine bottle; The first image is identified to obtain a first position, which is the position corresponding to the target medicine bottle. Obtain the target height, which is the height corresponding to the target medicine bottle; The first position is adjusted according to the target height to obtain a second position, which is the position corresponding to the cap of the target medicine bottle; The second position and the first opening force value are sent to the robotic arm so that the robotic arm can move. After determining that the robotic arm has reached the second position, control the robotic arm to open the target medicine bottle according to the first opening force value, and output the opened target medicine bottle.
2. The method according to claim 1, characterized in that, Before determining the target vial based on the drug name, the method further includes: The drug type is determined based on the drug name, and the drug type includes anesthetic drugs, emergency drugs, and chronic disease management drugs. The medical scenario is determined based on the type of drug, and the medical scenario includes operating room scenario, anesthesiology department scenario, emergency room scenario and general ward scenario; Based on the medical scenario, a target authentication method is determined, and the first user is authenticated using the target authentication method. After successful authentication, the target medicine bottle is determined based on the name of the medicine.
3. The method according to claim 2, characterized in that, The target authentication method includes a first authentication method, a second authentication method, and a third authentication method. The determination of the target authentication method based on the medical scenario specifically includes: When the medical scenario is the operating room scenario or the anesthesiology department scenario, it is determined that the first verification method is used, and the first verification method includes iris information; When the medical scenario is the emergency room scenario, it is determined that the second verification method is used, and the second verification method includes fingerprint information, voice information and password information; When the medical scenario is the general ward scenario, the third verification method is determined to be used, which includes facial information and password information.
4. The method according to claim 1, characterized in that, The step of identifying multiple images to obtain medicine bottle information specifically includes: The bottle cap area is cropped from the second image and entered into a preset bottle cap structure library for querying to obtain the target bottle cap design structure. The second image is any one of the multiple images. The target bottle cap design structure is output as the bottle cap design information. The second image is detected by a detection algorithm to obtain the thread matching degree and interference. The interference is the difference between a first value and a second value of the target medicine bottle. The first value is the inner diameter value corresponding to the cap of the target medicine bottle, and the second value is the outer diameter value corresponding to the body of the target medicine bottle. The thread fit and the interference are output as the fit information.
5. The method according to claim 4, characterized in that, The step of inputting the medicine bottle information into a preset database for matching to obtain a first opening force value specifically includes: Determine the preset matching degree and preset interference range based on the target bottle cap design structure; Determine whether the thread fit degree is greater than or equal to the preset fit degree, and determine whether the interference amount is within the preset interference range; When the thread matching degree is greater than or equal to the preset matching degree, and the interference is within the preset interference range, the target medicine bottle is determined to be in a qualified state. The qualified state means that the fit between the cap and the body of the target medicine bottle is in a normal state. Based on the qualified status, the target bottle cap design structure is input into the preset database for matching to obtain the first opening force value.
6. The method according to claim 5, characterized in that, After determining whether the thread fit degree is greater than or equal to the preset fit degree and whether the interference amount is within the preset interference range, the method further includes: When the thread matching degree is less than the preset matching degree and the interference is not within the preset interference range, the target medicine bottle is determined to be in a non-conforming state. The non-conforming state is that the fit between the cap and the body of the target medicine bottle is abnormal. Determine the target bottle cap design structure corresponding to the first opening force value; The first opening force value is adjusted according to the non-compliance status to obtain the second opening force value; The second opening force value is sent to the robotic arm.
7. The method according to claim 2, characterized in that, After determining that the robotic arm has reached the second position, and controlling the robotic arm to open the target medicine bottle according to the first opening force value, the method further includes: Obtain the facial image of the second user, who is currently located in a preset area, which is the area where the robotic arm outputs the target medicine bottle; The similarity between the face image and a preset face image is calculated to obtain the target similarity, wherein the preset face image is the face image corresponding to the first user; When the target similarity is less than the preset similarity, it is determined that the second user does not have permission to take the target medicine bottle, and a pause command is output to the robotic arm so that the robotic arm can stop outputting the target medicine bottle after it has been opened.
8. A processing device for opening medicine caps, characterized in that, The device includes a receiving unit (201), a processing unit (202), and an output unit (203). The receiving unit (201) receives a request to open a medicine cap sent by the first user, analyzes the request to open the medicine cap, and obtains the name of the medicine. The processing unit (202) determines the target medicine bottle according to the name of the medicine; Acquire a target video and extract multiple images from the target video, wherein the target video is obtained by taking a picture of the target medicine bottle using an image acquisition device; Multiple images are identified to obtain medicine bottle information, which includes cap design information and fit information, wherein the fit information is the fit between the cap and the body of the target medicine bottle. The information of the medicine bottle is entered into a preset database for matching to obtain a first opening force value; a first image is obtained by taking a picture of the target medicine bottle; The first image is identified to obtain a first position, which is the position corresponding to the target medicine bottle; a target height is obtained, which is the height corresponding to the target medicine bottle; the first position is adjusted according to the target height to obtain a second position, which is the position corresponding to the bottle cap of the target medicine bottle; the second position and the first cap-opening force value are sent to the robotic arm so that the robotic arm can move. The output unit (203) determines that after the robotic arm reaches the second position, it controls the robotic arm to open the target medicine bottle according to the first opening force value, and outputs the opened target medicine bottle.
9. An electronic device, characterized in that, The device includes a processor (301), a memory (302), a user interface (303), and a network interface (304). The memory (302) is used to store instructions. The user interface (303) and the network interface (304) are used to communicate with other devices. The processor (301) is used to execute the instructions stored in the memory (302) to cause the electronic device (300) to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.