Hospital medicine bottle recycling method and device based on image recognition

By combining image recognition and biometric verification, the shortcomings of individual bottle identification and status tracking in the drug management system have been addressed, achieving efficient and secure drug management and improving the intelligence and security of hospital drug management.

CN119069098BActive Publication Date: 2026-02-03JIANGSU HUIAN ZHIYUAN INTELLIGENT MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411122576.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2026-02-03
Estimated Expiration
2044-08-15

AI Technical Summary

Technical Problem

Existing drug management systems in hospitals are susceptible to external interference, have limited capabilities for individual bottle identification and status tracking, and have a low level of intelligence, resulting in low management accuracy and efficiency.

Method used

An image recognition-based approach is adopted. The image data of medicine bottles is acquired and preprocessed. The visual features of the medicine bottles are extracted and classified using empirical wavelet transform and one-dimensional improved self-attention enhanced convolutional neural network (1D-ISACNN). The identity is verified by combining biometric recognition technology, and the data is synchronized to the hospital information system in real time.

Benefits of technology

It has achieved high precision, low cost and high intelligence in drug management, improved drug use safety and management efficiency, and enhanced the management efficiency and response speed of the drug supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119069098B_ABST
    Figure CN119069098B_ABST
Patent Text Reader

Abstract

The application relates to a hospital medicine bottle recycling method and device based on image recognition, which comprises the following steps: acquiring medicine bottle image data, and pre-processing the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image for representing visual information of the medicine bottle object. Feature extraction is performed on the pre-processed medicine bottle image data through empirical wavelet transformation to separate the medicine bottle visual features from the medicine bottle image data, and a medicine bottle feature set is obtained. A one-dimensional improved self-attention enhanced convolutional neural network is called to classify the medicine bottle visual features in the medicine bottle feature set to obtain key features for distinguishing different types of medicine bottle objects through a self-attention mechanism. The medicine bottle object is identified based on the key features, an identification result of the medicine bottle type is obtained, and the identification result is fed back to a user terminal with access permission to recycle the medicine bottle object of the corresponding medicine bottle type. The state of the medicine bottle individual can be accurately identified, and the degree of intelligence is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical assistance and drug management technology, and in particular to a method and apparatus for recycling hospital medicine bottles based on image recognition. Background Technology

[0002] In a hospital environment, drug management is particularly critical, directly impacting medical safety and service efficiency. With the rapid development of medical technology, both the types of drugs and their frequency of use are increasing, placing higher demands on drug management. Traditional drug management methods, which rely heavily on manual operations including drug recording, storage, and dispensing, have many shortcomings, such as cumbersome procedures, high error rates, low efficiency, and poor safety.

[0003] Currently, with the development of information technology, automated and intelligent drug management systems are gradually being introduced into hospitals. These systems typically include barcode scanning, RFID technology, and automated dispensing machines to improve the accuracy and efficiency of drug management. However, these systems still face many challenges. For example, barcodes and RFID tags are susceptible to physical damage or interference, and their ability to individually identify and track the status of medicine bottles (such as whether they have been opened or how much remains) is limited. Furthermore, the initial investment and maintenance costs of these systems are relatively high, requiring specialized equipment and technical support. In addition, from a technological development perspective, image recognition and machine learning technologies are gradually becoming new choices for hospital drug management systems due to their potential in handling complex scenarios and providing accurate analysis. Image recognition technology can identify information on the labels of medicine bottles, such as drug name, dosage, and expiration date, by analyzing photographs of the bottles, without relying on physical labels. This not only improves the robustness of the system but also allows it to handle more complex situations, such as detecting the opening status of medicine bottles and estimating the remaining quantity.

[0004] In response, there is a growing market demand for drug management systems that offer high accuracy, low cost, and ease of maintenance. Hospitals and drug suppliers are seeking solutions that can improve drug safety, reduce drug waste, and integrate seamlessly into existing hospital information systems. Furthermore, as the healthcare industry increasingly relies on data-driven decision-making, systems that provide real-time data analytics and intelligent decision support are becoming particularly important.

[0005] In summary, existing drug management methods are easily affected by external conditions, have limited ability to identify individual medicine bottles and track their status, and have a low level of intelligence, which to some extent reduces the accuracy and operational efficiency of drug management. Summary of the Invention

[0006] Therefore, it is necessary to address the aforementioned technical problems by providing an image recognition-based method and device for recycling hospital medicine bottles, which can accurately identify the status of individual medicine bottles, has a high degree of intelligence, and improves the operational efficiency of drug management to a certain extent.

[0007] This invention provides a method for recycling hospital medicine bottles based on image recognition, the method comprising:

[0008] Acquire medicine bottle image data and preprocess the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object;

[0009] The preprocessed medicine bottle image data is subjected to feature extraction by empirical wavelet transform to separate the visual features of the medicine bottle from the image data and obtain the medicine bottle feature set.

[0010] A one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism;

[0011] Based on the key features, the medicine bottle object is identified to obtain the identification result of the medicine bottle type, and the identification result is fed back to the user terminal with access rights so that the medicine bottle object of the corresponding medicine bottle type can be recycled.

[0012] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features of the surface of the medicine bottle object. The key features include the label text on the medicine bottle object used to identify the type of medicine bottle and the type of medicine bottle.

[0013] In one embodiment, the step of acquiring medicine bottle image data and preprocessing the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object includes:

[0014] The image data of the medicine bottle is subjected to noise reduction processing, the contrast of the image data is adjusted, and grayscale processing and edge enhancement are performed on the image data of the medicine bottle; and

[0015] The medicine bottle image data is smoothed by Gaussian filtering to remove high-frequency noise.

[0016] In one embodiment, the step of acquiring medicine bottle image data and preprocessing the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object further includes:

[0017] Obtain the spatial coordinates of the filter, and traverse the pixel value of the medicine bottle image data at any spatial coordinate and the surrounding pixels according to the spatial coordinates.

[0018] The weight value of the Gaussian filter kernel at the spatial coordinates is obtained by using a Gaussian function, and different weights are assigned to the pixel points based on the weight values ​​to obtain the pixel values ​​corresponding to the preprocessed medicine bottle image data at the corresponding spatial coordinates.

[0019] In one embodiment, the step of extracting features from the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data and obtain a medicine bottle feature set includes:

[0020] The medicine bottle image data is subjected to Fourier transform to convert the medicine bottle image data from the spatial domain to the frequency domain in order to analyze the frequency components of the medicine bottle image data;

[0021] Call the filter function of any frequency band to select the corresponding frequency range from the frequency domain, and call the complex exponential function to perform Fourier transform and inverse Fourier transform according to the spatial position and frequency of the medicine bottle image data.

[0022] In one embodiment, the invocation of a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through a self-attention mechanism, includes:

[0023] The convolutional layers of the one-dimensional improved self-attention enhanced convolutional neural network extract local visual features of the medicine bottle object in the feature set of the medicine bottle, and the self-attention mechanism enhances the sensitivity of the one-dimensional improved self-attention enhanced convolutional neural network to the key features based on the local visual features.

[0024] Obtain the convolution kernel range during the convolution operation of the one-dimensional improved self-attention enhanced convolutional neural network. The convolution kernel range is the neighborhood range of the current pixel in the medicine bottle image data. Then, call the activation function to process the bias term during the convolution operation, the feature map of each layer, and the convolution kernel weights corresponding to the feature map.

[0025] The local visual features include the label text and graphic features displayed by the medicine bottle object in a local area, the activation function is a linear rectified function, the feature map of each layer is the processing result of the previous layer, and the convolutional kernel weights are used to extract the key features.

[0026] In one embodiment, the step of identifying the medicine bottle object based on the key features to obtain a medicine bottle type identification result, and feeding the identification result back to a user terminal with access rights for recycling of the corresponding medicine bottle type, includes the following prior steps:

[0027] The system acquires template biometric data and captures current biometric data in real time. The template biometric data consists of pre-stored biometric fingerprint information, iris information, and facial information, while the current biometric data consists of the fingerprint information, iris information, and facial information entered by the user during identity verification.

[0028] Calculate the sum of squared errors between the template biometric data and the current biometric data, and determine that the current biometric data has passed authentication when the sum of squared errors is lower than a first threshold;

[0029] The sum of squared errors is used to measure the similarity between the template biometric data and the current biometric data. The lower the sum of squared errors, the higher the similarity between the template biometric data and the current biometric data.

[0030] In one embodiment, the method further includes:

[0031] The system retrieves the number of medicine bottles retrieved in any given retrieval event and the time of the event. It then iterates through all retrieval events recorded in the index set to predict the corresponding drug inventory demand based on the current time and historical retrieval events.

[0032] When the current inventory of a corresponding drug is lower than the preset safety stock level, an early warning message is generated and fed back to the user terminal so that the corresponding drug can be replenished according to the inventory demand.

[0033] The present invention also provides a hospital medicine bottle recycling device based on image recognition, the device comprising:

[0034] An image preprocessing module is used to acquire medicine bottle image data and preprocess the medicine bottle image data to identify the medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object.

[0035] The feature extraction module is used to extract features from the preprocessed medicine bottle image data through empirical wavelet transform, so as to separate the visual features of the medicine bottle from the medicine bottle image data and obtain the medicine bottle feature set;

[0036] The feature classification module is used to call a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0037] The medicine bottle recycling module is used to identify the medicine bottle object based on the key features, obtain the identification result of the medicine bottle type, and feed the identification result back to the user terminal with access rights so as to recycle the medicine bottle object of the corresponding medicine bottle type.

[0038] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features of the surface of the medicine bottle object. The key features include the label text on the medicine bottle object used to identify the type of medicine bottle and the type of medicine bottle.

[0039] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the image recognition-based hospital medicine bottle recycling method as described above.

[0040] The present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the image recognition-based hospital medicine bottle recycling method as described above.

[0041] The aforementioned image recognition-based method and apparatus for recycling hospital medicine bottles involves acquiring medicine bottle image data and preprocessing it to identify visual features that characterize the visual information of the medicine bottles. Then, empirical wavelet transform is used to extract features from the preprocessed image data, resulting in a medicine bottle feature set. Subsequently, a one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features in the feature set, using the self-attention mechanism within the neural network to obtain key features that distinguish different types of medicine bottles. Finally, based on the extracted key features, the medicine bottle objects are identified to obtain the medicine bottle type identification result, which is then fed back to a user terminal with access permissions for recycling of the corresponding medicine bottle type. This method can automatically identify medicine bottle label information, verify the identity of operators, and synchronize drug usage data to the hospital information system in real time, thereby achieving efficient management and monitoring of drug flow. A one-dimensional improved self-attention enhanced convolutional neural network (1D-ISACNN) performs in-depth analysis and classification of extracted features to accurately identify the type and contents of medicine bottles, improving the intelligence level and security of hospital drug management, and thus significantly improving the management efficiency and response speed of the drug supply chain. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0043] Figure 1 This is one of the schematic diagrams of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0044] Figure 2 A schematic diagram of the overall process of the hospital medicine bottle recycling method based on image recognition in a specific implementation of the present invention;

[0045] Figure 3 The second schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0046] Figure 4 The third schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0047] Figure 5 The fourth schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0048] Figure 6 The fifth schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0049] Figure 7 The sixth schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0050] Figure 8 The seventh schematic diagram of the hospital medicine bottle recycling method based on image recognition provided by the present invention;

[0051] Figure 9 A schematic diagram of the hospital medicine bottle recycling device based on image recognition provided by the present invention;

[0052] Figure 10 An internal structural diagram of the computer device provided by the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.

[0054] The following is combined with Figures 1-10 This invention describes a hospital medicine bottle recycling method and apparatus based on image recognition.

[0055] like Figure 1 As shown, in one embodiment, a method for recycling hospital medicine bottles based on image recognition includes the following steps:

[0056] Step S110: Acquire medicine bottle image data and preprocess the medicine bottle image data to identify the medicine bottle visual features in the medicine bottle image that represent the visual information of the medicine bottle object.

[0057] The visual features of medicine bottles include the shape of the medicine bottle, the text on the label, and the graphic features on the surface of the medicine bottle.

[0058] Specifically, the medicine bottle recycling system acquires medicine bottle image data and preprocesses the data to improve image quality, thereby facilitating the identification of visual features that characterize the medicine bottle object.

[0059] Combination Figure 2 As shown in the specific embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention begins with image preprocessing, which directly affects the effectiveness of subsequent feature extraction, especially its accuracy. Image preprocessing improves image quality, removes noise, and optimizes the contrast and brightness of the medicine bottle image, enabling the Empirical Wavelet Transform (EWT) to more effectively extract key visual features, such as the shape, label, and text of the medicine bottle, from the preprocessed image during the subsequent feature extraction process.

[0060] In this embodiment, in a hospital medicine bottle recycling system, image capture of medicine bottles is typically affected by various factors, such as changes in lighting, cluttered backgrounds, and reflections on the bottle surface. Therefore, effective preprocessing of the captured images is a prerequisite for ensuring accurate image recognition. The main purpose of image preprocessing is to improve image quality, making it more suitable for computer processing without losing information important for subsequent processing. Specific preprocessing processes include noise reduction, contrast adjustment, grayscale conversion, and edge enhancement. Noise reduction and smoothing are particularly important in medicine bottle image processing because these processes reduce random variations in the image, making the labels and contents of the medicine bottles clearer and more legible.

[0061] In this embodiment, Gaussian filtering is used for image smoothing. Gaussian filtering is a commonly used image smoothing technique that can effectively remove high-frequency noise from images. The algorithm formula is as follows:

[0062] I'(x,y)=(1 / 9)*sum(I(x+k,y+l)*G(k,l)for k,l in[-1,0,1]).

[0063] Where I(x,y) represents the pixel value at position (x,y) in the original image. I'(x,y) represents the pixel value at position (x,y) after processing. G(k,l) represents the weight value of the Gaussian filter kernel at position (k,l). The Gaussian kernel is a 3×3 matrix whose value is determined by the Gaussian function and is used to assign different weights to surrounding pixels. "k,l" are the spatial coordinates of the filter, used to traverse the pixels surrounding the original image I(x,y).

[0064] It should be noted that the specific implementation of the Gaussian filter kernel typically relies on the standard deviation σ of the Gaussian function. However, in simplified applications, a uniform value, such as 1 / 9, can be used to ensure that the processed image maintains consistent brightness. This processing not only smooths the image but also preserves sufficient edge information, which is essential for subsequent medicine bottle label recognition.

[0065] In practical applications, this Gaussian filter is applied to every pixel of the medicine bottle image. It calculates a new pixel value by considering the values ​​of each pixel and its neighbors, making it particularly suitable for handling image blur caused by camera noise, uneven lighting, or rapid movement. Preprocessing significantly improves the recognition rate of small text and symbols on the medicine bottle, which is crucial for accurately identifying the contents and subsequent automated processing. Therefore, Gaussian filtering, as part of image preprocessing, reduces image noise and smooths the image, providing a solid foundation for image recognition in medicine bottle recycling systems. This ensures that the quality of the medicine bottle images is maintained at a high level, making the entire system's workflow more efficient and accurate.

[0066] Step S120: Feature extraction is performed on the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data and obtain the medicine bottle feature set.

[0067] Specifically, the medicine bottle recycling system uses empirical wavelet transform to extract features from the preprocessed medicine bottle image data, thereby separating the visual features of the medicine bottles from the image data and obtaining a medicine bottle feature set.

[0068] Combination Figure 2 As shown in the specific embodiment, the hospital medicine bottle recycling method based on image recognition provided by this invention obtains a series of feature sets from the medicine bottle images processed by Empirical Wavelet Transform (EWT). These features contain key visual information about the medicine bottles. These features are then used as input into a one-dimensional improved self-attention enhanced convolutional neural network (1D-ISACNN) for classification. 1D-ISACNN utilizes these extracted features for in-depth learning and analysis. Through the self-attention mechanism, the model can focus on the features most critical to medicine bottle classification, thereby achieving efficient and accurate identification of medicine bottle type and label.

[0069] In this embodiment, Empirical Wavelet Transform (EWT) is a method used in signal and image processing that extracts key features by decomposing a signal into different frequency components. In a medicine bottle image recognition system, EWT can effectively identify and separate the text and graphics on the medicine bottle label, thereby providing accurate features for subsequent image recognition and classification.

[0070] It should be noted that Empirical Wavelet Transform (EWT) utilizes the principles of Fourier Transform to decompose the frequency content of an image using a specific filter bank. This decomposition helps extract details and structural information from the image, especially variations at different scales, such as edges and textures. The basic idea of ​​EWT is to allocate the Fourier spectrum of the image to predefined frequency bands and reconstruct each band to extract local features.

[0071] In this embodiment, the algorithm formula for empirical wavelet transform is:

[0072] F_k(x)=Integral(Phi_k(w)*F(w)*exp(i*w*x)dw).

[0073] Here, F(w) represents the Fourier transform of image x, converting the image from the spatial domain to the frequency domain, allowing analysis of the image's frequency components. Phi_k(w) represents the filter for the k-th frequency band; it is a function used to select or emphasize a specific frequency range in the Fourier transform result. F_k(x) represents the image features corresponding to the k-th frequency band, which are converted back from the frequency domain to the spatial domain through an inverse Fourier transform, reconstructing the filtered image and preserving the main features of the original image in the k-th frequency band. exp(i*w*x) is a complex exponential function, where i is the imaginary unit, w is the frequency, and x is the spatial location; this function is used to perform Fourier and inverse Fourier transforms. Integral(...dw) represents integrating the entire expression to achieve the conversion from the frequency domain to the spatial domain.

[0074] In medicine bottle image recognition, EWT is suitable for extracting complex text and patterns from medicine bottle labels. For example, a medicine bottle might display a company logo in a relatively low frequency range, while displaying fine text instructions in a high frequency range. With EWT, the system can process this information independently, improving recognition accuracy and efficiency. In the actual operation of EWT, the first step is to determine the filter's frequency band settings, which typically relies on prior analysis or experience to determine which frequency bands are critical. Once set, for each captured medicine bottle image, the system performs EWT to generate a series of feature images, each representing information from the original image in a different frequency band. These feature images can then be used for further classification and recognition tasks, such as using machine learning algorithms to identify the medicine bottle type, contents, and expiration date. Furthermore, the application of EWT in medicine bottle recycling systems ensures that the system can efficiently process images from different sources and of varying quality, maintaining a high recognition rate even under poor image quality or complex background conditions, thus improving the automation and intelligence of medicine bottle management.

[0075] Step S130: Call a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of medicine bottles in the medicine bottle feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0076] Key features include label text on the medicine bottle object used to identify the type of medicine bottle and the type of medicine bottle.

[0077] Specifically, the medicine bottle recycling system calls a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism in the neural network.

[0078] Combination Figure 2As shown in the specific embodiment, the hospital medicine bottle recycling method based on image recognition provided by this invention utilizes 1D-ISACNN (One-Dimensional Improved Self-Attention Enhanced Convolutional Neural Network), a neural network architecture specifically designed for processing one-dimensional signals or data exhibiting significant features in a single dimension. In medicine bottle image recognition systems, this technology is used to extract more refined information from the image features after EWT processing, such as label text, patterns, and other identifying symbols. This information is crucial for accurate classification and identification of medicine bottles. Specifically, 1D-ISACNN utilizes convolutional layers to extract local features from the data and enhances the model's sensitivity to important features through a self-attention mechanism. This structure is particularly suitable for processing images or signals that display important information in local areas, such as specific text or symbols on medicine bottle labels.

[0079] In this embodiment, the algorithm formula for the one-dimensional improved self-attention enhanced convolutional neural network is as follows:

[0080] H[n+1]=f(sum(W[m]*H[nm]+B[n])for min M).

[0081] Where H[n] represents the feature map at layer n. In a neural network, the feature map of each layer is the result of processing the output of the previous layer, containing the transformation and abstract information of the input data. W[m] represents the convolution kernel weights applied to the feature map. These weights are learned through the training process and are used to extract key features. B[n] represents the bias term, used to adjust the result after convolution to better activate subsequent layers. f represents the activation function, usually ReLU (Rectified Linear Function), used to introduce non-linearity so that the network can learn more complex patterns. M represents the range of the convolution kernel, that is, the neighborhood range of the current pixel is considered when performing the convolution operation.

[0082] In medicine bottle image recognition systems, 1D-ISACNN uses a self-attention mechanism to further analyze and classify features obtained from Empirical Wavelet Transform (EWT). For example, the system may need to distinguish between different types of medicine bottle labels, including but not limited to prescription drugs, over-the-counter drugs, or specific brand-name medications. Through 1D-ISACNN processing, the system can learn the unique patterns, text styles, and other visual markers of each medicine bottle label, thus achieving accurate classification. The self-attention mechanism of this neural network allows the model to automatically emphasize feature regions that are crucial for classification when processing images with complex backgrounds or under different lighting conditions. This is particularly important in medicine bottle recycling systems, as the appearance of medicine bottles may vary due to storage conditions and wear during use. By automatically adjusting the focus of attention, 1D-ISACNN can adapt to these variations, improving the system's robustness and accuracy. Therefore, 1D-ISACNN provides a powerful tool for medicine bottle image recognition, efficiently extracting useful information from complex data and performing accurate feature classification. This improves the automation level of medicine bottle management systems, ensures drug safety and compliance, and has a profound impact on the healthcare industry.

[0083] Step S140: Identify the medicine bottle object based on key features to obtain the identification result of the medicine bottle type, and feed the identification result back to the user terminal with access rights so as to recycle the medicine bottle object of the corresponding medicine bottle type.

[0084] Specifically, the medicine bottle recycling system identifies medicine bottle objects based on key features, obtains the identification result of the medicine bottle type, and feeds back the identification result to the user terminal with access rights so that the medicine bottle objects of the corresponding medicine bottle type can be recycled.

[0085] Combination Figure 2 As shown in the specific embodiments, the hospital medicine bottle recycling method based on image recognition provided by the present invention is a key technology for ensuring drug safety and preventing unauthorized access in systems with high security requirements, such as hospital drug management systems. Biometric recognition technology uses unique personal biometric features for identity verification, including fingerprints, iris scans, facial recognition, and voice recognition.

[0086] In the process of medicine bottle recycling, using biometric technology to verify the identity of the person retrieving or recycling the medicine bottle can effectively prevent unauthorized access to and handling of medicines. The algorithm formula is as follows:

[0087] S=sum((T[i]-R[i])^2for iin I) <threshold。

[0088] Where T[i] is the template biometric data, which is the user's biometric data pre-stored in the system. This data is collected during user registration, such as fingerprint images, iris patterns, or facial features. R[i] is the real-time captured biometric data, which is the data captured in real time by the biometric scanning device during user authentication. S is the sum of the squared errors between the template biometric data and the real-time captured biometric data, which is used to measure the similarity between the template and the real-time captured data. I is the set of indexes of data points, used to iterate over feature points. threshold is the threshold used to determine whether authentication is successful. If the value of S is lower than this threshold, the identity is considered to match; otherwise, it is considered not to match.

[0089] In this embodiment, biometric identification is mainly used in the following aspects:

[0090] Identity verification: The system needs to verify the identity of the healthcare personnel who take or retrieve the medicine bottle. By scanning and verifying the biometrics of the healthcare personnel, the system can ensure that only authorized healthcare personnel can access specific medications.

[0091] Operation logs: The identity of the operator is recorded for each drug retrieval or disposal operation, providing a complete audit trail and helping to improve the transparency and traceability of drug management.

[0092] Security Management: Biometric technology adds a layer of security to prevent unauthorized access or misuse of medications. The system can automatically lock and notify the administrator after detecting multiple unsuccessful attempts.

[0093] In practice, users are first required to scan themselves using a biometric scanner, such as placing their finger on a fingerprint reader or facing a facial recognition camera. The real-time data captured by the device is compared with pre-stored template data in a database. The user's identity is verified based on the comparison result (i.e., whether the calculated S-value is below a threshold). If verification is successful, the user is authorized to perform subsequent operations; if it fails, the system denies access and records the attempt. The application of this biometric identification system not only improves the security of drug management but also reduces illegal and erroneous operations, improves the overall efficiency and compliance of drug use, and helps hospitals enhance the automation and intelligence of their drug management processes.

[0094] In this embodiment, ensuring the secure, accurate, and timely recording and synchronization of data to the Hospital Information System (HIS) is crucial, as it relates not only to drug regulatory compliance but also to drug safety management and the quality of medical services. In the medication bottle management system, every instance of medication dispensing and retrieval must be recorded and synchronized to the HIS system. To ensure data security, encryption technology is a common practice.

[0095] In this embodiment, the algorithm formula for data recording and synchronization operations is as follows:

[0096] D=Encrypt(K,concat(ID,Time,H[n],U)).

[0097] Where D is the encrypted data packet to be sent to the HIS system. Encrypt is the encryption function used to encrypt the data and ensure security during transmission. K is the key used to encrypt the data; in practical applications, key management is an important security issue. concat(ID,Time,H[n],U) is a function used to concatenate the bottle identifier (ID), timestamp (Time), bottle identification feature (H[n]), and user identifier (U) to form a single data string.

[0098] The above data items include:

[0099] ID: Medicine bottle identifier. Each medicine bottle has a unique identification code.

[0100] Time: Timestamp, records the specific time when the operation occurred.

[0101] H[n]: Identification features of the medicine bottle, including the type, size, and drug information of the medicine bottle.

[0102] U: User ID, i.e., the operator's identity information.

[0103] In this embodiment, every operation involving the medication (such as retrieval or disposal) needs to be meticulously recorded. The operation record includes the time, location, operator, and specific information about the medication. This information is first recorded locally and then encrypted before being synchronized to the hospital's central information system. Therefore, detailed recording of each operation helps the hospital track the flow of medications, which is crucial for subsequent medication safety management, audits, and compliance reporting. Through encryption, even if the data is intercepted during transmission, it is difficult for unauthorized third parties to interpret, which is vital for hospitals containing sensitive medical information. Furthermore, timely synchronization of medication operation data to the HIS system helps the hospital update medication inventory status in real time, optimize medication inventory management, reduce medication shortages or surpluses, and improve the efficiency and quality of medical services.

[0104] For example, when a healthcare worker retrieves a medication from the drug management system, the system automatically records all relevant information about the transaction (drug ID, retrieval time, retrieving person ID, etc.), encrypts this information using a preset security protocol, and then sends it to the Hospital Information System (HIS). Within the HIS, this data is used to generate drug usage reports, update inventory, and for potential security audits. This data recording and synchronization mechanism not only improves the automation and intelligence of hospital drug management but also strengthens internal monitoring and management of drug flow, ensuring the quality of medical services and patient safety.

[0105] In this embodiment, intelligent decision support is also a crucial function. By analyzing drug usage data and storage status, it uses appropriate data analysis algorithms to generate inventory management and early warning suggestions. This helps hospitals effectively manage drug inventory, prevent drug shortages or expiration, and improve drug utilization efficiency. The intelligent decision support system mainly includes two core functions: inventory forecasting and early warning generation.

[0106] In this embodiment, the inventory forecasting algorithm formula is:

[0107] Stock_pred=alpha*sum(S[i]*exp(-beta*(Tt[i]))for iin I).

[0108] Where Stock_pred represents the predicted inventory demand, which is the predicted drug demand based on historical data over a future period. S[i] represents the number of bottles taken out during the i-th use, indicating the actual number of bottles taken out in the i-th retrieval event. t[i] represents the time point of the i-th use, recording the specific time when each retrieval event occurs. T represents the current time, the current time point when making the prediction. alpha and beta are adjustment coefficients used to simulate the decay of drug usage rate; alpha is typically used to adjust the sensitivity of the prediction, while beta affects the decay rate of the time's impact on drug usage. I is the index set used to iterate through all recorded drug usage events.

[0109] It should be noted that the exponential decay model is based on past usage patterns, considers the time decay effect of drug use, and predicts future inventory demand. The model assumes that the impact of early usage records on current demand gradually decreases over time.

[0110] In this embodiment, the algorithm formula for generating the warning information is:

[0111] Alert = if(Stock_current) <Stock_safe)then'Low Stock'else'Stock OK'。

[0112] Here, Stock_current represents the current inventory level, which is the total inventory of all medicines currently recorded by the system. Stock_safe represents the safety stock level, which is the minimum safety stock level set to ensure the continuity of medicine supply. Alert represents the warning information, which is the corresponding warning information generated by the system based on the comparison between the current inventory and the safety stock level.

[0113] If the current inventory falls below the safety level, the system will generate a low inventory warning, prompting managers to take measures such as replenishing the inventory. This warning mechanism helps prevent drug shortages and ensures that the hospital can continue to provide necessary medical services.

[0114] In practical applications, intelligent decision support systems can significantly improve the efficiency and responsiveness of drug management. For example, based on drug usage data from the past few months, inventory forecasting models can predict drug demand for the next few weeks. This not only helps hospitals optimize drug procurement plans but also avoids financial waste or drug expiration due to excess inventory. Simultaneously, the early warning generation function can monitor drug inventory status in real time. Once inventory is detected to be falling to a critical level, the system will automatically notify management to take timely measures to replenish inventory or adjust drug usage policies, ensuring the continuity and safety of hospital operations. Through this intelligent decision support, hospitals can manage their drug inventory more effectively, reduce the cost of emergency purchases, improve the rationality and efficiency of drug use, and enhance the quality of medical services and patient satisfaction.

[0115] The aforementioned image recognition-based method for recycling hospital medicine bottles involves acquiring medicine bottle image data and preprocessing it to identify visual features that characterize the medicine bottle objects. Then, empirical wavelet transform is used to extract features from the preprocessed image data, resulting in a medicine bottle feature set. Subsequently, a one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features in the feature set, using the self-attention mechanism within the neural network to obtain key features that distinguish different types of medicine bottles. Finally, based on the extracted key features, the medicine bottle objects are identified to obtain the medicine bottle type identification result, which is then fed back to a user terminal with access permissions for recycling of the corresponding medicine bottle type. This method can automatically identify medicine bottle label information, verify the identity of operators, and synchronize drug usage data to the hospital information system in real time, thereby achieving efficient management and monitoring of drug flow. A one-dimensional improved self-attention enhanced convolutional neural network (1D-ISACNN) performs in-depth analysis and classification of extracted features to accurately identify the type and contents of medicine bottles, improving the intelligence level and security of hospital drug management, and thus significantly improving the management efficiency and response speed of the drug supply chain.

[0116] like Figure 3 As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention acquires medicine bottle image data and preprocesses the medicine bottle image data to identify the visual features of the medicine bottle in the medicine bottle image that characterize the visual information of the medicine bottle object. Specifically, the method includes the following steps:

[0117] Step S112: Denoise the medicine bottle image data, adjust the contrast of the medicine bottle image data, and perform grayscale processing and edge enhancement on the medicine bottle image data.

[0118] Step S114: The medicine bottle image data is smoothed by Gaussian filtering to remove high-frequency noise from the medicine bottle image data.

[0119] like Figure 4 As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention acquires medicine bottle image data and preprocesses the medicine bottle image data to identify the visual features of the medicine bottle in the medicine bottle image that characterize the visual information of the medicine bottle object. Specifically, it also includes the following steps:

[0120] Step S116: Obtain the spatial coordinates of the filter, and traverse the pixel value of the medicine bottle image data at any spatial coordinate and the surrounding pixels according to the spatial coordinates.

[0121] Step S118: Obtain the weight value of the Gaussian filter kernel at the spatial coordinates through the Gaussian function, and assign different weights to the pixels based on the weight values ​​to obtain the pixel values ​​corresponding to the preprocessed medicine bottle image data at the corresponding spatial coordinates.

[0122] like Figure 5 As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention extracts features from the preprocessed medicine bottle image data through empirical wavelet transform to separate the visual features of the medicine bottles from the image data and obtain a medicine bottle feature set. Specifically, the method includes the following steps:

[0123] Step S122: Perform Fourier transform on the medicine bottle image data to convert the medicine bottle image data from the spatial domain to the frequency domain in order to analyze the frequency components of the medicine bottle image data.

[0124] Step S124: Call the filter function of any frequency band to select the corresponding frequency range from the frequency domain, and call the complex exponential function to perform Fourier transform and inverse Fourier transform according to the spatial position and frequency of the medicine bottle image data.

[0125] like Figure 6As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention calls a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of medicine bottles in the feature set of medicine bottles, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism. Specifically, it includes the following steps:

[0126] Step S132: Extract local visual features of the medicine bottle object from the convolutional layer of the one-dimensional improved self-attention enhanced convolutional neural network, and enhance the sensitivity of the one-dimensional improved self-attention enhanced convolutional neural network to key features based on the local visual features through the self-attention mechanism.

[0127] Step S134: Obtain the convolution kernel range during the convolution operation of the one-dimensional improved self-attention enhanced convolutional neural network. The convolution kernel range is the neighborhood range of the current pixel in the medicine bottle image data. Then, call the activation function to process the bias term, the feature map of each layer, and the convolution kernel weights corresponding to the feature map during the convolution operation.

[0128] The local visual features include the label text and graphic features displayed by the medicine bottle object in a local area. The activation function is a linear rectified function. The feature map of each layer is the processing result of the previous layer. The convolutional kernel weights are used to extract key features.

[0129] like Figure 7 As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention identifies medicine bottle objects based on key features, obtains the identification result of the medicine bottle type, and feeds back the identification result to a user terminal with access rights for recycling of the corresponding medicine bottle type. The method includes the following steps:

[0130] Step S710: Obtain template biometric data and capture current biometric data in real time. The template biometric data consists of pre-stored biometric fingerprint information, iris information, and facial information. The current biometric data consists of the fingerprint information, iris information, and facial information entered by the user during identity verification.

[0131] Step S720: Calculate the sum of squared errors between the template biometric data and the current biometric data, and determine that the current biometric data has passed authentication when the sum of squared errors is lower than the first threshold.

[0132] The sum of squared errors is used to measure the similarity between the template biometric data and the current biometric data. The lower the sum of squared errors, the higher the similarity between the template biometric data and the current biometric data.

[0133] like Figure 8As shown, in one embodiment, the hospital medicine bottle recycling method based on image recognition provided by the present invention further includes the following steps:

[0134] Step S810: Obtain the number of medicine bottle objects taken out in any medicine retrieval event and the time point when the medicine retrieval event occurred, and iterate through all recorded medicine retrieval events through the index set to predict the inventory demand of the corresponding medicine based on the current time point and historical medicine retrieval events.

[0135] Step S820: When the current inventory of the corresponding medicine is lower than the preset safety stock level, an early warning message is generated and fed back to the user terminal so that the corresponding medicine can be replenished according to the inventory demand.

[0136] The image recognition-based hospital medicine bottle recycling device provided by the present invention will be described below. The image recognition-based hospital medicine bottle recycling device described below can be referred to in correspondence with the image recognition-based hospital medicine bottle recycling method described above.

[0137] like Figure 9 As shown, in one embodiment, a hospital medicine bottle recycling device based on image recognition includes an image preprocessing module 910, a feature extraction module 920, a feature classification module 930, and a medicine bottle recycling module 940.

[0138] The image preprocessing module 910 is used to acquire medicine bottle image data and preprocess the medicine bottle image data to identify the medicine bottle visual features in the medicine bottle image that represent the visual information of the medicine bottle object.

[0139] The feature extraction module 920 is used to extract features from the preprocessed medicine bottle image data through empirical wavelet transform, so as to separate the visual features of the medicine bottle from the medicine bottle image data and obtain the medicine bottle feature set.

[0140] The feature classification module 930 is used to call a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of medicine bottles in the feature set of medicine bottles, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0141] The medicine bottle recycling module 940 is used to identify medicine bottle objects based on key features, obtain the identification result of the medicine bottle type, and feed back the identification result to the user terminal with access rights so as to recycle the medicine bottle objects of the corresponding medicine bottle type.

[0142] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features on the surface of the medicine bottle. The key features include the label text on the medicine bottle used to identify the type of medicine bottle and the type of medicine bottle.

[0143] In this embodiment, the image preprocessing module of the hospital medicine bottle recycling device based on image recognition provided by the present invention is specifically used for:

[0144] The image data of the medicine bottle is subjected to noise reduction, contrast adjustment, grayscale conversion, and edge enhancement.

[0145] Gaussian filtering is used to smooth the medicine bottle image data in order to remove high-frequency noise.

[0146] In this embodiment, the image preprocessing module of the hospital medicine bottle recycling device based on image recognition provided by the present invention is further used for:

[0147] Obtain the spatial coordinates of the filter, and then iterate through the pixel values ​​of the medicine bottle image data at any spatial coordinate and the surrounding pixels based on the spatial coordinates.

[0148] The weight values ​​of the Gaussian filter kernel at the spatial coordinates are obtained by using the Gaussian function, and different weights are assigned to the pixels based on the weight values ​​to obtain the pixel values ​​corresponding to the spatial coordinates of the preprocessed medicine bottle image data.

[0149] In this embodiment, the feature extraction module of the hospital medicine bottle recycling device based on image recognition provided by the present invention is specifically used for:

[0150] Fourier transform is performed on the medicine bottle image data to convert it from the spatial domain to the frequency domain in order to analyze the frequency components of the medicine bottle image data.

[0151] Call the filter function of any frequency band to select the corresponding frequency range from the frequency domain, and call the complex exponential function to perform Fourier transform and inverse Fourier transform based on the spatial location and frequency of the medicine bottle image data.

[0152] In this embodiment, the feature classification module of the hospital medicine bottle recycling device based on image recognition provided by the present invention is specifically used for:

[0153] The convolutional layers of a one-dimensional improved self-attention enhanced convolutional neural network extract local visual features of the medicine bottle object from the feature set of the medicine bottle, and enhance the sensitivity of the one-dimensional improved self-attention enhanced convolutional neural network to key features based on the local visual features through a self-attention mechanism.

[0154] Obtain the convolution kernel range during the convolution operation of the one-dimensional improved self-attention enhanced convolutional neural network. The convolution kernel range is the neighborhood range of the current pixel in the medicine bottle image data. Then, call the activation function to process the bias term, the feature map of each layer, and the convolution kernel weights corresponding to the feature map during the convolution operation.

[0155] The local visual features include the label text and graphic features displayed by the medicine bottle object in a local area. The activation function is a linear rectified function. The feature map of each layer is the processing result of the previous layer. The convolutional kernel weights are used to extract key features.

[0156] In this embodiment, the hospital medicine bottle recycling device based on image recognition provided by the present invention further includes a biometric authentication module, used for:

[0157] The system acquires template biometric data and captures current biometric data in real time. The template biometric data consists of pre-stored fingerprint, iris, and facial information, while the current biometric data consists of the fingerprint, iris, and facial information entered by the user during authentication.

[0158] Calculate the sum of squared errors between the template biometric data and the current biometric data, and determine that the current biometric data is authenticated when the sum of squared errors is lower than a first threshold.

[0159] The sum of squared errors is used to measure the similarity between the template biometric data and the current biometric data. The lower the sum of squared errors, the higher the similarity between the template biometric data and the current biometric data.

[0160] In this embodiment, the hospital medicine bottle recycling device based on image recognition provided by the present invention further includes an inventory early warning module, used for:

[0161] This function retrieves the number of medicine bottles retrieved in any given medication retrieval event and the time of the event. It then iterates through all retrieval events using an index set to predict the corresponding medication's inventory demand based on the current time and historical retrieval events.

[0162] When the current inventory of a corresponding drug is lower than the preset safety stock level, an early warning message is generated and fed back to the user terminal so that the corresponding drug can be replenished according to the inventory demand.

[0163] Figure 10 This example illustrates a schematic diagram of the physical structure of an electronic device, which can be a smart terminal. Its internal structure diagram can be as follows: Figure 10As shown. The electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an image recognition-based method for recycling hospital medicine bottles, which includes:

[0164] Acquire medicine bottle image data and preprocess the medicine bottle image data to identify the visual features of the medicine bottle in the medicine bottle image that represent the visual information of the medicine bottle object;

[0165] Feature extraction is performed on the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data, thus obtaining the medicine bottle feature set.

[0166] A one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features of medicine bottles in the feature set of medicine bottles, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0167] Based on key features, the medicine bottle object is identified to obtain the identification result of the medicine bottle type, and the identification result is fed back to the user terminal with access rights so that the medicine bottle object of the corresponding medicine bottle type can be recycled.

[0168] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features on the surface of the medicine bottle. The key features include the label text on the medicine bottle used to identify the type of medicine bottle and the type of medicine bottle.

[0169] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the electronic device to which the present invention is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] On the other hand, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, implements a method for recycling hospital medicine bottles based on image recognition, the method comprising:

[0171] Acquire medicine bottle image data and preprocess the medicine bottle image data to identify the visual features of the medicine bottle in the medicine bottle image that represent the visual information of the medicine bottle object;

[0172] Feature extraction is performed on the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data, thus obtaining the medicine bottle feature set.

[0173] A one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features of medicine bottles in the feature set of medicine bottles, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0174] Based on key features, the medicine bottle object is identified to obtain the identification result of the medicine bottle type, and the identification result is fed back to the user terminal with access rights so that the medicine bottle object of the corresponding medicine bottle type can be recycled.

[0175] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features on the surface of the medicine bottle. The key features include the label text on the medicine bottle used to identify the type of medicine bottle and the type of medicine bottle.

[0176] In another aspect, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and when the processor executes the computer instructions, it implements an image recognition-based method for recycling hospital medicine bottles, the method comprising:

[0177] Acquire medicine bottle image data and preprocess the medicine bottle image data to identify the visual features of the medicine bottle in the medicine bottle image that represent the visual information of the medicine bottle object;

[0178] Feature extraction is performed on the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data, thus obtaining the medicine bottle feature set.

[0179] A one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features of medicine bottles in the feature set of medicine bottles, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism.

[0180] Based on key features, the medicine bottle object is identified to obtain the identification result of the medicine bottle type, and the identification result is fed back to the user terminal with access rights so that the medicine bottle object of the corresponding medicine bottle type can be recycled.

[0181] The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features on the surface of the medicine bottle. The key features include the label text on the medicine bottle used to identify the type of medicine bottle and the type of medicine bottle.

[0182] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory.

[0183] By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0184] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0185] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for recycling hospital medicine bottles based on image recognition, characterized in that, The method includes: Acquire medicine bottle image data and preprocess the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object; The preprocessed medicine bottle image data is subjected to feature extraction by empirical wavelet transform to separate the visual features of the medicine bottle from the image data and obtain the medicine bottle feature set. A one-dimensional improved self-attention enhanced convolutional neural network is invoked to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism; Based on the key features, the medicine bottle object is identified to obtain the identification result of the medicine bottle type, and the identification result is fed back to the user terminal with access rights so that the medicine bottle object of the corresponding medicine bottle type can be recycled. The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features of the surface of the medicine bottle object. The key features include the label text on the medicine bottle object used to identify the type of medicine bottle and the type of medicine bottle. The step of acquiring medicine bottle image data and preprocessing the medicine bottle image data to identify medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object includes: The image data of the medicine bottle is subjected to noise reduction processing, the contrast of the image data is adjusted, and grayscale processing and edge enhancement are performed on the image data of the medicine bottle; and The medicine bottle image data is smoothed by Gaussian filtering to remove high-frequency noise from the medicine bottle image data; Obtain the spatial coordinates of the filter, and traverse the pixel value of the medicine bottle image data at any spatial coordinate and the surrounding pixels according to the spatial coordinates. The weight value of the Gaussian filter kernel at the spatial coordinates is obtained by using the Gaussian function, and different weights are assigned to the pixel based on the weight value to obtain the pixel value corresponding to the preprocessed medicine bottle image data at the corresponding spatial coordinates. The step involves extracting features from the preprocessed medicine bottle image data using empirical wavelet transform to separate the visual features of the medicine bottle from the image data, resulting in a medicine bottle feature set, including: The medicine bottle image data is subjected to Fourier transform to convert the medicine bottle image data from the spatial domain to the frequency domain in order to analyze the frequency components of the medicine bottle image data; Call the filter function of any frequency band to select the corresponding frequency range from the frequency domain, and call the complex exponential function to perform Fourier transform and inverse Fourier transform according to the spatial position and frequency of the medicine bottle image data; The method of calling a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism, including: The convolutional layers of the one-dimensional improved self-attention enhanced convolutional neural network extract local visual features of the medicine bottle object in the feature set of the medicine bottle, and the self-attention mechanism enhances the sensitivity of the one-dimensional improved self-attention enhanced convolutional neural network to the key features based on the local visual features. Obtain the convolution kernel range during the convolution operation of the one-dimensional improved self-attention enhanced convolutional neural network. The convolution kernel range is the neighborhood range of the current pixel in the medicine bottle image data. Then, call the activation function to process the bias term during the convolution operation, the feature map of each layer, and the convolution kernel weights corresponding to the feature map. The local visual features include the label text and graphic features displayed by the medicine bottle object in a local area, the activation function is a linear rectified function, the feature map of each layer is the processing result of the previous layer, and the convolutional kernel weights are used to extract the key features.

2. The method for recycling hospital medicine bottles based on image recognition according to claim 1, characterized in that, The process of identifying the medicine bottle object based on the key features to obtain the identification result of the medicine bottle type, and feeding the identification result back to the user terminal with access rights for recycling of the corresponding medicine bottle type, includes the following steps: The system acquires template biometric data and captures current biometric data in real time. The template biometric data consists of pre-stored biometric fingerprint information, iris information, and facial information, while the current biometric data consists of the fingerprint information, iris information, and facial information entered by the user during identity verification. Calculate the sum of squared errors between the template biometric data and the current biometric data, and determine that the current biometric data has passed authentication when the sum of squared errors is lower than a first threshold; The sum of squared errors is used to measure the similarity between the template biometric data and the current biometric data. The lower the sum of squared errors, the higher the similarity between the template biometric data and the current biometric data.

3. The method for recycling hospital medicine bottles based on image recognition according to any one of claims 1 to 2, characterized in that, The method further includes: The system retrieves the number of medicine bottles retrieved in any given retrieval event and the time of the event. It then iterates through all retrieval events recorded in the index set to predict the corresponding drug inventory demand based on the current time and historical retrieval events. When the current inventory of a corresponding drug is lower than the preset safety stock level, an early warning message is generated and fed back to the user terminal so that the corresponding drug can be replenished according to the inventory demand.

4. A hospital medicine bottle recycling device based on image recognition, characterized in that, The apparatus for implementing the image recognition-based hospital medicine bottle recycling method according to any one of claims 1 to 3, the apparatus comprising: An image preprocessing module is used to acquire medicine bottle image data and preprocess the medicine bottle image data to identify the medicine bottle visual features in the medicine bottle image that characterize the visual information of the medicine bottle object. The feature extraction module is used to extract features from the preprocessed medicine bottle image data through empirical wavelet transform, so as to separate the visual features of the medicine bottle from the medicine bottle image data and obtain the medicine bottle feature set; The feature classification module is used to call a one-dimensional improved self-attention enhanced convolutional neural network to classify the visual features of the medicine bottles in the feature set, so as to obtain key features for distinguishing different types of medicine bottle objects through the self-attention mechanism. The medicine bottle recycling module is used to identify the medicine bottle object based on the key features, obtain the identification result of the medicine bottle type, and feed the identification result back to the user terminal with access rights so as to recycle the medicine bottle object of the corresponding medicine bottle type. The visual features of the medicine bottle include the shape of the medicine bottle, the label text, and the graphic features of the surface of the medicine bottle object. The key features include the label text on the medicine bottle object used to identify the type of medicine bottle and the type of medicine bottle.

5. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.

6. A computer storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Drug information identification method and device

    CN117911668A

  • Traditional Chinese medicine image recognition method based on CNN multi-model fusion and attention mechanism

    CN118135309A