Medicine packaging method and device, storage medium and electronic device
By identifying the barcode and label information of the medicine bag during the drug packaging process and judging its work order and user identity, the problem of low accuracy of drug packaging is solved, and higher packaging accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411696638.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-02-28
AI Technical Summary
There is a problem of low accuracy in the packaging process of traditional Chinese medicines in the prior art, which leads to the possibility that drugs from different users may be packaged together.
By identifying the barcode information of each medicine bag in the target medicine basket, it is determined whether it belongs to the same work order; if it belongs to the same work order, it is determined whether it belongs to the same user based on the label information of the medicine bag; if it belongs to the same user, it is packaged.
It improves the accuracy of drug packaging, ensures that drugs from different users will not be packaged together, and enhances the reliability of the packaging process.
Smart Images

Figure CN119527657A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a medicine packaging method, device, storage medium and electronic device. Background Art
[0002] In the related art, in the process of packing medicines, there is a situation where medicines of different users are packed together.
[0003] It can be seen from this that the related technology has the problem of low accuracy in packaging medicines.
[0004] Currently, no effective solution has been proposed for the above-mentioned problems existing in the related technologies. Summary of the invention
[0005] Embodiments of the present invention provide a medicine packaging method, device, storage medium and electronic device to at least solve the problem of low accuracy of medicine packaging existing in the related art.
[0006] According to one embodiment of the present invention, a method for packing medicines is provided, comprising: determining whether each medicine bag included in a target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket; determining whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags when the medicine bags included in the target medicine basket belong to the same work order; and packing the medicine bags in the target medicine basket when the medicine bags in the target medicine basket belong to the same user.
[0007] According to another embodiment of the present invention, a medicine packaging device is provided, comprising: a first determination module, used to determine whether each medicine bag included in a target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket; a second determination module, used to determine whether the medicine bags included in the target medicine basket belong to the same user based on the label information of the medicine bags when the medicine bags included in the target medicine basket belong to the same work order; and a packaging module, used to package the medicine bags in the target medicine basket when the medicine bags in the target medicine basket belong to the same user.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0009] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] According to yet another embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps of the method described in each embodiment of the present application are implemented.
[0011] Through the present invention, it is determined whether each medicine bag included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket; when the medicine bags included in the target medicine basket belong to the same work order, it is determined whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags; when the medicine bags in the target medicine basket belong to the same user, the medicine bags in the target medicine basket are packaged. Before packaging the medicines, it is possible to first determine whether the medicine bags included in the target medicine basket are in the same work order. If they belong to the same work order, it is determined whether the medicine bags in the target medicine basket belong to the same user. If they belong to the same user, they are packaged. That is, two judgments are made before packaging. Therefore, the problem of low accuracy of packaging medicines in the related art can be solved, and the effect of improving the accuracy of medicine packaging can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 It is a hardware structure block diagram of a mobile terminal of a medicine packaging method according to an embodiment of the present invention;
[0013] Figure 2 is a flow chart of a method for packaging medicines according to an embodiment of the present invention;
[0014] Figure 3 is a flow chart of a method for packaging medicines according to a specific embodiment of the present invention;
[0015] Figure 4 4 is a structural block diagram of a medicine packaging device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0018] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal of a drug packaging method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0019] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the packaging method of the medicine in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0020] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0021] In this embodiment, a method for packaging medicines is provided. Figure 2 is a flow chart of a method for packaging medicines according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0022] Step S202, determining whether each of the medicine bags included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket;
[0023] Step S204, when the medicine bags included in the target medicine basket belong to the same work order, determining whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags;
[0024] Step S206: If the medicine bags in the target medicine basket belong to the same user, the medicine bags in the target medicine basket are packaged.
[0025] In the above embodiment, a plurality of medicine bags can be placed in the target medicine basket, and barcode information can be affixed to each medicine bag. The barcode information can be a QR code, a barcode, etc., and the present invention does not limit the form of the barcode information. The barcode reader can be controlled to scan the barcode information to obtain the work order code corresponding to the barcode information, and determine whether each medicine bag belongs to the same work order according to the work order number. If the work order numbers in each medicine bag are the same, it can be determined that the medicine bags in the target amount of medicine belong to the same work order.
[0026] In the above embodiment, the prescription can be split into one or more work orders during the "receiving and reviewing prescriptions" stage, and each work order contains information such as the theoretical number of medicine bags, the volume of each bag of liquid medicine, prescription information, and patient information. During the "subpackaging and labeling" stage, the work order has been packaged in medicine bags and labeled with information labels according to the subpackaging and labeling parameters preset in the work order, and the surface of each bag is affixed with a label containing the work order number (QR code), liquid medicine volume, prescription information, patient information, and other content. That is, the label information includes the work order number (QR code), liquid medicine volume, prescription information, patient information, and the like. The medicine bags corresponding to the work order are all loaded in the same medicine basket and transferred to the packaging stage. The packaging method of medicines can be applied to a packaging system, and the packaging system can receive packaging instructions sent by other systems, wherein the packaging instructions include work order information, and the work order information may include information such as the theoretical number of medicine bags, the volume of each bag of liquid medicine, prescription information, and patient information. After receiving the packing instruction, the packing system can generate work order information, print out the work order information, control the pasting device to paste the printed work order information sheet in the target medicine basket and medicine bag, and control mechanical equipment, such as mechanical arms and packing robots, to put the medicine bag in the target medicine basket. In order to prevent errors during packaging, the barcode information of the medicine bag in the target medicine basket can be identified to determine whether the medicine bags in the target medicine basket belong to the same work order.
[0027] In the above embodiment, when it is determined that the medicine bags in the target medicine basket belong to the same work order, the label information in the medicine bags can be identified, and it is determined whether the medicine bags in the target medicine basket belong to the same user according to the identification result, wherein the user can be a user who uses the medicine in the medicine bag, such as a patient. Each medicine bag in the medicine basket can be grabbed by a mechanical arm or an intelligent robot, and the label information can be scanned by a label identification device to determine the patient information included in the label information. When the patient information is the same, it is determined that the medicine bags in the target medicine basket belong to the same user. When the patient information is different, the target medicine bag corresponding to the first patient information different from the other patient information is placed in the area to be confirmed by the mechanical arm or the intelligent robot, the label information of the target medicine bag is photographed, the photographed image is identified, and the second patient information included in the label information is determined. When the second patient information is different from the other patient information, the target medicine bag is placed in the to-be-classified library by the mechanical arm or the intelligent robot, and when the second patient information is the same as the other patient information, the target medicine bag is placed in the target medicine basket by the mechanical arm or the intelligent robot.
[0028] Through the present invention, it is determined whether each medicine bag included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket; when the medicine bags included in the target medicine basket belong to the same work order, it is determined whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags; when the medicine bags in the target medicine basket belong to the same user, the medicine bags in the target medicine basket are packaged. Before packaging the medicines, it is possible to first determine whether the medicine bags included in the target medicine basket are in the same work order. If they belong to the same work order, it is determined whether the medicine bags in the target medicine basket belong to the same user. If they belong to the same user, they are packaged. That is, two judgments are made before packaging. Therefore, the problem of low accuracy of packaging medicines in the related art can be solved, and the effect of improving the accuracy of medicine packaging can be achieved.
[0029] Optionally, the executor of the above steps may be a packaging system, a background processor, or other devices with similar processing capabilities, or a machine that at least integrates a data processing device, wherein the data processing device may include terminals such as computers and mobile phones, but is not limited thereto.
[0030] In an exemplary embodiment, determining whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags includes: performing a target operation for each of the medicine bags to determine the text information of the label information of each of the medicine bags; when the text information corresponding to each of the medicine bags is the same, determining that the medicine bags in the target medicine basket belong to the same user; wherein the target operation includes: collecting a first image of the label information of the medicine bag; preprocessing the first image to obtain a second image; and determining the text information based on the second image. In this embodiment, the text information included in the label information of each medicine bag can be identified. wherein the text information may include work order number (QR code), liquid medicine capacity, prescription information, patient information and the like. when the work order number of each medicine bag is the same, the liquid medicine capacity is the same, the prescription information is the same, and the patient information is the same, it is determined that the medicine bags in the target medicine basket belong to the same user.
[0031] In the above embodiment, the medicine bag can be placed into the shooting area of the camera by a mechanical arm or a robot, and the information recognition operation can be performed on the label of the medicine bag. The text content of the label can be recognized by image Ocr recognition technology for the result review of the medicine bag.
[0032] In the above embodiment, after the first image is captured, the resolution of the first image can be determined, and when the resolution of the first image is greater than a predetermined threshold, the first image is preprocessed. When the resolution of the first image is less than or equal to the predetermined threshold, the first image is recaptured until the resolution of the first image is greater than the predetermined threshold. For example, a high-definition image acquisition device (such as a camera or a scanner) can be used to capture images of the outer packaging of the medicine bag. Ensure that the captured image is clear and complete, covering the entire label area. During the acquisition process, the focus, lighting and other parameters are automatically adjusted according to the size and position of the medicine bag to obtain the best image quality. For example, an autofocus algorithm is used to focus according to the texture and edge features of the label to ensure that the text is clear and legible. The image resolution should at least reach a predetermined threshold, such as 100dpi, 200dpi, etc., to ensure sufficient details.
[0033] In an exemplary embodiment, preprocessing the first image to obtain the second image includes: grayscale processing the first image to obtain a grayscale image; performing noise reduction processing on the grayscale image to obtain a noise reduction image; and binarizing the noise reduction image to obtain the second image. In this embodiment, the collected color image, that is, the first image, can be converted into a grayscale image to reduce the amount of calculation and highlight the text features. The grayscale formula can be Gray=0.299R+0.587G+0.114B, where R, G, and B are the pixel values of the red, green, and blue channels in the color image, respectively, and Gray is the grayscale value. Median filtering or Gaussian filtering can also be used to remove noise in the grayscale image to obtain a noise reduction image. Median filtering eliminates isolated noise points such as salt and pepper noise, that is, impulse noise, by replacing the value of a pixel point with the median of its neighborhood pixel value. Gaussian filtering smoothes the image based on a Gaussian function to reduce the influence of Gaussian noise. An adaptive threshold binarization algorithm can also be used to convert the noise reduction image into a black and white binary image to better segment text and background. Among them, the adaptive threshold method can be used to perform binarization processing on the denoised image, wherein the adaptive threshold calculation formula can be: T(x,y)=mean(B(x,y))+k*std(B(x,y)), where T(x,y) is the threshold at the pixel point (x,y), B(x,y) is the gray value set of the neighborhood of the pixel point, mean is the mean function, std is the standard deviation function, and k is the adjustment coefficient (usually between [0,1]). By continuously adjusting the k value and the neighborhood size, the binarized image can clearly separate the text and the background while retaining the details of the text.
[0034] In an exemplary embodiment, determining the text information based on the second image includes: determining the character features of each character included in the second image; inputting the character features into the network model to obtain the text information. In this embodiment, the connected region analysis algorithm can be used to segment the characters in the binary image. The algorithm groups the interconnected pixels in the image into a region, and each region is considered to be a character or a part of a character. For the adhered characters, segmentation is performed based on the width, height, spacing and other features of the characters. For example, the horizontal and vertical spacing between adjacent connected regions is calculated. When the spacing is less than a certain threshold, it is judged as an adhered character, and a segmentation algorithm based on stroke width and direction is used for further processing. For some special format labels, such as text arranged in rows and columns, preliminary segmentation can be performed based on the features of the rows and columns, and then the characters in each small area can be finely segmented.
[0035] In the above embodiment, various features of the characters can be extracted, including structural features (such as the number of strokes, the number of holes, the number of connected components, etc.), statistical features (such as the projection features, moment features, etc. of the characters), and contour features (such as the edge contour of the characters, histogram of directional gradients, etc.). For example, the projection of the character in the horizontal and vertical directions is calculated to obtain the width and height distribution features of the character. The moment feature can describe the shape and center of gravity of the character by calculating the zero-order moment, first-order moment and second-order moment of the image. The histogram of directional gradients (HOG) generates a feature vector by calculating the gradient direction and amplitude of the edge of the character to describe the contour features of the character.
[0036] In the above embodiment, after the character features are extracted, a classifier based on machine learning or deep learning can be used to identify the extracted character features. A support vector machine (SVM) classifier can be used to train the SVM model by taking the extracted character features as input. During the training process, by adjusting the kernel function (such as linear kernel, polynomial kernel, radial basis function kernel, etc.) and parameters (such as penalty coefficient, kernel parameter, etc.), the model achieves the best classification performance on the training set. For new character features, the SVM model classifies according to the learned classification boundaries and determines the corresponding characters. The decision tree algorithm can also be used for character recognition. By constructing a decision tree, classification judgments are gradually made according to different values of the character features. The construction of the decision tree can be based on information gain, Gini coefficient and other indicators for node splitting selection. A convolutional neural network (CNN) model can also be constructed, including an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer. The input layer receives the character image, the convolution layer extracts the local features of the character through the convolution kernel, the pooling layer downsamples the features, the fully connected layer integrates the extracted features, and the output layer outputs the classification results of the characters. During the training process, a large number of labeled character samples are used to train the CNN model, and the weights and biases of the network are adjusted through the back-propagation algorithm so that the model can accurately recognize different characters. The recognized characters are post-processed, including error correction and text formatting. Error correction can include the establishment of dictionaries and language models, and spelling checking and grammatical analysis of the recognized text. For example, according to common medical vocabulary and grammatical rules, check whether the recognized prescription information and patient information are reasonable. For suspected erroneous characters, corrections are made based on contextual information and dictionaries. The edit distance algorithm can be used to calculate the similarity between the recognition result and the words in the dictionary. When the similarity is lower than a certain threshold, error correction is performed. Text formatting can include formatting the recognized text according to the format specifications of the medicine bag label. For example, the prescription information is arranged according to the filling amount, usage, etc., and the patient information is sorted in the order of name, age, gender, etc.
[0037] In the above embodiment, after error correction and text formatting are performed on the text information, the obtained target text information is compared, and when the target text information is the same, it is determined that the medicine bags belong to the same user.
[0038] In an exemplary embodiment, packing the medicine bags in the target medicine basket includes: controlling the target device to grab the medicine bags from the target medicine basket and placing the medicine bags into the target container; based on the first quantity of the medicine bags grabbed by the target device; and packaging the target container when the first quantity is the same as the second quantity indicated in the work order corresponding to the target medicine basket. In this embodiment, the medicine bags can be identified one by one, and the system calculates the cumulative quantity, i.e., the first quantity, and compares it with the theoretical number of bags in the work order, i.e., the second quantity. If the quantity matches, the test is passed. If the number of bags is insufficient, an early warning reminder is issued, and manual intervention is required.
[0039] In an exemplary embodiment, after the medicine bags in the target medicine basket are packed, the method further includes: sending an order instruction to the logistics system to instruct the logistics system to generate logistics information based on the order instruction; printing the logistics information to obtain a logistics information sheet; and controlling a pasting device to paste the logistics information sheet into a target container for packing the medicine bags. In this embodiment, after the medicine bags are packed, the logistics system can be notified to generate logistics information, print a logistics information sheet, and control the pasting device to paste the logistics information sheet into the target container. The target container with the logistics information sheet can also be transferred to the location to be shipped, and the logistics terminal corresponding to the logistics information sheet is notified to send a reminder to remind the user using the logistics terminal to pick up the target container at the location to be shipped.
[0040] In an exemplary embodiment, the IoT system composed of other systems, packaging systems and logistics systems for sending packaging instructions to the packaging system can adopt a microservice architecture, and the microservices communicate through well-defined interfaces, and the coupling between services is low. This makes it possible to modify and update each service independently without affecting other services. The database of the user storage packaging system, other systems and logistics system can be backed up in real time, and the server adopts a cluster configuration. The server cluster is a whole composed of multiple servers, which work together to provide services to users. Through load balancing technology, user requests are distributed to different servers, thereby improving the performance and reliability of the system. When one of the servers fails, other servers can automatically take over its work to ensure the continuity of the service. The above system can adopt work order lifecycle management, and the log system records each action node. Once an exception occurs, the abnormal point can be quickly located, and a certain action node can be processed separately, and it can be restored to use.
[0041] The following is an explanation of the packaging method of medicines in conjunction with specific implementation methods:
[0042] Figure 3 is a flow chart of a method for packaging medicines according to a specific embodiment of the present invention, such as Figure 3 As shown, the process includes:
[0043] Step S302, scanning the medicine bag barcode (corresponding to the above barcode information) in the medicine bag.
[0044] Step S304, identifying the prescription information corresponding to the medicine bag according to the barcode information.
[0045] Step S306, determine whether the medicine bags are the same prescription (corresponding to whether the medicine bags in the above-mentioned target medicine basket belong to the same user). If the judgment result is yes, execute step S308, if the judgment result is no, execute step S310.
[0046] Step S308, determine whether the number of medicine bags is sufficient. If the judgment result is yes, execute step S312, if the judgment result is no, execute step S310.
[0047] Step S310, alarm prompt.
[0048] Step S312, packing the medicine bags into cartons (corresponding to the above-mentioned target containers).
[0049] Step S314, click to print the logistics list (corresponding to the above-mentioned logistics information list).
[0050] Step S316, calling the logistics interface.
[0051] Step S318, determine whether the order is successfully placed. If the judgment result is yes, execute step S320, if the judgment result is no, execute step S310.
[0052] Step S320: The printer prints the logistics order.
[0053] Step S322: affix the logistics document to the carton.
[0054] Step S324, determine whether the prescription work order is completed. If the judgment result is yes, execute step S326, if the judgment result is no, execute step S328.
[0055] Step S326, enter the finished product warehouse.
[0056] Step S328, work order medicine bags of other medicine baskets of the prescription.
[0057] Step S330: the courier comes to pick up the package.
[0058] Step S332, finished products are shipped out.
[0059] It should be noted that after steps S304, S326, and S332, step S334 may be further executed to synchronize the information to the server API. Before step S302, the barcode information of each medicine bag included in the target medicine basket may be scanned first. If the scanning result indicates that each medicine bag included in the target medicine basket belongs to the same work order, step S302 is then executed.
[0060] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0061] In this embodiment, a drug packaging device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0062] Figure 4 is a structural block diagram of a drug packaging device according to an embodiment of the present invention, such as Figure 4 As shown, the device comprises:
[0063] A first determination module 42, configured to determine whether each of the medicine bags included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag;
[0064] A second determination module 44 is used to determine whether the medicine bags included in the target medicine basket belong to the same user based on the label information of the medicine bags when the medicine bags included in the target medicine basket belong to the same work order;
[0065] The packing module 46 is used to pack the medicine bags in the target medicine basket when the medicine bags in the target medicine basket belong to the same user.
[0066] In an exemplary embodiment, the second determination module 44 can determine whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags in the following manner: perform a target operation on each of the medicine bags to determine the text information of the label information of each of the medicine bags; when the text information corresponding to each of the medicine bags is the same, determine that the medicine bags in the target medicine basket belong to the same user; wherein the target operation includes: acquiring a first image of the label information of the medicine bags; preprocessing the first image to obtain a second image; and determining the text information based on the second image.
[0067] In an exemplary embodiment, the second determination module 44 can pre-process the first image to obtain the second image in the following manner: perform grayscale processing on the first image to obtain a grayscale image; perform noise reduction processing on the grayscale image to obtain a noise-reduced image; perform binarization processing on the noise-reduced image to obtain the second image.
[0068] In an exemplary embodiment, the second determination module 44 can determine the text information based on the second image in the following manner: determine the character features of each character included in the second image; input the character features into the network model to obtain the text information.
[0069] In an exemplary embodiment, the packaging module 46 can package the medicine bags in the target medicine basket in the following manner: control the target device to grab the medicine bags from the target medicine basket and place the medicine bags into the target container; based on a first quantity of the medicine bags grabbed by the target device; if the first quantity is the same as the second quantity indicated in the work order corresponding to the target medicine basket, seal the target container.
[0070] In an exemplary embodiment, the device can also be used to send an order instruction to the logistics system after packing the medicine bags in the target medicine basket, so as to instruct the logistics system to generate logistics information based on the order instruction; print the logistics information to obtain a logistics information sheet; and control the pasting device to paste the logistics information sheet into the target container used to pack the medicine bags.
[0071] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0072] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0073] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0074] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0075] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0076] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method in each embodiment of the present application when the computer program is executed by a processor.
[0077] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0078] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0079] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for packaging medicines, characterized in that: include: Determining whether each of the medicine bags included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag included in the target medicine basket; In a case where the medicine bags included in the target medicine basket belong to the same work order, determining whether the medicine bags in the target medicine basket belong to the same user based on label information of the medicine bags; In a case where the medicine bags in the target medicine basket belong to the same user, the medicine bags in the target medicine basket are packaged.
2. The method according to claim 1, characterized in that: Determining whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags includes: Performing a target operation on each of the medicine bags to determine text information of the label information of each of the medicine bags; When the text information corresponding to each of the medicine bags is the same, determining that the medicine bags in the target medicine basket belong to the same user; The target operation includes: Capturing a first image of label information of the medicine bag; Preprocessing the first image to obtain a second image; The text information is determined based on the second image.
3. The method according to claim 2, characterized in that Preprocessing the first image to obtain a second image includes: Performing grayscale processing on the first image to obtain a grayscale image; Performing noise reduction processing on the grayscale image to obtain a noise-reduced image; The denoised image is binarized to obtain the second image.
4. The method according to claim 2, characterized in that: Determining the text information based on the second image includes: determining a character feature of each character included in the second image; The character features are input into the network model to obtain the text information.
5. The method according to claim 1, characterized in that: Packing the medicine bags in the target medicine basket includes: Controlling a target device to grab the medicine bag from the target medicine basket and place the medicine bag into a target container; based on a first quantity of the medicine bags captured by the target device; When the first quantity is the same as the second quantity indicated in the work order corresponding to the target medicine basket, the target container is packaged.
6. The method according to claim 1, characterized in that After packing the medicine bags in the target medicine basket, the method further includes: Sending an order instruction to a logistics system to instruct the logistics system to generate logistics information based on the order instruction; Printing the logistics information to obtain a logistics information sheet; The pasting device is controlled to paste the logistics information sheet into a target container for packaging the medicine bag.
7. A drug packaging device, characterized in that: include: A first determination module, configured to determine whether each of the medicine bags included in the target medicine basket belongs to the same work order based on the barcode information of each medicine bag; a second determination module, configured to determine, if the medicine bags included in the target medicine basket belong to the same work order, whether the medicine bags in the target medicine basket belong to the same user based on the label information of the medicine bags; The packing module is used to pack the medicine bags in the target medicine basket when the medicine bags in the target medicine basket belong to the same user.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.