Method and device for taking medicine from medicine storage box, electronic equipment and storage medium
Through the robot, the grabbing path is optimized based on the medication information, and the efficiency of quickly grabbing multiple drugs in the drug storage box is solved, achieving efficient drug grabbing.
Patent Information
- Application Number
- CN202510041778.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-18
AI Technical Summary
When quickly grabbing a variety of drugs in the storage kit, the prior art is difficult to achieve efficiently.
Align the storage position in the medicine storage box through the grab handle in the robot, optimize the grab path and order according to the received medication collection information, and grab as many medicines as possible.
It improves the efficiency of grabbing drugs from the storage box and can quickly and accurately capture a variety of drugs.
Smart Images

Figure CN119840989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medicine storage, and in particular to a method, a device, an electronic device and a storage medium for taking medicine from a medicine storage box. Background Art
[0002] In the pharmacy of the hospital, there is usually a medicine cabinet, in which medicines are generally stored in medicine boxes, such as Figure 1 As shown, the medicine storage box is usually divided into M rows and N columns of storage positions, and each storage position can store a medicine; Figure 2 As shown, the manipulator is provided with Num grippers 11 arranged in a row, each gripper 11 can grasp a medicine, and the Num grippers 11 of the manipulator can simultaneously aim at Num storage locations in the same row, and can grab a medicine from each of the aimed storage locations (if there are medicines stored in the storage locations).
[0003] In practice, a medicine storage box may contain multiple medicines, that is, different storage locations may store different medicines. When multiple medicines need to be grabbed from a medicine storage box (the quantity of each medicine is fixed), how to quickly grab the medicines from the medicine storage box becomes an urgent problem to be solved. Summary of the invention
[0004] In view of this, the main purpose of the present invention is to provide a method, device, electronic device and storage medium for taking medicine from a medicine storage box.
[0005] To achieve the above object, the technical solution of the present invention is implemented as follows: 1. A method for a manipulator to pick up medicines from a medicine storage box. The medicine storage box is divided into storage positions arranged in M rows and N columns. Each storage position can hold one medicine. In the direction from one end of the M rows to the other end, the row numbers of the M rows are sequentially numbered from 1 to M; in the direction from one end of the N columns to the other end, the column numbers of the N columns are sequentially numbered from 1 to N. There are Num grippers arranged in a row in the manipulator, and each gripper can grasp one medicine. In the same row, the distance between adjacent storage positions in the columns is equal to the distance between adjacent grippers. Multiple types of medicines can be stored in the medicine storage box. Among them, M, N, and Num are all natural numbers, and Num < M, Num < N. The method includes the following steps: Receive medicine picking information, where the medicine picking information includes several types of pre-picked medicines and the corresponding pre-picked quantities for each type of pre-picked medicine. Set the row start value = 1 and the column start value = 0. Continuously execute the following operation steps until the row start value > M or there is no medicine stored in the rows with row numbers ≥ the row start value. The operation steps include: Select the target row with the smallest row number and row number ≥ the row start value from the medicine storage box. There is at least one candidate storage position in the target row where medicine is stored and the column number of each candidate storage position > the column start value. Obtain the target storage position with the smallest column number and where medicine is stored from all candidate storage positions. The row number of the target row is L1, and the column number of the target storage position is C1. When N - C1 + 1 ≥ Num, Len = Num; otherwise, Len = N - C1 + 1. Then, set the boolean value Flag = true and continuously execute the grasping operation until Flag = false. This operation step is completed. The grasping operation includes: When Len = 0, increase the column start value by one. When the column start value ≥ N, set the column start value = 0, increase the row start value by one, stop executing this grasping operation, and set Flag = false. Then, obtain the multiple medicine types type included in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row and the corresponding storage quantity for each medicine type type. Then, when each medicine type type is a pre-picked medicine type and the corresponding storage quantity is ≤ the pre-picked quantity corresponding to the medicine type type, control the manipulator to pick up the medicines in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row, subtract the corresponding storage quantity from the pre-picked quantity corresponding to each medicine type type, set the column start value to C1 + Len - 1, stop executing this grasping operation, and set Flag = false. Then, subtract one from the value of Len, and this grasping operation is completed.
[0006] As an improvement of an embodiment of the present invention, the receiving of the medicine picking information specifically includes: receiving the medicine picking information from the HIS system.
[0007] As an improvement of an embodiment of the present invention, controlling the gripper to grab the medicines in Len storage locations with column numbers C1 to C1+Len-1 in the target row specifically includes: controlling Len grippers in the robot to align with Len storage locations with column numbers C1 to C1+Len-1 in the target row and grab the medicines.
[0008] As an improvement of the embodiment of the present invention, the medicine is an injection.
[0009] An embodiment of the present invention also provides a device for a manipulator to pick up drugs from a medicine storage box. The medicine storage box is divided into storage positions arranged in M rows and N columns. Each storage position can hold one drug. In the direction from one end of the M rows to the other end, the row numbers of the M rows are sequentially numbered from 1 to M; in the direction from one end of the N columns to the other end, the column numbers of the N columns are sequentially numbered from 1 to N. There are Num grippers arranged in a row in the manipulator, and each gripper can grasp one drug. In the same row, the distance between adjacent storage positions in the columns is equal to the distance between adjacent grippers. Multiple types of drugs can be stored in the medicine storage box. Herein, M, N, and Num are all natural numbers, and Num < M, Num < N. The device includes the following modules: an information receiving module, configured to receive drug picking information, where the drug picking information includes several types of drugs to be pre-picked and the corresponding pre-picked quantities for each type of drug to be pre-picked; set the row start value = 1 and the column start value = 0; a processing module, configured to continuously execute the following operation steps until the row start value > M or there is no drug stored in the rows where the row number ≥ the row start value. The operation steps include: select a target row in the medicine storage box with the smallest row number and the row number ≥ the row start value, where there is at least one candidate storage position in the target row storing a drug and the column number of each candidate storage position > the column start value; obtain the target storage position with the smallest column number among all candidate storage positions storing a drug. The row number of the target row is L1, and the column number of the target storage position is C1; when N - C1 + 1 ≥ Num, Len = Num, otherwise, Len = N - C1 + 1; then, set the boolean value Flag = true and continuously execute the grasping operation until Flag = false; this operation step is completed. The grasping operation includes: when Len = 0, increase the column start value by one; when the column start value ≥ N, set the column start value = 0, increase the row start value by one, stop executing this grasping operation, and set Flag = false; then, obtain the multiple drug types type included in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row and the corresponding storage quantity for each drug type type; then, when each drug type type is a type of drug to be pre-picked and the corresponding storage quantity is ≤ the corresponding pre-picked quantity for the drug type type, control the manipulator to grasp the drugs in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row, subtract the corresponding storage quantity from the corresponding pre-picked quantity for each drug type type, set the column start value to C1 + Len - 1, stop executing this grasping operation, and set Flag = false; then, subtract one from the value of Len, and this grasping operation is completed.
[0010] As an improvement of an embodiment of the present invention, the information receiving module is further configured to: receive drug picking information from the HIS system.
[0011] As an improvement of the embodiment of the present invention, the processing module is further used to: control Len grippers in the robot to align with Len storage locations with column numbers C1 to C1+Len-1 in the target row and grab the medicines.
[0012] As an improvement of the embodiment of the present invention, the medicine is an injection.
[0013] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the above-mentioned method for a robot to take medicine from a medicine storage box are implemented.
[0014] An embodiment of the present invention further provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned method for a robot to take medicine from a medicine storage box are implemented.
[0015] The method, device, electronic device and storage medium for taking medicine from a medicine storage box provided by the embodiment of the present invention have the following advantages: The embodiment of the present invention discloses a method, device, electronic device and storage medium for taking medicine from a medicine storage box, the method comprising: receiving medicine taking information, the medicine taking information comprising a plurality of pre-taken medicine types and the pre-taken quantity corresponding to each pre-taken medicine type; in each grabbing process, as many medicines as possible are grabbed. The method can greatly improve the efficiency of grabbing medicines. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A structural diagram of a medicine storage box provided by an embodiment of the present invention; Figure 2 A structural diagram of a manipulator provided by an embodiment of the present invention; Figure 3 A schematic flow chart of a method for taking medicine from a medicine storage box provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be described in detail below in conjunction with the embodiments shown in the accompanying drawings. However, the embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on the embodiments are all within the protection scope of the present invention.
[0018] The following description and accompanying drawings fully illustrate the specific embodiments of this article so that those skilled in the art can practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments of this article includes the entire scope of the claims, as well as all available equivalents of the claims. Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also include elements inherent to such structure, device or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements. Each embodiment is described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can be referred to each other.
[0019] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0020] Embodiment 1 of the present invention provides a method for a manipulator to take medicine from a medicine storage box, wherein the medicine storage box is divided into storage locations of M rows and N columns, wherein one medicine can be stored in the storage location, and the M rows are numbered from 1 to M in a direction from one end of the M rows to the other end; and the N columns are numbered from 1 to N in a direction from one end of the N columns to the other end; the manipulator is provided with Num grippers 11 arranged in a row, wherein the grippers 11 can grasp one medicine, and in the same row, the distance between storage locations of adjacent columns is equal to the distance between adjacent grippers 11; the medicine storage box can store a plurality of medicines; wherein M, N and Num are all natural numbers, and Num <M,Num<N; exist Figure 1 In the diagram, each small square is a storage location, and a medicine can be stored in a storage location, which can be a boxed medicine or an injection. Figure 2 As shown, the manipulator is provided with a driving device 12 and a gripper 11, and the driving device 12 can drive each gripper 11 to grab a medicine, and can also control each gripper to put down a medicine. Figure 1 As shown, in the same row, the distance between the storage locations of adjacent columns is D2 (that is, the distance between the center points of the storage locations of adjacent columns is D2). Figure 2 As shown, the distance between adjacent grippers 11 is D1 (i.e., the distance between the center lines of adjacent grippers 11 is D1), D1=D2, i.e., the Num grippers 11 of the manipulator can simultaneously align with the Num storage positions in the same row, and can grab a medicine from each aligned storage position (if a medicine is stored in the storage position). The medicine can be a boxed medicine, an injection, a plate medicine, or a solvent, etc., and the gripper 11 can be a clamping claw so as to grab an injection, etc., and the gripper 11 can be a suction nozzle so as to suck the boxed medicine, the plate medicine, or the solvent, etc.
[0021] like Figure 3 As shown, the following steps are included: Step 301: receiving drug fetching information, wherein the drug fetching information includes a number of pre-fetched drug types and a pre-fetched quantity corresponding to each pre-fetched drug type; setting a row start value = 1, and a column start value = 0; For the medicine storage box, some storage positions may contain medicines, while some storage positions may not contain medicines. There may be medicines stored in a storage position, but one or more subsequent storage positions (i.e., in the same row and with a column number greater than that of the storage position) may not contain medicines.
[0022] Here, the medicine taking information includes several pre-taken medicine types and the pre-taken quantity corresponding to each pre-taken medicine type. It can be understood that some medicines corresponding to some pre-taken medicine types are not in the medicine storage box, and some medicines corresponding to some pre-taken medicine types are in the medicine storage box but the quantity is insufficient (i.e., less than the pre-taken quantity). In addition, some medicines in the medicine storage box do not correspond to any pre-taken medicine type.
[0023] Step 302: Continue to perform the following steps until there is no medicine stored in the row with a row starting value > M or a row number ≥ the row starting value, the operation steps include: selecting a target row with the smallest row number and a row number ≥ the row starting value from the medicine storage box, wherein there is at least one storage position to be selected in the target row storing medicines and the column number of each storage position to be selected> the column starting value; obtaining a target storage position with the smallest column number storing medicines from all storage positions to be selected, the row number of the target row is L1, and the column number of the target storage position is C1; when N-C1+1≥Num, Len=Num, otherwise, Len=N-C1+1; thereafter, setting the Boolean value Flag=true, and continuously performing the grabbing operation until Flag=false; this operation step is completed; the grabbing operation includes: when Len=0, increasing the column starting value by one; when the column starting value ≥N, the column starting value =0, and the row start value is increased by one, and the grabbing operation stops, and Flag=false; then, obtain the multiple drug types type contained in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row and the storage quantity corresponding to each drug type type; then, when each drug type type is a pre-taken drug type and the corresponding storage quantity is ≤ the pre-taken quantity corresponding to the drug type type, control the manipulator to grab the drugs in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row, and subtract the corresponding storage quantity from the pre-taken quantity corresponding to each drug type type, and set the column start value to C1+Len-1, and the grabbing operation stops, and Flag=false; then, the value of Len is subtracted by one, and the grabbing operation is completed.
[0024] Here, the types corresponding to some drugs in the drug storage box may not be any pre-taken drug types, so these drugs can be filtered out by the row start value and the column start value. For example, the drugs stored in the storage position with row number 1 and column number 2 are not any pre-taken drug types, so the start value can be set to 1 and the column start value can be set to 2 to filter out the storage position. Since the initial value of the row start value is 1 and the initial value of the column start value is 0, it is assumed that the drugs stored in all storage positions are of the same pre-taken drug type.
[0025] After executing the operation steps multiple times, if there is no medicine stored in the row where the row start value > M or the row number ≥ the row start value, there is no need to grab the medicine from the medicine storage box, and there is no need to execute the subsequent operation steps.
[0026] When you perform an action step, the following steps occur: The step "selecting a target row with the smallest row number and a row number ≥ a row starting value from the medicine storage box, wherein there is at least one storage location in the target row storing medicines and the column number of each storage location is greater than the column starting value", if medicines are stored in some storage locations with a row number ≤ a row starting value and a column number ≤ a column starting value, but the medicines are not of any pre-taken medicine type, they can be filtered out.
[0027] The step "obtaining the target storage location with the smallest column number and storing drugs from all the storage locations to be selected, wherein the row number of the target row is L1 and the column number of the target storage location is C1" selects the target storage location, and drugs are stored in the target storage location. It can be understood that the drugs in the target storage location may not be a pre-taken drug type, and may not be a pre-taken drug type.
[0028] In the step "When N-C1+1≥Num, Len=Num, otherwise, Len=N-C1+1", in the same row, if the number of subsequent storage locations of the target storage location is less than Num, at most N-C1+1 drugs can be grabbed, otherwise at most Num can be grabbed, and a grabbing operation will be performed later. The grabbing operation will try to grab the drugs. The first time, try to grab Len. If successful, there is no need to perform subsequent grabbing operations. Otherwise, the value of Len is subtracted by one. The second time, try to grab Len. If successful, there is no need to perform subsequent grabbing operations, ..., until Len=0, and all attempts to grab fail.
[0029] The step "When Len=0, increase the column starting value by one; when the column starting value ≥N, the column starting value = 0, and the row starting value is increased by one, the current grabbing operation is stopped and no subsequent grabbing operations are performed" means that when performing a grabbing operation, if Len=0 and all attempts to grab fail, the column starting value is increased by one, that is, the drug stored in the target storage location is not of any pre-taken drug type, or the drug is of one pre-taken drug type, but the quantity of the pre-taken drug type is sufficient.
[0030] Step "obtain multiple drug types type contained in Len storage locations with column numbers C1 to C1+Len-1 in the target row and the storage quantity corresponding to each drug type type, each drug type type is a pre-taken drug type and the corresponding storage quantity is ≤ the pre-taken quantity corresponding to the drug type type, control the gripper 11 to grab the drugs in Len storage locations with column numbers C1 to C1+Len-1 in the target row, and subtract the corresponding storage quantity from the pre-taken quantity corresponding to each drug type type", if then perform one grab; After that, set the column start value to C1 + Len - 1, and this grasping operation stops executing and no subsequent grasping operations are performed. Since the drugs in the Len storage positions with column numbers from C1 to C1 + Len - 1 have all been grabbed, the column start value is set to C1 + Len - 1, and the grasping is successful. Therefore, this grasping operation stops executing and no subsequent grasping operations are performed; Step "Subtract one from the value of Len". When the grasping is unsuccessful, subtract one from the value of Len and perform the second operation next time.
[0031] In this embodiment, the receiving of the medicine-taking information specifically includes: receiving the medicine-taking information from the HIS (Hospital Information System) system.
[0032] In this embodiment, the controlling the gripper 11 to grab the drugs in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row specifically includes: controlling the Len grippers 11 in the manipulator to align with the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row and grab the drugs.
[0033] In this embodiment, the drug is an injection.
[0034] Embodiment 2 of the present invention provides a device for a manipulator to take medicine from a medicine storage box. The medicine storage box is divided into storage positions of M rows and N columns. Each storage position can store one drug. In the direction from one end to the other end of the M rows, the numbers of the M rows are sequentially 1 to M; in the direction from one end to the other end of the N columns, the numbers of the N columns are sequentially 1 to N; there are Num grippers 11 arranged in a row in the manipulator. The gripper 11 can hold one drug. In the same row, the distance between adjacent storage positions in the columns is equal to the distance between adjacent grippers 11; various drugs can be stored in the medicine storage box; where M, N, and Num are all natural numbers, and Num < M, Num < N; it includes the following modules: An information receiving module, configured to receive medicine-taking information, where the medicine-taking information includes several types of pre-taken drugs and the corresponding pre-taken quantities for each type of pre-taken drug; set the row start value = 1 and the column start value = 0; A processing module is used to continuously perform the following steps until there is no medicine stored in the row with a row starting value>M or a row number≥the row starting value, the operation steps including: selecting a target row with the smallest row number and a row number≥the row starting value from the medicine storage box, wherein there is at least one storage position to be selected in the target row storing medicines and the column number of each storage position to be selected>the column starting value; obtaining a target storage position storing medicines and with the smallest column number from all storage positions to be selected, the row number of the target row is L1, and the column number of the target storage position is C1; when N-C1+1≥Num, Len=Num, otherwise, Len=N-C1+1; thereafter, setting a Boolean value Flag=true, and continuously performing a grabbing operation until Flag=false; this operation step is completed; the grabbing operation includes: when Len=0, increasing the column starting value by one; when the column starting value≥N, the column starting value= 0, and the row start value is increased by one, and the grabbing operation stops, and Flag=false; then, obtain the multiple drug types type contained in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row and the storage quantity corresponding to each drug type type; then, when each drug type type is a pre-taken drug type and the corresponding storage quantity is ≤ the pre-taken quantity corresponding to the drug type type, control the manipulator to grab the drugs in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row, and subtract the corresponding storage quantity from the pre-taken quantity corresponding to each drug type type, and set the column start value to C1+Len-1, and the grabbing operation stops, and Flag=false; then, the value of Len is subtracted by one, and the grabbing operation is completed.
[0035] In this embodiment, the information receiving module is also used to receive medication collection information from the HIS system.
[0036] In this embodiment, the processing module is further used to: control Len grippers 11 in the robot to align with Len storage locations with column numbers C1 to C1+Len-1 in the target row, and grab the medicines.
[0037] In this embodiment, the medicine is an injection.
[0038] Embodiment 3 of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for a robot to take medicine from a medicine storage box in embodiment 1 are implemented.
[0039] Embodiment 4 of the present invention provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for a robot to take medicine from a medicine storage box according to the first embodiment are implemented.
[0040] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.
[0041] The present invention may be a system, a method and / or a computer program product. The computer program product may include a readable storage medium carrying computer readable program instructions for causing a processor to implement various aspects of the present invention.
[0042] The readable storage medium can be a tangible device that holds and stores instructions used by the instruction execution device. The readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.
[0043] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for a manipulator to take medicine from a medicine storage box, wherein the medicine storage box is divided into M rows and N columns of storage locations, wherein one medicine can be stored in the storage location, and the M rows are numbered from 1 to M in a direction from one end of the M rows to the other end; and the N columns are numbered from 1 to N in a direction from one end of the N columns to the other end; the manipulator is provided with Num grippers (11) arranged in a row, wherein the grippers (11) can grasp one medicine, and in the same row, the distance between storage locations in adjacent columns is equal to the distance between adjacent grippers (11); the medicine storage box can store a plurality of medicines; wherein, M, N, and Num are all natural numbers, and Num < M, Num < N; it is characterized by including the following steps: Receive the medicine collection information, where the medicine collection information includes several types of pre-collected medicines and the corresponding pre-collected quantity for each type of pre-collected medicine; set the starting row value = 1 and the starting column value = 0; Continuously execute the following operation steps until the starting row value > M or there is no medicine stored in the rows with row numbers ≥ the starting row value. The operation steps include: Select the target row with the smallest row number and row number ≥ the starting row value from the medicine storage box, where there is at least one candidate storage position in the target row storing medicine and the column number of each candidate storage position > the starting column value; Obtain the target storage position with the smallest column number and storing medicine from all candidate storage positions. The row number of the target row is L1, and the column number of the target storage position is C1; When N - C1 + 1 ≥ Num, Len = Num, otherwise, Len = N - C1 + 1; Then, set the boolean value Flag = true and continuously execute the grasping operation until Flag = false; This operation step is completed; The grasping operation includes: When Len = 0, increase the starting column value by one; When the starting column value ≥ N, the starting column value = 0, and increase the starting row value by one, and this grasping operation stops executing, and Flag = false; Then, obtain the multiple medicine types type included in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row and the corresponding storage quantity for each medicine type type; Then, when each medicine type type is a pre-collected medicine type and the corresponding storage quantity is ≤ the pre-collected quantity corresponding to the medicine type type, control the manipulator to grasp the medicines in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row, subtract the corresponding storage quantity from the pre-collected quantity corresponding to each medicine type type, set the starting column value to C1 + Len - 1, and this grasping operation stops executing, and Flag = false; Then, subtract one from the value of Len, and this grasping operation is completed.
2. The method for a robot to take medicine from a medicine storage box according to claim 1, characterized in that: The specific process of receiving the medicine collection information includes: Receive the medicine collection information from the HIS system.
3. The method for a robot to take medicine from a medicine storage box according to claim 1, characterized in that: The specific process of controlling the manipulator to grasp the medicines in the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row includes: Control the Len grippers (11) in the manipulator to align with the Len storage positions with column numbers from C1 to C1 + Len - 1 in the target row and grasp the medicines.
4. The method for a manipulator to collect medicine from a medicine storage box according to claim 1, characterized in that The medicine is an injection.
5. A device for a manipulator to take medicine from a medicine storage box, the medicine storage box being divided into M rows and N columns of storage locations, each of which can store one medicine, and from one end of the M rows to the other end, the M rows are numbered from 1 to M in sequence; from one end of the N columns to the other end, the N columns are numbered from 1 to N in sequence; the manipulator is provided with Num grippers (11) arranged in a row, each gripper (11) can grasp one medicine, and in the same row, the distance between storage locations in adjacent columns is equal to the distance between adjacent grippers (11); the medicine storage box can store multiple medicines; wherein, M, N, and Num are all natural numbers, and Num < M, Num < N; it is characterized by including the following modules: An information receiving module for receiving the medicine collection information, where the medicine collection information includes several types of pre-collected medicines and the corresponding pre-collected quantity for each type of pre-collected medicine; set the starting row value = 1 and the starting column value = 0; A processing module is used to continuously perform the following steps until there is no medicine stored in the row with a row starting value>M or a row number≥the row starting value, the operation steps including: selecting a target row with the smallest row number and a row number≥the row starting value from the medicine storage box, wherein there is at least one storage position to be selected in the target row storing medicines and the column number of each storage position to be selected>the column starting value; obtaining a target storage position storing medicines and with the smallest column number from all storage positions to be selected, the row number of the target row is L1, and the column number of the target storage position is C1; when N-C1+1≥Num, Len=Num, otherwise, Len=N-C1+1; thereafter, setting a Boolean value Flag=true, and continuously performing a grabbing operation until Flag=false; this operation step is completed; the grabbing operation includes: when Len=0, increasing the column starting value by one; when the column starting value≥N, the column starting value= 0, and the row start value is increased by one, and the grabbing operation stops, and Flag=false; then, obtain the multiple drug types type contained in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row and the storage quantity corresponding to each drug type type; then, when each drug type type is a pre-taken drug type and the corresponding storage quantity is ≤ the pre-taken quantity corresponding to the drug type type, control the manipulator to grab the drugs in the Len storage positions with column numbers from C1 to C1+Len-1 in the target row, and subtract the corresponding storage quantity from the pre-taken quantity corresponding to each drug type type, and set the column start value to C1+Len-1, and the grabbing operation stops, and Flag=false; then, the value of Len is subtracted by one, and the grabbing operation is completed.
6. The device for a robot to take medicine from a medicine storage box according to claim 5, characterized in that: The information receiving module is further used for: Receive medication collection information from the HIS system.
7. The device for a robot to take medicine from a medicine storage box according to claim 5, characterized in that: The processing module is also used for: The L number of grippers (11) in the robot is controlled to align with the L number of storage locations in the target row with column numbers C1 to C1+Len-1, and to grab the medicines.
8. The device for a robot to take medicine from a medicine storage box according to claim 5, characterized in that: The medicine is an injection.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for a robot to take medicine from a medicine storage box as described in any one of claims 1 to 4 are implemented.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the method for a robot to take medicine from a medicine storage box according to any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Box-packed medicine dispensing method and device, electronic equipment and storage medium
CN120646435A
Cartridge drug dispensing method, device, electronic device, and storage medium
CN120646435B