An unmanned pharmacy prescription medicine matching confirmation method based on deep learning
By employing deep learning and a cloud-edge-device collaborative computing architecture, the problems of mismatch and slow response in drug matching in unmanned pharmacies have been solved, achieving high-precision and secure automatic drug matching, which is suitable for high-concurrency unmanned pharmacy environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG PROVINCIAL LITONGDE HOSPITAL (ZHEJIANG PROVINCIAL INST OF MENTAL HEALTH)
- Filing Date
- 2026-04-23
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional unmanned pharmacy drug matching methods suffer from problems such as mismatch, slow response, resource waste, and poor robustness in high-concurrency and multi-source heterogeneous data processing, and cannot meet the high security and low latency requirements of medical scenarios.
Deep learning methods are used to preprocess multi-source, multi-modal, heterogeneous data. Combined with a cloud-edge-device collaborative computing architecture, intelligent splitting and batch transmission of datasets are achieved. Drug matching is performed through a text-visual-structured feature fusion algorithm, dynamically adapting to multi-source data access verification rules to generate accurate matching results.
It achieves high-precision and safe automatic matching and confirmation of medicines in unmanned pharmacies, improves the stability and responsiveness of the system, and is suitable for high-concurrency, unattended pharmacy scenarios.
Smart Images

Figure CN122494110A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method for matching and confirming prescription drugs in unmanned pharmacies based on deep learning. Background Technology
[0002] With the rapid popularization of medical automation and new retail pharmacies, unmanned self-service dispensing and intelligent verification have become important development directions for improving pharmacy efficiency and reducing labor costs. Unmanned pharmacies need to quickly identify and accurately match multi-source heterogeneous data such as electronic prescriptions, paper prescriptions, drug appearance, barcodes, and specifications to achieve automated dispensing and medication safety verification. Traditional prescription matching methods mostly rely on manual verification, single-modality text matching, or simple rule comparison, which have the following technical shortcomings:
[0003] Traditional systems rely solely on prescription text or drug barcodes for single-dimensional matching, failing to integrate prescription semantics, drug visual images, structured specifications, and medication rules. This leads to mismatches and incorrect dispensing risks in scenarios involving confusion between brand and generic names, similar specifications, or identical appearances, making it difficult to meet the high security requirements of medical settings. Unmanned pharmacies often face peak outpatient periods and concurrent batch prescription processing. Traditional architectures employ centralized cloud computing, resulting in long data upload and inference links with high latency, leading to queuing congestion and slow response times, failing to meet the low-latency requirements of emergency prescriptions and immediate dispensing. Existing systems lack layered decoupling of terminal data collection, edge inference, and cloud training, resulting in fixed and rigid allocation of computing power and bandwidth. This makes them prone to data loss and upload interruptions in weak network environments. Furthermore, cloud models are large and slow to deploy, while edge computing power is significantly wasted, hindering dynamic scheduling and optimal utilization of resources across the entire system.
[0004] Traditional matching methods rely on fixed thresholds and static rules, resulting in poor robustness to issues such as blurred images, damaged barcodes, network fluctuations, and non-standard prescription formats. They lack dynamic verification, strong encoding binding, and inference backtracking correction mechanisms, making them prone to matching failures or security vulnerabilities, and failing to meet the high reliability requirements of unattended scenarios. Furthermore, multi-source data preprocessing lacks unified parameter standards, leading to chaotic processes in text segmentation, image enhancement, and barcode verification. Data sets are not intelligently batch-transmitted according to prescription complexity and drug characteristics, resulting in low transmission efficiency and uneven computational load, making it difficult to support stable training and inference of deep learning models.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part by practice of the invention.
[0007] According to one aspect of this application, a method for matching and confirming prescription drugs in unmanned pharmacies based on deep learning is provided, comprising: acquiring multi-source, multi-modal, heterogeneous data including prescription text, drug images, drug barcodes, drug specification parameters, and structured prescription / medical order data of the unmanned pharmacy; preprocessing the multi-source, multi-modal, heterogeneous data, including prescription text segmentation and entity extraction, drug image denoising and feature enhancement, barcode data verification and format unification, to generate a target prescription drug matching dataset; and determining a dynamic matching and fusion strategy for prescription drugs by combining a cloud-edge-device collaborative computing architecture, deep learning model computing resources, the mapping modeling accuracy of drug features-prescription requirements, and multi-dimensional matching verification requirements, setting the data access window size and dynamic update frequency according to the prescription complexity and drug feature dimensions, and adapting to multiple... Source data acquisition and transmission rate; split the target prescription drug matching dataset according to the target dynamic matching fusion strategy, generate processing batches containing prescription core information data, drug ontology feature data, medication rule data, and matching result labels, and transmit data based on access window size and dynamic update frequency; learn the mapping relationship between prescription information and drug features through a deep learning algorithm that integrates text semantics, image vision, and structured data multimodal features, optimize model parameters according to the weighted fusion logic of prescription key element weights, drug feature importance, and medication rule constraint strength, and dynamically adapt multi-source data access verification rules, drug unique identifier coding mapping rules, and model inference result correction instructions to generate accurate prescription drug matching confirmation results.
[0008] Another aspect of this application is a deep learning-based unmanned pharmacy prescription drug matching and confirmation device, the device being configured to execute the above-described deep learning-based unmanned pharmacy prescription drug matching and confirmation method by executing the executable instructions.
[0009] According to another aspect of this application, an electronic device includes: a first processor; and a memory for storing executable instructions of the first processor; wherein the first processor is configured to execute the above-described deep learning-based unmanned pharmacy prescription drug matching and confirmation method by executing the executable instructions.
[0010] According to another aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a second processor, implements the above-described deep learning-based unmanned pharmacy prescription drug matching and confirmation method.
[0011] The beneficial technical effects of this application are as follows: This application collects multi-source, multi-modal, heterogeneous data such as prescription text, drug images, barcodes, and specification parameters, and completes standardized preprocessing through text segmentation and entity extraction, image noise reduction and enhancement, and barcode verification and normalization; combined with a cloud-edge-device collaborative architecture, it achieves dynamic scheduling of resources across the entire domain and decoupling of three-level node tasks, and completes intelligent splitting and batch transmission of datasets according to prescription complexity and drug characteristics; it adopts a deep learning algorithm that fuses text-visual-structured multi-modal features, and completes end-to-end inference through weighted fusion and dynamic parameter adaptation, outputting matching confidence, security verification conclusions, and unique identifier binding results, realizing high-precision and high-security automatic matching and confirmation of prescription drugs in unmanned pharmacies. This method is standardized, automated, and can be executed in a closed loop throughout the entire process, and is suitable for high-concurrency, real-time, and unattended pharmacy automation scenarios.
[0012] This application uses joint modeling of text, images, and structured data to solve the mismatch problem caused by synonyms of the same drug or similar specifications, significantly improving matching confidence and security. Real-time local inference at the edge and iterative optimization in the cloud ensure fast emergency prescription response and significantly improved peak concurrency processing capabilities. Intelligent block partitioning and weighted scheduling optimize bandwidth and computing power utilization, ensuring stable data transmission even in weak network environments. Automatic fault tolerance is provided for scenarios such as data anomalies, network fluctuations, and image blurring, ensuring long-term stable and reliable operation. Mandatory verification of medication rules and strong binding of unique drug codes prevent incorrect drug dispensing from a fundamental mechanism, meeting medical safety standards.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0014] Figure 1 The flowchart illustrates a method for matching and confirming prescription drugs in an unmanned pharmacy based on deep learning, according to an embodiment of this application.
[0015] Figure 2 The diagram shows a schematic representation of a deep learning-based unmanned pharmacy prescription matching and confirmation device according to an embodiment of this application. Detailed Implementation
[0016] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0017] The following is combined Figure 1 This application describes a deep learning-based method for matching and confirming prescriptions in unmanned pharmacies according to exemplary embodiments. It should be noted that the application scenarios described below are merely illustrative for understanding the spirit and principles of this application, and the embodiments of this application are not limited in any way. Rather, the embodiments of this application can be applied to any applicable scenario.
[0018] In one implementation, Figure 1 The diagram illustrates a flowchart of a deep learning-based method for matching and confirming prescriptions in an unmanned pharmacy, according to an embodiment of this application.
[0019] S101, acquire multi-source, multi-modal, heterogeneous data including prescription texts, drug images, drug barcodes, drug specifications, and structured prescription data from unmanned pharmacies.
[0020] In one implementation, raw data from the entire unmanned pharmacy scenario, encompassing multiple types and modalities, is collected to provide a complete data source for subsequent preprocessing, matching, and confirmation. All data is acquired synchronously through sensing devices, business interfaces, and databases, employing standardized acquisition protocols, temporal alignment rules, and entity association mechanisms to ensure data integrity and consistency. An OCR optical character recognition algorithm and an HIS prescription data parsing interface are used to extract textual content such as drug names, dosages, usage methods, dosages, and patient information from electronic prescriptions and scanned paper prescriptions. After image acquisition of outpatient paper prescriptions, the OCR algorithm is used to recognize textual information such as "ibuprofen sustained-release capsules 0.3g orally twice a day," forming plain text structured entries.
[0021] Employing RGB high-definition image acquisition and global exposure correction algorithms, images of drug packaging, drug appearance, and key pages of the instruction manual are captured by the terminal camera in the unmanned pharmacy. Frontal images of drugs on the shelf are taken, and after exposure and distortion correction, clear, non-reflective, and distortion-free images of the drug packaging are obtained, including visual features such as drug name, manufacturer, and specifications. Using one-dimensional / two-dimensional barcode decoding and verification algorithms, a barcode scanner reads the drug's national drug approval number, product barcode, traceability code, and other numerical and symbolic information. Scanning the drug's outer packaging barcode, after decoding and verification, yields the unique identifier "6901234567890," ensuring the barcode's authenticity and validity.
[0022] Database field mapping algorithms and drug ontology attribute extraction algorithms are used to extract parameters such as dosage form, specifications, expiration date, manufacturer, indications, and contraindications from drug standard libraries and drug regulatory authority databases. Fixed specification information such as "Amoxicillin Capsules 0.25g / capsule, 24 capsules / blister, expiration date 24 months" is extracted from the drug standard library. Medical data structured parsing algorithms and medical order field standardization algorithms are used to obtain structured entries such as prescription number, prescribing doctor, prescription date, applicable population, and medication frequency from the hospital information system interface. Through interface parsing, standardized structured data such as "Prescription Number: 20260327001, Prescription Date: 2026-03-27, Usage: 3 times daily, 1 capsule each time" is obtained.
[0023] S102 preprocesses multi-source, multi-modal, heterogeneous data, including prescription text segmentation and entity extraction, drug image denoising and feature enhancement, barcode data verification and format unification, to generate a target prescription drug matching dataset.
[0024] In one implementation, based on the four core requirements of modal alignment consistency, feature extraction effectiveness, data normalization standardization, and dataset availability for drug matching in unmanned pharmacies, a global parameter statistical algorithm and a multi-module collaborative configuration mechanism are adopted to carry out unified parameter planning and constraint setting for the preprocessing process of three types of heterogeneous data: prescription text, drug images, and drug barcodes. Modal alignment error, feature loss rate, normalization deviation, and data availability indicators are transformed into a quantifiable and executable preprocessing parameter system, generating parameter calibration values, operating thresholds, and execution constraint information for the text processing module, image enhancement module, and barcode verification module, thereby achieving standardization of preprocessing actions, fixation of parameters, and reproducibility of results throughout the entire process.
[0025] In practice, the core control parameters of the three preprocessing modules—text, image, and barcode—are centrally configured and globally unified: For the prescription text structuring stage, entity recognition confidence thresholds, drug name normalization strictness, and medical order field mapping integrity indicators are set; for the drug image visual processing stage, noise reduction filtering coefficients, image enhancement amplitude, feature extraction resolution, and key area preservation rules are set; for the barcode data verification stage, recognition error tolerance bits, encoding verification length, format standardization, and unique identifier binding constraints are set. Through globally unified configuration, text structuring output, visual feature purification, and barcode data normalization are performed under a unified standard, ensuring that different modal data maintain spatial alignment, temporal alignment, semantic alignment, and format alignment in subsequent fusion and matching, providing a stable, standardized, and consistent data foundation for multimodal feature fusion and accurate prescription drug matching.
[0026] A unified confidence threshold of no less than 95% is set for text entity recognition to ensure accurate and reliable extraction of key information such as drug name, specifications, and usage. A unified image denoising filter coefficient of 3×3 Gaussian kernel is set to remove reflections and noise while preserving the text and outline features of drug packaging. A unified error tolerance of no more than 2 characters is set for barcode recognition to avoid erroneous codes entering the dataset. This ensures that the entire preprocessing process is standardized, outputs are stable, and results are reproducible, meeting the data quality requirements for subsequent multimodal feature fusion and deep learning model training.
[0027] For the prescription text segmentation and entity extraction stages, a fixed text structure parameter system and scenario adaptation logic are formed by setting segmentation granularity, entity recognition confidence threshold, drug name normalization rules, and medical order field mapping standards. This stage uses Chinese medical domain word segmentation algorithms to split and determine boundaries in the prescription text, ensuring that medical terms such as drug name, specifications, units, usage, and dosage are completely segmented without any breaks or ambiguities. Simultaneously, the BERT named entity recognition algorithm is used to extract elements from the segmented prescription information. Under the set confidence threshold constraints, key entities such as generic drug name, brand name, dosage form, dosage, usage, frequency, and course of treatment are accurately located and extracted.
[0028] During the processing, based on the drug name normalization rules, synonyms, abbreviations, and trade names of the same drug are uniformly replaced and standardized to ensure that the prescription text is consistent with the drug database information. According to the medical order field mapping standard, unstructured and semi-structured medical order descriptions are mapped into standardized fields that the system can recognize, realizing the complete conversion of prescription text from natural language to structured data.
[0029] When processing the original prescription text "ibuprofen sustained-release capsules 0.3g orally twice a day", the algorithm first performs word segmentation at the medical terminology level using a Chinese medical domain word segmentation algorithm. Then, the BERT named entity recognition algorithm accurately extracts four key entities—drug name, drug specifications, method of administration, and frequency of administration—under a set confidence threshold. Simultaneously, based on drug name normalization rules, common brand names such as "Fenbid" are automatically normalized to the standard generic name "ibuprofen sustained-release capsules". And according to the medical order field mapping standard, natural language descriptions such as "oral" and "twice a day" are mapped to structured fields such as usage and frequency. Finally, the output is standardized, unified, and directly usable structured prescription text data for matching calculations.
[0030] For the prescription text segmentation and entity extraction stages, a fixed text structure parameter system and scenario adaptation logic are formed by setting segmentation granularity, entity recognition confidence threshold, drug name normalization rules, and medical order field mapping standards. This stage uses Chinese medical domain word segmentation algorithms to split and determine boundaries in the prescription text, ensuring that medical terms such as drug name, specifications, units, usage, and dosage are completely segmented without any breaks or ambiguities. Simultaneously, the BERT named entity recognition algorithm is used to extract elements from the segmented prescription information. Under the set confidence threshold constraints, key entities such as generic drug name, brand name, dosage form, dosage, usage, frequency, and course of treatment are accurately located and extracted.
[0031] During the processing, based on the drug name normalization rules, synonyms, abbreviations, and trade names of the same drug are uniformly replaced and standardized to ensure that the prescription text is consistent with the drug database information. According to the medical order field mapping standard, unstructured and semi-structured medical order descriptions are mapped into standardized fields that the system can recognize, realizing the complete conversion of prescription text from natural language to structured data.
[0032] When processing the original prescription text "ibuprofen sustained-release capsules 0.3g orally twice a day", the algorithm first performs word segmentation at the medical terminology level using a Chinese medical domain word segmentation algorithm. Then, the BERT named entity recognition algorithm accurately extracts four key entities—drug name, drug specifications, method of administration, and frequency of administration—under a set confidence threshold. Simultaneously, based on drug name normalization rules, common brand names such as "Fenbid" are automatically normalized to the standard generic name "ibuprofen sustained-release capsules". And according to the medical order field mapping standard, natural language descriptions such as "oral" and "twice a day" are mapped to structured fields such as usage and frequency. Finally, the output is standardized, unified, and directly usable structured prescription text data for matching calculations.
[0033] For the barcode data verification and format standardization stage, this section establishes barcode data validity criteria and end-to-end constraints by setting barcode recognition error tolerance, code check bits, format conversion rules, and unique identifier binding strategies. This stage employs a barcode check bit verification algorithm to verify the digital legality of collected drug barcodes, national drug approval codes, and traceability codes. Check bit operations are used to verify the integrity and authenticity of the barcodes, preventing incorrect identification, garbled characters, and counterfeit codes from entering the dataset. Simultaneously, an encoding format normalization algorithm is used to uniformly format barcodes of different lengths, with different separators, and using different encoding rules.
[0034] During execution, reasonable character errors are allowed based on the set barcode recognition error tolerance rate to avoid recognition failure due to slight dirt or reflection; the fixed-length drug barcodes are strictly checked according to the number of bits in the code to ensure the completeness of the coding standard; the original barcodes containing separators, spaces, and special symbols are uniformly converted into standard codes with pure numbers and no redundant symbols through format conversion rules; based on the unique identifier binding strategy, the standardized barcodes are uniquely bound to the text information, image features, and specification parameters of the corresponding drug to form an indivisible drug data unit.
[0035] For example, for the scanned drug barcode "6901234567890", the legality calculation is first performed by the barcode check digit verification algorithm to eliminate invalid codes that have identification errors or fail verification; within the barcode recognition error tolerance range, normal recognition deviations are retained, and for barcodes that meet the requirements, redundant symbols are removed and the code length and arrangement format are standardized according to the format conversion rules; the standardized code is then bound to the prescription text information, enhanced drug image, and specification parameters of the same drug to form a unique identifier corresponding to a unique drug, ensuring that each item has a unique code, is fully traceable, and can be accurately matched in the subsequent multimodal fusion matching process.
[0036] The preprocessing results of text structuring, visual feature extraction, and barcode normalization are subjected to multi-dimensional modal alignment and full-domain data fusion to construct a standardized prescription drug matching dataset covering all data sources, the entire process, and all fields. First, the structured prescription text data, drug image enhancement feature data, and barcode verification normalization data are synchronized temporally, matched spatially, and associated with entities, unifying data format, length, and identifiers to form a multi-modal data closed loop for the same drug and prescription. Based on this, joint annotation and field mapping are performed on drug name, specifications, and usage in the text information; appearance, packaging, and text regions in the image features; and the unique code, verification result, and associated information after barcode normalization. Strong correlations between data are established, outliers, redundancies, and conflicting data are removed, completing data cleaning, completion, and consistency verification. Finally, all effective information is integrated into a standardized dataset with a unified structure, complete labels, and direct applicability for dynamic matching and deep learning training, achieving data structure standardization, feature normalization, and identifier uniqueness.
[0037] This dataset combines structured prescription text information for the same drug, denoised and enhanced visual features of the drug, verified and formatted standard barcode encoding, and complete drug specifications with timestamp alignment, unique drug identifier binding, and entity association. This forms a standardized data unit containing core prescription information, drug visual features, medication rule constraints, and a globally unique identifier. The dataset is structurally complete, feature-pure, formatted, and conflict-free, allowing direct integration into a cloud-edge-device collaborative architecture for dynamic matching strategy generation, multimodal feature learning, and accurate prescription drug matching inference, improving subsequent model training efficiency and matching confirmation accuracy.
[0038] S103 combines cloud-edge-device collaborative computing architecture, deep learning model computing power resources, drug feature-prescription demand mapping modeling accuracy, and multi-dimensional matching verification requirements to determine the dynamic matching and fusion strategy of prescription drugs. Based on the prescription complexity and drug feature dimensions, it sets the data access window size and dynamic update frequency to adapt to multi-source data collection and transmission rates.
[0039] In one implementation, based on the comprehensive requirements of unmanned pharmacy prescription matching accuracy, inference real-time performance, cloud-edge-device collaboration efficiency, and optimal utilization of deep learning computing power, a resource dynamic scheduling algorithm is adopted to globally perceive and adaptively schedule and allocate computing resources, network transmission resources, and device cache resources across the entire chain of terminal data collection, edge inference, and cloud training, thereby constructing a node load balancing and optimal resource configuration mechanism.
[0040] This process monitors the computing power utilization, bandwidth occupancy, and remaining cache of each node in real time. It dynamically adjusts the resource allocation ratio based on prescription complexity, drug feature dimensions, multimodal data volume, and system concurrent task volume. It generates quantitative standards such as computing power ratio, bandwidth allocation quota, and cache usage limit for the cloud, edge, and terminal respectively. At the same time, it establishes highly reliable operation constraints such as node overload protection, bandwidth congestion avoidance, and cache overflow circuit breaking to ensure that resource supply and task demand are accurately matched in high-concurrency, multimodal, and real-time unmanned pharmacy scenarios.
[0041] The system uses a dynamic resource scheduling algorithm for global coordination. Based on the task priorities and computing power consumption differences of model training, real-time inference, and data collection, it allocates 60% of cloud computing power for deep learning model training, iterative optimization, and rule base updates; 30% of edge computing power for multimodal feature fusion, real-time matching inference, and result verification; and 10% of terminal computing power for data collection, lightweight preprocessing, and result display.
[0042] Meanwhile, at the transmission level, bandwidth resources are adaptively allocated, with both downlink and uplink transmission bandwidth at the edge set to be no less than 20Mbps to ensure stable model distribution and feature feedback; terminal data upload bandwidth is set to be no less than 5Mbps to ensure real-time uploading of multi-source data. At the caching level, the cache usage limit for each node is uniformly set to no more than 80% of the total device capacity to prevent data loss or program abnormalities due to cache overflow, achieving efficient utilization of resources across the entire domain and long-term stable operation of each node, providing a solid resource guarantee for the subsequent execution of dynamic matching and fusion strategies.
[0043] Based on the cloud-edge-device collaborative architecture and the need for multimodal data fusion and matching, a task decoupling partitioning algorithm is adopted to vertically layer and horizontally decouple the entire process of dynamic drug matching for prescriptions. According to computational intensity, real-time requirements, data flow, and computing load characteristics, the overall business is divided into three levels of collaborative tasks: cloud, edge, and terminal. The functional boundaries, execution logic, and data interaction interfaces of each node are clearly defined, resulting in a refined task allocation information system with clear responsibilities, efficient scheduling, and low coupling with high cohesion. In the task layering design, the cloud focuses on high-computing-power, non-real-time model and rule-based tasks; the edge focuses on low-latency, high-concurrency inference and fusion tasks; and the terminal focuses on lightweight, high-real-time acquisition and interaction tasks. In the horizontal decoupling design, data acquisition, feature preprocessing, model inference, result verification, and strategy updates are independently encapsulated, allowing each stage to be scheduled, upgraded, and maintained independently.
[0044] The cloud-based tasks are defined as deep learning-oriented model iteration and optimization, network weight updates, medication rule base maintenance, and global policy distribution. Leveraging the powerful computing capabilities of the cloud, these tasks complete the training, distillation, and pruning of the multimodal fusion model, continuously improving matching accuracy. The edge-side tasks are defined as multimodal feature fusion, real-time prescription and drug matching calculations, and result compliance verification. These tasks receive lightweight models from the cloud and perform local inference on data uploaded from the terminal, ensuring millisecond-level response. The terminal tasks are defined as multi-source data acquisition, lightweight preprocessing, result display, and interactive feedback, completing the acquisition and initial cleaning of prescription text, drug images, and barcode information. All nodes interact through standardized and regulated data interfaces: the cloud periodically sends updated model files and medication rules to the edge; the edge sends inference statistics and anomaly samples back to the cloud; the terminal uploads standardized collected data to the edge in real time; and the edge sends matching results and control commands to the terminal. Through this three-level linkage and collaborative division of labor, the stable, efficient, and secure operation of the unmanned pharmacy's prescription and drug matching process is ensured.
[0045] By combining drug feature dimensions, prescription complexity, multi-dimensional verification intensity, and system concurrency throughput requirements, an adaptive access window algorithm is adopted. Based on the computing power and task type of different nodes (cloud, edge, and terminal), hierarchical access windows, modal fusion batches, verification execution batches, and result feedback batches are set respectively. The data volume of each batch, end-to-end latency limit, and cloud-edge-device data synchronization cycle are dynamically determined, forming a batch control system that is highly adaptable to node performance and task scenarios. For high-order tasks with a large number of drug features, complex prescription structures, and strict verification rules, a small window, small batch, and low latency configuration is adopted; for basic tasks with simple features, routine prescriptions, and simple verification, a large window, large batch, and high throughput configuration is adopted, achieving an optimal balance between matching accuracy and system efficiency.
[0046] For emergency prescriptions with a wide variety of drugs, complex prescription information, and the need for multiple medication safety verifications, a small-capacity access window is set, with a batch size of 10 prescriptions / batch and a latency limit of no more than 300ms, ensuring rapid response in emergency scenarios. For ordinary outpatient prescriptions with a single drug, clear structure, and conventional verification rules, a medium-capacity access window is set, with a batch size of 50 prescriptions / batch and a latency limit of no more than 1s, balancing response speed and system throughput. The cloud-edge-device data synchronization cycle is set to once every 5 seconds to ensure real-time consistency of the global status.
[0047] After completing the batch and cycle configuration, the overall resource scheduling results, the three-level node task allocation scheme, and the multi-batch processing rules are integrated into one system. This system constructs dynamic matching and fusion control information that includes resource elastic scheduling rules, edge-cloud collaborative execution process, and multimodal data interaction standards. Furthermore, multiple specialized algorithms are used to improve overall operational efficiency and data consistency.
[0048] The cloud employs incremental distillation and model pruning algorithms to lightweight the multimodal fusion deep learning model, significantly compressing its size while preserving matching accuracy, enabling the lightweight model to be deployed in seconds. Large, trained multimodal fusion models are compressed to 30% of their original size through incremental distillation and model pruning, and deployed within one second, significantly reducing transmission time and edge computing load. At the edge, spatiotemporal batch processing algorithms and high-frequency feature caching mechanisms aggregate prescription and drug feature data from the same time period, device, and type, reducing redundant computation and feature extraction overhead, and significantly improving concurrent matching efficiency. For example, batch processing of multiple prescription drug matching tasks within the same time period and caching frequently occurring drug feature data avoids repeated extraction, more than doubling the system's concurrent processing capacity.
[0049] The terminal employs an adaptive sampling rate algorithm and a data compression algorithm, automatically adjusting the sampling rate based on the current network signal quality and initiating lightweight compression. This ensures stable data transmission even in environments with weak networks or high packet loss rates. For example, when network bandwidth is insufficient or the signal is weak, it automatically reduces the image and text sampling rates while simultaneously enabling data compression to ensure uninterrupted data transmission to the edge. To guarantee data consistency and traceability across the cloud, edge, and terminal levels, all data and instructions are strongly aligned using a global timestamp and a unique drug code. Each prescription, each drug, and each batch of data carries a unified timestamp and a globally unique identifier, enabling data alignment, status synchronization, and process traceability at any time across the cloud, edge, and terminal. This mechanism fundamentally eliminates issues such as multimodal data misalignment and inconsistent matching results, providing solid support for the fully automated and safe operation of unmanned pharmacies.
[0050] The system integrates global resource scheduling results, three-level node task allocation schemes, and multi-batch processing rules. It unifies parameters such as computing power allocation, bandwidth planning, cache constraints, task division, batch size, latency limits, and synchronization cycles, constructing a dynamic matching and fusion control information system that includes resource elastic scheduling rules, edge-cloud collaborative execution processes, and multimodal data interaction standards. In the collaborative mechanism, the cloud employs incremental distillation and model pruning to achieve lightweight model deployment within seconds; the edge uses spatiotemporal batch processing and feature caching to improve concurrent matching efficiency; and the terminal uses adaptive sampling rate and data compression to ensure stable transmission in weak network environments. Three-level nodes achieve strong data consistency alignment through global timestamps and unique drug codes.
[0051] This process unifies and standardizes the distributed resource scheduling strategies, hierarchical task execution logic, graded batch processing specifications, and multimodal collaborative optimization algorithms, forming a complete control instruction system that can be directly invoked, dynamically adapted, and executed in a closed loop. By integrating the constraints and execution logic of each stage, it ensures that data access, feature preprocessing, batch transmission, multimodal fusion matching, and result verification operate collaboratively under unified rules, improving the automation level and stability of the overall process.
[0052] The integrated dynamic matching and fusion control information includes quantitative indicators of computing power allocation and bandwidth distribution at the cloud, edge, and terminal levels, task execution lists and interface specifications for each node, hierarchical access window size and data synchronization cycle, model distribution frequency and update rules, data consistency verification mechanism, and other complete control instructions. It can be directly used to guide the intelligent splitting, orderly transmission, and multimodal feature fusion matching execution of datasets, ensuring the efficient, stable, and reliable operation of the entire process of prescription drug matching in unmanned pharmacies.
[0053] S104: Split the target prescription drug matching dataset according to the target dynamic matching fusion strategy, generate processing batches containing prescription core information data, drug ontology feature data, medication rule data, and matching result labels, and transmit data based on the access window size and dynamic update frequency.
[0054] In one implementation, a unified dimensional alignment and batch mapping are performed on the determined dynamic matching fusion strategy and the standardized prescription drug matching dataset. With modal consistency, data correlation, and transmission timeliness as constraints, a multimodal data adaptive block partitioning algorithm and a prescription-drug-rule three-dimensional association grouping rule are adopted to intelligently split and orderly batch combine the standardized dataset, ensuring that the data maintains complete correlation and efficient processing in subsequent transmission, inference, and verification stages.
[0055] First, the four types of data—prescription core information, drug characteristics, medication rule data, and matching result tags—are normalized in dimensions and aligned in fields. This unifies the data format, index structure, and primary keys, allowing data from different sources and modalities to be directly combined and scheduled within the same spatial dimension. Based on this, using the prescription number and unique drug code as the core association keys, all drug information, contraindications, dosage rules, and matching tags corresponding to the same prescription are bound and grouped to form the smallest indivisible processing unit.
[0056] Subsequently, a multimodal data adaptive block partitioning algorithm is used to automatically calculate the optimal block size and batch combination method based on the access window size, prescription complexity, drug feature dimensions and edge computing load. The grouped units are divided into independent and orderly processing batches to ensure that prescription data is not split, drug data is not scattered, and association rules are not lost.
[0057] The standardized dataset aligns the structured information of prescription texts, drug visual features, specifications, barcodes, medication safety rules, and matching tags according to field dimensions and dynamic matching strategy requirements. Based on the prescription number and the globally unique code of the drug, all drug features, contraindications, usage rules, and matching tags under the same prescription are automatically grouped into a complete processing unit. Then, according to the adaptive block-splitting mechanism of the access window, multiple associated units are divided into independent processing batches to ensure the integrity of data within the same group and the balanced separation between different groups. This provides standardized batch data that is structurally regular, closely related, and directly executable for subsequent batch transmission and multimodal inference.
[0058] To align with the multi-source data access specifications and cloud-edge-device collaborative transmission requirements of unmanned pharmacies, a batch configuration model for datasets is constructed. This model comprehensively calculates the transmission weight of each batch of data using a computing power-bandwidth-latency balancing model, establishing a standardized dynamic data access and transmission mechanism adapted to edge computing, real-time inference, and weak network compatibility. The model uses edge computing load, network bandwidth margin, and maximum allowable latency as core constraints, combined with prescription type, drug characteristic dimensions, verification strength, and business priority, to weight and prioritize different batches of data, achieving on-demand allocation of transmission resources, priority protection for critical data, and overall balanced and stable traffic.
[0059] In transmission scheduling, priority is given to emergency prescriptions, high-risk medications, and high-priority batches of real-time matching. For low-priority batches such as routine outpatient prescriptions, static rule updates, and historical data synchronization, traffic smoothing and delayed transmission strategies are adopted to avoid network congestion and computing power contention. This ensures that the system can still maintain low latency and high reliability when high-concurrency and multi-modal data are uploaded concurrently.
[0060] Based on three constraints—real-time computing power at the edge, currently available bandwidth, and maximum allowable latency—a computing power-bandwidth-latency balancing model is used for weight calculation. High-priority batches with high real-time requirements, such as emergency prescriptions and emergency medications, are assigned a transmission weight of 0.8, receiving priority allocation of bandwidth and computing resources. Regular outpatient prescriptions and chronic disease medications are assigned a transmission weight of 0.5, transmitted at normal rates. Non-real-time static batches, such as drug rule bases and static parameters, are assigned a transmission weight of 0.3, transmitted during idle periods. The system dynamically schedules transmission resources according to these weights, ensuring rapid uploading and immediate processing of high-priority data, and smooth transmission of ordinary and static data. This achieves orderly, efficient, and stable transmission of multimodal data in unmanned pharmacies within a cloud-edge-device collaborative architecture.
[0061] Using batch adaptability as the core dimension, this paper unifies and models four key data elements—prescription core information, drug ontology characteristics, medication rule data, and matching result tags—to construct a multi-dimensional batch configuration association matrix for unmanned pharmacies. This matrix optimizes batch processing efficiency, data correlation, transmission stability, and matching accuracy, abstracting various influencing factors into quantifiable dimensions to achieve precise mapping between batch configuration and business scenarios.
[0062] During matrix construction, core dimensions such as prescription complexity, drug feature dimensions, multi-dimensional verification strength, batch size, latency limit, synchronization cycle, and transmission weight are used to classify processing tasks under different business scenarios into types such as high-priority emergency batches, medium-priority batches in regular outpatient clinics, and static batches based on drug rules, and these are mapped to corresponding positions in the matrix. Matrix operations allow for a direct and intuitive understanding of the optimal configuration parameters for each batch, ensuring that batch size, transmission rhythm, and computing power allocation are highly adapted to prescription and drug features.
[0063] By unifying prescription complexity, number of drug features, strength of medication rule constraints, batch size, end-to-end latency limit, and cloud-edge-device synchronization cycle as a matrix dimension, small batches, short latency, and high priority configurations corresponding to emergency prescriptions are mapped to the high-priority area of the matrix; medium batches, normal latency, and medium priority configurations corresponding to regular outpatient prescriptions are mapped to the middle area of the matrix; and large static batches such as drug rule bases and basic parameters are mapped to the low-priority area of the matrix. This forms a visualized, computable, and schedulable multi-dimensional batch configuration relationship, providing a direct and standardized execution basis for subsequent data batch transmission, dynamic scheduling, and multi-modal fusion matching.
[0064] The batch deviation optimization model monitors and addresses the configuration gap between the access window size and transmission frequency in real time, dynamically compensating and correcting anomalies such as insufficient window size, batch backlog, excessive frequency, and bandwidth congestion. Simultaneously, a real-time data traffic calibration mechanism smooths network fluctuations and suppresses traffic spikes, further improving the stability and continuity of data transmission. The batch deviation optimization results are deeply integrated with the batch configuration model output, enabling unified visual monitoring and closed-loop control of data splitting deviation, 3D grouping deviation, and network transmission deviation. This automatically generates an executable, traceable, and optimizable batch optimization decision chain, ultimately forming a basic strategy for batch transmission of unmanned pharmacy prescription and drug matching data that adapts to multimodal heterogeneous data.
[0065] The batch deviation optimization model can calculate in real time the difference between the current access window and the actual data volume, and the difference between transmission frequency and bandwidth utilization. It quickly identifies configuration gaps such as data congestion caused by an excessively small window, insufficient bandwidth caused by excessively high transmission frequency, and edge computing power overload caused by excessively large batches, and automatically performs compensation adjustments: expanding the access window, reducing the transmission frequency, and balancing the batch data volume, so that the system always operates in the optimal transmission range. The real-time data traffic calibration mechanism monitors and smooths instantaneous uplink traffic, network jitter, and packet loss rate in real time, avoiding data packet loss, latency, and out-of-order delivery through dynamic rate limiting, traffic shaping, and caching. Based on this, deviations such as unreasonable data splitting, misalignment of prescription-drug-rule grouping, and transmission link jitter are presented and analyzed in real time, forming an automated batch optimization decision chain of "monitoring-diagnosis-adjustment-feedback".
[0066] When the access window is set too small, causing data to accumulate, or the transmission frequency is too high, leading to insufficient network bandwidth and increased transmission latency, the batch deviation optimization model immediately activates the adjustment logic. It automatically increases the access window and appropriately reduces the transmission frequency to match the data transmission rate with the network carrying capacity. The real-time data traffic calibration mechanism simultaneously smooths out sudden traffic spikes to avoid network congestion, data packet loss, and transmission interruptions. At the same time, it visualizes data splitting deviation, three-dimensional association grouping deviation, and transmission link deviation in real time, providing the system with a basis for continuous optimization and forming a stable and self-healing automatic optimization decision chain to ensure that multimodal data can still be transmitted stably and reliably in high-concurrency, weak network, and high-traffic scenarios.
[0067] After completing deviation optimization, traffic calibration, and decision chain generation, the results of the entire process, including intelligent dataset splitting, batch configuration, transmission weight calculation, multi-dimensional correlation matrix, and batch deviation optimization, are integrated to form a complete, standardized, and directly executable basic strategy for batch transmission of unmanned pharmacy prescription drug matching data adapted to multimodal data. This strategy uniformly specifies the data batch division method, transmission priority sorting, hierarchical access window size, dynamic update frequency, real-time traffic calibration method, and abnormal deviation optimization logic, and can be directly used to guide cloud-edge-device collaborative data scheduling, transmission control, and multimodal fusion matching execution.
[0068] The final result is a complete batch transmission strategy that includes batch division rules, data transmission priority, access window size, dynamic update frequency, traffic calibration mechanism, deviation adaptive optimization logic, and data consistency guarantee measures. This strategy can be directly deployed to terminals, edge devices, and the cloud for execution, ensuring that multimodal data such as prescription text, drug images, barcode information, and specifications are transmitted in an orderly, efficient, and stable manner in the complex scenario of unmanned pharmacies. This provides high-quality data support for subsequent multimodal feature fusion and accurate matching of prescription drugs.
[0069] S105 learns the mapping relationship between prescription information and drug features through a deep learning algorithm that integrates text semantics, image vision, and structured data multimodal features. It optimizes model parameters by weighting the key elements of the prescription, the importance of drug features, and the strength of medication rule constraints. It also dynamically adapts to multi-source data access verification rules, drug unique identifier coding mapping rules, and model inference result correction instructions by combining drug classification attributes, prescription types, and medication safety standards to generate a precise matching confirmation result for prescription drugs.
[0070] In one implementation, based on the four core indicators of accuracy, safety, real-time performance, and robustness of drug matching in unmanned pharmacies, the core control parameters of the entire process of deep learning, which integrates text semantics, image vision, and structured data, are globally coordinated and uniformly configured. The requirements such as matching accuracy constraints, medication safety verification, low latency response, and compatibility with complex scenarios are transformed into a quantifiable, executable, and reproducible model parameter system, providing a standardized execution basis for multimodal feature mapping, weighted fusion, dynamic adaptation, and inference correction.
[0071] This comprehensive configuration process prioritizes medication safety, ensures accurate matching, emphasizes real-time response, and guarantees stability and robustness. It centrally sets key parameters for each sub-module in the multimodal feature fusion deep learning algorithm, including semantic embedding dimension, visual feature sampling rate, modality alignment loss weight, multi-source data access verification threshold, weighted fusion coefficient, and inference correction step size. This results in parameter calibration values and execution constraint information covering the entire algorithm chain, ensuring that the model stably outputs high-precision results in high-concurrency, multimodal, and real-time unmanned pharmacy scenarios.
[0072] The text semantic embedding dimension is uniformly set to 256 dimensions, ensuring that prescription text information maintains complete semantic expression in a low-dimensional space. The sampling rate of drug image visual features is uniformly set to 1080P, controlling computational load while ensuring clear and distinguishable visual features. The modal alignment loss weight is uniformly set to 0.7, strengthening spatial alignment and feature correlation between text, images, and structured data. The multi-source data access verification threshold is uniformly set to no less than 95%, ensuring that only high-quality, high-reliability data enters the inference process. Through the above global parameter configuration, the model simultaneously meets the comprehensive requirements of high-accuracy matching, controllable medication safety, real-time response on the device, and stable operation in complex environments, providing a reliable model operation foundation for subsequent multimodal feature fusion and accurate prescription drug confirmation.
[0073] For the multimodal feature mapping stage involving text semantics, image vision, and structured data, a fixed and adaptable multimodal feature mapping rule system is constructed by setting four key parameters: semantic embedding dimension, visual feature sampling rate, structured field association confidence, and modality alignment loss weight. This stage employs a multimodal feature cross-domain mapping algorithm to map the semantic features of prescription texts, visual features of drug images, and structured data features such as drug specifications and barcodes—which are not from the same source, have different structures, and different expressions—to the same high-dimensional feature space. This achieves feature alignment, association, and unified expression, establishing a precise, stable, and learnable mapping relationship between prescription information and drug features.
[0074] In the parameter configuration, the semantic embedding dimension controls the feature expression length of the prescription text, ensuring that medication information is complete and not lost; the visual feature sampling rate determines the precision of drug image feature extraction, balancing recognition accuracy and computational speed; the structured field association confidence score sets the matching strictness between text, images, and structured data, filtering out low-confidence associations; and the modality alignment loss weight constrains the distribution distance of different modal features in a unified space, improving the fusion effect. Through the fixed values of the above parameters and the collaborative adaptation logic, the three types of heterogeneous data are kept consistent in space, time, and semantics, providing standardized and unified feature inputs for subsequent weighted fusion and inference judgment.
[0075] Prescription text is semantically encoded into a fixed 256-dimensional feature vector, fully preserving semantic information such as drug name, dosage, and usage. Drug images are sampled at 1080P resolution to extract visual features, covering key visual information such as packaging text, appearance outline, and color scheme. Structured data such as drug specifications, barcodes, and expiration dates are bound to fields with a 98% association confidence level to ensure a one-to-one correspondence with the prescription and image. Modal alignment loss weights are used to constrain the distribution distance of the three types of features in a unified space, achieving accurate alignment and association mapping between "prescription text semantics, drug visual appearance, and drug attribute parameters," providing a high-quality feature foundation for subsequent weighted matching and security verification.
[0076] For the prescription-drug weighted fusion stage, a standardized weighted scoring system and matching judgment rules are constructed by setting weight coefficients for key prescription elements, importance scores for drug features, and thresholds for the strength of medication rule constraints. This stage employs a weighted feature fusion algorithm, which performs weighted summation and confidence synthesis on text features, visual features, and structured features that have undergone multimodal mapping. Information from different dimensions is dynamically fused according to their importance, ultimately outputting a unified matching score and judgment conclusion. In the parameter settings, the weight coefficients for key prescription elements are used to distinguish the importance of information such as drug name, specifications, dosage, and usage, ensuring that core medication information plays a dominant role in the matching result. The importance score for drug features is used to balance the contribution of drug ontological attributes, visual appearance, and unique codes in the matching. The threshold for the strength of medication rule constraints is used to control the effectiveness of safety rules such as contraindications, usage restrictions, and population suitability, ensuring that the matching process complies with medical standards. Through the synergy of these parameters, accurate, safe, and interpretable weighted fusion calculations are achieved.
[0077] The system assigns weights to key elements on the prescription side, with the drug name weighted at 0.4, specification at 0.3, dosage at 0.2, and usage at 0.1, highlighting the core importance of the name and specification. It also assigns importance values to drug-related features, with drug intrinsic features at 0.5, visual features at 0.3, and coding features at 0.2, emphasizing the decisive role of the drug's inherent attributes. Furthermore, the system sets the binding strength of medication rules to be mandatory, directly determining a mismatch in case of contraindications or overdosing. When performing a weighted fusion calculation on the prescription for "ibuprofen sustained-release capsules 0.3g" and the corresponding drug, the system accumulates the scores of each dimension according to their weights. A successful match is determined when the total score is greater than or equal to 95 points; otherwise, a review or anomaly alert is triggered, ensuring the safety and reliability of medication dispensing in unmanned pharmacies.
[0078] For the dynamic adaptation and inference correction stages, a full-process adaptive judgment and fault-tolerant correction mechanism is constructed by setting three key parameters: multi-source data access verification threshold, drug unique identifier code binding accuracy, and model result backtracking correction step size. The triggering conditions, execution logic, and constraint boundaries of adaptive optimization are clearly defined. This stage employs a dynamic parameter adaptive adjustment algorithm to monitor and automatically adjust data access quality, coding consistency, and inference result stability in real time. This enables dynamic adaptation and online correction of data verification rules, drug code mapping relationships, and model inference output, improving the robustness and reliability of the matching process in complex scenarios.
[0079] In the parameter configuration, the multi-source data access verification threshold is used to determine the qualification standard of multi-source data such as text, images, and barcodes. If the data is below the threshold, the re-collection or completion process will be automatically initiated to prevent inferior data from entering the inference stage. The drug unique identifier code binding accuracy is used to ensure that the drug barcode, number, national drug approval number, etc. are completely consistent with the prescription, avoiding wrong drug dispensing from the source. The model result backtracking correction step size is used to set the judgment window for continuous abnormal inference. When the deviation of multiple consecutive frames of results exceeds the limit, the model weight calibration and parameter fine-tuning are automatically triggered to ensure long-term stable operation.
[0080] The multi-source data access verification threshold is set to no less than 95%. When the effective confidence of any module in the prescription text, drug image, or barcode data falls below this threshold, the system automatically re-triggers the data collection and preprocessing process until the data is qualified. The binding accuracy of the unique drug identifier code is set to 100% consistency, requiring the drug code to completely match the prescription information. Any inconsistency is directly judged as abnormal and the dispensing is blocked. The model result backtracking correction step size is set to 3 consecutive frames. If the matching confidence fluctuation of the same drug exceeds the limit in 3 consecutive inferences, the model weight calibration and feature parameter correction are immediately triggered to ensure that the unmanned pharmacy maintains high accuracy and high stability matching during long-term high-concurrency operation.
[0081] The parameter settings for the three stages—multimodal feature mapping, prescription-drug weighted fusion, and dynamic adaptation and inference correction—are globally integrated. All core parameters, including semantic embedding dimension, visual feature sampling rate, structured field association confidence, modal alignment loss weight, prescription key element weight coefficient, drug feature importance score, medication rule constraint strength threshold, multi-source data access verification threshold, drug unique identifier coding binding accuracy, and model result backtracking correction step size, are uniformly encapsulated to form a deep learning model configuration and control system covering the entire prescription-drug matching process and the entire algorithm chain. This system transforms the scattered parameter configurations into standardized, deployable, and executable model operation specifications, providing unified execution standards and constraints for real-time inference at the edge, ensuring stable, accurate, and secure inference computation throughout the entire process.
[0082] Based on the established deep learning model configuration and control system, a lightweight model is loaded at the edge and end-to-end inference computation is initiated. The multimodal data, such as prescription text, drug images, barcode information, and specification parameters, which have been transmitted in batches, are processed uniformly. A series of operations are performed in sequence, including feature extraction, cross-domain mapping, weighted fusion, security verification, and consistency check. Finally, three core output information are output: prescription drug matching confidence, medication safety verification conclusion, and drug unique identifier binding result. The entire process is automated and requires no manual intervention or secondary verification.
[0083] For example, text semantic mapping parameters, visual feature extraction configuration, weighted fusion coefficients, and dynamic adaptive correction rules are uniformly integrated and encapsulated into a standardized model configuration file, which is then distributed to the edge for loading. The edge performs end-to-end real-time inference on batch input data based on this configuration file, directly outputting drug matching confidence, drug safety compliance conclusions, and globally unique drug code binding results, thus achieving full-process automation from data input to result output.
[0084] After completing end-to-end inference, based on the core output results and constraints such as drug classification attributes, prescription type, and medication safety regulations, a final comprehensive judgment is made to form the final accurate matching confirmation result of the prescription drugs. If the matching confidence reaches a preset threshold, there are no contraindications in the medication safety check, and the unique identifier binding is completely consistent, the matching is determined to be successful, and the system automatically confirms and allows dispensing; if the matching confidence is insufficient, there are contraindications to medication, or the unique identifier is inconsistent, the matching is determined to be abnormal, and the system immediately outputs an abnormality reminder and blocks the dispensing process, thus ensuring medication safety in unmanned pharmacies from a mechanism perspective.
[0085] For the multimodal fusion matching process of emergency prescriptions, the system outputs a safety conclusion with a matching confidence level of 98%, no medication contraindications, and completely consistent drug codes, automatically determining a successful match and quickly releasing the prescription. For regular outpatient prescriptions, if the matching confidence level is lower than the threshold, the drug code does not match, or there are medication contraindications, the system directly determines the anomaly and triggers audible and visual alerts and process blocking, ensuring the safety and accuracy of the fully automated operation of the unmanned pharmacy.
[0086] In one implementation, such as Figure 2 As shown, this application also provides a deep learning-based unmanned pharmacy prescription drug matching and confirmation device, comprising:
[0087] The multi-source multimodal data acquisition module 201 is used to acquire prescription text, drug images, drug barcodes, drug specification parameters, and structured prescription medical orders from unmanned pharmacies, forming multi-source multimodal heterogeneous data.
[0088] The standardized dataset construction module 202 is used to preprocess multi-source, multi-modal, heterogeneous data. Through prescription text segmentation and entity extraction, drug image denoising and feature enhancement, and barcode data verification and format unification, a target prescription drug matching dataset is generated.
[0089] The dynamic matching and fusion strategy configuration module 203 is used to combine the cloud-edge-device collaborative computing architecture, deep learning computing power, mapping modeling accuracy and multi-dimensional verification requirements to determine the dynamic matching and fusion strategy, and set the data access window size and dynamic update frequency according to the prescription complexity and drug characteristic dimensions to adapt to the collection and transmission rate.
[0090] The data batch splitting and transmission module 204 is used to split the dataset according to the dynamic matching and fusion strategy, generate processing batches of prescription core information, drug ontology features, medication rules, and matching result labels, and complete data transmission based on the access window and update frequency;
[0091] The multimodal fusion matching and confirmation module 205 is used to learn the feature mapping relationship between prescription and drug through a multimodal feature fusion deep learning algorithm, optimize model parameters according to weighted fusion logic, dynamically adapt data verification, encoding mapping and inference correction rules, and finally generate a precise matching and confirmation result of prescription and drug.
[0092] The computer-readable storage medium provided in the above embodiments of this application and the deep learning-based unmanned pharmacy prescription drug matching and confirmation method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application stored therein.
[0093] The various embodiments in this application are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for evaluating the deep learning-based unmanned pharmacy prescription drug matching and confirmation method, electronic device, electronic device, and readable storage medium are relatively simple in description because they are fundamentally similar to the embodiments of the deep learning-based unmanned pharmacy prescription drug matching and confirmation method described above. Relevant parts can be referred to in the descriptions of the embodiments of the deep learning-based unmanned pharmacy prescription drug matching and confirmation method described above.
Claims
1. A method for matching and confirming medication prescriptions in unmanned pharmacies based on deep learning, characterized in that, include: Acquire multi-source, multi-modal, heterogeneous data, including prescription texts, drug images, drug barcodes, drug specifications, and structured prescription and medical order data from unmanned pharmacies; Preprocessing of multi-source, multi-modal, heterogeneous data includes prescription text segmentation and entity extraction, drug image denoising and feature enhancement, barcode data verification and format unification, to generate a target prescription drug matching dataset; By combining cloud-edge-device collaborative computing architecture, deep learning model computing power resources, the mapping modeling accuracy of drug features-prescription requirements, and multi-dimensional matching and verification requirements, a dynamic matching and fusion strategy for prescription drugs is determined. The data access window size and dynamic update frequency are set according to the prescription complexity and drug feature dimensions to adapt to multi-source data collection and transmission rates. The target prescription drug matching dataset is split according to the target dynamic matching fusion strategy, and a processing batch containing prescription core information data, drug ontology feature data, medication rule data, and matching result tags is generated. Data is transmitted based on the access window size and dynamic update frequency. By using a deep learning algorithm that integrates multimodal features from text semantics, image vision, and structured data, the mapping relationship between prescription information and drug features is learned. The model parameters are optimized by weighted fusion logic based on the weight of key prescription elements, the importance of drug features, and the strength of medication rule constraints. Combined with drug classification attributes, prescription types, and medication safety standards, the algorithm dynamically adapts to multi-source data access verification rules, drug unique identifier coding mapping rules, and model inference result correction instructions to generate a precise matching confirmation result for prescription drugs.
2. The method as described in claim 1, characterized in that, Preprocessing of multi-source, multimodal, heterogeneous data, including prescription text segmentation and entity extraction, drug image denoising and feature enhancement, and barcode data verification and format unification, generates a target prescription drug matching dataset, including: Based on the requirements of modal alignment consistency, feature extraction effectiveness, data normalization standardization, and dataset availability for drug matching in unmanned pharmacies, the core parameters for preprocessing multi-source, multi-modal, heterogeneous data are set in a unified manner, generating parameter calibration values and execution rule information for each preprocessing module; For the word segmentation and entity extraction of prescription text, we set word segmentation granularity, entity recognition confidence threshold, drug name normalization rules, and medical order field mapping standards to obtain fixed parameters and adaptation logic for text structure. For the denoising and feature enhancement of drug images, we set denoising filter coefficients, image enhancement gain, feature extraction resolution, key region cropping rules, and clarified the quality judgment criteria for visual features. For the barcode data verification and format unification process, barcode recognition error tolerance rate, encoding verification bit length, format conversion rules, and unique identifier binding strategy are set to determine the validity judgment and constraints of barcode data. The preprocessing results of text structuring, visual feature extraction, and barcode normalization are integrated to form a standardized prescription drug matching dataset covering the entire preprocessing process of multi-source data.
3. The method as described in claim 1, characterized in that, Combining cloud-edge-device collaborative computing architecture, deep learning model computing resources, the accuracy of drug feature-prescription demand mapping modeling, and multi-dimensional matching and verification requirements, a dynamic matching and fusion strategy for prescription drugs is determined. Based on prescription complexity and drug feature dimensions, the data access window size and dynamic update frequency are set to adapt to multi-source data acquisition and transmission rates, including: Based on the requirements of drug matching accuracy, real-time inference, cloud-edge-device collaboration efficiency, and optimal utilization of deep learning computing power in unmanned pharmacies, dynamic adaptive scheduling and allocation of full-domain computing and transmission resources for terminal data collection, edge inference, and cloud training are carried out to generate quantitative standards and high-reliability operation constraints for computing power ratio, bandwidth allocation, and cache usage of each node. Based on the cloud-edge-device collaborative architecture and the need for multimodal data fusion and matching, the entire process of dynamic matching of prescription drugs is designed with vertical layering and horizontal decoupling. The division of responsibilities among three levels of nodes is defined: cloud model iteration and optimization, edge multimodal feature fusion and real-time matching, and terminal data collection and preprocessing. The execution logic and data interaction interface of each node are clarified, forming a refined task allocation information for cloud-edge-terminal collaborative work. Based on drug characteristics, prescription complexity, multi-dimensional verification intensity, and system concurrency throughput requirements, hierarchical access windows, modal fusion batches, verification execution batches, and result feedback batches are set according to node capabilities and task types, and batch size, latency limit, and synchronization cycle information are determined. The system integrates the overall resource scheduling results, the three-level node task allocation scheme, and the multi-batch processing rules to construct a dynamic matching and fusion control information system that includes resource elastic scheduling rules, edge-cloud collaborative execution processes, and multimodal data interaction standards. Specifically, the cloud uses incremental distillation and model pruning to achieve lightweight model deployment in seconds, the edge uses spatiotemporal batch processing and feature caching to improve concurrent matching efficiency, and the terminal uses adaptive sampling rate and data compression to ensure stable transmission in weak network environments. The three-level nodes achieve strong data consistency alignment through global timestamps and unique drug codes.
4. The method as described in claim 1, characterized in that, The target prescription drug matching dataset is split according to the target dynamic matching fusion strategy, generating processing batches containing core prescription information, drug ontology feature data, medication rule data, and matching result tags. Data is transmitted based on the access window size and dynamic update frequency, including: The established dynamic matching and fusion strategy is aligned with the standardized prescription drug matching dataset in terms of dimensions and batch mapping. A multimodal data adaptive block partitioning mechanism and a three-dimensional association grouping rule of prescription-drug-rule are introduced to realize intelligent splitting and batch combination of the dataset. To align with the multi-source data access standards and cloud-edge-device collaborative transmission requirements of unmanned pharmacies, a batch configuration model for datasets is constructed. The batch transmission weight is calculated through a computing power-bandwidth-latency balancing model, and a standardized dynamic data access and transmission mechanism is established. Using batch compatibility as the core dimension, a multi-dimensional batch configuration association matrix is constructed by integrating four types of data elements: core prescription information, drug characteristics, medication rules, and matching tags. By addressing the gap between the access window and transmission frequency configuration through a batch deviation optimization model, and combining it with a real-time data traffic calibration mechanism to enhance transmission stability, the batch optimization decision chain is generated through splitting, grouping, and transmission deviation visualization. This forms the basic strategy for batch transmission of unmanned pharmacy prescription drug matching data that is adapted to multimodal data.
5. The method as described in claim 4, characterized in that, This study employs a deep learning algorithm that fuses multimodal features from text semantics, image vision, and structured data to learn the mapping relationship between prescription information and drug features. The model parameters are optimized using a weighted fusion logic based on the weights of key prescription elements, the importance of drug features, and the strength of medication rule constraints. This is combined with drug classification attributes, prescription types, and medication safety regulations. The algorithm dynamically adapts to multi-source data access verification rules, unique drug identifier coding mapping rules, and model inference result correction instructions to generate a precise drug matching confirmation result for the prescription, including: Based on the requirements of accuracy, safety, real-time performance, and robustness in matching prescriptions in unmanned pharmacies, the core control parameters of multimodal feature fusion deep learning are set in a unified manner, generating parameter calibration values and execution constraint information for each algorithm module. For the multimodal feature mapping process of text semantics-image vision-structured data, we set the semantic embedding dimension, visual feature sampling rate, structured field association confidence, and modal alignment loss weight, and obtained fixed values and adaptation logic for each parameter. For the prescription-drug weighted fusion process, we set the weight coefficients of key prescription elements, the importance scores of drug characteristics, and the threshold for the constraint strength of medication rules, and clarified the calculation and judgment criteria for matching scores. For the dynamic adaptation and inference correction stages, we set the multi-source data access verification threshold, the drug unique identifier code binding accuracy, and the model result backtracking correction step size, and determined the triggering and constraint conditions of the adaptive mechanism. The parameter settings of multimodal feature mapping, weighted fusion, and dynamic adaptation are integrated to form a deep learning model configuration and control system covering the entire process of prescription drug matching. Based on the model configuration system, end-to-end inference calculations are completed, and the prescription drug matching confidence, medication safety verification conclusions and unique identifier binding results are output, ultimately generating a prescription drug accurate matching confirmation result.