Drug vending machine based on artificial intelligence inquiry

Through the drug vending machine based on AI consultation, the closed-loop service of ‘diagnosis-treatment-drug’ has been realized, solving the problem of imbalance in supply and demand of medical resources and insufficient transparency of drug information, improving the safety and convenience of drug use, ensuring the stability of drug supply and the security of privacy data.

CN120472588APending Publication Date: 2025-08-12肖淼淼

Patent Information

Application Number
CN202510456536.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, there are problems such as imbalance in the supply and demand of medical resources, complex and inefficient drug purchase processes, insufficient transparency of drug information, weak accessibility of primary drugs, closed-loop fragmentation of diagnostic and treatment drug chains, delayed supply of emergency medication, lack of full-chain control mechanisms, and weak privacy data protection, resulting in waste of medical resources and insufficient safety of patients' medication.

Method used

Design a drug vending machine based on AI consultation, integrating AI consultation system, drug storage warehouse, control system, payment system and printing device to realize the closed-loop service of "diagnosis-treatment-drug" and ensure drug safety and data compliance through multi-modal interaction, intelligent triage, personalized drug recommendation, intelligent drug storage and control, full-chain closed-loop management and privacy data protection.

Benefits of technology

It has achieved the full process of "diagnosis-treatment-drug" service in 3 minutes, improved the safety and convenience of medication, ensured the stability of drug supply and the security of privacy data, and reduced the risk of waste of medical resources and privacy leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472588A_ABST
    Figure CN120472588A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic medicine vending machine based on AI inquiry. The automatic medicine vending machine comprises a machine body, an intelligent interaction system, an AI inquiry system, a medicine storage bin, a control system, a payment system and a printing device. A constant-temperature and constant-humidity system and a disinfection and air purification module are arranged in the machine body. The intelligent interaction system collects symptom information in a multi-mode mode, and the AI inquiry system achieves symptom analysis, intelligent triage and personalized medication recommendation based on a medical knowledge graph and a natural language processing technology. The medicine storage bin carries a three-dimensional matrix type medicine cabinet and an intelligent inventory system, and intelligent replenishment is carried out through an LSTM algorithm. And the control system adopts a controller and triple verification to realize high-precision medicine discharging operation. The payment system supports multiple settlement modes and block chain evidence storage data. And the printing device outputs the medication guide sheet and the anti-counterfeit label. According to the invention, AI and automation technologies are deeply integrated, the service of less than or equal to 3 minutes in the whole process of inquiry-payment-medicine dispensing is realized, and the safety and convenience of medicine use are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical equipment, and in particular to an automatic medicine vending machine based on artificial intelligence (AI) consultation. Background Art

[0002] Despite the rapid development of artificial intelligence technology, especially in the medical field, which has spawned breakthrough applications such as AI-assisted diagnosis, the traditional drug sales model is still subject to multiple structural contradictions:

[0003] 1. Imbalance between supply and demand of medical resources: The growth in the number of medical staff lags behind the increase in demand for medical treatment, and the service capacity of primary medical institutions is insufficient.

[0004] 2. The drug purchasing process is complex and inefficient: Traditional drug purchasing requires patients to travel back and forth to hospitals or pharmacies, going through steps such as registration, waiting, doctor consultation, prescription payment, and drug collection. The process chain is long and the links are fragmented, resulting in a double loss of time and economic costs, which is particularly burdensome for the elderly and patients with limited mobility.

[0005] 3. Insufficient transparency of drug information: Patients lack authoritative and real-time channels to obtain drug information, and have a vague understanding of core information such as drug indications, contraindications, and adverse reactions. Self-medication is prone to dosage deviations or incompatibilities, threatening medication safety.

[0006] 4. Weak access to primary-level medicines: Due to geographical constraints, remote areas have insufficient coverage of the drug supply chain, and primary-level health institutions often face drug shortages and supply disruptions. Patients are forced to purchase medicines across regions or delay treatment, exacerbating health inequalities.

[0007] To address the above issues, a number of online medical consultation platforms and drug delivery services have emerged in recent years. However, these services still have the following shortcomings:

[0008] 1. Fragmented closed-loop diagnosis, treatment, and medication: Existing online consultation platforms only complete initial disease screening and fail to establish a complete closed-loop service chain from diagnosis to treatment to medication. Even after receiving an electronic prescription, patients still need to complete discrete offline steps such as price verification at the pharmacy, medical insurance settlement, and medication pickup. This creates a fragmented service model of "online diagnosis combined with offline errands." This causes chronic patients to interrupt treatment due to cumbersome procedures, exacerbating the waste of medical resources and insufficient patient compliance.

[0009] 2. Delayed supply of emergency medications: Drug distribution relies on logistics networks, and delivery timeliness is poor in remote areas (usually 24-72 hours), making it difficult to meet the immediate medication needs of sudden illnesses or acute attacks of chronic diseases. Furthermore, cold chain drugs are susceptible to temperature fluctuations during distribution. Temperature fluctuations caused by extreme weather, disconnected temperature control in transit, and cold chain breaks at the end of distribution can easily lead to the loss of their biological activity and reduce the therapeutic effectiveness of cold chain drugs.

[0010] 3. Lack of a comprehensive control mechanism: The existing platform lacks a comprehensive, closed-loop control mechanism encompassing prescription review, medical insurance payment, drug distribution, and medication guidance. Prescription processes are flawed, allowing patients to purchase medications directly. There is no automated screening system for contraindications or real-time verification of allergies based on health records. Medical insurance payment platforms are not fully integrated, preventing prescription data from being synchronized with regulatory authorities in real time. This leads to regulatory blind spots such as prescription abuse and medical insurance fraud. Drug information exchange is simplistic and relies on static text descriptions, making it easy for patients to make dosage errors or develop incompatibilities due to cognitive biases.

[0011] 4. Weak protection of privacy data: Online medical consultations involve patients' sensitive health data, but some Internet online medical consultation platforms adopt a centralized data storage model, with a weak awareness of data security risks, and there are risks of hacker attacks and internal leaks; biometric information such as voice and images does not use localized encryption technology, resulting in the risk of patient privacy leakage and violating medical data compliance requirements.

[0012] Therefore, it is necessary to design a medicine vending machine based on AI consultation to realize the resource integration of AI-assisted diagnosis technology and medicine sales, and realize the "diagnosis-treatment-medicine" closed-loop service, thereby effectively alleviating the livelihood issues of tight medical resources and difficulty for patients to see a doctor. Summary of the Invention

[0013] The present invention aims to provide an AI-powered medicine vending machine to address the aforementioned issues in the prior art. The vending machine can achieve the following functions:

[0014] 1. "Diagnosis-Treatment-Medication" Closed-Loop Service Chain

[0015] Based on the AI-powered medical consultation system, patients input their symptoms and upload their test reports through multimodal interaction (voice, touchscreen, medical imaging). The system then generates a preliminary diagnosis using medical knowledge graphs and natural language processing technology. The system then uses the Modified Early Warning Score (MEWS) system to determine the urgency of the condition (emergency / non-emergency / transfer to a doctor). The diagnostic results are then matched to the corresponding department's logical branch through intelligent triage, generating a personalized medication plan and automatically reviewing the prescription, seamlessly transitioning to drug dispensing. The entire process takes ≤3 minutes, achieving an efficient closed-loop "diagnosis-treatment-medication" system.

[0016] 2. Intelligent storage and management of medicines

[0017] The drug storage warehouse utilizes a three-dimensional matrix-style medicine cabinet, which manages conventional and cold-chain medications in separate compartments. It also features built-in UV disinfection and HEPA purification modules. A radio frequency identification (RFID) intelligent inventory system monitors inventory in real time, while a six-axis robotic arm coordinates pneumatic ducting for precise medication delivery. The intelligent replenishment system, based on a long-short-term memory (LSTM) neural network, predicts demand, automatically generates replenishment instructions, and pushes them to the pharmaceutical company's enterprise resource planning (ERP) system, ensuring a long-term, dynamic, and stable drug supply.

[0018] 3. Closed-loop control of the entire chain of "prescription review - medical insurance payment - drug distribution - medication guidance"

[0019] Prescriptions undergo triple verification (blockchain hash value verification, real-time inventory matching, and contraindication screening), with verification taking less than 800ms. The payment system supports QR code scanning, near-field communication (NFC), and offline medical insurance settlement. Two-factor authentication (face recognition + dynamic verification code) ensures compliance. Transaction data is stored on the Hyperledger Fabric 2.3 blockchain (latency ≤ 1.5 seconds) and synchronized to the regulatory platform. After medication is dispensed, a dual-channel thermal printer outputs encrypted QR code medication instructions and a UV fluorescent anti-counterfeiting label, and medication instructions are broadcasted through a dialect voice engine.

[0020] 4. Privacy data protection and upload supervision

[0021] User authentication utilizes offline encryption using the SM2 algorithm and infrared 3D structured light facial recognition. Consultation data is locally stored via a federated learning framework (raw data retention is ≤5 years), with only gradient parameters uploaded. Operation logs are encrypted using the SM4 national encryption algorithm, stored in tamper-proof storage, and synchronized to blockchain nodes. Data transmission utilizes HTTPS bidirectional authentication (SSL / TLS 1.3 protocol) throughout the entire process, and biometric information is locally encrypted to ensure compliance with medical data compliance requirements.

[0022] To achieve the above functions, the AI-information-based medicine vending machine designed by the present invention includes a body, an intelligent interactive system, an AI-information-based medicine vending machine, a medicine storage warehouse, a control system, a payment system, and a printing device.

[0023] The machine body is used to carry and fix other components.

[0024] The intelligent interactive system is used for human-computer interaction and is compatible with multiple system login methods. Patients can describe disease symptoms, upload test reports, query medical results and drug information, etc. through multiple modes.

[0025] The AI medical consultation system is integrated into the body and is used to analyze and judge based on the symptoms input by the patient or the uploaded examination report, and to provide diagnosis results and medication recommendations.

[0026] The medicine storage bin is used to store various medicines, and each medicine storage bin is equipped with an independent medicine dispensing mechanism.

[0027] The control system is used to control the operation of the entire device, including receiving instructions from the AI medical consultation system, controlling the dispensing of medicines by the dispensing agency, printing medicine purchase receipts, etc.

[0028] The payment system supports multiple payment methods, such as code scanning payment, bank card flash payment and medical insurance card offline settlement.

[0029] The printing device is used to print medication instructions and anti-counterfeiting labels, etc.

[0030] Furthermore, the device is constructed from metal with a double-layer, explosion-proof tempered glass casing, and features a built-in constant temperature and humidity system (temperature setting range: 2-25°C, humidity ≤40%), allowing for compartmentalized storage of conventional and cold-chain medicines. It also incorporates a HEPA air purification module and ultraviolet disinfection device, with daily scheduled UV disinfection.

[0031] Furthermore, the intelligent interactive system supports multiple account login methods, including medical insurance card recognition, electronic social security card scanning, and face binding to prescription accounts. The intelligent interactive system supports multimodal interactive interfaces such as voice dialogue, touch screen input, text question and answer, and camera-assisted image recognition. The intelligent interactive system also has an adaptive module that automatically switches the interface mode according to the user's age and usage (such as elderly mode: large font + extended touch response time). The intelligent interactive system interface is also equipped with privacy protection mechanisms such as anti-peep screen and voice privacy noise reduction technology.

[0032] Furthermore, the AI medical consultation system includes an AI medical consultation module, an intelligent triage module, a drug recommendation and management module, and an interconnection module.

[0033] Furthermore, the AI consultation module adopts symptom analysis based on medical knowledge graph and natural language processing (NLP). First, a speech recognition model based on deep learning (Transformer architecture) is deployed, combined with beamforming noise reduction technology (signal-to-noise ratio ≥ 65dB), to convert the voice input by the user through the intelligent interactive system into text, and extract symptom keywords. The key indicators in the test report are analyzed by optical character learning technology (OCR). Multi-source data such as voice text, touch screen options, and image features are integrated into a structured patient data set, and timestamps and data sources are marked for subsequent diagnostic reasoning. Secondly, using a pre-trained medical NLP model, the present invention performs entity recognition (such as disease name, symptom location) and relationship extraction (such as "headache accompanied by nausea") on patient symptom descriptions based on the biomedical language representation model (BioBERT). Based on the constructed medical knowledge graph (including the disease-symptom-drug-contraindication association relationship), multi-hop reasoning is performed through the graph database (Neo4j). For example, if you enter "persistent chest pain," the map automatically links to disease nodes such as "angina pectoris" and "myocardial infarction," and searches for corresponding test and examination indicator requirements (such as whether the electrocardiogram and myocardial enzyme spectrum meet the symptoms of "angina pectoris" and "myocardial infarction"). Based on the test and examination data uploaded by the patient (such as abnormal electrocardiograms), the confidence weights of related diseases in the knowledge map are dynamically adjusted, prioritizing matching high-probability diagnostic paths.

[0034] Furthermore, the intelligent triage module can triage patients according to the urgency of their symptoms (such as emergency / non-emergency / transfer to manual), and intelligently triage the corresponding clinical departments according to the patient's chief complaint and symptoms. The MEWS score is integrated, and the vital signs score is calculated through the rule engine to accurately triage the urgency of the patient's symptoms based on the score. A MEWS score ≥ 5 triggers emergency triage, reminds the patient through intelligent interaction, and provides relevant information about the nearest general hospital, and assists the patient in calling 120 for help when necessary. When the MEWS score is < 5, the department is associated with the symptoms, the corresponding department's diagnostic model is called, and the diagnosis result is given according to the AI model. Complex diseases with a diagnostic confidence lower than the threshold (<70%) or with contradictory symptoms detected can be transferred to the Internet hospital doctor's side for video consultation through manual transfer.

[0035] Furthermore, the drug recommendation and control module can make personalized recommendations based on the user's medication history, allergy history, and drug inventory. A personalized medication plan is generated by combining the patient's health record, drug inventory status, and contraindication conflict matrix. A collaborative filtering algorithm is used to prioritize the recommendation of drugs that are frequently used by similar patients and have lower side effects. Based on the patient's weight and the user's liver and kidney function data retrieved from the regional electronic health record platform, the safe dosage range is calculated through a pharmacokinetic model, and a maximum daily dose warning is marked. After the prescription of ordinary drugs is reviewed and approved by the AI consultation system, it is directly pushed to the payment system to activate the payment interface. For nationally controlled drugs and psychotropic drugs, the public security system is automatically linked to realize "two-person, two-certificate" real-name authentication and filing.

[0036] Furthermore, the interoperability module supports multi-protocol adaptation, including HL7 FHIR, WebService, and HTTP / JSON, enabling API integration with external systems (hospitals, health insurance, and electronic prescription platforms). The module also includes a built-in video consultation program and is compatible with mainstream internet hospital platforms.

[0037] Furthermore, the drug storage warehouse is equipped with a three-dimensional matrix medicine cabinet and an RFID intelligent inventory system (error rate <0.01%). The three-dimensional matrix medicine cabinet uses a robotic arm to coordinate the dispensing of medicines, and adopts corresponding conveying devices for different medications. At the same time, the drug storage warehouse is equipped with an intelligent replenishment system. The built-in LSTM model uses historical sales data, seasonal, regional and other multi-dimensional data for learning and prediction, generates replenishment orders and pushes them to the partner pharmaceutical company's ERP system, making replenishment more in line with actual needs. The LSTM forecasting model is based on multidimensional data (historical sales, seasonality, regional demand, and external variables). It extracts features through sliding windows and Fourier transforms, constructs a three-layer LSTM network (128 hidden units), and introduces an attention mechanism to capture key timing nodes. The model is trained using the Mean Square Error (MSE) loss function, the Adaptive Moment Estimation (Adam) optimizer, and a regularization strategy to predict drug demand for the next three days. Combined with real-time inventory and supply chain constraints, the optimal replenishment order is generated through Integer Linear Programming (ILP) and pushed to the pharmaceutical company's ERP system, achieving a demand forecast accuracy of ≥92% and a 40% increase in replenishment efficiency.

[0038] Furthermore, the drug storage warehouses are equipped with a built-in RFID smart inventory system for real-time and accurate monitoring of drug inventory status. This system includes: RFID tags, affixed to each box of medication, storing the drug's unique Electronic Product Code (EPC) and key information; RFID readers, installed within the drug storage warehouses, with high reading accuracy (less than 0.01%), enabling rapid reading of tag information; and a data management platform for receiving, processing, and storing drug information transmitted by the RFID readers, enabling real-time inventory updates and generating inventory reports.

[0039] Furthermore, the drug storage warehouse has a built-in LSTM prediction model, the implementation of which includes the following steps:

[0040] Data preprocessing and feature engineering: Input multidimensional data includes historical sales data (sliding window taking a 7-day average), seasonal factors (Fourier transform to extract periodic characteristics), regional demand heat maps (population flow density within geographic fences), and external variables (such as influenza outbreak index). Z-score standardization and linear interpolation are used to fill in the data format.

[0041] Model architecture design: A three-layer stacked LSTM structure is adopted, with 128 hidden units in each layer. The input sequence length is set to 30 days, and the output layer is connected to a fully connected network to predict drug demand in the next three days. An attention mechanism is introduced to dynamically weight key time nodes (such as weekend sales peaks) to enhance the model's ability to capture sudden demand.

[0042] Training and optimization: Use MSE as the loss function, combine with Adam optimizer (initial learning rate 0.001, decay rate reduced to 0.5 every 10 rounds), add Dropout (probability 0.3) and L2 regularization (coefficient 1e -4 ) to prevent overfitting; the training data is divided into training set, validation set and test set according to the ratio of 8:1:1, and the early stopping method (patience = 10) is used to control the number of training rounds.

[0043] Dynamic replenishment decision-making: After the model outputs predicted demand, it combines real-time inventory status (RFID inventory error rate <0.01%) with the pharmaceutical company's delivery cycle (for example, cold chain drugs must be ordered 72 hours in advance) to generate minimum cost replenishment orders through ILP, which are automatically pushed to the partner pharmaceutical company's ERP system and support manual calibration of thresholds (such as safety stock coefficients).

[0044] Furthermore, the payment system adopts a multimodal integrated design, supporting QR code payment (WeChat / Alipay), bank card flash payment, NFC and medical insurance card offline settlement functions. The system has a built-in financial-grade security chip, which interacts with the bank / medical insurance platform in real time through the SSL / TLS encryption protocol, and is equipped with a two-factor authentication module (face recognition + dynamic verification code) to ensure the compliance of medical insurance accounts. The payment terminal integrates prescription verification logic, and activates the payment interface only after the AI consultation system has reviewed and approved the prescription. The transaction data is uploaded to the drug supervision platform simultaneously. A special intelligent refund channel is configured, which can automatically trigger a refund via the original route when the drug is out of stock, and generate blockchain transaction evidence. After the payment is successful, an encrypted instruction is sent to the control system to link the drug dispensing agency, and at the same time drive the thermal printer to output medication instructions and anti-counterfeiting labels.

[0045] Furthermore, the printing device adopts a dual-channel thermal printing architecture. The first channel is equipped with a medical-specific printer. It outputs an encrypted QR code medication instruction sheet based on the AI consultation results. Scanning the code can jump to the medication video and contraindication instructions. The content complies with the drug supervision electronic prescription standards; the second channel integrates an anti-counterfeiting label printer, which uses ultraviolet fluorescent ink to generate a GS1 standard barcode containing drug traceability code, production batch number and supervision chain information, and is bound to the drug supervision platform data in real time. The error of the dual print heads working synchronously is ≤50ms, and it has a built-in paper remaining sensor and paper jam self-detection program. The matching voice prompt module is equipped with a dialect recognition engine, which can parse the content of the medication instruction sheet and generate multilingual voice reminders (including Cantonese, Sichuan and Chongqing dialect modes), which are broadcast in a targeted manner through bone conduction speakers. All printed data is stored on the blockchain by the Hyperledger Fabric 2.3 system and then uploaded to the cloud medical archive system.

[0046] Furthermore, the control system is built based on an industrial-grade programmable logic controller (PLC) and adopts a multi-threaded task scheduling architecture to achieve full-process control of the equipment. After the system receives the encrypted instructions of the AI medical consultation system through the HTTPS two-way authentication protocol, it activates the triple verification mechanism (prescription code verification, drug inventory comparison, and contraindication logic filtering) to ensure the safety of medication, and sends precise positioning instructions to the drug dispensing agency through the controller area network (CAN) bus to drive the servo motor to control the Archimedes screw drug delivery track to achieve ±0.5mm positioning accuracy, and synchronously trigger the dual-channel thermal printing module. The system integrates a real-time monitoring unit, which monitors the temperature, humidity and inventory status of the drug storage warehouse through a pressure sensor array, and automatically triggers the cold chain protection mode when an abnormality occurs. Equipped with a dual microcontroller unit (MCU) redundant design, the backup chip can be switched within 50ms when the main control chip is abnormal. All operation logs are encrypted with the SM4 national secret algorithm and stored in a tamper-proof memory, and are uploaded to the blockchain node of the drug supervision platform simultaneously.

[0047] The present invention has the following advantages:

[0048] 1. Efficient closed-loop service chain: Based on the AI consultation system and multimodal interaction technology, patients can complete the entire "diagnosis-treatment-medication" service process within 3 minutes, significantly shortening waiting time and drug purchase time, solving the problem of fragmented traditional medical processes, and improving treatment compliance among patients with chronic diseases.

[0049] 2. Precision medication and safety management: The AI system generates personalized medication plans based on patient health records, allergy history, and drug contraindication screening models. Through a triple verification mechanism and the public security system's "two-person, two-certificate" authentication system, it ensures medication safety and eliminates the risks of prescription abuse and medical insurance fraud.

[0050] 3. Intelligent dynamic inventory management: The RFID intelligent inventory system monitors drug inventory in real time and, combined with the LSTM neural network prediction model, dynamically generates replenishment instructions, which are then pushed to the pharmaceutical company's ERP system, achieving efficient coverage and stable supply of drug supply chains in remote areas.

[0051] 4. Full-chain privacy and data security: A federated learning framework is used to locally retain original medical consultation data, with only gradient parameters uploaded. Transaction and operation logs are encrypted using the SM4 national encryption algorithm and stored on the Hyperledger Fabric blockchain (latency ≤ 1.5 seconds), ensuring that data cannot be tampered with, is traceable, and complies with medical compliance requirements, reducing the risk of privacy leaks. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1A schematic diagram of the components of an AI-powered medicine vending machine;

[0053] Figure 2 A workflow diagram of a medicine vending machine based on AI consultation;

[0054] Figure 3 A diagram of the structure of a medicine vending machine based on AI consultation;

[0055] Figure 4 A schematic diagram of an intelligent interactive system for a medicine vending machine based on AI consultation;

[0056] Figure 5 A schematic diagram of an AI consultation system for a medicine vending machine based on AI consultation;

[0057] Figure 6 A schematic diagram of the medicine storage bin of an AI-powered medicine vending machine;

[0058] Figure 7 A schematic diagram of the control system of a medicine vending machine based on AI consultation;

[0059] Figure 8 A schematic diagram of the payment system for a medicine vending machine based on AI consultation;

[0060] Figure 9 A schematic diagram of a printing device for a medicine vending machine based on AI consultation;

[0061] Figure 01: Body 01, intelligent interactive system 02, AI medical consultation system 03, payment system 04, medicine storage compartment 05, printing device 06, control system 07, disinfection system 011, medicine dispensing port 012, body shell 013, internal integrated temperature and humidity control system 014, camera array 021, 8-microphone ring array 022, high-sensitivity capacitive touch screen 023, document scanner 024, medical insurance card offline reader 041, QR code payment module 042, bank card offline reader 043 DETAILED DESCRIPTION

[0062] The following, in conjunction with the accompanying drawings, describes in detail the specific implementations of the AI-based medical consultation vending machine of the present invention. However, these implementations do not limit the present invention and are provided for illustrative purposes only. By illustrating the advantages of the present invention, it will become clearer and easier to understand. This example uses a medical vending machine deployed in a community medical center as an example to illustrate its hardware configuration and system integration, system collaborative workflow, and security and maintenance mechanisms.

[0063] 1. Hardware configuration and system integration

[0064] like Figure 1The illustrated AI-powered medicine vending machine includes a housing 01, an intelligent interactive system 02, an AI medical consultation system 03, a payment system 04, a medicine storage bin 05, a printer 06, and a control system 07. Housing 01 houses medicine storage bin 05 and printer 06 and is embedded with intelligent interactive system 02, AI medical consultation system 03, payment system 04, and control system 07. Intelligent interactive system 02 is used for human-computer interaction and supports multiple login systems. Patients can describe their symptoms, upload test reports, and query medical consultation results and medication information through multiple modes. AI medical consultation system 03, embedded within the housing, analyzes and determines symptoms entered by patients or uploaded test reports, and provides diagnostic results and medication recommendations. Medicine storage bins 05 store various medications, each equipped with an independent dispensing mechanism. Control system 07 controls the entire device, including receiving instructions from the AI medical consultation system, controlling the dispensing mechanism to dispense medication, and providing instructions for printing purchase receipts. The payment system 04 supports multiple payment methods, such as code scanning payment (WeChat / Alipay), bank card flash payment, NFC near-field communication and medical insurance card offline settlement, etc. The printing device 06 is used to print medication instructions and anti-counterfeiting labels, etc.

[0065] like Figure 3The body 01 shown includes a disinfection system 011, a medicine dispensing port 012, a body shell 013 and an internal integrated temperature and humidity control system 014. The body shell 013 adopts a 304 stainless steel frame and double-layer explosion-proof tempered glass (outer layer thickness 8mm, inner layer 5mm), which not only ensures the durability of the body, but also has good explosion-proof performance and visibility. The internal integrated temperature and humidity control system 014 controls the temperature and humidity of conventional medicine warehouses and cold chain medicine warehouses. The system uses a high-precision negative temperature coefficient (Negative Temperature Coefficient, NTC) thermistor to monitor temperature changes in real time, and cooperates with semiconductor refrigeration chips and dual compressor circulation refrigeration technology to achieve precise temperature control. The conventional medicine warehouse, by utilizing the rapid cooling and heating characteristics of the semiconductor refrigeration chip and combining sensor feedback, ensures that conventional medicines are stored in a temperature and humidity environment with a temperature control range of 18-25°C and a humidity of ≤40%, effectively extending the shelf life of the medicines. The cold chain drug warehouse: through the dual compressor circulation refrigeration system, it ensures temperature control of 2-8°C and temperature fluctuation ≤±0.5°C, which greatly improves the refrigeration efficiency and stability, and reduces the impact of temperature fluctuations on cold chain drugs. The disinfection system 011 is composed of ultraviolet disinfection lamps and HEPA air purification modules. The ultraviolet disinfection lamp is an ultraviolet disinfection lamp with a wavelength of 254nm, which is started regularly during idle time (0:00-2:00 every day) for disinfection to achieve the purpose of disinfection and sterilization, and avoid affecting patient use. When the medicine is verified, the medicine door is unlocked, and the patient takes the purchased medicine through the medicine port 012.

[0066] like Figure 4 The intelligent interactive system shown in the figure includes two parts: hardware configuration and software logic. The hardware configuration includes a 21.5-inch capacitive touch screen 023, a dual camera array 021, an 8-microphone ring array 022 and a document scanner 024. The 21.5-inch capacitive touch screen 023 has a resolution of 1920×1080. The capacitive touch screen 023 supports 10-point touch and glove operation mode. It has high resolution and multiple touch operation modes, which facilitates patients to view and input information. The dual camera array 021 is composed of a 5-megapixel main camera and an infrared 3D structured light module. The 5-megapixel main camera is used to collect image information, and the infrared 3D structured light module realizes high-precision face recognition and enhances the security of identity authentication. The 8-microphone ring array 022 (beamforming angle ±15°, signal-to-noise ratio ≥65dB) can accurately collect patient voice information, reduce environmental noise interference, and improve voice recognition accuracy. The document scanner 024 supports A4 format and test report OCR recognition, and is used to scan the test reports uploaded by patients and analyze the key information therein through OCR technology.

[0067] The software logic described covers the user login stage and interactive mode switching. The user login stage supports three methods: medical insurance card recognition, electronic social security code scanning, and face binding to prescription account. The further described medical insurance card recognition reads the medical insurance card information by inserting a card reader (SM2 algorithm offline verification) to ensure information security. The further described electronic social security code scanning (decoding speed ≤ 0.3 seconds) realizes convenient login with a fast decoding speed. The further described face binding to prescription account (error recognition rate ≤ 0.001%) uses high-precision face recognition technology to complete account binding. The interactive mode switching includes elderly mode and privacy mode. The further described elderly mode enlarges the font to 24pt and extends the touch response time to 1.5 seconds to facilitate operation by the elderly. The privacy mode further described integrates multiple technologies: the anti-peep screen technology integrates a controllable viewing angle liquid crystal layer (horizontal viewing angle ≤ 30°, transmittance ≥ 85%) and a dynamic pixel masking algorithm. The former uses an electric field to regulate the arrangement of liquid crystal molecules to accurately limit the visible range of the screen, and the latter uses a camera to detect people around in real time and automatically blur sensitive information (mosaic intensity ≥ 90%), supporting one-click switching of privacy status by voice or touch; the privacy noise reduction system uses voiceprint directional transmission technology, and the bone conduction unit integrates piezoelectric ceramic vibrators and beamforming technology to focus the sound wave energy on the user's cheekbone contact area (sound pressure ≤ 40dB at 1 meter away), combined with a voiceprint separation module and an adaptive filter to eliminate ambient noise (noise reduction depth ≥ 30dB, voice clarity PESQ ≥ 3.8). At the same time, the voice signal is transmitted via the Advanced Encryption Standard (AES), and AES-256 end-to-end encrypted transmission to resist link eavesdropping and man-in-the-middle attacks. After the privacy mode is activated, the screen brightness automatically drops to 50cd / m 2 It is also linked to dynamic pixel masking, and the bone conduction broadcast dynamically adjusts the volume (±10dB) according to the ambient noise. Users can unlock information through finger vein biometric authentication by lightly touching the encrypted area, forming a three-dimensional protection mechanism of "visual restriction-voiceprint orientation-data encryption", which comprehensively guarantees the confidentiality of sensitive content such as medical consultation records and electronic prescriptions in public places.

[0068] like Figure 5The AI medical consultation system shown in the figure has a core module operating process consisting of five steps: symptom collection, intelligent triage, diagnostic reasoning, prescription generation, and control verification. Symptom collection involves patients inputting their symptoms via voice or other means. The system then uses an NLP engine to extract keywords and prompts users to upload relevant test reports (using document scanner OCR parsing), comprehensively collecting patient information. Intelligent triage uses the MEWS scoring system to determine the urgency of the condition and match it to the corresponding clinical department logical branch, enabling rapid triage. Diagnostic reasoning utilizes a knowledge graph to invoke relevant association models, combining uploaded patient data to generate a preliminary diagnosis, improving diagnostic accuracy. Prescription generation recommends appropriate medications based on diagnostic results and calculates dosages based on individual patient conditions to ensure safe and effective medication use. The AI medical consultation system is connected to the regional electronic health record platform, enabling automatic prescription renewal for chronic patients seeking follow-up appointments and medication purchases. Control verification, if controlled drugs are involved, triggers a face-to-ID card comparison with the public security system (response time ≤ 2 seconds). Biometric verification by the public security system implements "two-person, two-ID" real-name authentication, strictly controlling drug sales.

[0069] The multiple functional modules of the AI consultation system include an AI consultation module, an intelligent triage module, a drug recommendation and management module, and an interconnection module.

[0070] The AI consultation module further described adopts symptom analysis based on medical knowledge graph and NLP. First, a speech recognition model based on deep learning (Transformer architecture) is deployed, combined with beamforming noise reduction technology (signal-to-noise ratio ≥ 65dB), to convert the voice input by the user through the intelligent interactive system into text, and extract symptom keywords. The key indicators in the test report are analyzed by OCR technology. Multi-source data such as voice text, touch screen options, and image features are integrated into a structured patient data set, and timestamps and data sources are annotated for subsequent diagnostic reasoning. Secondly, the pre-trained BioBERT model is used to perform entity recognition (such as disease name, symptom location) and relationship extraction (such as "headache accompanied by nausea") on the patient's symptom description. Based on the constructed medical knowledge graph (including the relationship between disease-symptom-drug-contraindication), multi-hop reasoning is performed through the graph database (Neo4j). For example, if you enter "persistent chest pain," the map automatically links to disease nodes such as "angina pectoris" and "myocardial infarction," and searches for corresponding test and examination indicator requirements (such as whether the electrocardiogram and myocardial enzyme spectrum meet the symptoms of "angina pectoris" and "myocardial infarction"). Based on the test and examination data uploaded by the patient (such as abnormal electrocardiograms), the confidence weights of related diseases in the knowledge map are dynamically adjusted, prioritizing matching high-probability diagnostic paths.

[0071] Furthermore, the implementation of speech recognition and symptom extraction in the AI medical consultation module is based on a deep learning speech recognition model. By integrating beamforming noise reduction, Transformer architecture, and medical semantic enhancement technology, it significantly improves the accuracy of voice interaction and adaptability to medical scenarios, providing core technical support for the AI medical consultation system. Specifically, it includes the following steps:

[0072] Speech preprocessing and feature extraction: After the user's speech signal is collected by an 8-microphone ring array, beamforming noise reduction is performed using the General Sidelobe Canceller (GSC) algorithm, and the Deep Noise Suppression Challenge (DNS) model is used to improve the signal-to-noise ratio to ≥65dB. The signal is then framed and windowed, and 40-dimensional Mel Frequency Cepstral Coefficents (MFCCs) are extracted as feature input.

[0073] Transformer speech recognition model: We built an end-to-end model based on the Transformer architecture, consisting of a 6-layer encoder and decoder. The encoder uses a multi-head self-attention mechanism (8 heads, dk = 64) and a feedforward network (2048→512 dimensions). The decoder integrates masked self-attention and encoder-decoder alignment layers. Training is performed using the Connectionist Temporal Classification (CTC) loss function to achieve high-precision speech-to-text conversion.

[0074] Medical semantic enhancement and keyword extraction: After the recognized text is corrected by the rule engine and the terminology is standardized, it is input into the pre-trained BioBERT model for symptom entity recognition (such as "chest pain" and "fever"). The conditional random field (CRF) is combined to optimize the entity boundaries, and the keywords are dynamically weighted through the knowledge graph association to generate a structured symptom dataset.

[0075] Model optimization and deployment: Multi-task learning (speech recognition + symptom classification) and adversarial training are used to improve robustness. The model is compressed to a 6-layer Transformer through knowledge distillation, supporting streaming processing (segmented recognition interval ≤ 500ms), ultimately achieving efficient real-time inference with a word error rate ≤ 5% and end-to-end latency ≤ 1 second.

[0076] Furthermore, the AI consultation module's pre-trained medical NLP model performs entity recognition and relationship extraction on the patient's symptom text, specifically including the following steps:

[0077] Model fine-tuning and entity relationship labeling: Based on the pre-trained BioBERT model (12-layer Transformer structure), fine-tuning is performed on the annotated medical corpus. The CRF layer is used to accurately label symptom entities (such as "joint pain"), disease names (such as "rheumatoid arthritis"), and attribute relationships (such as "duration > 3 months"), with an entity recognition F1 value ≥ 0.92.

[0078] Knowledge graph construction and storage: Labeled entities (diseases, symptoms, drugs, contraindications) are used as nodes, relationships ("trigger", "treatment", "contraindications") are used as edges, attribute rules are defined (such as "ibuprofen-contraindications-gastric ulcer" has a confidence level of 0.95), and stored in the Neo4j graph database. It supports dynamic configuration of node attributes (International Classification of Diseases (ICD) tenth revision ICD-10 codes, dosage ranges) and edge weights.

[0079] Multi-hop reasoning and conflict verification mechanism: Cypher query language is used to implement multi-hop path search (such as "chest pain → angina pectoris → nitroglycerin → hypotension contraindications"), and conflict verification is performed in combination with real-time patient health records (allergy history, vital signs). If contraindications (such as "hypotension") are detected, high-risk drugs are automatically eliminated and an early warning is triggered.

[0080] Dynamic graph update and optimization: Through the incremental learning mechanism, the latest clinical guideline data (such as new drug contraindications and treatment plans) are synchronized every week, the graph nodes and edge relationships are updated, and the reasoning logic is optimized to ensure the timeliness and authority of the recommended plans.

[0081] The intelligent triage module further described can perform triage according to the urgency of the patient's symptoms (such as emergency / non-emergency / transfer to manual), and intelligently triage the corresponding clinical department according to the patient's chief complaint and symptoms. The MEWS score is integrated, and the vital signs score is calculated through the rule engine, and the urgency of the patient's symptoms is accurately triaged according to the score. A MEWS score ≥ 5 triggers emergency triage, and the patient is reminded through intelligent interaction. At the same time, relevant information about the nearest general hospital is provided, and the patient can be assisted in calling 120 for help when necessary. When the MEWS score is < 5, the department is associated with the symptoms, and the corresponding department's diagnostic model is called to give a diagnosis result based on the AI model. Complex diseases with a diagnostic confidence lower than the threshold (such as < 70%) or with contradictory symptoms detected can be transferred to the Internet hospital doctor's side for video consultation through manual transfer.

[0082] The drug recommendation and control module further described can make personalized recommendations based on the user's medication history, allergy history and drug inventory. A personalized medication plan is generated by combining the patient's health record, drug inventory status and contraindication conflict matrix. A collaborative filtering algorithm is used to give priority to recommending drugs that are frequently used by similar patients and have lower side effects. Based on the patient's weight and the user's liver and kidney function data retrieved from the regional electronic health record platform, the safe dosage range is calculated through a pharmacokinetic model, and a maximum daily dose warning is marked. Ordinary drugs are directly pushed to the payment system after the prescription is reviewed and approved by the AI consultation system, and the payment interface is activated. For nationally controlled drugs and psychotropic drugs, the public security system is automatically linked to realize "two-person, two-certificate" real-name authentication and filing.

[0083] The interconnectivity module supports multiple protocols such as HL7 FHIR, WebService, and HTTP / JSON, enabling API integration with external systems (hospitals, medical insurance, and electronic prescription platforms). The interconnectivity module also includes a built-in video consultation program and is compatible with mainstream internet hospital platforms.

[0084] Furthermore, the interconnection module adopts a multi-protocol adaptation architecture, which enables efficient interconnection of heterogeneous medical systems through a protocol abstraction layer and standardized data models. Specifically, it includes the following:

[0085] Protocol Adaptation Layer: Integrates a Fast Healthcare Interoperability Resources (FHIR)-compliant parser (based on the HL7 FHIR standard and developed using the HAPI FHIR framework) to achieve standardized conversion of medical data (such as electronic prescriptions and patient records) into FHIR resources (such as MedicationRequest and Patient); supports WebService interfaces (based on the Simple Object Access Protocol (SOAP)) and HTTP / JSON interfaces (following the RESTful API architectural style), automatically identifies protocol types (such as HL7 v2.x and FHIR R4) through a unified gateway, and completes cross-format data conversion (such as Extensible Markup Language (XML) and JavaScript Object Notation (JSON)).

[0086] External system integration: For the Hospital Information System (HIS), patient information synchronization and medical order issuance are achieved through HL7 v2.x messages (ADT^A01 (patient admission registration) and ORM^O01 (medical order issuance). When integrating with the medical insurance platform, transaction data is signed using the national SM2 / SM4 encryption algorithm to complete fee settlement. For integration with the electronic prescription platform, prescription data is encapsulated through FHIR Bundle resources, supporting electronic signatures and tamper-proof verification.

[0087] Video consultation integration: The system has an embedded Web Real-Time Communication (WebRTC) engine, supports 1080P video streaming (based on the H.264 encoding standard) and low-latency audio transmission (using Opus audio encoding), is compatible with mainstream Internet hospital software development kits (SDKs) (such as Tencent Health API and Alibaba Cloud Medical Video Service), implements two-way doctor-patient authentication through the OAuth 2.0 protocol, and builds a signaling server based on Socket.IO to manage session status. It also supports online preview of Digital Imaging and Communications in Medicine (DICOM) images and collaborative editing of prescriptions.

[0088] Exception handling and monitoring: A token bucket algorithm is used to limit the interface request rate to prevent system overload and implement flow control; the connection status is detected based on the heartbeat packet mechanism (interval of 10 seconds), and automatic reconnection (maximum retry number of 5 times) in the event of an exception is established to build a disconnection and reconnection mechanism; the Prometheus open source monitoring tool is used to collect API call success rate (≥99.9%) and response delay (≤500ms), and combined with the Grafana data visualization platform to generate a real-time dashboard, support alarm rule configuration (such as response timeout threshold ≥1 second trigger notification), to form an effective monitoring system; all operation logs are encrypted and stored using the SM4 national secret algorithm and synchronized to the blockchain node (based on the Hyperledger Fabric architecture) to ensure data traceability and compliance.

[0089] like Figure 6The drug storage warehouse shown can store both conventional and cold chain medications and is responsible for dispensing medications and prompting for restocking. Upon receiving a prescription, the control system locates the target compartment. A six-axis robotic arm (with a repeatability of ±0.5mm) grasps the medicine box and, following specific motion logic, transports the medicine via a pneumatic pipe to the dispensing port. Pressure control ensures drug safety during transportation. If a mechanical failure causes a drug to become stuck or the robotic arm fails to grasp the medicine (e.g., if the pressure sensor detects a weight deviation greater than 5g), the system triggers a reverse drive attempt three times. If the error fails, an alarm is issued and a smart refund is initiated. An RFID reader verifies the drug's EPC code (with a ≥99.99% consistency with the prescription) to ensure dispensed medications match the prescription. When a drug's inventory falls below a set threshold (e.g., ≤10 boxes), a built-in LSTM model leverages historical sales data, seasonality, and regional data to predict demand within three days. It generates a replenishment order and sends it to the partner pharmaceutical company's ERP system, ensuring that replenishment is more aligned with actual demand.

[0090] The internal structure of the drug storage warehouse includes a three-dimensional matrix medicine cabinet, an RFID-based intelligent inventory system, an intelligent replenishment system, and a zoned temperature control unit. The three-dimensional matrix medicine cabinet is equipped with an XYZ precision guide rail system (positioning accuracy ±0.5mm) for precise positioning. The RFID-based intelligent inventory system (error rate <0.01%) provides real-time and accurate monitoring of drug inventory. The intelligent replenishment system uses an LSTM neural network model to predict sales demand, generate replenishment orders, and push them to the partner pharmaceutical company's ERP system, ensuring a dynamic and stable supply of drugs. The zoned temperature control unit uses an NTC thermistor to monitor temperature fluctuations. Conventional drug warehouses utilize semiconductor refrigeration modules to maintain a relatively dry environment with a humidity of ≤40%. Cold chain drug warehouses utilize a dual-compressor circulating refrigeration system to maintain a temperature of 2-8°C with a fluctuation of ≤±0.5°C. If the cold chain warehouse temperature exceeds the limit (e.g., >8°C), the backup refrigeration module activates within 10 seconds, locking the warehouse door and prohibiting drug dispensing to prevent the drugs from becoming ineffective after being discharged.

[0091] Furthermore, the drug storage warehouse has a built-in LSTM prediction model, the implementation of which includes the following steps:

[0092] Data preprocessing and feature engineering: Multidimensional data, including historical sales data, seasonal factors, regional demand heat maps, and external variables, is integrated. The daily average sales volume of historical sales data is calculated using a sliding window (7-day window size, 1-day step size) to eliminate short-term fluctuations. A Fourier transform is applied to the sales data from the past three years to extract the fundamental frequency and harmonic components, quantifying cyclical fluctuations (such as quarterly peaks in drug demand). Dynamic demand weights are generated based on population mobility data within a geographic fence (1km radius) combined with regional disease incidence rates. Flu outbreak indexes, holiday markers, and weather data are integrated to construct a multidimensional feature vector. Continuous data is normalized by feature dimension and Z-score standardized. Missing values in historical data are filled using linear interpolation, and regional averages are used by default when external variables are missing.

[0093] Model Architecture Design: A stacked LSTM network model was constructed. The input layer receives 30 days of historical data, with each data entry having a feature dimension of 10, including information such as sales volume, seasonality, and external variables. The network structure consists of three stacked LSTM layers, each with 128 hidden units. The LSTM layer uses the tanh function as the activation function, and the kernel is initialized using the He normal distribution. The model incorporates an additive attention mechanism, assigning higher weights to key time steps such as flu outbreaks and holidays. The hidden states are weighted summed to generate an additive attention output, enhancing the model's focus on important information. The model's output layer uses a fully connected network structure with a 128→64→3 hierarchy, and uses ReLU as the activation function. This output layer further maps the feature information processed by the LSTM layers and the additive attention mechanism, ultimately outputting daily demand forecasts for the next three days.

[0094] Training and Optimization: Mean squared error combined with quantile loss (τ = 0.5) enhances robustness to outliers. The Adam optimizer adaptively adjusts the learning rate of each parameter (β1 = 0.9, β2 = 0.999), with an initial learning rate of 0.001 and a decay of 50% every 10 epochs. Dropout (with a probability of 0.3) is inserted between LSTM layers, and neurons are randomly masked to reduce the risk of overfitting. An L2 constraint (coefficient 1e -4 ) to limit model complexity. The training data was split into training, validation, and test sets at an 8:1:1 ratio. Early stopping was applied to monitor validation set loss. If there was no improvement after 10 consecutive epochs, training was terminated and the optimal weights were saved.

[0095] Dynamic replenishment decisions: After the stacked LSTM network model outputs future demand forecasts, it uses the ILP algorithm to generate the lowest-cost replenishment orders, combining real-time inventory status (checked using RFID technology with an error rate of less than 0.01%) and pharmaceutical companies' lead times (for example, cold chain drugs require 72-hour advance orders). These replenishment orders are automatically pushed to the partner pharmaceutical company's ERP system, enabling efficient and accurate supply chain collaboration. The system also supports manual calibration of thresholds, such as adjusting the safety stock factor, to adapt to varying business needs and market fluctuations.

[0096] Furthermore, the drug storage warehouse is equipped with an RFID intelligent inventory system for real-time and accurate monitoring of drug inventory status. The system comprises: an RFID tag, attached to each box of medication, storing the drug's unique EPC code and key information; an RFID reader installed within the drug storage warehouse, boasting high reading accuracy and an error rate of less than 0.01%, enabling rapid reading of tag information; and a data management platform, which receives, processes, and stores drug information transmitted by the RFID reader, updating inventory data in real time and generating inventory reports. During intelligent inventory, the RFID reader transmits a radio frequency signal to activate the tag, which then returns the stored information, which the reader transmits to the data management platform. The platform processes and analyzes the received data, updating inventory data in real time. When inventory levels fall below a set threshold (e.g., ≤10 boxes), the platform triggers a restocking reminder. If the RFID reader detects an anomaly during the reading process (e.g., missing or incorrect tag information), the system issues an alarm and records the anomaly for human intervention. Through the above-mentioned RFID intelligent inventory system, the drug storage warehouse can efficiently and accurately manage drug inventory, ensure the stability of drug storage and supply, and at the same time provide accurate inventory data support for the intelligent replenishment system, further optimizing supply chain management.

[0097] like Figure 7The control system shown in the figure comprises a core control layer, an execution control layer, a security verification layer, and a data management layer. The core control layer of the control system utilizes an industrial-grade PLC main control unit as the core processing hub, equipped with an ARM Cortex-A72 multi-core processor and running a real-time operating system (RTOS). A multi-threaded task scheduler ensures the orderly execution of medication dispensing control (highest priority), payment verification, and environmental monitoring functions. The communication architecture integrates an HTTPS bidirectional authentication module (national secret SM2 certificate + SSL / TLS1.3 encryption protocol) to ensure secure data transmission. A 1Mbps high-speed CAN bus network is also configured to enable precise communication between devices based on a preset message ID allocation table. The execution control layer of the control system includes a medication dispensing mechanism drive unit and a multi-device collaboration module. The medication dispensing mechanism drive unit utilizes a servo motor positioning algorithm combined with an Archimedean spiral orbital motion model to achieve precise medication retrieval and delivery. In the multi-device collaboration module, collaboration with the printing device is achieved by synchronously triggering the thermal printer through a hard-wired interlock mechanism. Stable collaboration with the medication storage environment is maintained using a semiconductor PID temperature control system. The control system's security verification layer consists of a triple-verification mechanism and a redundant fault-tolerant system, providing dual protection for system safety and reliability. The triple-verification mechanism includes a prescription verification system based on blockchain hash value comparison, a real-time RFID inventory matching engine, and a drug-disease conflict matrix screening model. The redundant fault-tolerant system deploys a dual-MCU hot standby architecture (with a heartbeat detection cycle of ≤10ms between the primary and standby chips) to ensure register mirroring within 50ms during a failover. The control system's data management layer uses a secure storage module and blockchain interface to securely store and upload data. The data management layer utilizes an eMMC chip and a physical write-protection switch to create tamper-resistant memory, and utilizes SM4 encryption combined with a timestamp chain signature to create an operation log encryption engine. The Fabric consortium chain SDK is integrated to enable dual-event-driven data upload for prescription generation and dispensing completion, forming a three-tiered medical regulatory evidence chain: storage, log, and blockchain.

[0098] like Figure 8The payment system illustrated here utilizes security measures to ensure smooth drug transactions and handle unusual transactions. This system utilizes a multimodal integrated design, supporting QR code payment (WeChat / Alipay), bank card QuickPass, NFC (near-field communication), and offline settlement using medical insurance cards. The payment system incorporates a built-in financial-grade security chip, interacting with banks and medical insurance platforms in real time via SSL / TLS encryption protocols. It also features a two-factor authentication module (facial recognition + dynamic verification code) to ensure compliant use of medical insurance accounts. Successful transactions are authenticated on the Hyperledger Fabric 2.3 blockchain (Fabric consortium blockchain confirmation time ≤ 1.5 seconds), ensuring that transaction data is tamper-proof and traceable. In the event of an anomaly, such as a drug delivery failure caused by a jam in the Archimedean screw delivery track, an intelligent refund channel completes the refund via the original route within 15 seconds, safeguarding consumer rights. If a network outage or payment platform anomaly occurs during the payment process, the system will notify the consumer that the payment status is unknown and record the relevant information. Upon network restoration, the system will automatically query the payment result and, if necessary, guide the consumer to re-pay. The payment system terminal integrates prescription verification logic, and the payment interface is activated only after the AI consultation system has reviewed and approved the prescription. The transaction data is simultaneously uploaded to the drug supervision platform.

[0099] like Figure 9 The printing device shown adopts a dual-channel thermal printing architecture with a built-in paper level sensor and paper jam self-detection program. The first channel prints an encrypted QR code medication instruction sheet based on the AI medical consultation results. The first channel is equipped with a medical-specific printer to output a medication instruction sheet containing a SHA-3 encrypted QR code (scanning the code jumps to the medication video, loading time ≤ 1 second). The content complies with the drug supervision electronic prescription standards and provides patients with detailed medication guidance. Furthermore, the built-in voice prompt parses the content of the medication instruction sheet through a dialect recognition engine and generates multilingual voice reminders (including Cantonese and Sichuan and Chongqing dialect modes). The instructions are broadcast directionally through a bone conduction speaker (sound pressure level 60dB, pointing angle 30°), making it easier for patients in different regions to understand medication information. The second channel uses ultraviolet fluorescent ink to generate GS1 standard barcodes. The second channel is equipped with an anti-counterfeiting label printer, which uses ultraviolet fluorescent ink to generate GS1 standard barcodes containing drug traceability codes, production batch numbers and chain of custody information. It is bound to the drug supervision platform data in real time to achieve drug anti-counterfeiting and traceability. The printed data is stored in the Hyperledger Fabric 2.3 system on the blockchain and then uploaded to the cloud medical archive system to ensure data security and traceability.

[0100] 1.2 System Collaborative Workflow

[0101] like Figure 2The system collaborative workflow of a medicine vending machine based on AI consultation is shown, which covers the startup stage, consultation stage, transaction stage and medicine dispensing stage.

[0102] The startup phase further includes a control system self-check and a full RFID scan of the drug storage bin. The control system self-check, leveraging a dual-MCU hot standby architecture, completes dual-MCU status verification within 50ms, ensuring the stability and reliability of the control system. If an abnormality occurs in the main control chip, the backup chip can be quickly switched within 50ms, ensuring continuous operation of the equipment. The full RFID scan of the drug storage bin, initiated at a rate of 200 items per minute with an error rate of less than 0.01%, rapidly counts all drugs in the drug storage bin using a high-frequency read / write antenna array, obtaining real-time inventory information and providing accurate data support for subsequent drug sales and management.

[0103] The consultation phase further involves multimodal data fusion, AI model diagnosis, and intelligent triage based on an intelligent interactive system. For multimodal data fusion, patients can input information through the intelligent interactive system through various methods, such as describing symptoms by voice, selecting relevant options with touch, and uploading images of examination reports. The multimodal fusion engine integrates and processes this data, such as converting speech to text and performing image recognition analysis, to form a comprehensive patient information dataset. For AI model diagnosis, after receiving the multimodal fusion data, the AI consultation system analyzes it using a medical knowledge graph and deep learning algorithms, invoking relevant disease models and combining the patient's specific symptoms and examination data to output a diagnosis. The intelligent triage module integrates the MEWS score, calculating vital sign scores using a rules engine and accurately triaging the urgency of the patient's symptoms based on these scores. If a patient's vital signs are unstable, their condition is urgent, and they require emergency treatment and rescue, the intelligent interactive system alerts the patient and provides information about the nearest general hospital. If necessary, the system assists the patient in calling 120. If the patient's vital signs are stable and the case is non-emergency, the AI model will provide a diagnosis and recommend appropriate medications, such as omeprazole enteric-coated capsules for a diagnosis of "duodenal ulcer." Complex conditions can be transferred to a human operator, using an integrated online video consultation unit (compatible with SDKs such as Tencent Health and Ping An Good Doctor), providing patients with online medical access.

[0104] The transaction phase further includes payment system verification and blockchain evidence storage. Regarding payment system verification, after the payment system receives the prescription information from the AI medical consultation system, the prescription verification logic integrated into the payment terminal will verify the prescription. The payment interface will only be activated after the review is passed, supporting multiple payment methods such as QR code scanning and NFC functions. Regarding blockchain evidence storage, after a successful transaction, the system will trigger the blockchain evidence storage mechanism, using the Fabric consortium chain architecture to upload the transaction data hash value to the chain with a delay of ≤1.5 seconds, and synchronize it to the drug regulatory platform to ensure the immutability and traceability of the transaction data.

[0105] Furthermore, the drug dispensing stage includes a control system that drives drug dispensing and drug dispensing verification. The control system drives drug dispensing. After receiving the payment success signal, the control system sends a precise positioning instruction to the drug dispensing mechanism through the CAN bus based on the industrial-grade PLC controller, drives the servo motor to control the Archimedean screw drug delivery track, and accurately delivers the drug to the drug dispensing port with a positioning accuracy of ±0.5mm and a speed of completing drug delivery within 3 seconds. In the drug dispensing verification, the pressure sensor monitors the drug dispensing weight in real time. When the drug dispensing weight error is less than 5g, it is determined that the drug dispensing is normal and the drug dispensing door is unlocked; if an abnormality occurs, such as excessive weight deviation or mechanical failure causing drug jamming, the system will start the corresponding abnormality handling procedure, such as triggering the intelligent refund channel (if there is a shortage of drugs), attempting reverse drive of the robotic arm, and performing fault alarm prompts and maintenance (mechanical failure).

[0106] 3. Security and maintenance mechanism

[0107] The security and maintenance mechanism includes three parts: data security, troubleshooting and regular maintenance.

[0108] The data security mentioned above involves operation log encryption and consultation data protection. The operation log encryption mentioned above is further described. The operation log is encrypted using the SM4 national encryption algorithm and synchronized to the drug regulatory blockchain every 30 minutes. During the encryption process, all operation records of the device, including user login information, consultation data, transaction records, etc., are encrypted to ensure the security of data during storage and transmission and prevent data from being stolen or tampered with. The consultation data protection mentioned above is further described. The consultation data adopts a federated learning framework, the original data is stored locally, only the gradient parameters are uploaded, and the original data retention period does not exceed five years. In this way, the patient's privacy data is protected from being leaked, and the AI model can be trained using multi-party data to improve the diagnostic accuracy of the model.

[0109] The fault handling described above covers temperature control anomaly handling and mechanical fault handling. Regarding the temperature control anomaly handling, when the temperature and humidity control system detects a temperature control anomaly, such as when the temperature of the cold chain drug warehouse exceeds the range of 2-8°C, the system will immediately start the backup refrigeration module with a switching time of ≤10 seconds to ensure that the temperature of the drug storage environment is stable and to avoid drug deterioration due to temperature anomalies. Regarding the mechanical fault handling described above, if the robotic arm becomes stuck, the system will automatically perform reverse drive and try 3 times. If the 3 attempts fail, a manual maintenance alarm will be triggered and fault information will be recorded at the same time to facilitate maintenance personnel to quickly locate and solve the problem and ensure the normal operation of the equipment.

[0110] The regular maintenance mentioned above includes calibration of the Archimedean spiral medicine delivery track and replacement of equipment components. The track calibration mentioned above further includes weekly track deformation calibration, which uses laser ranging technology with an accuracy of ±0.01mm. Through regular calibration, the accuracy of the Archimedean spiral medicine delivery track is ensured, abnormal drug delivery due to track deformation is avoided, and the accuracy and stability of drug delivery are guaranteed. The replacement of equipment components mentioned above includes replacing the ultraviolet disinfection lamp every two months. When the cumulative working time of the ultraviolet disinfection lamp is ≥200 hours, the system automatically reminds you to replace it. At the same time, regularly check and replace other vulnerable parts, such as the filter of the air purification module, to ensure that all functions of the equipment are always in good condition.

[0111] This implementation method achieves a fast service of ≤3 minutes for the entire process of consultation-payment-drug delivery through deep collaboration of multiple systems. During actual deployment, the body size can be adjusted according to site requirements (standard specifications: height 2.2m × width 1.5m × depth 0.8m), and it can be connected to the regional medical information platform through the interconnection module.

[0112] It should be noted that the above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention covered in this application is not limited to the technical solutions formed by the specific combination of the aforementioned technical features, but also includes other solutions that combine the aforementioned technical features or similar features without departing from the inventive concept. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be included in the scope of protection of the present invention, and the rest not described in detail are prior art.

Claims

1. A medicine vending machine based on AI consultation, characterized by: include: The unit features a metal frame and double-layer explosion-proof tempered glass housing. It houses an integrated temperature and humidity control system, using an NTC thermistor to monitor temperature changes in real time. Combined with semiconductor refrigeration elements and dual-compressor circulating refrigeration technology, it achieves precise temperature control and zoning control for conventional and cold chain drug storage. The disinfection system includes UV disinfection and HEPA air purification modules. The medication access port is linked to the control system and automatically unlocks after dispensing verification. Intelligent interactive system: supports offline medical insurance card reading (SM2 algorithm verification), electronic social security code scanning (decoding speed ≤ 0.3 seconds), multi-account login method of face binding prescription account, equipped with multi-modal interactive interfaces such as voice dialogue, touch screen input, image recognition, and has adaptive interface mode switching function (including large font display and elderly mode and privacy mode with extended touch response time). Among them, the privacy mode integrates multiple technologies: the anti-peep screen technology integrates a controllable viewing angle liquid crystal layer (horizontal viewing angle ≤ 30°, transmittance ≥ 85%) and a dynamic pixel masking algorithm (mosaic intensity ≥ 90%); the privacy noise reduction system uses voiceprint directional transmission technology, and the bone conduction unit integrates piezoelectric ceramic vibrators and beamforming technology, combined with a voiceprint separation module and an adaptive filter to eliminate environmental noise; at the same time, the voice signal is transmitted end-to-end encrypted via AES-256. It supports one-button switching of privacy mode by voice or touch. After the mode is activated, the screen brightness automatically drops to 50cd / m 2 It is also linked to dynamic pixel masking, and the bone conduction broadcast dynamically adjusts the volume according to the ambient noise. Users can unlock information through finger vein biometric authentication by lightly touching the encrypted area, forming a three-dimensional protection mechanism of "visual restriction-voiceprint orientation-data encryption", which comprehensively guarantees the confidentiality of sensitive content such as medical consultation records and electronic prescriptions in public places. AI consultation system: Integrates AI consultation module, intelligent triage module, drug recommendation and control module, and interconnection module to generate diagnosis results and medication recommendations; The AI consultation module implements symptom analysis based on medical knowledge graphs and natural language processing (NLP) technology, specifically including: Deploy a Transformer architecture speech recognition model (signal-to-noise ratio ≥ 65dB, word error rate ≤ 5%) combined with beamforming noise reduction technology (GSC algorithm + DNS model) to convert patient speech into text and extract symptom keywords; Use OCR technology to analyze key indicators in test reports, integrate voice text, touch screen options, and image features to generate structured patient data sets, and annotate timestamps and data sources; A pre-trained BioBERT model (entity recognition F1 value ≥ 0.92) was used to perform entity recognition and relationship extraction on symptom descriptions. Multi-hop reasoning was performed in conjunction with the Neo4j graph database (disease-symptom-drug-contraindication associations), and the confidence weights of the knowledge graph were dynamically adjusted to match high-probability diagnostic pathways. The intelligent triage module integrates the MEWS scoring system. A MEWS score of 5 or higher triggers emergency triage (pushing information about the nearest hospital and assisting in calling 120). A MEWS score of less than 5 invokes the departmental diagnosis model. If the diagnosis confidence is less than 70% or there are conflicting symptoms, the patient will be transferred to an internet hospital for video consultation. The drug recommendation and control module combines a patient's medication history, allergy history, and contraindication conflict matrix to recommend high-frequency, low-side effect drugs through a collaborative filtering algorithm. It also calculates a safe dosage range (with a maximum daily dose warning) based on a pharmacokinetic model. Controlled drugs trigger "two-person, two-certificate" real-name authentication with the public security system. The interconnection module supports HL7 FHIR, WebService and HTTP / JSON multi-protocol adaptation, realizes standardized conversion of medical data through the protocol adaptation layer (HAPI FHIR framework), has an embedded WebRTC video consultation engine (1080P H.264 video stream + Opus audio encoding), is compatible with mainstream Internet hospital SDKs, and encrypts transaction data through the SM2 / SM4 national secret algorithm. In the event of anomalies, the token bucket algorithm is used to limit the flow and disconnection reconnection mechanism. The operation log is encrypted by SM4 and synchronized to the Hyperledger Fabric blockchain for evidence storage. Drug storage warehouse: It adopts a three-dimensional matrix medicine cabinet, equipped with an XYZ axis precision guide rail system (positioning accuracy ±0.5mm) and a six-axis robotic arm to coordinate pneumatic pipes to accurately dispense medicines. It integrates an RFID intelligent inventory system to monitor inventory in real time (error rate <0.01%), and generates dynamic replenishment instructions through the LSTM neural network prediction model, combined with ILP to optimize replenishment orders; the internal structure of the drug storage warehouse includes a three-dimensional matrix medicine cabinet, an RFID intelligent inventory system, an intelligent replenishment system, and a partitioned temperature control unit. The three-dimensional matrix medicine cabinet is equipped with an XYZ precision guide rail system (positioning accuracy ±0.5mm) and a six-axis robotic arm (repeat positioning accuracy ±0.5mm). It accurately transports medicines through pneumatic pipes. During the dispensing process, a pressure sensor monitors weight deviation in real time. In the event of an abnormality, it triggers reverse drive and attempts three times. If the reverse drive fails, it will be connected to the intelligent refund system. The RFID intelligent inventory system includes an EPC code tag attached to each box of medicine, a reader with an error rate of less than 0.01%, and a data management platform. It monitors inventory status in real time and matches it with prescription information. When the inventory level is ≤10 boxes, a replenishment reminder is triggered. Abnormal readings generate alarms and record them. Intelligent replenishment system, based on LSTM prediction model to achieve dynamic demand forecasting and supply chain optimization, combined with ILP to optimize replenishment orders; Partitioned temperature control unit, conventional medicine warehouse adopts semiconductor refrigeration module and NTC sensor to maintain temperature at 18-25℃ and humidity ≤40%; cold chain medicine warehouse controls temperature at 2-8℃ (fluctuation ≤±0.5℃) through dual compressor circulation refrigeration system (including backup module). If the temperature of cold chain warehouse exceeds the limit (such as >8℃), the backup refrigeration module will start within 10 seconds, and the warehouse door will be locked to prohibit the discharge of medicines to avoid the loss of efficacy after the medicines flow out. Control system: It includes the core control layer, execution control layer, security verification layer, and data management layer to achieve the coordination and control of multiple systems within the AI-based medicine vending machine. The core control layer uses a PLC main control unit equipped with an ARM Cortex-A72 multi-core processor running an RTOS system. It prioritizes drug dispensing control, payment verification, and environmental monitoring functions through a multi-threaded task scheduler, and integrates an HTTPS two-way authentication module and a high-speed CAN bus network. The execution control layer includes the drug dispensing mechanism drive unit and the multi-device coordination module. The drug dispensing mechanism drive unit uses a servo motor positioning algorithm and an Archimedean spiral orbital motion model to achieve ±0.5mm positioning accuracy for drug retrieval and delivery. The multi-device coordination module synchronously triggers the thermal printer through a hard-wired interlock mechanism and maintains a constant temperature and humidity in the drug storage environment through a semiconductor PID temperature control system. The security verification layer is based on a triple verification mechanism and a redundant fault-tolerant system. The triple verification includes blockchain hash value prescription verification, RFID inventory real-time matching, and contraindication conflict matrix screening. The redundant fault-tolerant system uses an MCU hot standby architecture to achieve ≤10ms heartbeat detection between the main and standby chips and register mirror switching within 50ms in the event of a fault. The data management layer uses eMMC chips and physical write protection switches to build tamper-proof storage. The operation log is encrypted with SM4 and timestamped with chain signatures to generate tamper-proof records. The Fabric consortium chain SDK is integrated to realize dual-event driven data upload of prescription generation and drug delivery, forming a three-level medical supervision evidence chain of storage-log-blockchain. Payment system: Integrated multi-modal payment, supports QR code payment (WeChat / Alipay), bank card flash payment, NFC near-field communication and offline settlement of medical insurance cards, built-in financial-grade security chip, and real-time interaction with bank / medical insurance platforms through SSL / TLS1.3 encryption protocol; equipped with a two-factor authentication module (face recognition + dynamic verification code) to ensure the compliance of medical insurance accounts; transaction data is uploaded to the Hyperledger Fabric 2.3 consortium chain and synchronized to the drug supervision platform to ensure that the data cannot be tampered with and is traceable; when the drug is out of stock or the drug fails to be dispensed, the original refund is triggered within 15 seconds and a blockchain transaction certificate is generated; the payment terminal only activates the payment interface after the AI consultation system has reviewed and approved the prescription, and verifies the medical insurance account balance in real time or executes other payment methods to deduct the money; in the event of a network failure, the transaction data is temporarily stored and the payment status is prompted as unknown. After recovery, it will automatically re-upload or guide the payment again; Printing device: It adopts a dual-channel thermal printing architecture, outputs encrypted medication instructions and ultraviolet fluorescent anti-counterfeiting labels, and is equipped with a dialect voice prompt module.

2. The method for speech recognition and symptom extraction in the AI medical inquiry module according to claim 1, characterized in that: The following steps are involved: (1) Speech preprocessing and feature extraction: The user's speech signal is collected through an 8-microphone ring array, and the GSC algorithm is used for beamforming noise reduction. The signal-to-noise ratio is improved to ≥65dB based on the DNS model. The noise-reduced signal is framed and windowed, and 40-dimensional MFCC is extracted as feature input. (2) Transformer speech recognition model construction: Deploy an end-to-end model based on the Transformer architecture, including a 6-layer encoder and decoder. The encoder integrates an 8-head self-attention mechanism (dk=64) and a feedforward network (2048→512 dimensions). The decoder uses masked self-attention and encoder-decoder alignment layers. It is trained with the CTC loss function to achieve high-precision speech-to-text conversion (word error rate ≤ 5%), support streaming processing (segment recognition interval ≤ 500ms) and end-to-end latency ≤ 1 second. (3) Medical semantic enhancement and keyword extraction: The recognized text is corrected by rule engines and medical terminology is standardized. The pre-trained BioBERT model is input for symptom entity recognition. The entity boundaries are optimized by combining CRF. The structured symptom dataset is generated by dynamically weighting keywords through the knowledge graph relevance. (4) Model optimization and deployment: Multi-task learning (speech recognition + symptom classification) and adversarial training are used to improve robustness. The model is compressed to a 6-layer Transformer architecture through knowledge distillation to adapt to the real-time reasoning requirements of medical scenarios.

3. The pre-trained medical NLP model in the AI consultation module according to claim 1 performs entity recognition and relationship extraction on the patient's symptom text, characterized in that: The following steps are involved: (1) Model fine-tuning and entity relationship annotation: Based on the pre-trained BioBERT model (12-layer Transformer structure), the CRF layer is fine-tuned on the annotated medical corpus to annotate symptom entities, disease names, and attribute relationships, achieving an entity recognition F1 value ≥ 0.92; (2) Knowledge graph construction and storage: The labeled entities are used as nodes and relationships as edges, attribute rules are defined, and the data are stored in the Neo4j graph database, supporting dynamic configuration of node attributes (ICD-10 code, dosage range) and edge weights; (3) Multi-hop reasoning and conflict verification: Cypher query language is used to perform multi-hop path search, and contraindication conflict verification is performed in combination with real-time patient health records. When contraindications are detected, high-risk drugs are automatically eliminated and an early warning is triggered; (4) Dynamic graph update: Synchronize the latest clinical guideline data weekly through the incremental learning mechanism, update the graph node attributes and edge relationship confidence, and optimize the reasoning logic to ensure the timeliness and authority of the recommended solutions.

4. The built-in LSTM prediction model for the medicine storage warehouse according to claim 1 is characterized in that: The steps include: (1) Data preprocessing and feature engineering: A multidimensional feature vector is constructed by integrating historical sales data, seasonal factors (extracting cyclical fluctuations through Fourier transform), regional demand heat maps (generating dynamic demand weights based on population mobility and regional incidence within the geographic fence), and external variables (flu outbreak index, holiday markers, and weather data). A sliding window (window size of 7 days, step size of 1 day) is used to calculate the average daily sales volume, and Z-score standardization and linear interpolation are performed on continuous data to fill missing values. (2) Model architecture design: A three-layer stacked LSTM network (128 hidden units per layer, tanh activation function, He normal distribution initialization) is constructed. The input layer receives 30 days of historical sequence data (feature dimension 10), introduces an additive attention mechanism to weight key time steps, and the output layer adopts a fully connected structure (128→64→3, ReLU activation function) to predict the demand for the next three days. (3) Training and optimization: The mean square error (MSE) and quantile loss (τ = 0.5) were used for joint training, combined with the Adam optimizer (β1 = 0.9, β2 = 0.999, initial learning rate 0.001, decay 50% every 10 rounds), Dropout (probability 0.3) and L2 regularization (coefficient 1e -4 To prevent overfitting, the training data was divided into training, validation, and test sets at an 8:1:1 ratio, and the optimal weights were saved using the early stopping method (termination after 10 consecutive rounds without improvement). (4) Dynamic replenishment decision-making: Based on LSTM prediction output, combined with RFID real-time inventory data (error rate <0.01%) and pharmaceutical company supply cycle (such as cold chain drugs ordered 72 hours in advance), the minimum cost replenishment order is generated through integer linear programming and automatically pushed to the pharmaceutical company's ERP system. It also supports manual calibration of the safety stock coefficient to adapt to business needs.

5. A collaborative workflow method for a medicine vending machine based on AI consultation, characterized in that: The following steps are involved: (1) Startup phase: The control system completes self-test through the dual MCU hot standby architecture. When the main control chip fails, the backup chip switches within 50ms. The drug storage warehouse starts RFID full disk scanning (speed 200 pieces / minute, error rate <0.01%) to obtain inventory data in real time. (2) Consultation stage: Patients input multimodal data (voice, touch, test report images) through the intelligent interactive system, and a structured data set is generated by the fusion engine; the AI consultation system uses the medical knowledge graph and deep learning model to analyze the data and output the diagnosis results; the intelligent triage module triggers emergency triage according to the urgency of the disease (MEWS score ≥5 points, pushes hospital information and assists in calling for help; MEWS <5 points recommends drugs, and when the diagnosis confidence is <70%, transfers to the Internet hospital video consultation); (3) Transaction stage: After the payment system verifies the prescription, it activates the payment interface, supporting medical insurance account deductions and QR code / NFC payment; the transaction data hash value is stored on the Hyperledger Fabric consortium chain (delay ≤ 1.5 seconds) and synchronized to the drug supervision platform; (4) Medicine dispensing stage: The control system drives the servo motor to control the Archimedean screw medicine delivery track through the CAN bus (positioning accuracy ±0.5mm, medicine dispensing is completed within 3 seconds), and the pressure sensor verifies the weight of the medicine. When the weight of the medicine is abnormal, it triggers the intelligent refund, the robotic arm reverses and drives 3 times or an alarm prompts. If the error is less than 5g, the medicine dispensing door is unlocked.

6. A safety and maintenance method for a medicine vending machine based on AI consultation, characterized in that: The following steps are involved: (1) Data security protection: Operation logs are encrypted using the SM4 national encryption algorithm and synchronized to the drug regulatory blockchain every 30 minutes. The encrypted content includes user login information, medical consultation data, and transaction records. Medical consultation data uses a federated learning framework to store raw data locally, and only gradient parameters are uploaded to the cloud for model training. (2) Fault handling: When the temperature of the cold chain warehouse is detected to be out of limit, the backup refrigeration module will start within 10 seconds and lock the warehouse door; when the robotic arm is stuck, the reverse drive will be triggered and attempted three times. If it fails, a manual maintenance alarm will be generated and the fault information will be recorded; (3) Regular maintenance: The Archimedean screw medicine delivery track is calibrated weekly using laser ranging technology (accuracy ±0.01mm); the UV disinfection lamp must have a cumulative working time of ≥200 hours or be replaced every two months; the air purification module filter must be regularly inspected and replaced to ensure stable operation of the equipment.

7. A method for automatically selling medicines based on AI consultation, characterized in that: The following steps are involved: Step S100: Multimodal symptom collection and data fusion: Patients describe their symptoms through voice input, touchscreen interaction, or medical image upload. The intelligent interactive system collects voice signals and test report images. The voice is converted into text using a Transformer architecture speech recognition model (word error rate ≤ 5%). Combined with OCR technology, key indicators of the test report are analyzed to generate a structured patient dataset (labeled with timestamps and data sources). Step S200: AI-assisted diagnosis and triage decision-making, based on the medical knowledge graph (Neo4j graph database) and the pre-trained BioBERT model, performs multi-hop reasoning on the symptom text and dynamically adjusts the disease confidence weight. Combined with the MEWS score, the diagnosis is triaged as emergency (MEWS ≥ 5 points pushes the nearest hospital information and assists in calling 120) or non-emergency (calls the department's diagnosis model). If the diagnosis confidence is less than 70%, the patient is transferred to a video consultation. Step S300: Prescription generation and safety verification: Based on the patient's health record, contraindication conflict matrix, and drug inventory status, a personalized medication plan is generated through a collaborative filtering algorithm, the safe dosage range is calculated (pharmacokinetic model), and a maximum daily dose warning is marked; Trigger triple verification, including blockchain hash value verification of prescription integrity (Hyperledger Fabric 2.3 evidence storage, latency ≤ 1.5 seconds), real-time matching of RFID tag EPC code and prescription (matching rate ≥ 99.99%), and contraindication conflict screening; Step S400: Payment and blockchain evidence storage. The payment system supports QR code scanning, NFC, and offline medical insurance settlement (SM2 / SM4 encryption). The transaction is completed after two-factor authentication (face recognition + dynamic verification code). Transaction data is stored on the blockchain in real time. In the event of out-of-stock or mechanical failure, a refund will be triggered within 15 seconds. Step S500: Intelligent medication dispensing and medication guidance. The control system drives the six-axis robotic arm (positioning accuracy ±0.5mm) via the CAN bus to accurately dispense medication. The pressure sensor verifies weight deviation and triggers reverse drive or refunds in the event of an abnormality. The dual-channel thermal printer outputs encrypted QR code medication instructions and ultraviolet fluorescent anti-counterfeiting labels, and the bone conduction speaker broadcasts dialect voice prompts in a targeted manner. Step S600: Dynamic inventory management and replenishment optimization. The RFID intelligent inventory system (error rate <0.01%) monitors inventory in real time, and the LSTM prediction model (inputting historical sales, seasonal factors, and influenza outbreak index) generates demand forecasts for the next three days. Integer linear programming is combined with the pharmaceutical company's supply cycle to generate the minimum cost replenishment order and push it to the ERP system. The entire service process takes ≤3 minutes, supporting closed-loop operations of "diagnosis-treatment-medicine". Data is stored locally via the federated learning framework (retention ≤5 years), and operation logs are encrypted using SM4 and synchronized to blockchain nodes.

Citation Information

Patent Citations

  • Screen privacy protection method and system for mobile terminal equipment

    CN106557711A

  • Medical record storage, sharing and security claim settlement model and method based on a block chain

    CN110008746A

  • Clinic remote service system based on artificial intelligence

    CN110097977A

  • Refrigeration structure and double-temperature double-control medical cold closet

    CN112539589A

  • System for decentralized ownership and secure sharing of personalized health data

    CN113169957A

Cited By

  • Intelligent interaction system and method based on medical nursing vehicle

    CN121070182A

  • Dynamic stock management and environment control method and system for intelligent dispensing

    CN121483520A

  • Urban rail intelligent agent question and answer system fusing multiple modes

    CN121860066A