A medicine management method and system for an automatic dispensing machine

By scanning the medicine boxes of the automatic dispensing machine with a motor, the location of the medicine boxes and the bound drug ID are confirmed, which solves the problem of low accuracy in drug management and improves the operational accuracy of the automatic dispensing machine and the efficiency of drug management.

CN117799991BActive Publication Date: 2026-07-31SHENZHEN LACHESIS MOBILE MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN LACHESIS MOBILE MEDICAL TECH CO LTD
Filing Date
2023-12-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The existing automated dispensing machines have low accuracy in drug management, leading to errors in drug information recording, affecting medical efficiency and potentially causing drug shortages.

Method used

By scanning the medicine boxes of the automatic dispensing machine with a motor, the machine confirms the location coordinates of each medicine box and binds the medicine box ID, identifies the type and quantity of medicine, and generates accurate medicine information.

Benefits of technology

It enables accurate counting of drug quantity and location, improves the operational accuracy of automatic dispensing machines, and avoids problems such as errors and lack of drug information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117799991B_ABST
    Figure CN117799991B_ABST
Patent Text Reader

Abstract

This invention discloses a drug management method and system for an automated dispensing machine. The method includes: moving a motor in each layer of the automated dispensing machine with a preset number of offset steps in two preset scanning directions to obtain the first motor pulse quantity and the second motor pulse quantity corresponding to each medicine box, and generating the position coordinates of each medicine box; switching the flashing frequency of the LED light of each medicine box in each layer, moving the motor and collecting the flashing frequency of the LED light of each medicine box to determine the medicine box ID corresponding to the position coordinates of each medicine box; identifying the drug and drug type through an industrial camera, binding each drug to the medicine box it belongs to, and calculating the quantity of each drug type and the position coordinates of each drug to achieve drug management of the automated dispensing machine. This invention can accurately and automatically count and record the quantity of drugs and identify the position of drugs, obtaining accurate drug information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automated management, and specifically relates to a drug management method and system for an automated dispensing machine. Background Technology

[0002] Currently, the location and quantity of medications in automated dispensing machines are still managed manually. However, with the continuous improvement of medical standards, a large amount of medication information needs to be effectively integrated. Furthermore, due to the tedious and stressful manual work, operators are prone to recording incorrect medication information, leading to the automated dispensing machine dispensing the wrong medication, reducing its accuracy, and impacting medical efficiency. In addition, incorrect medication information may result in the inability to replenish certain medications in a timely manner when they are unavailable, causing inconvenience to patients.

[0003] Because existing automated dispensing machines have low accuracy in managing drug information, a new method and system for managing drugs using automated dispensing machines is needed to solve these problems. Summary of the Invention

[0004] This invention proposes a drug management method and system for an automatic dispensing machine, which can accurately and automatically count and record the quantity of drugs and identify the location of drugs, thereby obtaining accurate drug information.

[0005] A first aspect of the present invention provides a method for managing medicines using an automatic dispensing machine, the method comprising:

[0006] The first motor moves laterally in each layer of the automatic dispensing machine with a preset first scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the pulse quantity corresponding to each medicine box is recorded as the pulse quantity of the first motor, and the number of medicine boxes in each layer is recorded as the total number of the first medicine boxes, and the pulse quantity of the second motor in each layer is recorded as the pulse quantity of the second motor. The first motor moves laterally in each layer of the automatic dispensing machine with a preset second scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the number of medicine boxes in each layer is recorded as the total number of the second medicine boxes. The automatic dispensing machine includes a first motor and a second motor. The first motor is used to move the industrial camera laterally for scanning, and the second motor is used to move the industrial camera vertically to switch the layers of the automatic dispensing machine.

[0007] The position coordinates of each medicine box are generated based on the pulse quantities of the first and second motors.

[0008] Switch the flashing frequency of the LED light of each medicine box on each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of the LED light of each medicine box to determine the medicine box ID corresponding to the position coordinates of each medicine box;

[0009] Based on the position coordinates of the medicine box, the first motor moves laterally on each layer of the automatic medicine dispensing machine. The industrial camera of the first motor identifies the medicine and the type of medicine, binds each medicine to the medicine box it belongs to, and calculates the quantity of each type of medicine and the position coordinates of each medicine.

[0010] The automatic dispensing machine manages the medications based on the quantity of each type of medication and the location coordinates of each medication.

[0011] The above scheme first uses a motor to scan the medicine boxes of the automatic dispensing machine to confirm the position coordinates of each medicine box, and binds the position coordinates of each medicine box with the corresponding medicine box ID to provide data support for identifying the location of the medicine. Then, it scans the medicines with a motor to confirm the type and quantity of each medicine, and binds each medicine with its location coordinates. This confirms the position coordinates of each medicine and counts the quantity of medicines. It can accurately and automatically count and record the quantity of medicines and identify the location of medicines, thus obtaining accurate medicine information.

[0012] In one possible implementation of the first aspect, before moving the first motor laterally in a preset first scanning direction, the first motor and the second motor are set with medicine box scanning parameters and a preset number of offset steps, and the first motor and the second motor are moved to a preset initial position, and then each medicine box LED is set to a preset state.

[0013] The above solution pre-sets the motor parameters before scanning the medicine box, ensuring that the motor scans according to preset conditions and guaranteeing scanning accuracy. In one possible implementation of the first aspect, the position coordinates of each medicine box are generated based on the pulse quantities of the first and second motors, specifically as follows:

[0014] When the total number of the first medicine box and the total number of the second medicine box on the same layer of the automatic medicine dispensing machine are the same, it is confirmed that the pulse quantity of the first motor and the pulse quantity of the second motor on that layer are valid.

[0015] When the pulse quantity of the first motor and the pulse quantity of the second motor on the same layer of the automatic dispensing machine are valid, the position coordinates of each medicine box are generated with the pulse quantity of the first motor corresponding to each medicine box in that layer as the horizontal axis and the pulse quantity of the second motor as the vertical axis.

[0016] The above method compares the data from two different scans and determines that the data from the two scans are consistent, thus proving that the pulse quantities of the first and second motors are valid. This allows the generation of the position coordinates of the medicine box, ensuring the accuracy of the scanned data.

[0017] In one possible implementation of the first aspect, the flashing frequency of the LED light of each medicine box on each layer is switched. The first and second motors are moved according to the position coordinates of each medicine box, and the flashing frequency of the LED light of each medicine box is collected to determine the medicine box ID corresponding to the position coordinates of each medicine box. Specifically:

[0018] Based on the preset medicine box ID information, the flashing frequency of each medicine box LED light in each layer is set; wherein, each medicine box LED light in each layer has a different flashing frequency;

[0019] The first and second motors are moved according to the position coordinates of each medicine box, and the blinking frequency of the LED light of each medicine box is identified by the industrial camera of the first motor.

[0020] Based on the flashing frequency of the LED lights in each medicine box, determine the medicine box ID corresponding to the position coordinates of each medicine box, and then bind the position coordinates and medicine box ID of each medicine box.

[0021] The above solution sets the LED lights of each medicine box on each layer of the automatic dispensing machine to different flashing frequencies, so that the motor can distinguish the corresponding position coordinates when recognizing each medicine box LED light, and binds the position coordinates of each medicine box with the medicine box ID to achieve consistency of medicine box position data.

[0022] In one possible implementation of the first aspect, before the industrial camera of the first motor identifies the drug and drug type, drug type parameters and drug template information are set for the first motor, and the first motor is moved to a preset initial position; wherein the drug type parameters and drug template information are used by the industrial camera to identify the drug type.

[0023] The above solution enables the motor to identify the type of drug during scanning by pre-setting drug type parameters and drug template information, thus providing data support for recording the quantity of drugs.

[0024] A second aspect of the present invention provides a drug management system for an automatic dispensing machine, the system comprising: a medicine box scanning module, a medicine box coordinate determination module, a medicine box position determination module, a drug scanning module, and a drug management module;

[0025] The medicine box scanning module is used to laterally move the first motor in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset first scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the pulse quantity corresponding to each medicine box as the pulse quantity of the first motor, and records the number of medicine boxes in each layer as the total number of the first medicine boxes, and the pulse quantity of the second motor in each layer as the pulse quantity of the second motor. The module also moves the first motor laterally in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset second scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the number of medicine boxes in each layer as the total number of the second medicine boxes. The automatic medicine dispensing machine includes a first motor and a second motor. The first motor is used to move the industrial camera laterally for scanning, and the second motor is used to move the industrial camera vertically to switch the layers of the automatic medicine dispensing machine.

[0026] The medicine box coordinate determination module is used to generate the position coordinates of each medicine box based on the pulse quantity of the first motor and the pulse quantity of the second motor.

[0027] The medicine box position determination module is used to switch the flashing frequency of each medicine box LED light in each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of each medicine box LED light to determine the medicine box ID corresponding to the position coordinates of each medicine box.

[0028] The drug scanning module is used to move the first motor laterally on each layer of the automatic dispensing machine according to the position coordinates of the medicine box, identify the drugs and drug types through the industrial camera of the first motor, bind each drug to the medicine box it belongs to, and calculate the quantity of each drug type and the position coordinates of each drug.

[0029] The drug management module is used to manage the drugs in the automatic dispensing machine according to the quantity of each type of drug and the location coordinates of each drug.

[0030] In one possible implementation of the second aspect, the medicine box coordinate determination module includes: a position coordinate generation unit;

[0031] The position coordinate generation unit is used to confirm the validity of the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine when the total number of the first medicine boxes and the total number of the second medicine boxes in the same layer are the same; when the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine are valid, the unit generates the position coordinates of each medicine box with the first motor pulse quantity corresponding to each medicine box in the layer as the horizontal coordinate and the second motor pulse quantity as the vertical coordinate.

[0032] In one possible implementation of the second aspect, the medicine box location determination module includes: a medicine box information binding unit;

[0033] The medicine box information binding unit is used to set the flashing frequency of each medicine box LED light in each layer according to the preset medicine box ID information; wherein, each medicine box LED light in each layer has a different flashing frequency;

[0034] The first and second motors are moved according to the position coordinates of each medicine box, and the flashing frequency of the LED light of each medicine box is identified by the first motor. Based on the flashing frequency of the LED light of each medicine box, the medicine box ID corresponding to the position coordinates of each medicine box is determined, and the position coordinates and medicine box ID of each medicine box are bound together.

[0035] A third aspect of the present invention provides a terminal device, the device comprising: a terminal device including a processor and a memory, the memory storing a computer program, wherein the processor executes the computer program to implement the steps of the drug management method of an automatic dispensing machine according to any one of the embodiments of the present invention.

[0036] A fourth aspect of the present invention provides a storage medium storing computer-readable program code that, when executed, implements the steps of a drug management method for an automatic dispensing machine as described in any one embodiment of the present invention. Attached Figure Description

[0037] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figure 1 This is a schematic diagram of a specific process for a drug management method using an automatic dispensing machine, according to a certain embodiment of the present invention;

[0039] Figure 2 This is a schematic diagram of an automatic dispensing machine, which provides a method for managing medicines using an automatic dispensing machine according to a certain embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of the structure of drug scanning in a drug management method for an automatic dispensing machine according to a certain embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of the scanning results of a drug management method for an automatic dispensing machine provided in a certain embodiment of the present invention;

[0042] Figure 5 This is a structural diagram of a drug management system for an automatic dispensing machine provided in one embodiment of the present invention;

[0043] Figure 6This is a schematic diagram of the structure of a terminal device provided in a certain embodiment of the present invention. Detailed Implementation

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

[0045] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.

[0046] like Figure 1 As shown, Figure 1 This invention provides a schematic flowchart of a drug management method using an automated dispensing machine according to a specific embodiment. The drug management method of the automated dispensing machine in this embodiment includes steps S1 to S5, which are described in detail below:

[0047] Step S1: Move the first motor laterally in each layer of the automatic dispensing machine by a preset offset number of steps in a preset first scanning direction. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, record the pulse quantity corresponding to each medicine box as the pulse quantity of the first motor, and record the number of medicine boxes in each layer as the total number of first medicine boxes and the pulse quantity of the second motor in each layer as the pulse quantity of the second motor. Move the first motor laterally in each layer of the automatic dispensing machine by a preset second scanning direction by a preset offset number of steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, record the number of medicine boxes in each layer as the total number of second medicine boxes.

[0048] In this step, before controlling the motor to scan the medicine box of the automatic medicine dispenser, the upper and lower axes of the automatic medicine dispenser are calibrated, and the total number of steps of each axis is calculated by moving the upper and lower axes and the left and right axes.

[0049] Then, based on the total number of travel steps of each axis, the first motor is set with the following parameters: the pillbox scanning parameters, the preset offset steps, and the total number of layers on the upper and lower axes. In some embodiments, the pillbox scanning parameters include the pillbox scanning image rendering state, the pillbox scanning image horizontal offset, the pillbox scanning image scaling value, the pillbox scanning image vertical offset, the pillbox scanning image gain value, the pillbox scanning image width, the pillbox scanning image exposure value, the pillbox scanning image height, the pillbox scanning spot height threshold, and the pillbox scanning image rate.

[0050] After setting the parameters, move the first motor to the first layer of the automatic dispensing machine, record the current layer number, and then set the LED lights of each medicine box to always be on.

[0051] First, the first motor moves horizontally at high speed in the forward scanning direction. When the industrial camera of the first motor detects a medicine box LED light that is in a constantly lit state, the pulse quantity of the first motor at this time is recorded as the first motor pulse quantity. Then, the first motor moves again and detects the medicine box LED lights until all the medicine box LED lights in the first layer are scanned in the forward scanning direction. The number of medicine boxes in the first layer obtained by forward scanning is the total number of medicine boxes in the first layer.

[0052] Then, the industrial camera is moved again in the reverse scanning direction to identify the medicine box LEDs. When the medicine box LEDs are in a constantly lit state, the number of medicine boxes is recorded. This process continues until all the medicine box LEDs in the first layer have been scanned in the reverse scanning direction. The scanning of the first layer is then stopped, and the number of medicine boxes in the first layer obtained by the reverse scanning is the total number of medicine boxes in the second layer.

[0053] Finally, the pulse quantity corresponding to the second motor at each layer is recorded as the second pulse quantity.

[0054] The other layers of the automatic dispensing machine also scan all the LED lights in the medicine box according to the above-mentioned forward and reverse scanning directions to obtain the corresponding motor pulse quantity.

[0055] To better demonstrate the structure of the automatic medicine dispensing machine, Figure 2 This is a schematic diagram of an automatic dispensing machine for managing medicines, provided by an embodiment of the present invention. As shown in the figure, the lifting mechanism, which can control the first motor and the second motor, moves along the upper and lower shafts ( Figure 2 The Y-axis and left and right axes move on the automatic dispensing machine. During the movement, the industrial cameras of the first and second motors will scan the medicine box to complete the medicine box scanning.

[0056] Step S2: Generate the position coordinates of each medicine box based on the pulse quantity of the first motor and the pulse quantity of the second motor;

[0057] In this step, when the total number of the first medicine box and the total number of the second medicine box on the same layer of the automatic dispensing machine are the same, the first motor pulse quantity and the second motor pulse quantity of that layer are confirmed to be valid.

[0058] When the pulse quantity of the first motor and the pulse quantity of the second motor on the same layer of the automatic dispensing machine are valid, the position coordinates of each medicine box are generated with the pulse quantity of the first motor corresponding to each medicine box in that layer as the horizontal axis and the pulse quantity of the second motor as the vertical axis.

[0059] Step S3: Switch the flashing frequency of the LED light of each medicine box on each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of the LED light of each medicine box to determine the medicine box ID corresponding to the position coordinates of each medicine box;

[0060] In this step, after scanning all the medicine boxes on a certain layer of the automatic dispensing machine, the flashing frequency of the LED light of each medicine box is controlled according to the preset medicine box ID information. Then, the first motor and the second motor are moved according to the position coordinates of each medicine box and the flashing frequency of the LED light of each medicine box is identified. Based on the flashing frequency of the LED light of each medicine box, the medicine box ID corresponding to the position coordinates of each medicine box is determined, and the position coordinates of each medicine box and the medicine box ID are bound together.

[0061] In some embodiments, step S3 specifically includes:

[0062] The first layer of the automatic dispensing machine contains five medicine boxes with IDs 1, 2, 3, 4, and 5. The flashing frequency of the LED lights on the medicine boxes is controlled by their IDs. Specifically, the LED light of medicine box ID 1 flashes at 10Hz, the LED light of medicine box ID 2 flashes at 20Hz, the LED light of medicine box ID 3 flashes at 30Hz, the LED light of medicine box ID 4 flashes at 40Hz, and the LED light of medicine box ID 5 flashes at 50Hz. Then, an industrial camera is used to collect the flashing frequency of each medicine box. If the flashing frequency of the medicine box at position coordinates (3,1) is 30Hz, then the medicine box at (3,1) is recorded as medicine box ID 3.

[0063] Step S4: Based on the position coordinates of the medicine box, the first motor moves laterally on each layer of the automatic dispensing machine. The industrial camera of the first motor identifies the medicine and the type of medicine, binds each medicine to the medicine box it belongs to, and calculates the quantity of each type of medicine and the position coordinates of each medicine.

[0064] In this step, before scanning the medicine, the medicine type parameters and medicine template information are set for the motor, and then the medicine box is reset to its initial position. The medicine type parameters and medicine template information include: medicine template verification function status, camera preview width, horizontal offset of template image area, template image stabilization threshold, template verification timeout exception, template verification photo retention status, camera preview height, vertical offset of template image area, template image scaling, valid point threshold for template verification, video retention status for template verification, camera preview frame rate, template image area width, template verification feature threshold, template verification rendering status, camera exposure value, template image area height, algorithm iteration count, template verification GPU acceleration status, and template verification feature distance.

[0065] The length, thickness, and height of the medicine are then measured and the information is stored in a database. An industrial camera is then used to capture medicine template information, including the medicine's length, thickness, and height, medicine name, medicine code, manufacturer, and photos of both the front and back of the medicine. The thick side of the medicine faces the industrial camera, and only one medicine can be placed in each medicine box.

[0066] After recording all the drug template information, the system automatically resets all the upper and lower axes and left and right axes, moves the motor to the first column of the first layer of the automatic dispensing machine, and begins scanning the drugs.

[0067] The industrial camera first scans the drug template, identifies the drug type, binds the corresponding drug template information and the position coordinates of the medicine box, and stores them in the database. Then, it counts the drug type until all drugs have been scanned, obtaining the quantity of each drug type and the position coordinates of each drug.

[0068] To better demonstrate the drug scanning process, Figure 3 This is a schematic diagram of the structure of a drug scanning method in an automatic dispensing machine according to an embodiment of the present invention. As shown in the figure, after adding the drug, the distance to the drug pusher is measured by a laser rangefinder sensor, and then the quantity of the drug is calculated based on the known drug thickness; wherein, the drug drop detection sensor is used to fix the position of the drug pusher.

[0069] To better illustrate the results of the medicine box scanning, Figure 4 This is a schematic diagram of the scanning results of a drug management method for an automatic dispensing machine provided in an embodiment of the present invention. As shown in the figure, based on the medicine box layout information, the green area represents the location coordinates of the medicine, and -1 indicates that there is no medicine at that location.

[0070] Step S5: Manage the medicines in the automatic dispensing machine according to the quantity of each type of medicine and the location coordinates of each medicine.

[0071] Furthermore, in order to implement the drug management system of the automatic dispensing machine corresponding to the above method embodiments, and to achieve the corresponding functions and technical effects, Figure 5 A structural diagram of a drug management system for an automated dispensing machine is provided. For ease of explanation, only the parts relevant to this embodiment are shown. The drug management system for the automated dispensing machine provided in this embodiment of the invention includes:

[0072] The medicine box scanning module 201 is used to laterally move the first motor in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset first scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the pulse quantity corresponding to each medicine box as the pulse quantity of the first motor, and records the number of medicine boxes in each layer as the total number of the first medicine boxes, and the pulse quantity of the second motor in each layer as the pulse quantity of the second motor. The module also moves the first motor laterally in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset second scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the number of medicine boxes in each layer as the total number of the second medicine boxes. The automatic medicine dispensing machine includes a first motor and a second motor. The first motor is used to move the industrial camera laterally for scanning, and the second motor is used to move the industrial camera vertically to switch the layers of the automatic medicine dispensing machine.

[0073] The medicine box coordinate determination module 202 is used to generate the position coordinates of each medicine box based on the pulse quantity of the first motor and the pulse quantity of the second motor.

[0074] The medicine box position determination module 203 is used to switch the flashing frequency of each medicine box LED light in each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of each medicine box LED light to determine the medicine box ID corresponding to the position coordinates of each medicine box.

[0075] The drug scanning module 204 is used to move the first motor laterally on each layer of the automatic dispensing machine according to the position coordinates of the medicine box, identify the drugs and drug types through the industrial camera of the first motor, bind each drug to the medicine box it belongs to, and calculate the quantity of each drug type and the position coordinates of each drug.

[0076] The drug management module 205 is used to manage the drugs in the automatic dispensing machine according to the quantity of each type of drug and the location coordinates of each drug.

[0077] In some embodiments, the medicine box coordinate determination module 202 includes:

[0078] The position coordinate generation unit is used to confirm the validity of the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine when the total number of the first medicine boxes and the total number of the second medicine boxes in the same layer are the same; based on the validity of the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine, the position coordinates of each medicine box are generated with the first motor pulse quantity corresponding to each medicine box in the layer as the horizontal axis and the second motor pulse quantity as the vertical axis.

[0079] In some embodiments, the medicine box position determination module 203 includes:

[0080] The medicine box information binding unit is used to set the flashing frequency of each medicine box LED light in each layer according to the preset medicine box ID information; wherein, each medicine box LED light in each layer has a different flashing frequency; the first motor and the second motor are moved according to the position coordinates of each medicine box and the first motor identifies the flashing frequency of each medicine box LED light; the medicine box ID corresponding to the position coordinates of each medicine box is determined according to the flashing frequency of each medicine box LED light, and the position coordinates of each medicine box and the medicine box ID are bound together.

[0081] Furthermore, Figure 6 This is a schematic diagram of the structure of a terminal device provided in one embodiment of this application. Figure 3 As shown, the terminal device 3 of this embodiment includes: at least one processor 30 (in... Figure 3 (Only one is shown in the image) and a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor, wherein when the processor 30 executes the computer program 32, it can implement the steps of a drug management method of an automatic dispensing machine according to any one of the embodiments of the present invention.

[0082] The terminal device 3 may be a computing device such as a desktop computer, a cloud server, or a laptop computer, and the computing device may include, but is not limited to, a processor 30 and a memory 31. Figure 6 This is merely an example of terminal device 3 and does not constitute a limitation on terminal device 3. It may include more or fewer components than those shown in the figure.

[0083] This invention provides a storage medium that stores computer-readable program code, which, when executed, implements the steps of the above-described method for managing medicines using an automatic dispensing machine.

[0084] This embodiment proposes a drug management method and system for an automatic dispensing machine: A first motor moves laterally in each layer of the automatic dispensing machine with a preset first scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the pulse quantity corresponding to each medicine box is recorded as the pulse quantity of the first motor, and the number of medicine boxes in each layer is recorded as the total number of first medicine boxes, and the pulse quantity of the second motor in each layer is recorded as the pulse quantity of the second motor. The first motor moves laterally in each layer of the automatic dispensing machine with a preset second scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the number of medicine boxes in each layer is recorded as the total number of second medicine boxes. Based on the pulse quantities of the first and second motors, the position coordinates of each medicine box are generated. The flashing frequency of the LED lights on each medicine box on each layer is switched. The first and second motors are moved according to the position coordinates of each medicine box, and the flashing frequency of the LED lights on each medicine box is collected to determine the medicine box ID corresponding to each medicine box's position coordinates. Based on the position coordinates of the medicine boxes, the first motor moves laterally on each layer of the automatic dispensing machine. The industrial camera on the first motor identifies the medicine and its type, binding each medicine to its corresponding medicine box, and calculating the quantity and position coordinates of each medicine type. Based on the quantity and position coordinates of each medicine type, the medicines in the automatic dispensing machine are managed. Its beneficial effects are: it can accurately and automatically count and record the quantity and position of medicines, obtaining precise medicine information.

[0085] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention in detail. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A medicine management method of an automatic dispensing machine, characterized by, include: The first motor moves laterally in each layer of the automatic dispensing machine with a preset first scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the pulse quantity corresponding to each medicine box is recorded as the pulse quantity of the first motor, and the number of medicine boxes in each layer is recorded as the total number of the first medicine boxes, and the pulse quantity of the second motor in each layer is recorded as the pulse quantity of the second motor. The first motor moves laterally in each layer of the automatic dispensing machine with a preset second scanning direction and a preset number of offset steps. When the industrial camera of the first motor detects that the LED light of the medicine box is in a preset state, the number of medicine boxes in each layer is recorded as the total number of the second medicine boxes. The automatic dispensing machine includes a first motor and a second motor. The first motor is used to move the industrial camera laterally for scanning, and the second motor is used to move the industrial camera vertically to switch the layers of the automatic dispensing machine. The position coordinates of each medicine box are generated based on the pulse quantities of the first and second motors. Switch the flashing frequency of the LED light of each medicine box on each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of the LED light of each medicine box to determine the medicine box ID corresponding to the position coordinates of each medicine box; Based on the position coordinates of the medicine box, the first motor moves laterally on each layer of the automatic medicine dispensing machine. The industrial camera of the first motor identifies the medicine and the type of medicine, binds each medicine to the medicine box it belongs to, and calculates the quantity of each type of medicine and the position coordinates of each medicine. The automatic dispensing machine manages the medications based on the quantity of each type of medication and the location coordinates of each medication.

2. The medicine management method of the automated dispensing machine according to claim 1, characterized by, Before moving the first motor laterally in a preset first scanning direction, set the medicine box scanning parameters and preset offset steps for the first motor and the second motor, move the first motor and the second motor to the preset initial position, and then set each medicine box LED light to the preset state.

3. The drug management method of the automatic dispensing machine according to claim 1, characterized in that, The step of generating the position coordinates of each medicine box based on the pulse quantities of the first and second motors is as follows: When the total number of the first medicine box and the total number of the second medicine box on the same layer of the automatic medicine dispensing machine are the same, it is confirmed that the pulse quantity of the first motor and the pulse quantity of the second motor on that layer are valid. When the pulse quantity of the first motor and the pulse quantity of the second motor on the same layer of the automatic dispensing machine are valid, the position coordinates of each medicine box are generated with the pulse quantity of the first motor corresponding to each medicine box in that layer as the horizontal axis and the pulse quantity of the second motor as the vertical axis.

4. The drug management method of the automatic dispensing machine according to claim 1, characterized in that, The process involves switching the flashing frequency of the LED lights in each medicine box on each layer, moving the first and second motors according to the position coordinates of each medicine box, and collecting the flashing frequency of the LED lights in each medicine box to determine the medicine box ID corresponding to the position coordinates of each medicine box. Specifically: Based on the preset medicine box ID information, the flashing frequency of each medicine box LED light in each layer is set; wherein, each medicine box LED light in each layer has a different flashing frequency; The first and second motors are moved according to the position coordinates of each medicine box, and the blinking frequency of the LED light of each medicine box is identified by the industrial camera of the first motor. Based on the flashing frequency of the LED lights in each medicine box, determine the medicine box ID corresponding to the position coordinates of each medicine box, and then bind the position coordinates and medicine box ID of each medicine box.

5. The drug management method of the automatic dispensing machine according to claim 1, characterized in that, Before the industrial camera on the first motor identifies the medicine and its type, medicine type parameters and medicine template information are set for the first motor, and the first motor is moved to a preset initial position; wherein, the medicine type parameters and medicine template information are used by the industrial camera to identify the medicine type.

6. A drug management system for an automatic dispensing machine, characterized in that, include: The system includes a medicine box scanning module, a medicine box coordinate determination module, a medicine box location determination module, a medicine scanning module, and a medicine management module. The medicine box scanning module is used to laterally move the first motor in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset first scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the pulse quantity corresponding to each medicine box as the pulse quantity of the first motor, and records the number of medicine boxes in each layer as the total number of the first medicine boxes, and the pulse quantity of the second motor in each layer as the pulse quantity of the second motor. The module also moves the first motor laterally in each layer of the automatic medicine dispensing machine by a preset offset number of steps in a preset second scanning direction. When the industrial camera of the first motor detects that the medicine box LED light is in a preset state, it records the number of medicine boxes in each layer as the total number of the second medicine boxes. The automatic medicine dispensing machine includes a first motor and a second motor. The first motor is used to move the industrial camera laterally for scanning, and the second motor is used to move the industrial camera vertically to switch the layers of the automatic medicine dispensing machine. The medicine box coordinate determination module is used to generate the position coordinates of each medicine box based on the pulse quantity of the first motor and the pulse quantity of the second motor. The medicine box position determination module is used to switch the flashing frequency of each medicine box LED light in each layer, move the first motor and the second motor according to the position coordinates of each medicine box and collect the flashing frequency of each medicine box LED light to determine the medicine box ID corresponding to the position coordinates of each medicine box. The drug scanning module is used to move the first motor laterally on each layer of the automatic dispensing machine according to the position coordinates of the medicine box, identify the drugs and drug types through the industrial camera of the first motor, bind each drug to the medicine box it belongs to, and calculate the quantity of each drug type and the position coordinates of each drug. The drug management module is used to manage the drugs in the automatic dispensing machine according to the quantity of each type of drug and the location coordinates of each drug.

7. The drug management system for the automatic dispensing machine according to claim 6, characterized in that, The medicine box coordinate determination module includes: a position coordinate generation unit; The position coordinate generation unit is used to confirm the validity of the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine when the total number of the first medicine boxes and the total number of the second medicine boxes in the same layer are the same; when the first motor pulse quantity and the second motor pulse quantity of the same layer of the automatic dispensing machine are valid, the unit generates the position coordinates of each medicine box with the first motor pulse quantity corresponding to each medicine box in the layer as the horizontal coordinate and the second motor pulse quantity as the vertical coordinate.

8. The drug management system for the automatic dispensing machine according to claim 6, characterized in that, The medicine box location determination module includes: a medicine box information binding unit; The medicine box information binding unit is used to set the flashing frequency of each medicine box LED light in each layer according to the preset medicine box ID information; wherein, each medicine box LED light in each layer has a different flashing frequency; The first and second motors are moved according to the position coordinates of each medicine box, and the flashing frequency of the LED light of each medicine box is identified by the first motor. Based on the flashing frequency of the LED light of each medicine box, the medicine box ID corresponding to the position coordinates of each medicine box is determined, and the position coordinates and medicine box ID of each medicine box are bound together.

9. A terminal device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the steps of the drug management method of an automatic dispensing machine according to any one of claims 1 to 5.

10. A storage medium, characterized in that, The storage medium stores computer-readable program code, which, when executed, implements the steps of a drug management method for an automatic dispensing machine according to any one of claims 1 to 5.