Medical service robot scheduling method and system
By building a multi-dimensional weighted scheduling model and a distributed dynamic auction mechanism, combined with Hungarian algorithm to optimize task allocation, the dynamic adaptation problem of patient care level and urgency in medical service robot scheduling is solved, and the global optimal task allocation and service quality are improved.
Patent Information
- Application Number
- CN202510596703.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-01
AI Technical Summary
The existing medical service robot scheduling methods are difficult to dynamically adapt to the patient's care level and urgency level, and task allocation does not comprehensively consider a variety of factors, resulting in insufficient response and poor service quality.
A scheduling model based on multi-dimensional comprehensive weighting is constructed, a distributed dynamic auction mechanism is combined with a Hungarian algorithm, a Dijkstra algorithm is used to optimize the path, a nursing level and urgency coefficient is introduced, and the weight parameters are adjusted through service quality evaluation feedback to achieve global optimal task allocation.
It improves the response ability and patient satisfaction of medical service robots, optimizes task allocation, adapts to the needs of different patient groups, and improves the efficiency and quality of medical services.
Smart Images

Figure CN120406466A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot planning, and particularly to a scheduling method and system for medical service robots. Background Art
[0002] With the rapid development of embodied intelligent robot technology, multi-robot systems are increasingly widely used in many scenarios of smart hospitals, playing the most important role in improving the efficiency and quality of medical services, saving human resources, optimizing hospital management, etc. However, the current scheduling methods and systems for smart medical multi-robots have the following challenges:
[0003] 1. Insufficient dynamic adaptation ability to patient diversity and differentiation in aspects such as patient care grading and urgency. Currently, by means of evaluating the patient's daily living activity ability based on the patient's clinical condition, vital signs, and using scales such as the Barthel index, patients can be divided into four levels: special care, first-level care, second-level care, and third-level care; at the same time, medical staff determine the urgency of the patient according to clinical symptoms (such as heart rate, respiration, consciousness status, etc.) and triage criteria (such as ESI, TTAS, etc.), and its score is generally from 1 to 5 points, where 1 point indicates the most urgent situation and 5 points indicates a relatively stable situation. Existing scheduling methods are difficult to dynamically adjust the robot service order according to the patient care level and urgency, resulting in insufficient response in case of emergencies and unable to achieve reasonable care for patients at different levels in different situations;
[0004] 2. Task allocation does not comprehensively consider multiple influencing factors. Traditional scheduling methods often allocate tasks only based on a single factor (such as the shortest path), and cannot comprehensively consider multiple factors such as the nursing status, patient waiting time, and the distance between the robot and the material site, so that the overall cost cannot reach the optimal; for example, a Chinese patent with the patent number ZL2022100951302 discloses a smart scheduling system and method for hospital material transportation robots, which supports multi-robot asynchronous scheduling, supports multi-transport tasks in parallel, matches suitable robots according to specific rules, and plans the shortest path to maximize the transportation capacity of the robots;
[0005] 3. Lack of a closed-loop optimization mechanism for the patient service experience; currently, most scheduling systems stay at the KPI assessment level of task completion rate, lacking a closed-loop mechanism for feeding back scheduling optimization from service effects, resulting in a deviation between nursing services and the real needs of patients.
[0006] Therefore, there is an urgent need for a scheduling method and system for medical service robots that can comprehensively consider multiple factors such as patient care level and urgency, and can find the globally optimal task allocation scheme. Summary of the Invention
[0007] The object of the present invention is to provide a scheduling method and system for medical service robots, aiming to solve the technical problems that the traditional scheduling method often ignores multi-faceted factors such as the patient care level in task allocation based on a single factor, resulting in high overall operating costs and inability to meet the actual needs of medical services.
[0008] To achieve the above object, in the first aspect, the present invention provides a scheduling method for medical service robots, including:
[0009] S1. Construct a scheduling model based on multi-dimensional comprehensive weighting. For each robot in the scheduling model for a patient the local task cost function is specifically as follows:
[0010]
[0011] Wherein, : the distance between robot and patient ; : the waiting time of patient [[ID=Z29]] (unit: second), defined as the interval time from when the patient sends a service request to the current moment; : the care level of patient , determined according to the clinical condition and Barthel index, usually divided into special care, first-level care, second-level care, and third-level care, and converted into a numerical value; : the urgency of patient , determined by monitoring the patient's physiological indicators (such as heart rate, blood pressure, body temperature, etc.), and the scoring range is generally 1 to 5 points, with 1 point being the most urgent; : the care level coefficient; : the urgency coefficient; : the cost for robot to pick up medical supplies for patient ; , , and are respectively weight parameters for each item, and .
[0012] S2. According to the principle of the overall minimum total cost for all tasks and robot scheduling, determine the objective function for global minimization of the total cost. The objective function is specifically as follows:
[0013]
[0014] Wherein, is a decision variable, indicating whether task is assigned to robot , = 1 indicates that the task is assigned to the robot , = 0 indicates that the task is not assigned to the robot ; is the number of robots; is the number of tasks;
[0015] S3. Solve the objective function based on the distributed dynamic auction mechanism and the Hungarian algorithm to obtain the globally optimal robot to execute the currently released task.
[0016] As a further improvement of the above solution, the medical service robot scheduling method further includes:
[0017] S4. After the robot completes the task, collect the user's service score for the robot, and re-analyze and calculate the various weight parameters of the local task cost function (i = 1, 2, 3, 4);
[0018] And feedback the new weight parameters to the local task cost function .
[0019] As a further improvement of the above solution, the and are respectively obtained by using the Dijkstra algorithm to search for the shortest path and calculate the path length.
[0020] As a further improvement of the above solution, in step S2, the objective function also needs to satisfy the following constraint conditions:
[0021] Each task must be assigned to only one robot for execution:
[0022] [[ID=�3]]
[0023] ∈ {0, 1} holds for all i, j.
[0024] As a further improvement of the above solution, the bidding cost also includes the additional cost of communication and data processing overhead , and the bidding cost is specifically shown as the following formula:
[0025] .
[0026] As a further improvement of the above solution, in step S3, when obtaining the globally optimal robot to execute the currently released task based on the distributed dynamic auction mechanism, the specific method steps are as follows:
[0027] Each robot generates its own bidding cost for each task based on the bidding cost, and publishes the bidding information to the scheduling module in JSON format;
[0028] The scheduling module solves for the optimal allocation based on the Hungarian algorithm and publishes the optimal allocation result (i.e., the bidding result) to the corresponding robot in JSON format.
[0029] As a further improvement of the above solution, in step S3, when solving the objective function based on the Hungarian algorithm to obtain the globally optimal robot group to execute the multiple currently released tasks, the specific method steps are as follows:
[0030] S31. For the cost matrix of perform row subtraction. Specifically, for each row i, execute:
[0031]
[0032] Where: is the element in the original cost matrix, is the matrix element after row subtraction processing;
[0033] S32. For the cost matrix after row subtraction processing, perform column subtraction. Specifically, for each column j, execute:
[0034]
[0035] Where, is the matrix element after column subtraction processing;
[0036] S33. Cover all the zero elements in the matrix :
[0037] Use the minimum number of horizontal and vertical lines to cover all the zero elements in the matrix ;
[0038] Let the number of covering lines be L. If L = N (for the square matrix of
[0039] S34. Adjust the matrix. Specifically, among all the elements not covered by any line, find the minimum value, denoted as :
[0040]
[0041] For the elements not covered by any straight line, subtract ;
[0042] For the elements covered by both a horizontal line and a vertical line (i.e., covered twice), add ;
[0043] For the elements covered by only one straight line, keep them unchanged;
[0044] The adjusted matrix is denoted as , and the specific representation is as follows:
[0045]
[0046] Then return to step S33, and repeat the covering and adjustment until all zero elements can be covered by N straight lines;
[0047] S35. Determine the perfect assignment:
[0048] Select a set of zeros from the adjusted cost matrix such that each row and each column has exactly one zero, that is, find a perfect matching set in a bipartite graph , and construct an assignment matrix based on the perfect matching set Satisfying:
[0049]
[0050] That is, determine which robot each task is assigned to .
[0051] S36. The final assignment matrix X is the globally optimal task assignment scheme, and the corresponding global cost is specifically as follows:
[0052] .
[0053] As a further improvement of the above scheme, in step S35, the steps to find the beautiful matching set are as follows:
[0054] Regard each zero in the adjusted cost matrix as an edge, let the left node set represent each row (i.e., each robot), and the right node set represent each column (i.e., each task);
[0055] If the matrix element , then establish an edge between robot and task ;
[0056] Construct a bipartite graph as shown in the following formula:
[0057]
[0058] where represents the set of robot edges, represents the set of tasks, represents the set of edges;
[0059] Use the depth-first search (DFS) or breadth-first search (BFS) method to find the set of perfect matchings in the bipartite graph , such that:
[0060] .
[0061] As a further improvement of the above solution, in step S4, the steps to obtain the new weight parameter based on the evaluation data are as follows:
[0062] S41. After the task is completed: The user scores each index of the local task cost function and generates an evaluation vector, which is specifically expressed as follows:
[0063]
[0064] where represents the score for the distance factor (for ), represents the score for the waiting time (for ), represents the score for the nursing quality (for ), represents the score for the material receiving cost (for );
[0065] S42. Aggregate data: For all task evaluation data, for the i-th item (i = 1, 2, 3, 4), calculate the average evaluation:
[0066]
[0067] where is the score of user p for the i-th item, and n is the total number of users participating in the evaluation; : The average evaluation score of the i-th item;
[0068] S43. Calculate the evaluation deviation: Set the ideal evaluation (for example, all are 5 points). For each index, calculate the evaluation deviation, which is specifically as follows:
[0069]
[0070] Among them, is the ideal evaluation score of the i-th item, is the evaluation deviation of the i-th item,
[0071] After calculating the evaluation deviation , perform gradient clipping on it to ensure that its value is within a predetermined interval and prevent outliers from having too much impact on the update amplitude. Specifically, it is shown in the following formula:
[0072]
[0073] Where: and are the maximum allowable evaluation deviation and the minimum evaluation deviation threshold respectively, represents the evaluation deviation of the i-th item after the clipping process;
[0074] S44. Calculate the average cost sensitivity , specifically shown in the following formula:
[0075]
[0076] Among them, is the average cost sensitivity of the i-th item, indicating the average contribution of this item in the calculation of the local task cost function; is the cost component of the i-th item on task q. When i = 1, ; when i = 2, ; when i = 3, ; when i = 4, ; Each user p generates one task q each time, so the total number of patients is equal to the total number of tasks;
[0077] S45. Update the model based on the weights to obtain the local task cost function The update weight parameters for each item, and the weight update model is specifically shown in the following formula:
[0078]
[0079] Where: is the value of the i-th weight in the t-th round, is the updated i-th weight parameter, is the learning rate, which controls the step size of weight update;
[0080] S46. Normalize the updated weight parameters to obtain the new weight parameters , specifically shown in the following formula:
[0081] .
[0082] In a second aspect, the present invention also provides a medical service robot scheduling system, including:
[0083] A client for publishing task requirements and evaluating and scoring medical service robots;
[0084] A scheduling module including a task management unit, a robot management unit, an algorithm unit, and a service evaluation unit. The task management unit is used for receiving tasks published by the client, managing task status, task assignment, task redo or cancellation;
[0085] The robot management unit is connected to each medical service robot based on the TCP protocol;
[0086] The algorithm unit is deployed with a local task cost function for calculating local task costs and a global optimal optimization algorithm for finding the globally optimal robot to execute the currently published task;
[0087] The service evaluation unit is used for receiving the evaluation scores of the client and re-analyzing and calculating the weight parameters of the local task cost function (i = 1, 2, 3, 4); and then feeding back the new weight parameters to the local task cost function therein.
[0088] Since the present invention adopts the above technical solutions, the beneficial effects of the present application are as follows:
[0089] The present invention provides a medical service robot scheduling method. By constructing a multi-dimensional weighted model based on distance factors, waiting time, nursing level, urgency, and material receiving cost, and adopting a non-linear weighted summation algorithm to achieve the normalization processing of multi-dimensional parameters; compared with the traditional single-factor scheduling strategy, the present invention introduces a dual adjustment mechanism of a nursing level coefficient α and an urgency coefficient β, establishes a dynamic balance relationship between clinical priority and resource consumption cost, and effectively solves the problem of lagging response of critically ill patients in the medical scenario;
[0090] Innovatively combines a distributed dynamic auction mechanism with the Hungarian optimal allocation algorithm to form a two-layer optimization architecture: the front end adopts an autonomous bidding strategy, allowing each robot to make distributed decisions based on the local cost function, reducing the computing load of the central node; the back end realizes the globally optimal matching through an improved Hungarian algorithm, and its time complexity has real-time feasibility under the task scale of the medical scenario, ensuring that the globally optimal robot is found to execute the currently published task;
[0091] In some preferred embodiments, by constructing a closed-loop feedback system based on service quality evaluation and introducing a weight update algorithm, this mechanism realizes the online adaptive adjustment of four weight parameters, enabling the system to have environmental adaptability. The adjustment mechanism of the present invention based on the actual user experience enables this scheduling method to be continuously improved to meet the needs of different patient groups. Especially when dealing with patients of different care levels and urgencies, it improves patient satisfaction and system response ability.
[0092] This scheduling method combines a distributed dynamic auction mechanism with an online adaptive feedback optimization mechanism to achieve optimal multi-robot task allocation. At the same time, considering factors such as the care level, urgency, waiting time, and material acquisition of patients, it ensures fast response and efficient service in real-time task scheduling and resource allocation. The present invention can not only optimize the task allocation of medical service robots, reduce negative emotions caused by excessive waiting time or poor service quality, and improve medical service efficiency and patient satisfaction; at the same time, its innovative dynamic weight learning mechanism can continuously optimize scheduling parameters, can be continuously improved in practical applications, and adapt to the changing medical environment. It is especially suitable for high-complexity scenarios that require hierarchical response such as the emergency department and ICU, and has significant clinical value and technical promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0094] Figure 1 It is a schematic diagram of the overall comprehensive process of a medical service robot scheduling method disclosed by the present invention;
[0095] Figure 2 It is a schematic diagram of the implementation process of the dynamic auction process disclosed by the present invention;
[0096] Figure 3 It is a flowchart of the update of the feedback evaluation weight parameters disclosed by the present invention.
[0097] The realization of the purpose of the present invention, functional features, and advantages will be further described in conjunction with the embodiments with reference to the drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0098] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0099] It should be noted that the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the premise that those of ordinary skill in the art can implement them. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0100] The present invention provides a medical service robot scheduling system, including:
[0101] A client for publishing task requirements and evaluating and scoring medical service robots; specifically, in a medical service environment, a user publishes task requirements through a Web interface or a mobile terminal, and the task types include material transportation, patient location guidance, disinfection operations, etc.; when publishing a task, information such as the user's care level, urgency, execution area, and expected completion time needs to be associated. After the task is completed, the user gives a star rating (1-5 stars) to the robot service quality through the client and submits written feedback, and the rating data is uploaded to the service evaluation unit in real time;
[0102] A scheduling module, including a task management unit, a robot management unit, an algorithm unit, and a service evaluation unit. The task management unit is used to receive tasks published by the client, manage task states, allocate tasks, and redo or cancel tasks;
[0103] The robot management unit is connected to each medical service robot based on the TCP protocol. The TCP-based connection enables the scheduling module to be deployed locally or in the cloud;
[0104] The algorithm unit is deployed with a local task cost function for calculating the local task cost and a global optimal optimization algorithm for finding the globally optimal robot to execute the currently published task;
[0105] The service evaluation unit is used to receive the evaluation scores from the client and re-analyze and calculate the various weight parameters of the local task cost function (i = 1, 2, 3, 4); and then feedback the new weight parameters to the local task cost function .
[0106] A medical service robot scheduling method provided by the present invention is deployed on the scheduling module. Specifically, the scheduling method includes:
[0107] S1. Construct a scheduling model based on multi-dimensional comprehensive weighting. In the scheduling model, the local task cost function for each robot for a patient is as follows: Specifically as follows:
[0108]
[0109] Among them, : The distance between the robot and the patient ; : The waiting time of the patient (unit: second), defined as the interval time from when the patient sends a service request to the current moment; : The nursing level of the patient , determined according to the clinical condition and Barthel index, usually divided into special care, first-level care, second-level care, and third-level care, and converted into a numerical value; : The urgency of the patient , determined by monitoring the patient's physiological indicators (such as heart rate, blood pressure, body temperature, etc.), and the scoring range is generally 1-5 points, with 1 point being the most urgent; : Nursing level coefficient; : Urgency coefficient; : The cost for the robot to go to the supply station to pick up medical supplies for the patient ; , , and are respectively weight parameters for each item, and ; and are respectively obtained by using the Dijkstra algorithm to search for the shortest path and calculate the path length;
[0110] S2. According to the principle of the overall minimum total cost of all tasks and robots, determine the objective function for global minimization of the total cost. The objective function is specifically as follows:
[0111]
[0112] Among them, is a decision variable, indicating whether task is assigned to robot , = 1 indicates that task is assigned to robot , = 0 indicates that the task is not assigned to a robot ; is the number of robots; is the number of tasks;
[0113] The objective function also needs to satisfy the following constraints:
[0114] Each task must be assigned to only one robot for execution:
[0115]
[0116] ∈ {0, 1} holds for all i, j;
[0117] S3. Solve the objective function based on the distributed dynamic auction mechanism and the Hungarian algorithm to obtain the globally optimal robot to execute the currently released task;
[0118] Based on the distributed dynamic auction mechanism, obtain the globally optimal robot to execute the currently released task. The specific method steps are as follows:
[0119] Each robot respectively generates its own bidding cost for each task based on the bidding cost, and publishes the bidding information in JSON format to the scheduling module;
[0120] The scheduling module solves to obtain the optimal allocation based on the Hungarian algorithm, and publishes the optimal allocation result (i.e., the bidding result) to the corresponding robot in JSON format.
[0121] Solve the objective function based on the Hungarian algorithm to obtain the globally optimal robot group to execute the multiple currently released tasks. The specific method steps are as follows:
[0122] S31. For the cost matrix of perform row subtraction. Specifically, for each row i, execute:
[0123]
[0124] Where: is an element in the original cost matrix, is the matrix element after row subtraction processing;
[0125] S32. For the cost matrix after row subtraction processing perform column subtraction. Specifically, for each column j, execute:
[0126]
[0127] Where, is the matrix element after column subtraction processing;
[0128] S33. Cover all zero elements in the matrix :
[0129] Cover all zero elements in the matrix with the minimum number of horizontal and vertical lines ;
[0130] Let the number of covering lines be L. If L = N or L = M, there is a perfect matching, go to step S35; otherwise, enter step S34;
[0131] S34. Adjust the matrix. Specifically, find the minimum value among all elements not covered by any line, denoted as :
[0132]
[0133] The adjusted matrix is denoted as , and is specifically represented as follows:
[0134]
[0135] Then return to step S33, repeat covering and adjustment until all zero elements can be covered by N lines;
[0136] S35. Determine the perfect assignment:
[0137] Find a perfect matching set in a bipartite graph , and construct an assignment matrix based on the perfect matching set satisfying the following formula:
[0138]
[0139] That is, determine which robot each task is assigned to ;
[0140] Specifically, the steps to find the beautiful matching set are as follows:
[0141] Regard each zero in the adjusted cost matrix as an edge. Let the left node set represent each row (i.e., each robot), and the right node set represent each column (i.e., each task);
[0142] If the matrix element , then establish an edge between robot and task ;
[0143] Construct a bipartite graph as shown in the following formula:
[0144]
[0145] where represents the set of robot edges, represents the set of tasks, represents the set of edges;
[0146] Use the depth - first search (DFS) or breadth - first search (BFS) method to find the perfect matching set in the bipartite graph , such that:
[0147] ;
[0148] S36. The final allocation matrix X is the globally optimal task allocation scheme, and the corresponding global cost is specifically as follows:
[0149] ;
[0150] S4. After the robot completes the task, collect the user's service score for the robot, and re - analyze and calculate the weight parameters of each item of the local task cost function (i = 1, 2, 3, 4); And feedback the new weight parameters
[0151] to the local task cost function ; Specifically, refer to
[0152] . Before executing the scheduling method provided by the present invention, data collection and environment modeling are also required, Figure 1 When performing data collection and environment modeling:
[0153] When performing data collection and environment modeling:
[0154] By docking with the hospital's medical data collection and information management system, the data required by the robot is obtained through the access interface of the hospital's medical data system, including the patient's care level, the patient's physiological indicators (such as heart rate, body temperature, respiration, etc., used to determine the patient's urgency), the waiting time of the patient since the call for service began, the patient's location, etc. Each time the patient calls, the intelligent device generates patient - related data based on the collected physiological indicators and sends it to the scheduling module;
[0155] The robot needs to be equipped with an indoor positioning system to achieve high - precision positioning, and be equipped with a high - definition camera and a lidar for collecting environmental images and distance data for use in environmental modeling and obstacle detection;
[0156] Environmental modeling generates a real-time indoor environment map to provide spatial information for robot task scheduling; the robot is used to collect lidar data and construct a map to form a point cloud data map, and the indoor road network map saved in vector map format is obtained through feature extraction. The point cloud map ensures that the robot can perform self-localization during the driving process in the environment map, and the road network vector map ensures that the robot can perform path search and planning based on the road network;
[0157] Patient task issuance:
[0158] When patients with different care levels and urgencies issue service requests through the client, the system generates specific task requirements;
[0159] Each robot calculates its own local cost for executing the task according to the issued task requirements. Each robot for the patient local task cost function is specifically as follows:
[0160]
[0161] After the robots calculate their respective local costs, to compensate for communication and data processing overheads, a fixed additional cost is added based on the local cost calculation results and then the task cost is issued:
[0162]
[0163] where is the fixed additional cost item, used to compensate for communication, data processing, etc. overheads; if these costs are negligible, 0 can be taken;
[0164] Robot bidding:
[0165] The robots publish and collect bidding information for the locally calculated bidding costs through the MQTT protocol. The specific method steps are as follows:
[0166] Topic and message design: including three auction-related topics (topics) such as task requests, bidding messages, and auction results. When designing the topics, a unified naming rule is adopted to ensure that different modules (such as robots, scheduling modules, etc.) use the same topic format when publishing and subscribing, avoiding data loss or duplicate subscriptions caused by inconsistent naming;
[0167] Task request topic
[0168] Topic format: task / request
[0169] All patient task request information is uniformly published to this topic, and all robots and scheduling nodes subscribe to this topic to obtain new task requests;
[0170] Bid message topic
[0171] Topic format: task / bid / <patient_id>
[0172] The task request for each patient corresponds to a bid message topic, where <patient_id> is the unique identifier of the patient; for example, if the patient ID is P001, the bid message topic is task / bid / P001. After each robot calculates the cost of serving the patient, it publishes the bid information in JSON format to this topic;
[0173] Auction result topic
[0174] Topic format: task / result / <patient_id>
[0175] After completing the collection of bid messages and auction decision-making, the system publishes the information of the winning robot to this topic; for example, for patient P001, the auction result topic is task / result / P001. The information of the winning robot is distributed to all relevant robots and scheduling nodes through this topic for task execution.
[0176] After each robot calculates the task cost, it publishes the bid information in JSON format;
[0177] Auction result message
[0178] After the bidding ends, the scheduler selects the winning robot and publishes the auction result message.
[0179] See Figure 2 , Distributed dynamic auction to collect bid information
[0180] To ensure the real-time progress of the auction process, set the bid timeout (for example, 5 seconds). The specific steps are as follows:
[0181] Start the timer: When the patient task request is published, the scheduling node starts listening to the task / bid / <patient_id> topic and records the start time;
[0182] Collect all bid messages published by robots within the timeout period; after the timeout, if the number of messages is insufficient, trigger the rebroadcast or default processing mechanism to ensure the continuation of the auction process; if within bid messages are received, select the winner based on the principle of minimum cost; if no bid messages are received, trigger the rebroadcast mechanism or use the default high-cost value processing to ensure that the auction process will not be blocked.
[0183] Release the auction result: Publish the winner information to the task / result / <patient_id> topic.
[0184] Exception handling: The timeout mechanism ensures that when the bidding times out, it will not wait indefinitely, avoiding scheduling delays; at the same time, the ACK and retransmission mechanisms are adopted to ensure the reliability of message transmission.
[0185] QoS (Quality of Service levels) settings and message reliability
[0186] QoS levels: For bidding messages and auction result messages, set QoS = 1 or QoS = 2 to ensure that the message is transmitted successfully at least once or strictly once, preventing message loss due to network problems.
[0187] Retain messages: For auction result messages, set the "retain" flag to ensure that newly joined subscribers can immediately obtain the latest auction results.
[0188] Solving global task allocation using the Hungarian algorithm
[0189] The scheduling module obtains the global optimal task allocation scheme through the Hungarian algorithm. To further illustrate the process of solving global task allocation using the Hungarian algorithm, in this embodiment, it is assumed that there are 4 robots , , , and 4 tasks , , , ; The specific calculation steps are as follows:
[0190] The local costs calculated by each robot for each task form a 4×4 cost matrix C = , and let the local cost matrix be:
[0191]
[0192] is the local cost for robot to execute task , and the local cost comprehensively considers factors such as the distance between the robot and the patient, waiting time, care level, urgency, and the distance between the robot and the supply station;
[0193] Perform row subtraction on the 4×4 cost matrix , subtract the minimum value in each row from each row to obtain:
[0194] First row: [9, 11, 14, 11], the minimum value is 9, the row becomes [9−9, 11−9, 14−9, 11−9] = [0, 2, 5, 2];
[0195] Second row: [6, 15, 13, 13], the minimum value is 6, the row becomes [0, 9, 7, 7];
[0196] Third row: [12, 13, 6, 8], the minimum value is 6, the row becomes [12−6, 13−6, 6−6, 8−6] = [6, 7, 0, 2];
[0197] Fourth row: [11, 9, 10, 12], the minimum value is 9, the row becomes [11−9, 9−9, 10−9, 12−9] = [2, 0, 1, 3];
[0198] Obtain the matrix after row subtraction as:
[0199]
[0200] For the cost matrix after row subtraction perform column subtraction, subtract the minimum value of each column from the column to obtain:
[0201] First column: elements [0, 0, 6, 2], the minimum value is 0, the column remains unchanged;
[0202] Second column: elements [2, 9, 7, 0], the minimum value is 0, the column remains unchanged;
[0203] Third column: elements [5, 7, 0, 1], the minimum value is 0, the column remains unchanged;
[0204] Fourth column: elements [2, 7, 2, 3], the minimum value is 2, the column becomes [0, 5, 0, 1];
[0205] Obtain the matrix after column subtraction as:
[0206]
[0207] Cover all the zero elements in the matrix and construct a perfect matching:
[0208] When zero covering, first identify the zero elements in the matrix as:
[0209] First row: zeros are located in the 1st and 4th columns;
[0210] Second row: zero is located in the 1st column;
[0211] Third row: zeros are located in the 3rd and 4th columns;
[0212] The fourth row: zero is in the 2nd column;
[0213] Construct another perfect matching (i.e., select one zero from each row and each column), and select:
[0214] Select the zero in the 4th column of the first row;
[0215] Select the zero in the 1st column of the second row;
[0216] Select the zero in the 3rd column of the third row;
[0217] Select the zero in the 2nd column of the fourth row;
[0218] For the remaining elements in the matrix, if , then the value is 1, where is the set of perfect matchings;
[0219] Thus, the assignment matrix is obtained, as shown specifically below:
[0220]
[0221] That is, determine which robot each task is assigned to .
[0222] Global cost calculation:
[0223] According to the original cost matrix C, the optimal assignment corresponding to the total cost is as follows: Assign to (corresponding cost c 21 = 6), Assign to (corresponding cost c 42 = 9), Assign to (corresponding cost c 33 = 6), Assign to (corresponding cost c 14 = 11), and the global total cost is as shown below:
[0224] .
[0225] The corresponding robots assigned tasks execute the corresponding release tasks. When the robots execute tasks, they call the Dijkstra path planning algorithm to navigate to the nearest material site to pick up medical supplies and then navigate to the patient's location.
[0226] Patient feedback and evaluation
[0227] Collect patient evaluations after the task is completed. Through evaluation feedback, adjust the weight parameters in the local cost calculation to achieve closed-loop optimization. Specifically, patients can evaluate the following four sub-items:
[0228] Distance factor (for w1): Evaluate the convenience of the robot reaching the patient's location, mainly measuring the impact of the physical distance between the robot and the patient on the service response speed; this not only involves the length of the robot's travel distance, but also includes the complexity of the navigation path and the traffic conditions; if the patient's location is in a remote area of the building or the path is complex (such as needing to detour, passing through congested areas), the patient may consider the robot's response efficiency to be low.
[0229] Waiting time (for w2): Evaluate the timeliness of service response, which directly reflects the time consumed by the patient from submitting a service request to the robot starting to provide service; this indicator mainly focuses on time delay and response speed, and does not involve the robot's travel distance or path complexity; it is usually affected by factors such as task queuing, robot task scheduling, and actual execution efficiency.
[0230] Nursing quality (for w3): Mainly evaluate the professionalism and service effect of the robot in the process of providing nursing services to patients, and the relative proportion of nursing quality and urgency in the overall task cost. When w3 is large, the system will pay more attention to the patient's nursing needs and emergencies; on the contrary, if w3 is small, the impact of the nursing indicator on the task cost will be weakened.
[0231] Material collection cost (for w4): Evaluate the impact of the robot's service delay caused by going to the material site; measure the additional delay and resource consumption brought by the robot having to go to the material site to pick up medical supplies before providing service; this is not simply waiting time, but reflects the experience that due to factors such as hospital layout, material site location, and robot scheduling strategy, the robot has to detour to obtain materials, which may delay the service.
[0232] Feedback data processing and weight update
[0233] The flowchart of updating the weight parameters of the patient feedback evaluation is as Figure 3 shown. Specifically, the steps to obtain the new weight parameters based on the evaluation data are as follows: as follows:
[0234] S41. After the task is completed: The user scores each index of the local task cost function and generates an evaluation vector, which is specifically expressed as follows:
[0235]
[0236] Among them, represents the score for the distance factor (for ), represents the score for the waiting time (for ), represents the score for the nursing quality (for ), represents the score for the cost of obtaining supplies (for );
[0237] S42. Aggregate data: For all task evaluation data, for the i-th item (i = 1, 2, 3, 4), calculate the average evaluation:
[0238]
[0239] where is the score of user p for the i-th item, and n is the total number of users participating in the evaluation; : The average evaluation score of the i-th item;
[0240] S43. Calculate the evaluation deviation: Set the ideal evaluation (for example, all 5 points). For each indicator, calculate the evaluation deviation as follows:
[0241]
[0242] where is the ideal evaluation score of the i-th item, is the evaluation deviation of the i-th item;
[0243] During the weight update process, abnormal data (extremely large or extremely small singular values) may cause the gradient to update too fast or unstably, thus affecting the overall performance of the system. In the present invention, an outlier processing mechanism of gradient clipping is introduced. After calculating the evaluation deviation , clip it to ensure that its value is within a predetermined interval and prevent outliers from having too much impact on the update amplitude, as shown in the following formula:
[0244]
[0245] where: and are the maximum allowable evaluation deviation and the minimum evaluation deviation threshold respectively, represents the evaluation deviation of the i-th item after clipping processing;
[0246] S44. Calculate the average cost sensitivity , as shown in the following formula:
[0247]
[0248] where is the average cost sensitivity of the i-th item, representing the average contribution of this item in the calculation of the local task cost function; is the cost component of the i-th item on task q. When i = 1, ; when i = 2, ; when i = 3, ; when i = 4, ; Each user p generates one task q each time, so the total number of patients is equal to the total number of tasks;
[0249] S45. Based on the weight update model, obtain the local task cost function The update weight parameters of each item. The weight update model is specifically shown as follows:
[0250]
[0251] where, is the value of the i-th weight at the t-th round, is the updated i-th weight parameter, is the learning rate, controlling the step size of weight update;
[0252] S46. Normalize the updated weight parameters to obtain the new weight parameters , specifically shown as follows:
[0253] .
[0254] A medical service robot scheduling method provided by the present invention constructs a multi-dimensional weighted model based on distance factors, waiting time, nursing level, urgency, and material acquisition cost, and uses a non-linear weighted summation algorithm to achieve the normalization processing of multi-dimensional parameters. Compared with the traditional single-factor scheduling strategy, the present invention introduces a dual adjustment mechanism of a nursing level coefficient α and an urgency coefficient β, establishes a dynamic balance relationship between clinical priority and resource consumption cost, and effectively solves the problem of lagging response of critically ill patients in the medical scenario. In addition, it innovatively combines a distributed dynamic auction mechanism with the Hungarian optimal allocation algorithm to form a two-layer optimization architecture. The front end adopts an independent bidding strategy, allowing each robot to make distributed decisions based on a local cost function, reducing the computational load of the central node. The back end achieves global optimal matching through an improved Hungarian algorithm, and its time complexity is real-time feasible under the task scale of the medical scenario, ensuring that the globally optimal robot is found to execute the currently released task. It also constructs a closed-loop feedback system based on service quality evaluation and introduces a weight update algorithm, which realizes the online adaptive adjustment of four weight parameters, enabling the system to have environmental adaptability. The adjustment mechanism of the present invention based on the actual user experience enables this scheduling method to be continuously improved and adapt to the needs of different patient groups. Especially when dealing with patients of different nursing levels and urgencies, it improves patient satisfaction and system response ability.
[0255] This scheduling method combines a distributed dynamic auction mechanism with an online adaptive feedback optimization mechanism to achieve optimal multi-robot task allocation, taking into account factors such as the nursing level, urgency, waiting time, and material acquisition of patients, ensuring fast response and efficient service in real-time task scheduling and resource allocation. The present invention can not only optimize the task allocation of medical service robots, reduce negative emotions caused by excessive waiting time or poor service quality, improve medical service efficiency and patient satisfaction, but also its innovative dynamic weight learning mechanism can continuously optimize scheduling parameters, be continuously improved in practical applications, and adapt to the changing medical environment. It is especially suitable for high-complexity scenarios that require hierarchical response such as the emergency department and ICU, and has significant clinical value and technical promotion prospects.
[0256] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structural transformation made under the inventive concept of the present invention by using the content of the specification and drawings of the present invention, or directly / indirectly applied to other related technical fields, is included in the patent protection scope of the present invention.
Claims
1. A scheduling method for a medical service robot, characterized in that, Including: S1. Construct a scheduling model based on multi-dimensional comprehensive weighting. In the scheduling model, each robot for a patient of the local task cost function is specifically as follows: ; Among them, is the distance between the robot and the patient; is the waiting time of the patient; is the nursing level of the patient; is the urgency of the patient; is the nursing level coefficient; is the urgency coefficient; is the cost for the robot to go to the supply station to pick up medical supplies for the patient; , , and are the weight parameters for each item, and ; S2. According to the principle of the overall optimal scheduling cost of all tasks and the robot, determine the objective function for minimizing the total cost globally. The specific objective function is as follows: ; Among them, is a decision variable representing the task whether it is assigned to the robot , = 1 indicates that the task is assigned to the robot , = 0 indicates that the task is not assigned to the robot ; is the number of robots; is the number of tasks; S3. Solve the objective function based on the distributed dynamic auction mechanism and the Hungarian algorithm to obtain the globally optimal robot to execute the released tasks.
2. The scheduling method of a medical service robot according to claim 1, wherein The medical service robot scheduling method further includes: S4. After the robot completes the task, collect the user's service score for the robot, and re-analyze and calculate the weight parameters of each item of the local task cost function (i = 1, 2, 3, 4); and feedback the new weight parameters to the local task cost function therein. 3. A medical service robot scheduling method according to claim 1 or 2, characterized in that The said and are respectively obtained by using the Dijkstra algorithm to search for the shortest path and calculate the path length.
4. A medical service robot scheduling method according to claim 1 or 2, characterized in that In step S2, the objective function also needs to satisfy the following constraint conditions: Each task must be assigned to only one robot for execution: ; ∈ {0, 1} holds for all i, j.
5. A medical service robot scheduling method according to claim 1 or 2, characterized in that Bidding cost Also includes additional costs for communication and data processing overhead , and the bidding cost is specifically shown as follows: 。 6. The medical service robot scheduling method according to claim 5, wherein, In step S3, when obtaining the globally optimal robot to execute the currently released task based on the distributed dynamic auction mechanism, the specific method steps are as follows: Each robot generates its own bidding cost for each task based on the bidding cost, and publishes the bidding information to the scheduling module in JSON format; The scheduling module solves to obtain the optimal allocation based on the Hungarian algorithm, and publishes the optimal allocation result to the corresponding robot in JSON format.
7. A medical service robot scheduling method according to claim 1 or 2, characterized in that In step S3, when solving the objective function based on the Hungarian algorithm to obtain the globally optimal robot group to execute the currently released multiple tasks, the specific method steps are as follows: S31. Subtract from the cost matrix row by row. Specifically, for each row i, execute: ; Wherein: is an element in the original cost matrix, is the matrix element after row subtraction processing; S32. Perform column subtraction on the cost matrix after row subtraction Specifically, for each column j, execute: ; Among them, is the matrix element after column subtraction processing; S33. Covering matrix All zero elements in: Cover all the zero elements in the matrix with the minimum number of horizontal and vertical lines in the matrix; Let the number of covering lines be L. If L = N or L = M, there is a perfect matching, go to step S35; otherwise, enter step S34; S34. Adjust the matrix. Specifically, find the minimum value among all the elements not covered by any straight line and denote it as :[[]]END]] ; The adjusted matrix is denoted as , and the specific representation is as follows: ; Then return to step S33, repeat covering and adjustment until all zero elements can be covered by N lines; S35. Determine the perfect allocation: Finding a set of perfect matchings in a bipartite graph Constructing an assignment matrix based on the set of perfect matchings Satisfying the following formula: ; That is, determine each task assigned to which robot ; S36. The final allocation matrix X is the globally optimal task allocation scheme, and the corresponding global cost Specifically, it is as follows: 。 8. A method for scheduling a medical service robot according to claim 7, characterized in that, In step S35, the steps to find the perfect match set are as follows: The step method is as follows: The adjusted cost matrix Regarding each zero in it as an edge, let the left node set represent each row and the right node set represent each column; If the matrix element , then an edge is established between the robot and the task . Construct a bipartite graph as shown in the following formula: ; Among them represents the set of robot edges, represents the set of tasks, represents the set of edges; Finding a set of perfect matchings in a bipartite graph using depth - first search or breadth - first search methods , such that: 。 9. A method for scheduling a medical service robot according to claim 2, characterized in that, In step S4, new weight parameters are obtained based on the evaluation data The step method is as follows: S41. After the task is completed: The user scores each index of the local task cost function and generates an evaluation vector, which is specifically expressed as follows: ; Among them, represents the score for the distance factor, represents the score for the waiting time, represents the score for the nursing quality, represents the score for the cost of obtaining supplies; S42. Summarize data: For all task evaluation data, for the i-th item (i = 1, 2, 3, 4), calculate the average evaluation: ; wherein, is the score given by user p to the i-th item, and n is the total number of users participating in the evaluation; : the average evaluation score of the i-th item; S43. Calculate the evaluation deviation: Set the ideal evaluation , and for each indicator, calculate the evaluation deviation as follows: ; Among them, is the ideal evaluation score of the i-th item, is the evaluation deviation of the i-th item, When calculating the evaluation deviation after that, perform gradient clipping on it, as shown in the following formula: ; Wherein: and are the maximum allowable evaluation deviation and the minimum evaluation deviation threshold respectively, represents the evaluation deviation of the i-th item after the shearing process; S44. Calculate the average cost sensitivity , as shown in the following formula: ; wherein, is the average cost sensitivity of the i-th item; is the cost component of the i-th item on task q; S45. Obtain a local task cost function based on the weight update model The update weight parameters for each item, and the weight update model is specifically shown as follows: ; wherein, is the value of the i-th weight at the t-th round, is the updated i-th weight parameter, is the learning rate; S46. Normalize the updated weight parameters to obtain new weight parameters , as shown in the following formula: 。 10. A medical service robot scheduling system, characterized in that, Including: The client is used to publish task requirements and evaluate and score the medical service robot; The scheduling module includes a task management unit, a robot management unit, an algorithm unit, and a service evaluation unit. The task management unit is used to receive the tasks published by the client, manage the task status, assign tasks, and redo or cancel tasks; The robot management unit is connected to each medical service robot based on the TCP protocol; An algorithm unit, on which a local task cost function for calculating the local task cost is deployed and a global optimal optimization algorithm for finding the globally optimal robot to execute the currently released task; A service evaluation unit for receiving the evaluation scores of the client and re-analyzing and calculating the various weight parameters of the local task cost function based on the obtained evaluation data of each item (i = 1, 2, 3, 4); and then feeding back the new weight parameters to the local task cost function .
Citation Information
Cited By
Hospital health science popularization robot service system
CN121483543A