Method and system for drug path planning based on uncertainty modeling and multi-strategy cooperation
By using multimodal perception data fusion and uncertainty modeling, the problems of weak identification and authorization fault tolerance, unquantified uncertainty, and poor dynamic response capability in hospital drug delivery systems were solved, achieving efficient and safe path planning and dynamic response in drug delivery systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-28
AI Technical Summary
The existing hospital drug delivery system lacks fault tolerance in the identification and authorization process, has unquantified uncertainties, poor dynamic response capabilities, and a broken risk transmission link, which affects the efficiency and safety of drug delivery.
A path planning method based on multimodal sensing data fusion, uncertainty modeling, and multi-strategy collaboration is adopted. The multimodal fusion confidence is calculated through multimodal sensing data to quantify the identification and authorization results, construct a comprehensive uncertainty scalar, identify the perturbation mode of the task time window, and use a multi-strategy collaborative differential evolution method for path planning and online replanning.
It improves the robustness of identification and authorization, realizes the quantitative transmission of uncertainty from the front end to the back end, enhances the system's response to dynamic disturbances, optimizes the target from the shortest path to the minimum clinical risk, forms a closed-loop risk control across the entire chain, and improves computing speed and security.
Smart Images

Figure CN122472640A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of path planning technology, specifically relating to a drug path planning method and system based on uncertainty modeling and multi-strategy collaboration. Background Technology
[0002] Current hospital drug delivery systems primarily rely on automated equipment and basic information systems to transport medications from the pharmacy to the wards. However, in practical clinical applications, existing technologies have the following shortcomings:
[0003] 1. The identification and authorization mechanisms are simplistic and lack fault tolerance: Traditional systems often rely on simple barcode scanning or visual recognition for drug verification, providing only a binary "pass / fail" output, resulting in a high false rejection rate. When drug packaging has damage, glare, or minor printing defects, the system directly refuses release, causing legitimate drugs to be intercepted and affecting the continuity of clinical medication. The authorization process also uses binary judgment, failing to quantify the reliability of operator identity verification and unable to transmit the uncertainty of identification and authorization to downstream scheduling processes.
[0004] 2. Lack of quantitative modeling for uncertainties in the execution process: Drug delivery involves multiple stages, including identification, authorization, mechanical drug dispensing, and route travel, each with varying degrees of uncertainty (such as fluctuations in barcode scanning quality, changes in facial recognition similarity, and mechanical docking deviations). Existing methods isolate or completely ignore these uncertainties, making it impossible for the scheduling system to perceive the risk differences between tasks. This forces the system to adopt a uniform buffer time, resulting in both conservative scheduling and resource waste.
[0005] 3. Path planning has a singular objective and cannot respond to dynamic disturbances: Existing path planning uses "shortest travel distance" or "least time" as optimization objectives, without considering the differences in clinical consequences among different drugs. When common dynamic disturbances in hospitals occur, such as temporary medical orders, surgery time adjustments, elevator congestion, and emergency room order insertions, the system lacks the ability to identify the type of time window change, and can only re-execute global static planning or rely on manual intervention, resulting in slow response speed and easy delays to critical tasks.
[0006] 4. Lack of a full-link risk transmission mechanism: Risk information in the identification, authorization, scheduling, and execution stages is fragmented. Problems such as low identification confidence and insufficient authorization credibility perceived at the front end cannot be translated into time buffer requirements on the scheduling side; delays occurring during execution cannot be used to correct scheduling parameters. The system cannot form a closed-loop risk control of "perception-decision-execution-feedback", and delay and mismatch risks continue to accumulate.
[0007] Therefore, it is very important to design a drug pathway planning method and system that uses uncertainty modeling and multi-strategy collaboration to achieve intelligent scheduling from "shortest path" to "minimum clinical risk" by quantifying multimodal perception of uncertainty and dynamically classifying task urgency. Summary of the Invention
[0008] This invention aims to overcome the problems of weak identification and authorization fault tolerance, unquantified uncertainty, poor dynamic response capability, and broken risk transmission links in existing hospital drug delivery methods. It provides a trajectory planning method and system that can significantly improve the computation speed by using motion camouflage reparameterization and homotopy perception topology while maintaining the efficiency and safety of the agent's motion.
[0009] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0010] The drug pathway planning method based on uncertainty modeling and multi-strategy synergy includes the following steps:
[0011] S1, acquire multimodal perception data for the drug task; the multimodal perception data includes barcode scanning data, visual image data, and authorization verification data;
[0012] S2, based on the multimodal perception data, calculate the multimodal fusion confidence level, quantify the identification and authorization results into continuous probability values, and construct task metadata;
[0013] S3. Based on the task metadata, construct a comprehensive uncertainty scalar and inject the comprehensive uncertainty scalar into the variance estimate of the task completion time to calculate the expected clinical risk of each drug task.
[0014] S4, based on real-time data from the medical order system, identifies disturbance patterns in the task time window and calculates a comprehensive dynamic urgency score for the task.
[0015] S5. Based on the expected clinical risk and the dynamic urgency comprehensive score, a multi-strategy collaborative differential evolution method is used for path planning and online replanning to output an optimized delivery path that minimizes global clinical risk.
[0016] Preferably, in step S2, the calculation of the multimodal fusion confidence score specifically includes the following process:
[0017] The scan confidence level is calculated based on the decoder error correction level, image patch contrast, and localization score of the scanned image. ;
[0018] Visual confidence is calculated based on color similarity, shape matching, layout similarity, and text matching of drug appearance images. ;
[0019] The confidence level of the QR code scan in the Logit space and visual confidence We perform weighted fusion to obtain the multimodal fusion confidence score. The fusion formula is:
[0020] ;
[0021] in, and All are represented as channel weights; This is represented as a bias term.
[0022] Preferably, in step S3, the construction of the comprehensive uncertainty scalar specifically includes the following process:
[0023] Obtaining multimodal fusion confidence Authorization confidence level and single-port occupancy identification confidence level ;
[0024] Constructing a comprehensive uncertainty scalar The specific formula is as follows:
[0025] ;
[0026] in, , , All are weighting coefficients for the uncertain components;
[0027] The comprehensive uncertainty scalar Introducing the variance of task completion time The estimation formula is as follows:
[0028] ;
[0029] in, The coefficient of variation of travel time. For travel time, For service time variation coefficient, To estimate service time, This is the uncertainty amplification factor.
[0030] Preferably, in step S3, calculating the expected clinical risk for each drug task specifically includes the following process:
[0031] Based on the task's urgency, time constraint, irreplaceable nature of the medicine, fragility, and artificial weighting indicators, a task importance score is calculated and mapped to discrete priority. and the corresponding clinical loss coefficient ;
[0032] Based on the average task completion time variance of task completion time The computation task is performed within the time window. Probability of failure to deliver :
[0033] ;
[0034] in, The cumulative distribution function of the standard normal distribution; The right endpoint of the time window for task / customer i (latest service time);
[0035] Expected clinical risks of computational tasks .
[0036] Preferably, in step S4, the dynamic urgency comprehensive scoring of the computational task specifically includes the following process:
[0037] Based on the endpoint displacement within the task time window, identify the perturbation pattern and calculate the perturbation amplitude within the time window. ;
[0038] Calculate the reachability time margin of the task based on the current path scheme. ;
[0039] Based on the delayed transmission effect of a task on subsequent tasks, the cascading effect factor is calculated. ;
[0040] The disturbance amplitude of the time window Task availability margin and linkage influence factors The task is dimensionless and then weighted to obtain a dynamic urgency score. The formula is as follows:
[0041] ;
[0042] in, This is a dynamic priority correction factor; , , All are dimensionless components, which respectively represent the intensity of time window changes, the tightness of achievable margin, and the chain reaction on subsequent tasks; , , All of these are learnable weight coefficients.
[0043] Preferably, in step S5, the path planning and online replanning using the multi-strategy cooperative differential evolution method specifically includes the following process:
[0044] Comprehensive score based on the dynamic urgency of the task Based on the time window perturbation type, task nodes are divided into rigid nodes, elastic nodes, high-cascading-effect nodes, and global buffer nodes;
[0045] For different types of nodes, a differentiated local search strategy is matched in the mutation and crossover operations of the differential evolution method;
[0046] When a new task is inserted or a time window change is detected during operation, online replanning is triggered, candidate insertion positions are enumerated, and the optimal solution is selected and the remaining path is updated through a comprehensive evaluation function.
[0047] Preferably, in the online replanning, the incremental cost of the comprehensive evaluation function is... The calculation formula is as follows:
[0048] ;
[0049] in, This is the path distance increment. For runtime increments, This represents the expected increase in global risk. , , All are disturbance response weighting coefficients.
[0050] As a preferred embodiment, an adaptive estimation step for service duration is also included, as follows:
[0051] Baseline service time calculated based on the mechanical motion parameters of the medicine tank. By combining the disinfection increment, rescanning increment, rotation angle, and alignment displacement, an estimated service time is obtained. ;
[0052] The service time is updated online using the exponential smoothing method, and the formula is as follows:
[0053] ;
[0054] in, , representing the learning rate; This is an estimate of the task service time from the previous moment (or the previous round); The actual service time observed at the current moment.
[0055] As a preferred option, a parameter self-learning step is also included, as follows:
[0056] The contribution of each evolutionary strategy to the generation of non-dominated solutions in the population evolution is statistically analyzed, and the probability of using the strategy is dynamically adjusted.
[0057] Based on the actual error rate and average delay time in historical operational data, the learnable weight coefficients in the dynamic urgency comprehensive score are determined. , , and disturbance response weighting coefficient , , Perform adaptive updates.
[0058] This invention also provides a drug pathway planning system based on uncertainty modeling and multi-strategy collaboration, including:
[0059] A multimodal perception module is used to acquire multimodal perception data for drug delivery tasks. The multimodal perception data includes barcode scanning data, visual image data, and authorization verification data.
[0060] The task metadata construction module is used to calculate the multimodal fusion confidence based on the multimodal perception data, quantify the identification and authorization results into continuous probability values, and construct task metadata.
[0061] The uncertainty quantification and risk prediction module is used to construct a comprehensive uncertainty scalar based on the task metadata, inject the comprehensive uncertainty scalar into the variance estimate of the task completion time, and calculate the expected clinical risk of each drug task.
[0062] The dynamic disturbance identification module is used to identify disturbance patterns in the task time window based on real-time data from the medical order system and to calculate a comprehensive score of the dynamic urgency of the task.
[0063] The multi-strategy collaborative route planning module is used to perform route planning and online replanning based on the expected clinical risk and the dynamic urgency comprehensive score, and output an optimized delivery route that minimizes the global clinical risk.
[0064] Compared with the prior art, the beneficial effects of this invention are: (1) Improved robustness and security of identification and authorization: This invention uses a multimodal confidence fusion model to uniformly quantify the multi-channel identification results such as barcode scanning, vision, and face recognition into continuous probability values, and performs weighted fusion in the Logit space to achieve evidence complementarity when a single channel fails; at the same time, it introduces a fault-tolerant matching model based on normalized edit distance, allowing the tolerance range to pass for key fields such as batch number and expiration date, improving the traditional "hard rejection" mechanism into "fault-tolerant acceptance", significantly reducing the false rejection rate caused by soiling, reflection, and minor printing defects; authorization confidence model Support for graded access control based on individual and drug, mandatory use of two-factor authentication for high-alert drugs, effectively compressing low-reliability operations to a low-probability range; (2) Achieve quantitative transmission of uncertainty from front end to back end: This invention constructs a comprehensive uncertainty scalar, explicitly transforming the uncertainty of identification, authorization, mechanical docking and other links into calculable indicators, and injecting them into the variance estimation of task completion time, thereby deriving the probability of lateness and expected clinical risk; This transmission link enables the scheduling system to perceive the risk differences of each task and automatically reserve a larger time safety buffer for high-risk tasks; (3) Change the optimization objective from "shortest" to "most accurate". The "path" is upgraded to "minimum clinical loss": This invention constructs a clinical priority quantification model, which integrates multiple clinical factors such as urgency, time urgency, irreplaceability, fragility, and artificial weighting into a task importance score, and maps it to discrete priority and its clinical loss coefficient; in the multi-objective optimization function, the core objective is to minimize the global expected clinical risk, while taking into account the driving distance, waiting time and the number of vehicles used, so that the scheduling decision reflects the clinical safety needs; (4) Enhance the system's perception and response capability to dynamic disturbances: This invention establishes a dynamic time window disturbance identification and quantification mechanism, classifying time window changes into Multiple disturbance modes, combined with disturbance amplitude, reachable time margin, chain influence factor and other dimensions, construct dynamic time demand comprehensive evaluation index to quantify and sort the urgency of tasks; when dynamic disturbances such as temporary medical orders, surgical adjustments, elevator congestion occur, the system can identify the affected tasks and their disturbance types, and provide input for subsequent replanning; (5) It has the ability of multi-strategy collaborative optimization and online replanning: the present invention designs a multi-strategy differential evolution algorithm based on node type perception, divides tasks into rigid nodes, elastic nodes, high chain influence nodes, and global buffer nodes, and matches differentiated evolution strategies for each type.For emergency order insertions during operation, an online replanning mechanism of "insertion at any position + Δ cost evaluation" is adopted to comprehensively measure the path distance increment, time increment and clinical risk increment, select the adjustment scheme with the minimum comprehensive cost, and periodically feed the local optimization results back to the global population; (6) It has the ability to adaptively learn parameters: This invention introduces two types of learnable weights, and the strategy usage rights are updated according to the contribution of each strategy to the non-dominated solution, so as to realize the "survival of the fittest" of the evolutionary strategy; the disturbance response weight is adjusted in small steps according to the actual window error rate, average delay time and other operating indicators; the service duration estimation model The block adopts exponential smoothing online update, making the mechanical cycle time estimation "more and more accurate with use" and eliminating the need for frequent manual calibration; (7) Forming a full-link closed-loop risk control system: This invention constructs a complete closed loop of "multimodal perception and authorization - task metadata structuring - uncertainty quantification - dynamic path planning - execution feedback and parameter self-learning"; the low confidence of the front end perception is transmitted to the scheduling side to affect the time buffer; the actual service time observed in the execution link is fed back to correct the duration estimate; the operation indicators such as window error rate and delay time are fed back to adjust the weight parameters, forming a perceptible, quantifiable, transmissible and optimizable closed-loop risk control system. Attached Figure Description
[0065] Figure 1 This is a schematic diagram of the confidence analysis results of a typical sample in this invention under single-channel and fused-channel conditions;
[0066] Figure 2 This is a schematic diagram illustrating the distribution of multimodal authorization confidence in drug scenarios with different risk levels in this invention.
[0067] Figure 3 This is a schematic diagram showing a comparison of recognition accuracy and false rejection rate between the fusion method of this invention and the traditional single barcode scanning recognition method on the same test set.
[0068] Figure 4 This invention provides a method for estimating service time when service cycle time drifts. A schematic diagram illustrating the online update process over time;
[0069] Figure 5 This is a schematic diagram illustrating the relationship between time margin and uncertainty in risk modeling in this invention;
[0070] Figure 6 In this invention, each task in a delivery batch is scored based on its overall urgency. A schematic diagram of one sorting result;
[0071] Figure 7 This is a flowchart of a multi-strategy cooperative differential evolution method in this invention;
[0072] Figure 8 This is a schematic diagram illustrating the analysis of path distance increment, time increment, and risk increment caused by different insertion positions in this invention.
[0073] Figure 9 This is a schematic diagram of an online replanning process under dynamic disturbance in this invention;
[0074] Figure 10 This is a data illustration of the robustness performance of the method of the present invention under simulated dynamic disturbance scenarios;
[0075] Figure 11 This is a schematic diagram comparing the performance of the method of the present invention with that of traditional route planning methods in terms of key indicators such as clinical risk, travel distance, waiting time, and number of vehicles used.
[0076] Figure 12 This is a Pareto front comparison diagram of the method of the present invention with two other comparison methods (classical NSGA-II and greedy insertion algorithm);
[0077] Figure 13 This is a schematic diagram of the overall architecture of the drug pathway planning system with uncertainty modeling and multi-strategy collaboration in this invention in practical applications. Detailed Implementation
[0078] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.
[0079] This invention provides a drug pathway planning method based on uncertainty modeling and multi-strategy collaboration, comprising the following steps:
[0080] S1, acquire multimodal perception data for the drug task; the multimodal perception data includes barcode scanning data, visual image data, and authorization verification data;
[0081] S2, based on the multimodal perception data, calculate the multimodal fusion confidence level, quantify the identification and authorization results into continuous probability values, and construct task metadata;
[0082] S3. Based on the task metadata, construct a comprehensive uncertainty scalar and inject the comprehensive uncertainty scalar into the variance estimate of the task completion time to calculate the expected clinical risk of each drug task.
[0083] S4, based on real-time data from the medical order system, identifies disturbance patterns in the task time window and calculates a comprehensive dynamic urgency score for the task.
[0084] S5. Based on the expected clinical risk and the dynamic urgency comprehensive score, a multi-strategy collaborative differential evolution method is used for path planning and online replanning to output an optimized delivery route that minimizes global clinical risk.
[0085] The method of this invention was deployed and implemented in the pharmacy and inpatient delivery scenarios of a tertiary hospital. The system hardware includes: industrial cameras, barcode scanners, facial recognition terminals, and pressure-sensitive sensors deployed at the pharmacy compartment interfaces, as well as several unmanned delivery vehicles. The software system is deployed on the hospital's local server and interfaces in real time with the HIS system and medical order system.
[0086] The specific process of the method of the present invention is as follows:
[0087] At the pharmacy compartment interface of this invention, dual recognition is performed using visual / barcode scanning + QR code, followed by secondary authorization via facial recognition / password to ensure compliance and traceability of inbound and outbound processes. Based on the recognition results, the system structures prescription information, pharmacological category, whether it is under high alert / controlled status, whether it is in cold chain, batch number and expiration date, target department, and prescription time window into task metadata. Furthermore, it introduces source confidence for multi-channel identification. Subsequently, the system calculates importance weights in real time and maps them to priorities. Clinical loss coefficient For tasks that require disinfection or rescanning, a fixed increment is automatically added to the service time s, transforming the "perceived facts" into executable scheduling parameters.
[0088] Fault-tolerant matching model for key fields:
[0089] Normalization is applied to key text fields such as batch number and expiration date. distance Perform fault-tolerant matching.
[0090] ;
[0091] Pick Even a difference of 1-2 letters is acceptable. (This allows for tolerance of common OCR or scanning errors (such as dirt or glare) without being overly lenient and compromising security. This value is based on a balance between false rejection and false acceptance rates in actual testing.)
[0092] This approach changes text exceptions from a "hard rejection" to a fault-tolerant acceptance, reducing the false rejection rate without sacrificing security, and... Let's move on to the subsequent uncertainty modeling.
[0093] QR code confidence modeling based on multi-feature fusion:
[0094] The system captures images of medicines through a camera at the medicine compartment interface. And integrate the error correction level of the decoder Image block contrast and positioning score To calculate the confidence level of the QR code scan: ;
[0095] Drug QR code error correction level: ;
[0096] Drug image block contrast: ;
[0097] Drug location scoring (rectangularity, tilt, etc.): ;
[0098] in It converts the error correction level into a number;
[0099] The weights reflect "who decides the decoding quality"; (usually) The higher value is 0.5, because the error correction level has the greatest impact on decoding reliability; and (Lowest value: 0.25)
[0100] It is a translation term used to control the overall pass rate;
[0101] for ;
[0102] Quantify the decoding reliability of QR codes into a unified probability value. It overcomes real-world interference such as glare, dirt, and tilt, providing continuous and measurable uncertainty input for subsequent risk assessment, rather than a simple "pass / fail" binary judgment.
[0103] Visual / text consistency score (e.g., appearance color / template / character similarity) → probability
[0104] The system captures images of the medicine's appearance through a camera at the medicine compartment interface, performs template matching on the main color scheme, outline shape, layout structure, and key text of the packaging, obtains a comprehensive visual / text consistency score, and maps it to visual confidence level. : ; : Obtained by normalizing the distance between the ROI and the template color histogram; Calculated by the correlation or IoU between the outer contour of the packaging and the template contour; Calculated based on the layout matching degree of the main color block, title band, barcode area, etc. Calculated by normalized edit distance between OCR results and standard drug name / specification fields;
[0105] The weights of each visual feature are used to reflect "who decides the appearance"; This is a translation term, used to control the overall level of deliberation in the visual channel;
[0106] for function: .
[0107] When multiple valid packaging templates exist for the same product specification, the scores mentioned above can be calculated for each template separately, and the maximum score can be taken as the final score. By unifying and quantifying information such as appearance color, layout structure, and character matching into probabilities. It can still provide stable evidence even when the QR code is damaged, obscured, or reflective, thus facilitating subsequent fusion. It provides continuous, single-channel-independent visual confidence input for risk assessment.
[0108] Logit-based spatial weighted decision-making based on the fusion of barcode scanning and visual recognition information:
[0109] Two independent sources of evidence—from barcode scanning and visual recognition (color, shape, character)—are merged into a unified posterior confidence level. : ; ;
[0110] The credibility of medicines obtained by scanning their codes;
[0111] Visual / textual consistency scores with the drug are obtained using color, shape, text similarity, and template matching.
[0112] and The weights of the two channels, currently the parameters are: =0.7, =0.3;
[0113] : Bias term, used to push the whole thing up / down.
[0114] If fields conflict or Then place Not joining the team QR code evidence ( ) is usually more than visual evidence ( It is more reliable, and therefore given higher weight. =0.70 is a safety threshold; tasks below this value are marked as REVIEW to prevent low-confidence tasks from entering the schedule. These values are determined based on historical recognition accuracy statistics.
[0115] Linear weighted fusion is performed in the probabilistic Logit space, and then the Sigmoid function is used to map back to probability. When the scanning quality deteriorates, the weight of visual evidence automatically increases, achieving a smooth transition and complementarity of evidence. A robust identity recognition system is constructed to ensure that the system can still make highly reliable judgments when a single recognition channel fails or becomes unreliable.
[0116] Based on the above-mentioned QR code confidence, visual confidence, and Logit space fusion model, this invention can obtain the multimodal recognition confidence distribution under different working conditions. Figure 1 The confidence analysis results of typical samples under single-channel and fusion channels are presented.
[0117] from Figure 1 It can be seen that the confidence level after multimodal fusion Even when the scanning quality deteriorates or the appearance features are interfered with, it can still maintain a high degree of discrimination, and significantly reduces the proportion of false passes with low confidence and false rejections with high confidence compared to a single channel.
[0118] Risk-adaptive hierarchical authorization confidence model:
[0119] The credibility of operator authorization is quantified as a probability value. : ;
[0120] Parameter description:
[0121] Cosine similarity between facial features and templates in the database. ;
[0122] Liveness detection score ;
[0123] Has it passed? The second factor of the password, once passed, is... ;
[0124] The weights of the three channels. High-risk drugs should be... Raise, or make it mandatory ;
[0125] The amount of shift in the authorization threshold.
[0126] Implement hierarchical, measurable security access control, and transmit authorization uncertainty to the scheduling system as part of risk assessment. In this way, the authorization result is no longer a Boolean quantity, but a measurable confidence level, which can both intercept low-confidence operations and be used by the scheduling side to amplify the risk perception of time variance.
[0127] Strategy:
[0128] For regular medication: either facial recognition or PIN verification is sufficient.
[0129] High alert / controlled: Both facial recognition and PIN verification are required, and log entries must include screenshots;
[0130] Authorization failed or This inbound / outbound operation is not permitted, and the data will not be sent to the dispatch center.
[0131] By using the above-mentioned facial similarity, operator historical behavior and PIN quadratic factor joint modeling, the present invention can obtain the probability distribution of authorization confidence. Figure 2 The distribution of multimodal authorization confidence levels is shown in drug scenarios with different risk levels.
[0132] like Figure 2 As shown, after enabling the face + PIN dual-factor authentication for high-alert / controlled drugs, the overall confidence distribution of authorization shifts to the right, and low-confidence operations are effectively compressed into the low range, proving that the model can achieve hierarchical and measurable security access control.
[0133] To verify the effectiveness of the multimodal recognition and fault-tolerant matching mechanism of this invention, a comparative experiment was conducted with the traditional single barcode scanning recognition scheme. Figure 3 The results comparing the recognition accuracy and false rejection rate of the two schemes on the same test set are presented.
[0134] from Figure 3 It can be seen that while improving the overall recognition accuracy, the present invention significantly reduces the false rejection rate caused by minor errors in batch number / expiration date, proving that the multimodal confidence fusion and fault-tolerant matching strategy can balance security and efficiency.
[0135] Confidence model based on single-port occupancy and port alignment:
[0136] To characterize the physical docking reliability of a single-port rotary-lifting medicine compartment during the "upper-position alignment—middle-position rotation—lower-pressure delivery" process, this invention deploys an alignment monitoring camera and a occupancy detection sensor (pressure-sensitive switch) at the medicine compartment's outlet position, forming a joint perception of the single-port occupancy status and the degree of alignment. Before each inbound / outbound operation begins, the system uses this perception result to calculate the single-port occupancy / alignment recognition confidence level. and treat it as a comprehensive uncertainty. One of the inputs.
[0137] ; The value is calculated based on the overlap area, center offset, and outer contour IoU of the ROI of the medicine compartment and the standard template. Perfect alignment is set to 1, and the larger the deviation, the closer it is to 0. This indicates whether the camera image is clear; the clearer the image and the sharper the outline of the mouth. The closer to 1, the blurrier the image or the more obscured it is. The closer it is to 0.
[0138] The current port is determined by infrared / photoelectric / pressure-sensitive sensors to determine whether it is idle. When the port is empty and there are no foreign objects obstructing it. =1, when a tray / foreign object is detected in use. =0.
[0139] is the Sigmoid function, used to map the result of a linear combination to the probability in the interval [0,1]. These are feature weight coefficients used to reflect the relative importance of three types of information—whether the alignment is truly aligned with the single port, whether the image quality is reliable, and whether the single port is idle—in the overall alignment reliability.
[0140] This is the shift threshold, used to control the overall pass rate and safety margin.
[0141] Clinical priority and task importance quantification model:
[0142] The multidimensional clinical factors, such as "urgency, time-sensitive nature, irreplaceability, fragility, and artificial coverage," are folded into a single ranking scalar. : ;
[0143] recommend .
[0144] Parameter description:
[0145] urgency Emergency / STAT directly given ;ordinary ;
[0146] Time is of the essence It gradually increases as the current time approaches the deadline; ;
[0147] Irreplaceable For example, special antibiotics / special chemotherapy drugs Conventional drugs ;
[0148] fragile : 1 if needed, 0 if not;
[0149] Artificial Coverage Doctors / pharmacists receive 1 point for manual privilege escalation, otherwise 0.
[0150] This score is interpretable and adjustable, facilitating consensus-based weighting among infection control, pharmacy, and information parties, and ultimately mapping it to discrete priorities P∈{1,2,3} and their clinical loss coefficient C(P).
[0151] Threshold mapping: ; .
[0152] Adaptive estimation and adaptive learning of service duration:
[0153] Accurately predict the service time required for the mechanical medicine compartment to perform a complete "medication retrieval-matching-delivery" operation. : ;
[0154] Parameter description:
[0155] The standard operation cycle time is the baseline time required for the equipment to complete one complete operation process of "upper position alignment - middle position rotation - lower pressure (disinfection)," which is generally 8-10 seconds.
[0156] Increase the dosage for a quick disinfection, 12 seconds;
[0157] The increase in the amount of time the camera rescans once, 4 seconds;
[0158] : To make an extra turn to align with a certain position.
[0159] The missing linear displacement at the diaphragm We need to give the vision servo some time;
[0160] A coefficient that converts "angle / displacement" into "time";
[0161] By feeding forward the actual complexity of the physical execution layer to the scheduling algorithm, systematic path planning failures due to inaccurate time estimation can be avoided.
[0162] In actual operation, the actual service duration will vary, so an online update is needed to adapt it to the hospital's operational status at different times. ;
[0163] This refers to the learning rate. A value between 0.2 and 0.3 will make the system more accurate with use. (A value between 0.2 and 0.3 allows the system to adapt quickly to changes (such as peak-hour congestion) without becoming overly sensitive. This range is based on commonly used values for exponential smoothing.)
[0164] This method aims to make duration estimates more accurate with increasing use, adapting to variations in hospital congestion and shift schedules. It uses observed values to exponentially smooth historical estimates. During shift changes / peak hours... Too big It will be adjusted accordingly in a timely manner. It achieves zero-intrusion, low-complexity self-learning, eliminating the need for frequent manual calibration of the single-port cycle time.
[0165] To evaluate the convergence effect of the online learning module for service hours, this invention tracked multiple batches of real-world operational data. Figure 4 This demonstrates how to estimate service time when service takt drift occurs. Online update process over time
[0166] like Figure 4 As shown, when the actual service time increases due to peak congestion, the model estimate can smoothly follow within a limited number of batches without manual recalibration, thus maintaining an accurate depiction of the machine's rhythm.
[0167] Task metadata structuring:
[0168] After successful identification and authorization, the system structures the prescription information into initial task metadata: ;
[0169] Furthermore, through subsequent calculations, the description is enriched into a complete schedulable task description: ;
[0170] Parameter description:
[0171] The topological location of the department / ward / room to which the patient needs to be delivered. This can be coordinates, or floor + node. ;
[0172] The prescription time window for this medication, for example, "to be delivered between 15:20 and 15:40";
[0173] The baseline cycle time for the equipment to complete one cycle of "upper position alignment, middle position rotation, and lower position pressing / disinfection";
[0174] A series of switches that record "STAT / ICU / Controlled / Cold Chain / Fragile / Requires Disinfection / Requires Rescanning / Authorization Level...".
[0175] Construction of a comprehensive scalar model for uncertainty and prediction of mission risks:
[0176] Generate a composite scalar Used to quantify the overall uncertainty of the current task: ;
[0177] ( To determine the confidence level for matching / occupancy identification; recommendations are needed. ).
[0178] Parameter description:
[0179] : Identify fusion confidence; Authorization confidence level; : Confidence of single port occupancy / port identification (lower if the alignment image is blurry);
[0180] Generally, identification is the most important, so we take (1, 0.5, 0.5).
[0181] It integrates identification uncertainty, authorization uncertainty, and physical docking occupancy uncertainty. It explicitly transforms the "risk" of front-end perception and authorization into a calculable indicator, driving the scheduling algorithm to automatically reserve a larger time safety buffer when planning for the task.
[0182] Injecting uncertainty into the variance estimation of task completion time: ; ;
[0183] Parameter description:
[0184] The coefficient of variation for walking / driving time will fluctuate when there are people in the corridor; 0.2 is sufficient.
[0185] The coefficient of variation for service actions is 0.15–0.25.
[0186] : Amplify the "uneasy g" factor to the second level, 2.0;
[0187] The estimated service time from the previous section.
[0188] Variance of estimated task completion time That is, quantifying the fluctuation range of its time prediction incorporates the fluctuation of path travel time. Inherent fluctuations in service hours and the comprehensive uncertainty Additional time risks introduced .
[0189] Assuming the task completion time follows a normal distribution Under the premise that it cannot be calculated within the time window Probability of delivery within the delivery window: ;
[0190] It is the CDF of the standard normal distribution.
[0191] Finally, calculate the expected risk for each task. This is the core minimization objective of the path optimization algorithm: ;
[0192] Multiplying the "probability of being late" by the "consequences of being late" transforms the scheduling objective from simply "shortest path" to "minimizing clinical loss," truly aligning with the hospital's operational needs for both safety and efficiency.
[0193] Path replanning and risk buffering mechanisms for dynamic time window disturbances:
[0194] Based on the task metadata obtained above (including multimodal recognition confidence, authorization confidence, service time estimation, uncertainty parameters, clinical priority and initial time window, etc.), a dynamic route replanning and risk buffering mechanism for hospital delivery scenarios will be constructed.
[0195] This mechanism addresses typical in-hospital disturbances such as frequent changes in clinical orders, emergency room order insertions, early / delayed surgeries, and elevator congestion, proposing the following:
[0196] Dynamic time window modeling and disturbance type identification;
[0197] Real-time updates of task completion time distribution parameters ;
[0198] Risk buffering mechanisms based on the urgency and uncertainty of time windows;
[0199] Dynamic comprehensive evaluation index for path planning ;
[0200] This establishes a continuous chain of "time window change - risk propagation - scheduling parameter update", enabling subsequent optimization algorithms to accurately respond to dynamic changes in demand.
[0201] Construction of multi-objective vehicle path optimization model
[0202] Model set and definition of decision variables
[0203] (1) Task set:
[0204] Where 0 represents the hospital pharmacy or central drug warehouse, and 1...N represent the delivery tasks corresponding to each ward / facility. Each task i corresponds to one row in the first part of the task table.
[0205] (2) Vehicle / delivery unit collection:
[0206] These are unmanned delivery vehicles.
[0207] (3) Path and time parameters:
[0208] The distance or equivalent cost of traveling from task point i to task point j;
[0209] : The average speed of vehicle k;
[0210] The required amount of medicine for Task i (boxes / bags / volume);
[0211] The loading capacity of vehicle k;
[0212] The original prescription time window for task i (from the HIS / medical order system, denoted in Part 1) ;
[0213] : A dynamic time window that integrates information such as ward rescheduling, surgery postponement, and risk buffering;
[0214] The service time of task i (directly using the output of the "Adaptive Service Duration Estimation Module" in Part 1). );
[0215] The first part calculates the task completion time distribution parameters (mean and standard deviation), reflecting factors such as recognition / authorization confidence and uncertainty propagation;
[0216] The first part calculates the expected clinical risk of task i;
[0217] (4) Decision variables:
[0218] If vehicle k travels directly from task i to task j, then Otherwise, it is 0;
[0219] If vehicle k is actually activated, then If not enabled, the value is 0;
[0220] : The time when vehicle k arrives at / leaves task i, where ;
[0221] Additional variables may include vehicle departure time, return time, etc., to finely constrain shifts and inter-shift handover.
[0222] This is used to map the "task metadata" in the first part to node parameters in the vehicle routing optimization model, realizing a unified representation from a single prescription to route nodes.
[0223] A multi-objective optimization function incorporating clinical risk:
[0224] In the context of in-hospital drug delivery, this invention introduces risk distribution parameters that are updated in real time from the first part, based on the classic multi-objective vehicle routing model. With priority Construct a multi-objective optimization function with learnable weights.
[0225] (1) Minimize the global expected clinical risk (core objective):
[0226] For the task Given a specific route, its planned completion time follows a set pattern. The distribution described. Combined with the clinical loss coefficient of the task. Define the expected risk based on the current path: ;
[0227] To reflect the weight of different task priorities in the overall risk, this invention further introduces a learnable risk weighting factor. For example, setting larger risk targets for high-priority tasks such as STAT, ICU, and high-alert medications. The risk objective would then be defined as:
[0228] ;
[0229] The initial value is set by in-house pharmacy / clinical experts. During operation, the system can make small adaptive adjustments based on actual error rates, adverse event statistics, etc., so that the risk target gradually aligns with real clinical preferences.
[0230] (2) Minimize the total distance traveled by the vehicle:
[0231] ;
[0232] Used to control the mileage and energy consumption of the entire delivery network, avoiding decreased efficiency and increased equipment wear caused by excessive detours.
[0233] (3) Minimize the total waiting time (the time doctors / nurses wait for medication):
[0234] To address the hospital's requirement for "timely medication administration," this invention combines the completion time of all vehicle tasks with the waiting time for medical staff to construct a timeliness target: ;
[0235] in, The second term in the above formula represents the total time taken for all tasks to be completed and the vehicle to return to the pharmacy. It describes the impact of "waiting caused by vehicles arriving too early" on healthcare workers. The relative weight of the two can be used as a learnable parameter, and data-driven adjustments can be made during actual deployment by statistically analyzing indicators such as "total delay time" and "average waiting time".
[0236] (4) Minimize the number of vehicles / delivery units used:
[0237] ;
[0238] This is intended to encourage the use of as few vehicles as possible while meeting risk and time requirements, thereby reducing labor and equipment costs and facilitating hospitals to select different Pareto solutions based on different shift strategies.
[0239] In summary, this invention preferably employs a multi-objective evolutionary algorithm, directly in... A family of non-dominated solutions is searched along four dimensions. Unlike traditional models, this invention... , Some time-weighted parameters can be continuously updated with historical operation data, thereby forming a learnable multi-objective scheduling preference, so that the path scheme gradually approaches the hospital's long-term optimal strategy over time.
[0240] Hybrid constraint system for in-hospital delivery:
[0241] (1) Each task is served only once: ;
[0242] Ensure that each prescription task is executed exactly once by a specific vehicle.
[0243] (2) Path continuity constraints: ;
[0244] Ensure that each prescription task is executed exactly once by a specific vehicle.
[0245] (3) Dynamic time window constraint: ;
[0246] in This is to integrate modified medical orders, bedside requests, and the effective time window following the risk buffer in Part 1. It is used to ensure that the treatment pathway meets the actual medication needs at the current moment.
[0247] (4) Time recursion constraint:
[0248] If vehicle k travels from i to j, then: ;
[0249] in This is to integrate modified medical orders, bedside requests, and the effective time window following the risk buffer in Part 1. It is used to ensure that the treatment pathway meets the actual medication needs at the current moment.
[0250] (5) Capacity constraints: ;
[0251] It prevents the load on a single vehicle from exceeding its rated capacity, and is particularly suitable for scenarios with strict upper limits, such as the volume of cold chain boxes and the quantity of controlled drugs.
[0252] (6) Vehicle activation constraints:
[0253] If vehicle K is not activated If all arc variables related to the vehicle are zero, this can be achieved through the following Big M constraint: ;
[0254] This is used to bind "whether to enable vehicles" to specific routes at the model level, making it easier to implement a "less vehicles priority" scheduling strategy.
[0255] (7) Single-port dispensing / shift restrictions:
[0256] Considering that pharmacy dispensing outlets are typically single-outlet or have a limited number of outlets, this invention adds an outlet occupancy constraint to the model: at any given time, a pharmacy dispensing outlet only serves the first task of one delivery route, and the departure time of each route must fall within the corresponding shift's time window. For example: ;
[0257] The above formula indicates that multiple routes are not allowed to occupy a single dispensing port simultaneously within the same time period. This constraint allows the model to accurately reflect the process limitations of single-port batch dispensing within the hospital.
[0258] Through the above model, this invention unifies "expected risk—path length—waiting time—number of vehicles" into a computable scheduling framework, providing a foundation for subsequent multi-strategy collaborative optimization. The scheduling objective incorporates clinical risk values, rather than being based solely on distance; the dynamic time window is directly derived from real-time changes in front-end identification and the medical order system; the uncertainty parameter (g) affects the time variance. This changes the risk ratio; vehicle departures are subject to "single-port dispensing of medicine," which is a technical representation of the limitations of real hospitals; the overall optimization target weights can learn on their own and be adjusted based on the hospital's historical error rate and path performance.
[0259] Identification and quantitative evaluation of time window perturbation patterns:
[0260] The changing time requirements of hospital wards are characterized by their variety, high frequency, and strong interconnectivity: a tightening of the time window for a task in an ICU can potentially "squeeze" multiple subsequent tasks in general wards along the entire pathway. To differentiate between these changes at the algorithmic level, this invention introduces a dynamic time requirement comprehensive evaluation index. This index combines dimensions such as the magnitude of time window disturbance, achievable time margin, cascading effects, and customer priority to provide a normalizable quantitative score for each task. It is used to guide the differential evolution algorithm in selecting "who to protect first and who to adjust first".
[0261] Perturbation mode classification based on endpoint displacement:
[0262] (1) Unilateral variation time window:
[0263] Within the same delivery route within the hospital, assume there are four representative medication tasks (such as routine intravenous infusion, post-examination medication, etc.), denoted as tasks. The original medical order time window is After dynamic updates, it becomes When performing intravenous infusions in a general ward The left endpoint of the time window moves to the left, while the right endpoint remains unchanged. When it means "infusion can be started earlier," it is defined as the initial relaxation type; when a drug administration task that should be performed after imaging examination... The left endpoint of the time window moves to the right, while the right endpoint remains unchanged. When this occurs, it indicates "cannot be delivered prematurely" and requires waiting for inspection to be completed; this is defined as an initial contraction type. This applies to routine oral medication delivery tasks. The right endpoint of the time window moves to the right, while the left endpoint remains unchanged. When it indicates "delivery may be delayed," it is defined as a termination of the relaxation type; when performing bedside drug administration in the ICU. The right endpoint of the time window moves to the left, while the left endpoint remains unchanged. When a task exhibits a unilateral change as described above, it indicates that "the infusion must be completed or the medication must be stopped earlier," and is defined as a termination-tightening task. When the system detects any such unilateral change in any task, it marks the start / termination-tightening task as a more rigid time constraint and the start / termination-relaxing task as a buffer node with a certain degree of flexibility, providing basic labels for subsequent calculation of time window disturbance intensity and multi-strategy path adjustment.
[0264] (2) Bilateral change time window:
[0265] Within the same delivery route within the hospital, there are medication needs for four different wards (such as preoperative medication in the ICU and intravenous infusions in general wards), which are recorded as tasks. The original medical order time window is After dynamic updates, it becomes Preoperative medication administration in the ICU The left time window endpoint shifts to the left, and the right time window endpoint also shifts to the left. This indicates that the overall dosing time has been advanced, defined as a bilateral left-shifted type; during routine fluid resuscitation tasks The left time window endpoint shifts to the left, and the right time window endpoint shifts to the right. This indicates that the deliverable range is relaxed both forward and backward, defined as a bilateral relaxation type; when a high-alert medication task is performed. The left time window endpoint shifts to the right, and the right time window endpoint shifts to the left. This indicates that the available infusion time is significantly compressed, defined as bilateral compression; when preoperative medication is delayed due to examinations. The left time window endpoint shifts to the right, and the right time window endpoint also shifts to the right. This indicates that the overall medication period has been uniformly shifted to the later time, defined as a bilateral right-shift type. When the above bilateral change is detected in any task time window, the system can determine its disturbance type accordingly, and in the subsequent disturbance intensity calculation and strategy matching, prioritize marking "bilateral contraction type" tasks as rigid nodes and "bilateral relaxation type" tasks as elastic nodes, thereby realizing differentiated scheduling response to different types of time demand changes.
[0266] Construction and normalization of multidimensional perturbation dimensions:
[0267] The parameters are defined as follows:
[0268] Tasks in the current plan The actual start time of service; Changes in the left time window; Changes in the right time window; Left / right time window perturbation type factor, distinguished by symbols for "relaxation / contraction / translation", for example, the left endpoint is taken earlier. Postponing the pick-up ; Tasks under the existing path The reachable time margin; Task For subsequent tasks The influence weight (calculated based on time distance or positional relationship on the path); :Task The chain influence factors; : Scalar of time window disturbance amplitude; : Task importance factor (consistent with the priority output in Part 1, but can be adjusted according to the type of time window change); Dynamic time demand comprehensive evaluation index; The weight coefficients of the three types of components can be updated in small steps driven by data in subsequent operations.
[0269] Time window disturbance amplitude:
[0270] Changes in the time window can compress or relax the scheduling feasible region to varying degrees. This invention folds it into a scalar:
[0271] ;
[0272] Through reasonable design The sign and size allow for the compression variation in The larger values are reflected in the larger values, while the smaller values are reflected in the slightly relaxed values.
[0273] Available time margin
[0274] Under the current route arrangement, the margin between the vehicle's actual arrival time and the time window boundary is a key quantity for determining "how easily this change can be absorbed." This invention defines:
[0275] ;
[0276] like A smaller value indicates that the task is nearing the end of its time window, making it a "tight node"; A larger value indicates that the task has a natural buffer capacity and can be used as an adjustment node in replanning.
[0277] The amplitude of disturbance in the construction time window Availability time margin and comprehensive uncertainty Based on this, the present invention maps it to the probability of task lateness and the expected risk. Figure 5 This illustrates the relationship between risk modeling based on time margin and uncertainty.
[0278] from Figure 5It can be seen that under the same time window perturbation conditions, the smaller the reachability margin or the larger the uncertainty g, the greater the corresponding lateness probability and expected risk, indicating that injecting front-end identification and execution layer uncertainty into scheduling risk is necessary and effective.
[0279] Chain Influence Factors:
[0280] For a task i located in the middle of the path, changes in its time window not only affect its own feasibility but also have a cumulative effect of "delaying / shifting" multiple subsequent tasks. This invention defines:
[0281] ;
[0282] ;
[0283] The source of the disturbance belongs to task i:
[0284] Changes in the left / right endpoints of task i and type factor This determines the "intensity of the disturbance," and is unrelated to subsequent tasks.
[0285] The summation object is all affected tasks j: the effects of delays or advancements propagate backwards along the path, therefore it is necessary to sum all... Sum.
[0286] Responsible for describing the strength of the perturbation propagated to j:
[0287] like and If the distance is relatively far, or if there is a large time margin, then Smaller;
[0288] like Adjacent Or if the time window is tight, then Larger.
[0289] in It can be constructed according to principles such as "adjacency on the same path" and "proportion of time distance to the whole path", so that the later the critical task is, the greater the weight, thereby identifying sensitive nodes that "affect a whole series" when they are moved.
[0290] This indicates the degree of adjacency between tasks i and j in the current path, or the number of nodes between them. The closer to i, the easier it is for the disturbance to propagate.
[0291] : The reachability time margin for the defined task j: ;
[0292] The smaller the margin, the more sensitive j is.
[0293] : Path structure weights, used to reflect whether the delay of i has a mandatory dependency on j:
[0294] If task j must be executed after task i (e.g., continuous drug administration in the same ward or pre-operative relationship), then take 1; otherwise, take 0.
[0295] , , As learnable weights, they can be automatically updated with historical data (error window rate, number of adjustments).
[0296] Data-driven dynamic prioritization and comprehensive urgency scoring:
[0297] Dynamic prioritization that integrates business rules and real-time status:
[0298] Dynamic priority correction factor Reference priority used for the output in the first part Clinical loss coefficient Based on this, the importance of the task is fine-tuned in real time according to the dynamic changes of the time window. Its value is determined by a comprehensive consideration of:
[0299] (1) Baseline clinical importance: directly inherits the clinical loss coefficient from Part 1 The quantified tasks inherently carry risks.
[0300] (2) Urgency adjustment of time window change type: For tasks with time window contraction (such as termination contraction, bilateral contraction), the urgency is significantly increased. Should be in For tasks with relaxed changes, the urgency is relatively reduced, so the task can be adjusted downwards or remain unchanged.
[0301] (3) Risk contribution under the current path: Based on the current path planning results, consider the expected risk of task i. The proportion of risk in the overall risk. For tasks that contribute significantly to risk under the current path, their adjustment priority should be appropriately increased.
[0302] The specific calculation formula is as follows:
[0303] ;
[0304] The clinical loss coefficient for task i calculated in the first part is the baseline value of the correction factor.
[0305] : Time window change type correction item.
[0306] Contractionary changes (such as termination of contraction, bilateral contraction): ;
[0307] Relaxation variations (such as initial relaxation, bilateral relaxation): ;
[0308] Other types (translation, right shift, etc.): ;
[0309] Risk contribution weighting coefficient, recommended value is... .
[0310] : Expected risk of task i under the current path.
[0311] The sum of expected risks for all tasks under the current path.
[0312] Through this correction factor, the system ensures that dynamic adjustments are always based on the clinical risk assessment in Part 1, achieving a coherent and interpretable mapping from "static clinical value" to "dynamic scheduling urgency".
[0313] A comprehensive urgency scoring model based on learnable weights:
[0314] To facilitate the algorithm's direct use of dynamic time requirement information, this invention incorporates the aforementioned three dimensions of quantities. And the task priority is transformed into a dimensionless, multi-dimensional comprehensive score. .
[0315] (1) Multidimensional dimensionless processing:
[0316] To avoid bias in the overall score due to different dimensions and orders of magnitude, this invention first normalizes each component according to the current scheduling batch or recent historical data: ;
[0317] in, Reflects the relative intensity of disturbances within the time window. After the "1-" transformation, it means "the closer to 1, the more tense". Indicates the relative level of the chain reaction effect. This represents the average value of the corresponding batches.
[0318] (2) Sub-level risk scoring:
[0319] Based on the dimensionless principle, this invention provides three types of sub-scoring: ;
[0320] These correspond to "intensity of time window change", "degree of achievability margin tension" and "chain reaction on subsequent tasks", respectively, which makes it easy to explain why each task is marked as "critical" when visualized using radar charts or bar charts.
[0321] (3) Learnable weight-driven comprehensive score:
[0322] Generate a comprehensive score It is used to quantify the "pressure" or "urgency of adjustment" that a task exerts on the current path plan due to dynamic changes in the time window.
[0323] ;
[0324] in, To combine the output priority of the first part Task importance factor adjusted for time window change type; These are the weighting coefficients for the three categories of components. Unlike traditional fixed weights, this invention designs... Learnable parameters: The system periodically collects high-level data during operation. Indicators such as the actual error window rate of a task and the frequency of replanning should be evaluated. When a certain component is found to be more relevant to the actual scheduling risk, its weight should be increased; when a certain component is overestimated for a long time (leading to too many unnecessary replanning), its weight should be appropriately reduced.
[0325] Through this data-driven, small-step update mechanism It can automatically adjust based on historical data, thus more accurately reflecting "how demanding the task is in the current environment." Overall Rating It is not only used for key task selection and strategy matching in the next section, but also provides direct basis for subsequent experimental visualization: the comprehensive score of each task can be displayed by sorting bar charts, and the composition of a single task in the three categories can be displayed by radar charts, which intuitively explains why the system prioritizes protecting some tasks and prioritizes moving other tasks.
[0326] Based on the disturbance amplitude of the time window Availability time margin Chain Influence Factors and dynamic priority This invention yields a comprehensive task urgency score. .
[0327] Figure 6 The tasks in a certain delivery batch are given as follows: Example of sorting results. For example... Figure 6As shown, high-priority tasks with tight time windows and significant chain effects are ranked first, while buffer nodes such as ordinary oral medications naturally fall to the back, providing an intuitive basis for the subsequent multi-strategy differential evolution algorithm to select "key protection objects".
[0328] Multi-strategy collaborative path optimization and online replanning based on comprehensive task evaluation indicators:
[0329] Based on the comprehensive task evaluation index calculated in Part II This section proposes a multi-strategy collaborative differential evolution (DE) algorithm for hospital drug delivery scenarios, enabling efficient solution and online replanning for complex environments such as dynamic time window perturbations, emergency room order insertions, and route congestion. The algorithm achieves this through:
[0330] (1) A node categorization strategy library for different time window disturbance types and importance levels;
[0331] (2) Based on comprehensive evaluation indicators A mechanism for selecting key tasks and matching strategies;
[0332] (3) Online replanning for arbitrary insertion with Δ cost evaluation for dynamic disturbances;
[0333] (4) A learnable update mechanism for parameters in the strategy use weights and disturbance response weights.
[0334] Based on the task urgency scoring and node type classification mentioned above, this invention constructs a multi-strategy cooperative differential evolution algorithm to solve multi-objective path planning problems. Figure 7 The overall process of this method is given.
[0335] like Figure 7 As shown, the method forms a closed loop through "population initialization - multi-objective fitness evaluation - node type-aware strategy selection - mutation and crossover - Pareto solution set update - parameter self-learning", which enables the path scheme to gradually converge to a solution set that takes into account both clinical risk and driving efficiency.
[0336] Individual coding and fitness assessment:
[0337] (1) Individual coding:
[0338] In the context of in-hospital drug delivery, this invention employs a coding method combining path sequence and vehicle segmentation. This applies to the current batch of tasks. Make an arrangement Then, it is divided into multiple subsequences through several "splitting points," each corresponding to the service sequence of a vehicle. For example:
[0339] Combined with vehicle segmentation vector This can be interpreted as: Vehicle 1: the first 3 missions; Vehicle 2: missions 4-8; Vehicle 3: mission 9.
[0340] This encoding natively supports operations such as "insertion at any position, swapping, and partial rearrangement", making it easy to handle urgent task insertions and real-time changes in time windows.
[0341] (2) Fitness evaluation:
[0342] For each individual, based on the current path scheme:
[0343] 1. Execute time simulation to obtain the results for each task. Planned arrival time With completion time distribution parameters ;
[0344] 2. Calculate the expected risk based on the path. Total driving distance, total running time / waiting time, and number of vehicles used;
[0345] 3. Four objectives The combination is a multi-objective fitness model, and Pareto ranking and crowding distance mechanisms are used to maintain non-dominated solutions.
[0346] In this process, the risk weighting factor defined in the previous section Comprehensive score based on time requirements and learnable weights Directly proceed to fitness evaluation to ensure that individual performance reflects the hospital's current actual scheduling preferences.
[0347] based on Node type-aware strategy library design:
[0348] Combining the types of time window changes and comprehensive evaluation indicators in Section 3 This invention divides task nodes into four categories and designs a matching differential evolution local operation strategy for each category, thereby forming a node type-aware strategy library.
[0349] (1) Elastic node strategy (relaxed task)
[0350] The time window is categorized into "initial relaxation," "termination relaxation," or "bilateral relaxation," and a comprehensive score is given. For lower-level tasks, mark them as resilient nodes and use them in the algorithm:
[0351] Increase its probability of being selected in "insertion, exchange, shift" type operators;
[0352] Apply a lower penalty to minor window misalignment in resilient nodes;
[0353] When balancing vehicle load and distance, elastic nodes are used preferentially as "sequential buffers".
[0354] In this way, tasks such as routine oral medications and fluid resuscitation with ample time leeway will naturally become "adjustment pads," making way for high-risk tasks.
[0355] (2) Rigid node strategy (compressed tasks)
[0356] For time windows such as ICU, preoperative medication, and high-alert medication, "termination tightening" and "bilateral tightening" are implemented, and and For tasks with high saturation, mark them as rigid nodes and use:
[0357] When constructing the initial solution, prioritize placing it at the beginning of the path or in the center of the time window;
[0358] Strictly limit the displacement amplitude of rigid nodes during mutations and intersections (only local fine-tuning or no movement is allowed);
[0359] Treating violations of rigid time windows as "hard constraints" or imposing severe penalties directly eliminates infeasible individuals.
[0360] This strategy ensures that tasks such as bedside medication administration in the ICU and preoperative medication control are prioritized in any acceptable protocol.
[0361] (3) High-chain impact node strategy (local chain break reconstruction)
[0362] Linkage Influence Factors Larger, overall score The tasks at the forefront are considered as nodes with high chain influence. In the method:
[0363] Using this node as the center, extract a local sub-chain along the path, for example, starting from the node... The task to One task;
[0364] Perform differential mutation, local search, or rearrangement operations such as 2-opt / 3-opt on this local subchain separately;
[0365] Comparison of local reconstruction before and after Changes will only be accepted if the risk or distance is significantly reduced.
[0366] This strategy can make fine adjustments to key nodes that have far-reaching consequences without disrupting the overall path structure, adapting to typical hospital situations where "a sudden change in the time window of a certain ward affects multiple subsequent wards".
[0367] (4) Local buffer node strategy (low priority ordinary tasks)
[0368] For clinical grades that are lower, have smaller time window variations, and have higher overall scores Lower-level tasks are treated as global buffer nodes:
[0369] During global reordering and vehicle switching, it allows flexible migration between different paths to balance the load of each vehicle and the total distance.
[0370] Apply a lower penalty coefficient to minor waits or small delays;
[0371] When it is necessary to make room for rigid nodes, prioritize adjusting these types of tasks.
[0372] Through this strategy, the system can fully utilize ordinary tasks to absorb fluctuations in overall scheduling while ensuring the safety of critical medication use.
[0373] For tasks that simultaneously meet multiple node type conditions (such as being both highly chained nodes and having a compact time window),
[0374] This invention establishes a priority hierarchy of rigidity > high interlocking > elasticity > buffering. The system classifies node types according to this hierarchy.
[0375] Uniqueness processing ensures that the strategy selection process is definite and does not conflict.
[0376] Metric-driven task selection and strategy choice:
[0377] To avoid frequent reordering of all tasks indiscriminately, this invention utilizes the aforementioned comprehensive evaluation indicators. The specific steps for tiered screening and strategy matching of tasks are as follows:
[0378] (1) Variation task identification and scoring:
[0379] For example, at 9:10 AM, an ICU doctor, during rounds, temporarily prescribes a STAT infusion; simultaneously, an additional surgery is scheduled in the operating room, advancing the originally planned preoperative antibiotic window. This invention's system will:
[0380] Mark the affected task set in the current batch of task sets. (Including these two new medical orders, as well as the tasks in general wards that have had their time windows squeezed);
[0381] Recalculate for each affected task And normalize within this batch to obtain .
[0382] (2) Selection of key task set:
[0383] according to Sort by size from largest to smallest, for example, select the top 60% to form the key task set. The rest are general sets. In the example above:
[0384] ICU STAT medications and preoperative antibiotics used for additional surgeries will inevitably appear At the forefront;
[0385] Some tasks in general wards with squeezed time windows will also be selected for key collections due to "tighter leeway + large chain reaction";
[0386] A large number of common oral medications and nutritional supplements were left at night. It mainly acts as a buffer.
[0387] (3) Strategy matching and operator selection:
[0388] Based on the type of time window change and task priority, select or combine applicable strategies for each task:
[0389] ICU STAT, preoperative intensive tasks + high priority → rigid node strategy;
[0390] Relaxing the time window for general wards / allowing early arrival → flexible node strategy;
[0391] Tasks in several wards before and after a certain ICU or operating room → High-chain impact node strategy;
[0392] Regular tasks that are away from the current peak hours → Global buffer node strategy.
[0393] Differential evolution, when generating new individuals, considers the node type of the task and... The size is automatically adjusted to determine the probability of its participation in various operators, so that the search process truly reflects "who is in the most urgent need in the hospital right now, and who can be moved".
[0394] Online replanning and Δ cost evaluation under dynamic perturbations (corresponding to "insertion" during operation):
[0395] In the context of a hospital setting, new task insertion and time window updates often occur after the vehicle has already completed its execution. This invention, based on multi-strategy DE, designs an online replanning mechanism that involves insertion at any position plus Δ cost evaluation:
[0396] (1) Status freeze and remaining task extraction:
[0397] When a vehicle executes the first step of the task sequence When there are only a few nodes, the system treats the parts that have been completed or are being executed as "frozen prefixes," and only freezes the remaining set of unfinished tasks. Re-planning new tasks is necessary to avoid disrupting existing execution paths on a large scale and reduce interference with actual operations.
[0398] (2) Insertion at arbitrary positions and neighborhood generation:
[0399] For new tasks or tasks with significant time window changes, the system first enumerates several reasonable insertion positions (or local rearrangement schemes) on the current path structure to form a candidate scheme set. Each candidate solution will result in three types of cost changes:
[0400] Path distance increment Total runtime / waiting time increment Global expected risk increment ;
[0401] (3) Evaluation of the Δ cost of learnable weights:
[0402] This invention defines a disturbance response evaluation function:
[0403] ;
[0404] in The initial values for the learnable response weights can be set by the hospital based on whether they prioritize risk or efficiency. When a new task is inserted or the time window is updated, the overall cost of different insertion schemes can be quickly assessed.
[0405] In response to the insertion of new tasks or drastic changes in time windows during operation, this invention adopts a local replanning mechanism that involves insertion at arbitrary positions and Δ cost evaluation. Figure 8 A schematic analysis was conducted on the path distance increment, time increment, and risk increment caused by different insertion positions.
[0406] from Figure 8 As can be seen, this invention comprehensively measures the three types of increments—path length, running time, and expected risk—through a unified Δ cost evaluation function, providing a quantitative basis for quickly selecting the scheme with the minimum comprehensive cost among multiple insertion candidates.
[0407] (4) The connection between local replanning and global DE:
[0408] Local insertion and Δ cost minimization are used for rapid response to real-time perturbations, while global differential evolution performs multi-generational searches across the entire task set over a longer timescale. The system periodically feeds back the results of local adjustments to the DE population, incorporating well-performing local solutions into the population, thereby achieving a unification of "real-time patching + global optimization".
[0409] Figure 9The demonstration showcases the online replanning process triggered by the system when dynamic disturbances such as new task insertions or time window changes occur during drug delivery: First, the executed paths are frozen, and only the set of incomplete tasks is extracted; then, multiple reasonable insertion positions are enumerated for the new task to generate candidate path schemes, and three types of costs—path distance increment, time increment, and clinical risk increment—are calculated for each scheme. Each scheme is evaluated through a comprehensive cost function with learnable weights; the scheme with the minimum total cost is selected to quickly update the path, achieving real-time response within seconds; finally, the local optimization scheme is fed back to the global differential evolution population, forming a closed-loop optimization mechanism of "real-time order insertion - local reconstruction - global collaboration," ensuring that the system can still balance clinical risk and delivery efficiency in dynamic environments.
[0410] Adaptive learning of policy weights and parameters:
[0411] To avoid relying on human experience for all parameters in the long term, this invention introduces two types of learnable weights in multi-strategy DE, which continuously self-optimize through running data.
[0412] (1) Adaptive use of weights in the strategy:
[0413] Suppose there are a total of Each evolutionary strategy (including different mutation operators, local search operators, and combinations of the above node type strategies) is used to formulate an evolutionary strategy. Assign a probability of use ,satisfy In each generation of DE delivery:
[0414] according to Random selection strategy for individuals or local subchains ;
[0415] Statistics by strategy The number of individuals generated and entering the non-dominated solution set, or the improvement in fitness, is denoted as the contribution. ;
[0416] Periodically based on contribution Perform small-step updates, for example: .
[0417] in The learning rate is used to gradually increase the weight of strategies with high contribution, while gradually decreasing the weight of strategies with low contribution or deteriorating fitness, thus achieving an adaptive combination of strategies based on "survival of the fittest".
[0418] (2) Adaptive perturbation response weights:
[0419] for The update process can employ gradient approximation, proportional adjustment, or simple rules (such as "weighting if exceeding a threshold"), primarily using small-step modifications to ensure the system gradually converges to a configuration that reflects the hospital's actual preferences over long-term operation. For example:
[0420] Statistics show the actual window error rate, average delay time, and overall travel growth over a recent period.
[0421] If the error window rate is too high, then increase it appropriately. , and emphasize the importance of risk costs;
[0422] If the risk is low but the distance and time costs are too high, then increase the speed appropriately. or reduce This is to reduce the efficiency losses caused by excessive conservatism.
[0423] The update process can employ gradient approximation, proportional adjustment, or simple rules (such as "weighting if the threshold is exceeded"), primarily using small-step modifications to ensure that the system gradually converges to a configuration that matches the hospital's actual preferences during long-term operation.
[0424] like Figure 10 The robustness of the algorithm in this invention is demonstrated under simulated dynamic disturbance scenarios (such as new task insertion, time window contraction, path congestion, etc.). By comparing the changes in path stability, task completion rate, and clinical risk before and after the disturbance, it is shown that the algorithm can effectively absorb the impact of disturbances, maintain the feasibility and safety of the scheduling scheme, and demonstrate the system's adaptability to uncertain environments within the hospital.
[0425] like Figure 11 As shown, through a multi-indicator horizontal comparison, the algorithm of this invention is compared with traditional path planning methods (such as the shortest path algorithm and the static time window VRP algorithm) on key indicators such as clinical risk, travel distance, waiting time, and number of vehicles used. The results clearly show that the algorithm of this invention significantly reduces clinical risk while also having advantages in delivery efficiency and resource utilization, verifying the effectiveness of the algorithm in multi-objective collaborative optimization.
[0426] like Figure 12 As shown, the Pareto fronts of the algorithm of this invention and two other comparative algorithms (such as the classic NSGA-II and the greedy insertion algorithm) are plotted in the multi-objective optimization space. Figure 12 The horizontal and vertical axes represent "clinical risk" and "driving distance" or "time cost," respectively, with each point representing a non-dominated solution. The Pareto front of the algorithm in this invention is closer to the origin of the coordinate axis, indicating that it can achieve shorter driving distances or less time consumption under the same risk level, or achieve lower risk with the same resource consumption, demonstrating the algorithm's superiority in multi-objective trade-offs.
[0427] In addition, this invention also provides a drug pathway planning system with uncertainty modeling and multi-strategy collaboration, including:
[0428] A multimodal perception module is used to acquire multimodal perception data for drug delivery tasks. The multimodal perception data includes barcode scanning data, visual image data, and authorization verification data.
[0429] The task metadata construction module is used to calculate the multimodal fusion confidence based on the multimodal perception data, quantify the identification and authorization results into continuous probability values, and construct task metadata.
[0430] The uncertainty quantification and risk prediction module is used to construct a comprehensive uncertainty scalar based on the task metadata, inject the comprehensive uncertainty scalar into the variance estimate of the task completion time, and calculate the expected clinical risk of each drug task.
[0431] The dynamic disturbance identification module is used to identify disturbance patterns in the task time window based on real-time data from the medical order system and to calculate a comprehensive score of the dynamic urgency of the task.
[0432] The multi-strategy collaborative route planning module is used to perform route planning and online replanning based on the expected clinical risk and the dynamic urgency comprehensive score, and output an optimized delivery route that minimizes the global clinical risk.
[0433] In practical applications, such as Figure 13 As shown, the system can be composed of a front-end multimodal perception and authorization module, a task metadata and risk modeling module, a dynamic path planning and online replanning module, and an execution feedback and parameter self-learning module, forming a closed-loop structure of "entry perception - task-based - path decision-making - execution feedback".
[0434] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.
Claims
1. A drug pathway planning method based on uncertainty modeling and multi-strategy collaboration, characterized in that, Includes the following steps: S1, acquire multimodal perception data for the drug task; the multimodal perception data includes barcode scanning data, visual image data, and authorization verification data; S2, based on the multimodal perception data, calculate the multimodal fusion confidence level, quantify the identification and authorization results into continuous probability values, and construct task metadata; S3. Based on the task metadata, construct a comprehensive uncertainty scalar and inject the comprehensive uncertainty scalar into the variance estimate of the task completion time to calculate the expected clinical risk of each drug task. S4, based on real-time data from the medical order system, identifies disturbance patterns in the task time window and calculates a comprehensive dynamic urgency score for the task. S5. Based on the expected clinical risk and the dynamic urgency comprehensive score, a multi-strategy collaborative differential evolution method is used for path planning and online replanning to output an optimized delivery path that minimizes global clinical risk.
2. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 1, characterized in that, In step S2, the calculation of the multimodal fusion confidence score specifically includes the following process: The scan confidence level is calculated based on the decoder error correction level, image patch contrast, and localization score of the scanned image. ; Visual confidence is calculated based on color similarity, shape matching, layout similarity, and text matching of drug appearance images. ; The confidence level of the QR code scan in the Logit space and visual confidence We perform weighted fusion to obtain the multimodal fusion confidence score. The fusion formula is: ; in, and All are represented as channel weights; This is represented as a bias term.
3. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 2, characterized in that, In step S3, the construction of the comprehensive uncertainty scalar specifically includes the following process: Obtaining multimodal fusion confidence Authorization confidence level and single-port occupancy identification confidence level ; Constructing a comprehensive uncertainty scalar The specific formula is as follows: ; in, , , All are weighting coefficients for the uncertain components; The comprehensive uncertainty scalar Introducing the variance of task completion time The estimation formula is as follows: ; in, The coefficient of variation of travel time. For travel time, For service time variation coefficient, To estimate service time, This is the uncertainty amplification factor.
4. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 3, characterized in that, In step S3, calculating the expected clinical risk for each drug task specifically includes the following process: Based on the task's urgency, time constraint, irreplaceable nature of the medicine, fragility, and artificial weighting indicators, a task importance score is calculated and mapped to discrete priority. and the corresponding clinical loss coefficient ; Based on the average task completion time variance of task completion time The computation task is performed within the time window. Probability of failure to deliver : ; in, The cumulative distribution function of the standard normal distribution; The right endpoint of the time window for task / customer i; Expected clinical risks of computational tasks .
5. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 4, characterized in that, In step S4, the dynamic urgency comprehensive scoring of the computational task specifically includes the following process: Based on the endpoint displacement within the task time window, identify the perturbation pattern and calculate the perturbation amplitude within the time window. ; Calculate the reachability time margin of the task based on the current path scheme. ; Based on the delayed transmission effect of a task on subsequent tasks, the cascading effect factor is calculated. ; The disturbance amplitude of the time window Task availability margin and linkage influence factors The task is dimensionless and then weighted to obtain a dynamic urgency score. The formula is as follows: ; in, This is a dynamic priority correction factor; , , All are dimensionless components, which respectively represent the intensity of time window changes, the tightness of achievable margin, and the chain reaction on subsequent tasks; , , All of these are learnable weight coefficients.
6. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 5, characterized in that, In step S5, the path planning and online replanning using the multi-strategy cooperative differential evolution method specifically includes the following processes: Comprehensive score based on the dynamic urgency of the task Based on the time window perturbation type, task nodes are divided into rigid nodes, elastic nodes, high-cascading-effect nodes, and global buffer nodes; For different types of nodes, a differentiated local search strategy is matched in the mutation and crossover operations of the differential evolution method; When a new task is inserted or a time window change is detected during operation, online replanning is triggered, candidate insertion positions are enumerated, and the optimal solution is selected and the remaining path is updated through a comprehensive evaluation function.
7. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 6, characterized in that, In the online replanning process, the incremental cost of the comprehensive evaluation function is... The calculation formula is as follows: ; in, This is the path distance increment. For runtime increments, This represents the expected increase in global risk. , , All are disturbance response weighting coefficients.
8. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 7, characterized in that, It also includes an adaptive estimation step for service duration, as detailed below: Baseline service time calculated based on the mechanical motion parameters of the medicine tank. By combining the disinfection increment, rescanning increment, rotation angle, and alignment displacement, an estimated service time is obtained. ; The service time is updated online using the exponential smoothing method, and the formula is as follows: ; in, , representing the learning rate; This is the estimated service time of the task at the previous moment; The actual service time observed at the current moment.
9. The drug pathway planning method based on uncertainty modeling and multi-strategy collaboration according to claim 8, characterized in that, It also includes a parameter self-learning step, as detailed below: The contribution of each evolutionary strategy to the generation of non-dominated solutions in the population evolution is statistically analyzed, and the probability of using the strategy is dynamically adjusted. Based on the actual error rate and average delay time in historical operational data, the learnable weight coefficients in the dynamic urgency comprehensive score are determined. , , and disturbance response weighting coefficient , , Perform adaptive updates.
10. A drug pathway planning system based on uncertainty modeling and multi-strategy collaboration, used to implement the drug pathway planning method based on uncertainty modeling and multi-strategy collaboration as described in any one of claims 1-9, characterized in that, The uncertainty modeling and multi-strategy collaborative drug pathway planning system includes: A multimodal perception module is used to acquire multimodal perception data for drug delivery tasks. The multimodal perception data includes barcode scanning data, visual image data, and authorization verification data. The task metadata construction module is used to calculate the multimodal fusion confidence based on the multimodal perception data, quantify the identification and authorization results into continuous probability values, and construct task metadata. The uncertainty quantification and risk prediction module is used to construct a comprehensive uncertainty scalar based on the task metadata, inject the comprehensive uncertainty scalar into the variance estimate of the task completion time, and calculate the expected clinical risk of each drug task. The dynamic disturbance identification module is used to identify disturbance patterns in the task time window based on real-time data from the medical order system and to calculate a comprehensive score of the dynamic urgency of the task. The multi-strategy collaborative route planning module is used to perform route planning and online replanning based on the expected clinical risk and the dynamic urgency comprehensive score, and output an optimized delivery route that minimizes the global clinical risk.