Smart medical end-to-cloud collaborative multi-modal task offloading method, device and medium

By constructing feature encoding and cross-attention mechanisms for medical tasks and model-node execution units, and combining the MAPPO algorithm to optimize the policy network, the problem of inaccurate matching between medical tasks and model-nodes is solved, thereby improving resource utilization efficiency and dynamic environmental adaptability, and ensuring real-time task completion and rational resource allocation.

CN123178024APending Publication Date: 2026-11-27HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611674770.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing smart healthcare systems, the matching relationship between medical tasks and model-nodes is not accurately represented, causing the resource competition state to deviate from the actual execution sequence, making it difficult to balance the real-time and computing power requirements of tasks, and resulting in insufficient adaptability to long-term dynamic environments.

Method used

By constructing feature encoding and cross-attention mechanisms for medical tasks and model-node execution units, and combining the MAPPO algorithm to optimize the policy network, the task offloading decision is dynamically adjusted, taking into account task level, time margin, and resource competition status, to form a joint model-node offloading strategy, thereby improving resource utilization efficiency and adaptability.

Benefits of technology

It achieves efficient matching of medical tasks and execution units, improves resource utilization efficiency and scheduling rationality, enhances the system's adaptability in dynamic environments, and ensures real-time task completion and rational resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178024A_ABST
    Figure CN123178024A_ABST
Patent Text Reader

Abstract

The application provides a smart medical end-edge cloud collaborative multi-modal task offloading method, device and medium, relates to the field of smart medical edge computing and artificial intelligence task scheduling, and comprises the following steps: constructing a set according to task requirements and service capabilities, available states and running conditions of execution units, determining a target execution unit to form a joint offloading strategy by a MAPPO policy network according to the association between the task and each execution unit through cross-attention extraction, determining readiness according to execution positions and transmission states, including waiting tasks and ready tasks in a to-be-admitted set, sorting according to levels and initial time limit margins, combining models and node computing power to perform admission, determining related time limit margins and predicted values, determining a basic weight according to the level, adjusting time delay, energy consumption and overtime weight according to the predicted value to form a reward, updating the policy network and continuously learning. The application can realize accurate matching of tasks and execution units, consistency of resource occupation and actual execution, and improve time limit perception scheduling and environmental adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of edge computing and artificial intelligence task scheduling technology in smart healthcare, specifically to a multimodal task offloading method, device, and medium for edge-cloud collaboration in smart healthcare. Background Technology

[0002] With the development of smart healthcare, artificial intelligence, and edge computing technologies, medical robots, intelligent medical imaging terminals, bedside monitoring equipment, wearable medical devices, and other intelligent medical terminals continuously generate medical tasks of different modalities, including medical images, physiological signals, and medical texts, as well as joint reasoning tasks composed of two or more modalities of data. Different medical tasks require the use of medical reasoning models with corresponding task processing capabilities and modality adaptation capabilities for processing. Some tasks have high requirements for real-time performance and computing power, but the computing, storage, and energy resources of medical terminals themselves are limited. Therefore, reasoning and computation processing usually need to be completed collaboratively by edge nodes and cloud nodes.

[0003] Existing task offloading methods typically use the computing node as the decision-making object, selecting the execution location (local, edge, or cloud) based on the node's computing resources, communication status, task data volume, and task time limits. However, in real-world smart healthcare AI environments, multiple medical inference models with different capability levels can be deployed on the same computing node. Each model differs in the types of tasks it supports, the quality of inference services, its inference performance resource requirements, and its concurrent services. Simply determining the execution node cannot accurately represent the service compatibility between medical tasks and specific inference models.

[0004] On the other hand, multiple medical terminals may request the same high-capacity medical inference model at the same time, or simultaneously select different model instances deployed on the same node, resulting in competition for concurrent model instance services and competition for shared computing resources among nodes. If only a fixed first-come, first-served rule is adopted or task scheduling is based solely on node load, it is difficult to simultaneously consider the business priority of medical tasks and the urgency of real-time completion caused by waiting, network, and changes in model execution status.

[0005] When performing model-node offloading decisions in reinforcement learning, after a task selects a target execution unit, data transmission is required to reach the target node and participate in resource admission. If the model-node selection result is not distinguished from the resource admission readiness state, or if existing waiting tasks and newly ready tasks in the current round are not uniformly scheduled during admission, the resource contention state may deviate from the actual execution sequence. When using a current state estimation strategy for evaluation, it is also necessary to clarify the timing of the expected execution result and the actual completion result in reward calculation.

[0006] During the long-term operation of a smart healthcare system, the distribution of medical tasks, model deployment relationships, and node resource environment will change. If the policy network is updated only according to the new scheduling trajectory, the existing task-model node associations and selection patterns may shift significantly, reducing the adaptability and stability of the offloading strategy to the long-term dynamic environment.

[0007] Therefore, a multimodal task offloading method is needed: first, feasible model-node execution units are selected based on the needs of medical tasks; then, when multiple medical agents compete for model service resources and node computing resources, data transmission status, waiting tasks, task levels, time margins, dynamic strategy evaluation, and long-term environmental changes are considered uniformly. This method aims to improve the temporal consistency of resource access and multi-task scheduling, resource utilization efficiency, and long-term adaptability. Summary of the Invention

[0008] The purpose of this invention is to provide a multimodal task offloading method, device, and medium for edge-cloud collaboration in smart healthcare, addressing the aforementioned technical problems.

[0009] In a first aspect, the present invention provides a multimodal task offloading method for smart healthcare edge-cloud collaboration, comprising the following steps:

[0010] The system acquires the medical tasks to be unloaded generated by each medical terminal, models each medical terminal as a medical intelligent agent, and acquires the task type, medical task level, task data scale, computing requirements, task arrival time, maximum allowable completion time limit and minimum inference service quality requirements of the medical tasks to be unloaded, forming task requirement information.

[0011] The system acquires information on the medical inference models deployed on the edge computing nodes, the running status of the model instances, and the resource status of the computing nodes, and forms multiple model-node execution units based on the deployment relationship between the medical inference models and the computing nodes.

[0012] Based on the model service capabilities, service availability status, and basic operating conditions of each model-node execution unit, a set of model-node execution units corresponding to the medical tasks to be unloaded is constructed based on the task requirement information.

[0013] The task requirement information is feature-encoded to obtain task-side features. The features of each unit in the model-node execution unit set are also feature-encoded to obtain model-node execution unit features. The task-side features are used as query information, and the model-node execution unit features are used as key and value information. Cross-attention operation is performed on the query information and the key and value information of each model-node execution unit to obtain the task-model node relationship representation.

[0014] The task-model node relationship is input into the policy network of the multi-agent proximal policy optimization MAPPO algorithm. Each medical agent determines the target model-node execution unit within the model-node execution unit set, and the determined target model-node execution units are combined into a joint model-node task offloading strategy.

[0015] Within the set of tasks awaiting admission, the priority relationship of task services is determined based on the medical task level and the initial time limit margin. In accordance with the priority relationship of task services, combined with the concurrent service capabilities of the corresponding medical inference model instance and the allocable computing resources of the computing node, joint resource admission is performed to queue up medical tasks that do not meet the resource admission conditions.

[0016] Based on the data transmission, task queuing, and model inference status of the medical task to be unloaded, the relevant time margin of the medical task to be unloaded in the target model-node execution unit is determined. At the decision moment when the joint model-node task unloading strategy is generated, the subsequent data transmission, resource access, queuing, and model inference processes are predicted to obtain the expected value of the model-node relevant time margin.

[0017] The task-level reward for the medical task is obtained based on the medical task level and the expected value. The task-level rewards of multiple medical agents are aggregated to form a joint strategy reward.

[0018] The policy network and value network of the MAPPO algorithm are updated based on the joint policy reward, and a continuous learning mechanism is introduced in the update process to obtain a model-node offloading policy network for multi-medical agent collaboration.

[0019] In a second aspect, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the multimodal task offloading method for smart medical edge-cloud collaboration described in the first aspect.

[0020] Thirdly, the present invention provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the multimodal task offloading method for smart medical edge-cloud collaboration described in the first aspect.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] (1) This invention constructs a set of feasible model-node candidate executions corresponding to medical tasks and uses a task-model node cross-attention mechanism to extract related features from task requirements, model service capabilities, node resources, network status and in-transit task load. Based on this, MAPPO jointly selects model-node execution units, so that the unloading decision reflects the current execution environment and known in-transit load at the same time, thereby improving the matching of medical tasks and execution units and multi-agent collaborative unloading.

[0023] (2) By distinguishing between model-node selection, task data transmission and resource access readiness process, this invention unifies the scheduling of existing waiting tasks and newly completed tasks that meet the resource access readiness conditions. It also combines the concurrent service capabilities of medical inference model instances and the allocable computing resources of computing nodes to perform joint resource access, so that the timing of task resource occupation is consistent with the actual transmission and execution process. At the same time, it takes into account both the concurrent competition of model instances and the competition for shared computing resources of nodes, thereby improving the scheduling rationality and resource utilization efficiency in multi-medical task concurrent scenarios.

[0024] (3) This invention uses medical task level and time limit margin to participate in task scheduling and strategy evaluation. In the event of resource competition, the service priority relationship is determined according to the medical task level and the initial time limit margin. The model-node related time limit margin is used to reflect the dynamic completion pressure of the task as the transmission, queuing and inference states change. Based on this, the relative weights of latency, energy consumption and timeout evaluation are dynamically adjusted to form dynamic rewards. This allows the priority of business services and the urgency of real-time completion to play a synergistic role in the offloading decision, thereby improving the time limit awareness scheduling capability in the resource competition environment.

[0025] (4) This invention introduces continuous learning training on the basis of MAPPO strategy training, and imposes consistency constraints on the task-model node association relationship and model-node action distribution on the historical effective model-node candidate set. This enables the unloading strategy to adapt to changes in medical task distribution, model deployment relationship and resource environment, while reducing the task-model node matching relationship and model-node unloading rules formed in the historical scheduling state being covered by subsequent training, and improving the continuous adaptability of the collaborative unloading strategy in the long-term operating environment. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart illustrating the multimodal task offloading method for edge-cloud collaboration in smart healthcare provided in an embodiment of the present invention;

[0028] Figure 2 A schematic diagram of the collaborative deployment architecture of smart healthcare edge-cloud multimodal tasks and heterogeneous medical inference models provided in an embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of the MAPPO algorithm provided in the embodiment of the present invention for training and continuous learning of the model-node task offloading strategy;

[0030] Figure 4 A schematic diagram of a device for a multimodal task offloading method for edge-cloud collaboration in smart healthcare provided in an embodiment of the present invention. Detailed Implementation

[0031] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0032] In the description of this invention, it should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0033] like Figure 1 As shown, the multimodal task offloading method for smart healthcare edge-cloud collaboration provided in this embodiment includes steps S101 to S109, as follows: Figure 2 The embodiment shown here employs a collaborative deployment architecture for smart healthcare edge-cloud multimodal tasks and heterogeneous medical inference models, and the specific implementation methods for each step are explained.

[0034] S101, Construct medical task requirement information.

[0035] The system acquires the medical tasks to be uninstalled generated by each medical terminal, models each medical terminal as a medical intelligent agent, and acquires the task type, medical task level, task data scale, computing requirements, task arrival time, maximum allowed completion time limit, and minimum inference service quality requirements of the medical tasks to be uninstalled, thus forming the task requirement information of the medical tasks to be uninstalled.

[0036] Let the set of medical intelligent agents in the smart healthcare system be . ,in, Indicates the first A medical intelligent agent, This represents the total number of medical intelligent agents. Index for medical intelligent agents;

[0037] For the One medical task to be uninstalled Define its time at time The task requirements are as follows:

[0038]

[0039] in, Indicates the task type. Indicates the level of medical tasks. Indicates the size of the task data. Indicates computational requirements. Indicates the maximum allowed completion time. This indicates the minimum quality requirement for inference services. Indicates the time when the task arrives. This represents the time that has elapsed up to time t, and .

[0040] Medical mission level Characterizes the priority attribute of business services and the maximum allowed completion time. Characterizing time constraint attributes, the two are not fixedly mapped, and the maximum allowable completion time satisfies Minimum inference service quality requirements This serves as the basic service quality threshold for candidate model-node execution units, rather than repeatedly setting the same quality penalty item in subsequent dynamic rewards.

[0041] To prevent the same medical task from being repeatedly unloaded during consecutive decision-making moments, the task processing state is further defined:

[0042] ;

[0043] in, Indicates medical tasks to be uninstalled At any moment Task processing state variables, This represents the decision state of the model-node. Indicates the data transmission status. This indicates a waiting or queuing status for resource access. Indicates the execution state of model inference. This indicates the task completion status.

[0044] The current set of medical agents for model-node decision-making medical tasks is defined as follows:

[0045] ;

[0046] After MAPPO determines the target model-node execution unit for medical tasks, local tasks directly enter the resource admission judgment, while remote tasks first enter... After the transmission is completed, the system enters the resource admission judgment stage, and proceeds according to the admission result. or Status, enter after completion Status. No new model-node selection actions will be generated until this task is completed.

[0047] When multiple tasks are generated continuously or concurrently by the same medical terminal, a queue of tasks to be decided on the terminal side can be maintained; the task processing status is set according to the specific task and does not affect the participation of subsequent new tasks of the same terminal in the model-node selection. Therefore, each medical terminal still corresponds to a medical intelligent agent.

[0048] S102, Obtain model-node capabilities and running status.

[0049] The system acquires information on the medical inference models deployed on the edge computing nodes, the running status of the model instances, and the resource status of the computing nodes, and forms multiple model-node execution units based on the deployment relationship between the medical inference models and the computing nodes.

[0050] Let the set of computing nodes in the system be . ,in, , and Let these represent the sets of computing nodes on the edge, device, and cloud sides, respectively; and let the set of medical inference models that the system can call be denoted as . ,in, Indicates the index of the medical inference model. This represents the total number of medical inference models that the system can call. The set of medical inference models currently deployed on node j is denoted as... ,when At that time, the node With medical reasoning models Combining to form a model - node execution unit The Indicates that it is composed of computing nodes and medical reasoning models The combined model-node execution unit is the basic action object for task unloading.

[0051] For medical reasoning models Define basic ability attributes:

[0052] ;

[0053] in, Medical reasoning model Basic ability attribute vectors This represents the set of medical task types supported by the model. This represents the inference service quality information of the model for different task types. and These represent the model's basic computational resource requirements and storage or memory resource requirements, respectively. Indicates the model size. (For task type) ,when When, it represents the model Supports the current medical task type and meets its minimum inference service quality requirements.

[0054] Considering the different actual service capabilities when the same model is deployed on different nodes, define the model-node service attributes:

[0055] ;

[0056] in, Representation Model Deployed on nodes The corresponding model-node service attributes, Representation Model Deployed on nodes The subsequent reasoning processing ability, and satisfying , This indicates the maximum number of concurrent tasks that the model instance can simultaneously enter the inference execution process.

[0057] For nodes Define resource status:

[0058] ;

[0059] in, Represents a node At any moment The resource state vector, and These represent the node's maximum computing resources and currently allocable computing resources, respectively. and These represent the node's maximum storage or memory resources and currently allocable storage or memory resources, respectively. Represents a node At any moment The load status can be determined by computing resource utilization, the number of tasks being executed, or a combination thereof; and can be set to... ,in, Represents a node At any moment The computing resources already occupied by the model's resident operation and task execution. The node's maximum resource capacity is used to determine the basic operating conditions of the model, and the node's currently allocable computing resources are used for task-level dynamic resource admission; when dynamic loading or resource reconfiguration is supported, the basic operating conditions of the model can be re-verified during the candidate set construction phase.

[0060] The running state of a model instance is defined as follows:

[0061]

[0062] in, Representation Model - Node Execution Unit At any moment The running status of the model instance. This indicates the number of tasks that have currently entered the inference and execution process. This indicates the maximum number of concurrent tasks for a model instance. This represents a queue of model instances waiting for data.

[0063] The model instance waiting queue records medical tasks that have met the resource access readiness conditions but have not yet entered inference execution. When used for feature encoding, it can be represented by statistical features such as the number of waiting tasks, remaining workload, queue head status, cumulative estimated processing time, or task level distribution to form a fixed-dimensional representation.

[0064] To reflect future loads where target model-node execution units have been identified but have not yet reached resource admission readiness, the set of in-transit tasks for model-nodes is further defined:

[0065] ;

[0066] in, Indicates at time The target execution unit has been identified as But still in The state model consists of a set of tasks in transit. Medical tasks within this set are in a state of... The status does not occupy concurrent location space for model instances or task-level inference computing resources. It can form fixed-dimensional on-the-way task load characteristics based on the number of tasks in transit, remaining data volume, estimated readiness time, and task level distribution, denoted as... .

[0067] For medical terminals With nodes Define network communication status:

[0068] ;

[0069] in, Indicates medical terminal With computing nodes Between moments The network communication state vector, Indicates medical terminal With nodes Available communication bandwidth between them This indicates the channel state or link quality parameters of the corresponding communication link. This indicates that the task data is from the medical terminal. Transmit to node Effective transmission rate at that time;

[0070] The effective transmission rate can be obtained by the network monitoring module or calculated based on parameters such as communication bandwidth and link status.

[0071] Define the model - node execution unit for the task Service availability status:

[0072] ;

[0073] in, Representation Model - Node Execution Unit For medical tasks to be uninstalled At any moment The service availability status indicator; when At this time, it indicates that the medical terminal can access the node. And the model The model instance is in a callable state that can accept tasks or allow tasks to enter a waiting-for-scheduling state. This value does not require the model instance to be currently idle.

[0074] For medical tasks to be uninstalled and model-node execution unit Define the task-related model - node execution unit state:

[0075] ;

[0076] in, Indicates medical tasks to be uninstalled With model-node execution unit At any moment The corresponding task-related model-node execution unit state vector uses the same definitions as above for model capabilities, service attributes, node resources, model instance state, in-transit load, network state, and service availability. The in-transit task load feature, together with the current execution and waiting states of the model instance, constitutes the task-related model-node state, which is used for subsequent encoding and cross-attention relationship extraction to reflect future task requests that have been selected by the execution unit but for which resources are not yet ready for admission.

[0077] S103, Construct the model - set of node execution units.

[0078] Based on the task requirements information and the model service capabilities, service availability status, and basic operating conditions of each model-node execution unit, a set of model-node execution units corresponding to the medical task to be uninstalled is constructed.

[0079] Set up medical tasks to be unloaded The corresponding model-node execution unit set is For medical terminals Let the set of computing nodes that it can currently access be denoted as . ,and ,but:

[0080] ;

[0081] in, Indicates medical tasks to be uninstalled At any moment The model - a collection of node execution units, and These represent the compute node index and the medical inference model index, respectively. This represents the set of currently accessible nodes. Represents a node The deployed medical inference model set, Representation Model - Node Execution Unit For medical tasks to be uninstalled The basic operating condition indicator is set to 1 when the node meets the basic computing and storage or memory resource requirements for model operation, and 0 otherwise. The basic operating conditions of a fixed deployment model can be verified during the deployment phase, while those of a dynamically loaded or elastically start-stop model are determined based on the current basic resource conditions.

[0082] The candidate set is used to determine whether the model-node execution unit has the basic qualifications to handle the current medical task; dynamic states such as model instance concurrency, node load, waiting queue and in-transit task load participate in subsequent relationship extraction, strategy evaluation and resource scheduling, but do not directly exclude the basic candidate qualifications of the execution unit.

[0083] When the model-node execution unit set is empty, the medical task remains in a state awaiting decision-making by the model-node execution unit, and the set is reconstructed after changes in the system state affecting candidate eligibility. Relationship encoding and action probability calculation are then performed when the candidate set is not empty. The system state includes: whether the computing node is accessible; whether the medical inference model has been deployed on the corresponding computing node and is in a callable state capable of accepting tasks or allowing tasks to enter a waiting-for-scheduling state; whether the medical inference model supports the current medical task type and meets the minimum inference service quality requirements of the medical task; and whether the computing node meets the basic computing resources and storage or memory resources required for the operation of the medical inference model.

[0084] Furthermore, to ensure that all medical agents entering the task-model node across the attention network and policy network have at least one executable action, the set of medical agents currently eligible to participate in the selection of the model-node execution unit is defined as follows:

[0085] ;

[0086] in, Indicates time The set of medical intelligent agents that are in the state of waiting for model-node execution unit decision-making and whose corresponding model-node execution unit set is not empty, and therefore can actually participate in the selection of model-node execution units in this round.

[0087] Only medical agents whose candidate sets are not empty participate in this round of relation extraction, action generation, and joint reward calculation; if there are no medical agents to participate in the selection at present, no joint action or corresponding updated sample will be generated in this round.

[0088] S104, based on task-model node cross-attention extraction of candidate relationships.

[0089] The task requirement information and the state information of each unit in the model-node execution unit set are feature-encoded. The task-side features are used as query information and the model-node execution unit features are used as key and value information. Cross-attention operation is performed on the query information and the key and value information of each model-node execution unit to obtain the association relationship between the task requirement information and each model-node execution unit, that is, the task-model node relationship representation.

[0090] For the medical task corresponding to the medical agent that can currently participate in the model-node execution unit selection, its task requirement information is input into the task feature encoding network to obtain the task-side latent feature representation:

[0091] ;

[0092] in, Indicates medical tasks to be uninstalled Task-side implicit feature representation This represents the task feature encoding function. This represents the network parameters used to encode task features.

[0093] For any The corresponding model-node execution unit state Input model - node execution unit encoding network, to obtain the hidden feature representation of the execution unit:

[0094] ;

[0095] in, Representation Model - Node Execution Unit The corresponding latent feature representation, This represents the feature encoding function of the candidate execution unit. This represents the network parameters encoding the features of the candidate execution unit.

[0096] The task side represents the generation of a query vector, and each execution unit represents the generation of a key vector and a value vector:

[0097] ;

[0098] ;

[0099] ;

[0100] The correlation score between the task and the candidate execution unit is:

[0101] ;

[0102] in, , and These represent the trainable mapping parameters corresponding to the query feature, key feature, and value feature, respectively. This indicates the query features corresponding to the current medical task. and These represent the model and node execution units, respectively. The corresponding key features and value features, Indicates medical tasks to be uninstalled With candidate execution units The correlation score between them; This represents the common feature dimension when performing association calculations between query features and key features.

[0103] After normalization, the cross-attention association weights are obtained:

[0104] ;

[0105] The normalization range is ;

[0106] in, This represents the current medical task and model - node execution unit. Cross-attention association weights; these association weights are used to describe the strength of the relationship between tasks and candidate execution units.

[0107] For specific candidate execution units, a candidate-level relationship is formed:

[0108] ;

[0109] And form a comprehensive relational representation of the candidate set:

[0110] ;

[0111] The candidate-level task-model node relationship representation Comprehensive Relationship with Candidate Set Together, they constitute the task-model node relationship representation corresponding to the current medical task, and serve as the input for subsequent policy network to evaluate the actions of model-node execution units.

[0112] Medical mission level It is included in the task requirement information and formed into task-side implicit feature representation and query features through task feature encoding. Therefore, it can participate in the extraction of the association relationship between the current medical task and different candidate model-node execution units before the model-node execution unit action is generated.

[0113] S105, based on MAPPO to generate a joint model - node task offloading strategy.

[0114] The task-model node relationship is represented as the policy network of the multi-agent proximal policy optimization algorithm. Each medical agent determines the target model-node execution unit within its corresponding set of model-node execution units. The target model-node execution units of each medical agent are combined into a joint model-node task offloading strategy.

[0115] In this embodiment, each medical terminal acts as a medical intelligent agent. The current model-node execution unit set directly determines the effective discrete action space of the corresponding medical intelligent agent, which is as follows:

[0116] ;

[0117] in, This represents the set of valid discrete actions determined by the current model-node execution unit set. Indicates medical intelligent agent Select Model - Node Execution Unit A corresponding discrete action.

[0118] The policy network calculates an action evaluation value for each candidate model-node execution unit:

[0119] ;

[0120] in, Candidate model - node execution unit The corresponding unnormalized action evaluation value, This represents the policy network action evaluation function. This represents the network parameters for the action evaluation part; and the action probability is obtained:

[0121] ;

[0122] in, This represents the raw observation information from the local part of the medical intelligent agent. Starting from this point, after task feature encoding, execution unit feature encoding, extraction of cross-attention relationships between task and model nodes, and action evaluation, an overall policy mapping of action probabilities is formed. This represents the overall parameters of the strategy side; This represents local observation information, which includes at least the current medical task requirements and the corresponding model-node execution unit status information.

[0123] Determine the medical intelligent agent based on the aforementioned action probability. Corresponding selection action The model-node execution unit This refers to the target execution unit of the current medical task. The target model-node execution unit combination of each selectable medical agent forms a joint model-node task offloading strategy.

[0124] Multiple medical agents can choose the same model instance or different model instances on the same node, thus forming a competition for concurrent model instance resources and shared node computing resources. The relevant admission results are determined based on the dynamic resource status after the joint model-node task offloading strategy is formed.

[0125] The MAPPO algorithm adopts a centralized update and distributed execution mechanism: in the update phase, the centralized value network estimates the value based on global state information; in the execution phase, each medical agent generates a model-node execution unit selection action based on the task-model node relationship representation and policy network.

[0126] S106, determine the resource access readiness status and perform service ordering and dual resource joint access.

[0127] Based on the target execution location and task data transmission status of the target model-node execution unit, the resource access readiness status of the corresponding medical task is determined. Medical tasks that were previously in a waiting state and those that have newly reached the resource access readiness status are unified into a set of tasks to be admitted. Within the set of tasks to be admitted, the task service priority relationship is determined according to the medical task level and the initial time limit margin. According to the task service priority relationship, combined with the concurrent service capacity of the corresponding medical inference model instance and the allocable computing resources of the computing node, joint resource admission is performed. Medical tasks that do not meet the resource admission conditions are queued. The initial time limit margin is determined before the queuing waiting delay added in this resource admission sorting is taken into account.

[0128] S1061, Task transfer and resource access ready.

[0129] The joint model-node task offloading strategy only determines the target model-node execution unit of the task and does not indicate that the remote task has occupied the model concurrency position or task-level computing resources of the target node.

[0130] For medical tasks to be uninstalled At the decision-making moment of the joint model-node task offloading strategy Select Model - Node Execution Unit The situation is defined from the decision moment. The amount of data that still needs to be transmitted is When node j is a local endpoint node, When node For edge or cloud nodes, and using the following fraction to calculate the remaining transmission delay, the current effective transmission rate satisfies... , .in, Indicates medical tasks to be uninstalled Node-oriented The remaining transmission delay, Indicates the moment of decision-making Medical tasks to be uninstalled The amount of data still to be transmitted This indicates the current effective transmission rate.

[0131] The time when the task data is expected to reach the target node and meet the resource access readiness conditions is: ,in, This represents the medical task to be unloaded, obtained based on the network state estimation at the decision time. Reaching the node And the expected time when the resource access readiness conditions are met. This indicates the decision-making moment generated by the joint model-node task offloading strategy. This represents any resource admission scheduling moment after the decision moment, used to update task data arrival, resource admission, and queuing status. The estimated resource admission readiness time is used to estimate the task arrival time based on the current transmission and network status; during actual execution, local tasks are resource-ready after the model-node execution unit selection is completed, while remote tasks use the actual transmission completion as the resource admission readiness condition.

[0132] Define resource admission ready indicators:

[0133] ;

[0134] in, Indicates medical tasks to be uninstalled Node-oriented During resource access scheduling Resource access readiness indicators, medical missions in The value is 1 when the resource access readiness condition is always met, and 0 otherwise. When the resource access readiness indicator is 0, the remote task remains active. Status: When it is 1, the task enters the unified waiting admission process.

[0135] S1062, Unify the set of tasks awaiting admission.

[0136] At any given time of resource access scheduling, those already in a certain position will be subject to further restrictions. The state and the target execution unit is The task is treated as an old set of waiting tasks, and the task that first meets the resource access readiness condition and whose target execution unit is in this round is... The tasks are set as a new set of ready tasks:

[0137] ;

[0138] in, and These represent the set of newly ready tasks and the set of existing waiting tasks, respectively.

[0139] The unified model-level admission set is The node-level admission set is: .

[0140] Among them, the model-level admission set Used to maintain the correspondence between medical tasks and their target medical inference model instances, in order to determine the concurrent service conditions of model instances; node-level set of candidates to be admitted. This node-level aggregation is used to aggregate different model instances corresponding to pending tasks with the same target execution node, in order to coordinate the competition for shared computing resources on the same computing node. This node-level aggregation does not change the already determined target model-node execution unit for each medical task.

[0141] S1063, Service sorting based on medical task level and initial time limit margin.

[0142] To avoid interdependence between queuing order and queuing delay, an initial time margin is calculated before determining the additional queuing time. For remote tasks that are already resource-admitted and ready, the current remaining transmission delay is 0, but this term is retained in the formula to maintain consistency with the unified delay model.

[0143] ;

[0144] in, This indicates the initial time margin used for resource admission prioritization. This represents the estimated inference delay of the complete model before inference has even begun.

[0145] The expected model inference latency can be achieved by using Alternatively, based on the node's current load, actual resource allocation, and model runtime configuration, Dynamic correction.

[0146] The pending entry task has not yet started inference, therefore the initial time margin uses the full estimated inference delay; task entry After the state is changed, the relevant time margin is updated according to the remaining model inference delay.

[0147] For the node-level set of candidates to be admitted Medical tasks in the game are first determined according to the medical task level. Determine the service sequence; for medical tasks of the same level, determine the initial time margin. Further determine the service order, with medical tasks having smaller initial time margins receiving higher service priority; for medical tasks with the same medical task level and initial time margin, priority is given based on task arrival time. Further determine the service sequence.

[0148] S1064, Model Instance - Node Dual Resource Joint Admission.

[0149] For medical tasks to be uninstalled In the model-node execution unit The task-level incremental computing resources required after entering the inference execution phase are defined. This indicates that the medical task is to be uninstalled. During resource access scheduling Enter the model - node execution unit The task-level incremental computing resources required for the inference execution phase.

[0150] The resources for model instances that are constantly running have been included in the resources already used by the node, and the incremental computing resources at the task level will not be counted again for this part of the resources.

[0151] During scheduling The current available concurrent positions for model instances are determined by and It was jointly determined that the node's allocable computing resources are For a task to begin execution, the following conditions must be met simultaneously:

[0152] ;

[0153] as well as:

[0154] ;

[0155] The medical task only begins when both the concurrency conditions of the model instances and the allocable computing resources of the nodes are met. State; maintained if any condition is not met. However, this does not terminate the assessment of resource conditions for other pending medical tasks. Resource conditions are assessed task by task according to the service order determined by the medical task level, initial time margin, and task arrival time. Tasks meeting both conditions are admitted. And update resource status; tasks that do not meet the conditions are retained. Meanwhile, continue to check subsequent tasks to avoid unnecessary node-level queue head blocking.

[0156] As one implementation method, medical tasks that have entered the model inference execution state adopt a non-preemptive execution method, that is, after the task enters the model inference execution state, it continues to execute until the current inference process is completed.

[0157] As one implementation method, the above resource access process is explained below with reference to specific numerical values:

[0158] Assume three medical intelligent agents , and Each generates a medical task to be uninstalled. , and ,and In this embodiment, a higher medical task level value represents a higher priority of business services. After constructing the model-node execution unit set, extracting the cross-attention relationship between task and model nodes, and evaluating the actions of the model-node execution units in the policy network, all three medical agents determine to select the high-capability medical inference model on the first edge node at the same policy decision time. That is, the target model - node execution unit is:

[0159] ;

[0160] in, Indicates the first edge node. This indicates that the maximum number of concurrent tasks in the high-capacity medical inference model is... .

[0161] Once the model-node execution units for the three tasks are selected, if their input data is not yet located at the first edge node, they will enter the data transmission state respectively, and the expected resource admission ready time will be obtained based on their respective effective transmission rates. , and .

[0162] During resource access scheduling At that moment, the resource access readiness condition will be newly met and the target model-node execution unit will be... The medical missions constitute a new set of ready missions. and at time t′ still in The set of old waiting tasks in the state Merge to form a model-level set of tasks to be admitted. Telemedicine missions that have not yet met the resource access readiness criteria will remain in a state of flux. The state does not occupy the concurrent service location of the corresponding model instance, nor does it occupy task-level model inference computing resources.

[0163] Further assuming the same resource admission scheduling time Three medical tasks awaiting uninstallation , and All have met the resource admission readiness conditions and have been included in the set of tasks to be admitted in the target model-node execution unit. ; ; t′ immediately preceding the resource admission scheduling time, the number of tasks currently being executed by the model instance satisfies Furthermore, the currently available computing resources on the node are sufficient to support the simultaneous entry of the two medical tasks with the highest service priority into the model inference execution process. The system calculates the initial time margin for resource admission scheduling for each of the three tasks at the current time. .because ,Task and All take priority over tasks If further satisfied In the same level of tasks Priority over If two medical tasks of the same level have the same initial time margin, the service order will be determined based on the arrival time of the corresponding tasks, with the medical task that arrives earlier taking priority.

[0164] Therefore, under the above conditions in this embodiment, the two available concurrent locations are respectively determined by... and Occupy, both enter state, Enter Status. As a supplement to the above resource admission process, when there is a medical task ranked high in the node-level task set to be admitted on the same node, but the current concurrent service conditions of its target model instance are not met, the system keeps the medical task in the WAIT state and continues to check whether subsequent medical tasks to be admitted can utilize other model instances and remaining node computing resources, thereby avoiding unnecessary node-level head-of-line blocking caused by the temporary unavailability of a single target model instance.

[0165] In the above scenario, the waiting and resource competition results affect the model-node related time margin and the expected urgency of the decision moment. The joint strategy reward is fed back to MAPPO, enabling multiple medical agents to gradually form a coordinated model-node execution unit selection strategy that takes into account task level, time limit status, model concurrency capability and node resource conditions.

[0166] S107, Determine the model-node related time margin and its predicted decision time.

[0167] Based on the data transmission, task queuing, and model inference status of the medical task to be unloaded, the model-node related time margin of the medical task under the target model-node execution unit is determined. At the decision time of generating the joint model-node task unloading strategy, the subsequent data transmission, resource access, queuing, and model inference processes are predicted based on the system state known at the decision time, and the predicted value of the model-node related time margin is obtained.

[0168] S1071, Model-Node Related Time Margin.

[0169] Based on the remaining execution time of the model instance, the release time of concurrent positions, the service order of pending admission tasks, the release status of node resources, and the estimated inference time of the task, the estimated start time of the task entering the model inference execution process is determined. Historical time that has already been waited or executed is not counted again in the subsequent remaining latency. This is based on the current resource admission scheduling time. The remaining estimated queuing time is as follows:

[0170] ;

[0171] in, Indicates the time since the current resource admission scheduling. The estimated remaining queueing time is still pending. This indicates the expected start time for entering the model inference execution process; This indicates the expected resource access readiness time. Tasks that are not yet resource access ready will use the expected resource access readiness time as the time base for future access participation, while tasks that are already resource access ready will have their remaining queuing delay calculated from the current resource access scheduling time.

[0172] by Indicates an arbitrary reference time: the task is at... or Furthermore, before inference begins, the remaining model inference latency equals the expected full inference latency; Only the time for incomplete reasoning is counted; in the process of... The time is taken as 0. At the reference time... The remaining transmission, queuing, and inference delays are only included in the corresponding processing that has not yet occurred after that moment.

[0173] Based on any reference time The time already consumed, plus the remaining transmissions, queuing, and model inference processes still required from this reference time, will place the medical task within the model-node execution unit. The total completion time is uniformly represented as:

[0174] ;

[0175] in, Indicates medical tasks to be uninstalled In the model-node execution unit Below, at any reference time The total completion delay is calculated based on "time consumed + remaining time". Indicates reference time The remaining model inference latency that has not yet been completed.

[0176] Accordingly, any reference time The model-node related time margin is uniformly defined as follows:

[0177] ;

[0178] in, Represents any reference time Medical tasks to be uninstalled For model-node execution units The model-node related time margin, the smaller the value, the greater the expected completion pressure under the selected model-node execution unit.

[0179] In the actual execution chain, the reference time is taken as the resource admission scheduling time. At that moment, based on the updated task status, remaining transmission status, remaining queuing status, and remaining inference status, the time margin related to the same model-node is updated in real time. The initial time margin is used for resource admission ranking, and the model-node related time margin is used for subsequent dynamic completion stress evaluation.

[0180] S1072, Decision-making time prediction model - node-related time margin.

[0181] To ensure that the rewards and the joint model-node task offloading strategy adopt a consistent time base, at the decision time t when the joint model-node task offloading strategy is generated, the subsequent transmission, resource access, queuing and model inference processes of the task are predicted based on the known system state at that time, so as to obtain the expected total completion delay and the expected model-node related time margin corresponding to the decision. Tasks generated after the decision time and which are not yet known are not included in this prediction.

[0182] The expected total completion time and the expected model-node related time margin are expressed as follows:

[0183] ;

[0184] ;

[0185] in, Indicates the moment of decision The i-th medical task to be uninstalled For model-node execution units The model-node related time margin is the predicted value, where j represents the computation node and m represents the medical inference model; Indicates the moment of strategic decision-making The estimated total completion time is predicted based on the known state. Indicates the moment of decision Time already consumed; Indicates the moment of decision Estimated remaining transmission delay; Indicates the moment of decision Expected queuing delay; Indicates the moment of decision Expected model inference latency.

[0186] Specifically, the estimated remaining transmission delay, estimated queuing delay, and estimated inference delay at the decision-making time are determined by the current transmission state, the known pending tasks and resource states, and the current model-node execution unit selection result, respectively. The initial time margin is used for resource admission sorting, the model-node related time margin during actual execution is used for runtime state updates, and the estimated model-node related time margin at the decision-making time is used for policy evaluation and dynamic rewards.

[0187] S108 forms task-level rewards and aggregates them into joint strategy rewards.

[0188] The basic weights of task completion delay, task processing energy consumption, and task timeout evaluation are determined based on the medical task level. The relative weights of task completion delay, task processing energy consumption, and task timeout evaluation are adjusted according to the predicted values ​​to obtain the task-level reward of the medical task. The task-level rewards of multiple medical intelligent agents are aggregated to form a joint strategy reward.

[0189] S1081, estimated energy consumption, overtime assessment, and real-time urgency.

[0190] During the strategy evaluation phase, using the decision time t generated by the joint model-node task offloading strategy as a benchmark, and based on the current joint model-node execution unit selection results and the known environmental state at the decision time, the expected task processing energy consumption of the medical task under the selected target model-node execution unit is determined:

[0191] ;

[0192] in, This indicates the target model for the current medical task selection - node execution unit. The corresponding estimated energy consumption for task processing, This indicates the estimated energy consumption for data transmission during the mission. This represents the estimated energy consumption for model inference; all estimated energy consumption values ​​above are based on the decision time. The available information forms the basis of the computation. When the medical task selects a local edge model-node execution unit, the expected data transmission energy consumption is 0; when the medical task selects an edge node or cloud node model-node execution unit, the expected data transmission energy consumption can be determined based on the decision time. Given the known data size, transmission power, and effective transmission rate, the expected model inference energy consumption can be determined based on the task execution power and expected model inference latency corresponding to the current medical task processed by the target model-node execution unit.

[0193] Based on the decision-time prediction model and node-related time margin, the predicted timeout evaluation quantity can be defined in binary form:

[0194] ;

[0195] in, Indicates medical tasks to be uninstalled At the moment of decision For model-node execution units The expected task timeout evaluation score. Alternatively, the expected task timeout evaluation score can be a continuous timeout evaluation score based on the degree of expected timeout:

[0196] ;

[0197] The estimated real-time urgency is determined based on the decision-time prediction model and the node-related time margin:

[0198] ;

[0199] in, Indicates the expected level of urgency in real time. This represents the mapping function from the expected model-node-related time margin at the decision-making moment to the expected real-time urgency. The mapping satisfies as follows Decrease The level of urgency is not expected to decrease.

[0200] One implementation method:

[0201] ;

[0202] in Indicates that the input will be entered. Limited to the range The estimated task processing energy consumption and estimated timeout evaluation are used as energy consumption and timeout evaluation in the task-level reward, and the estimated real-time urgency is used to dynamically adjust the weights of latency, energy consumption, and timeout evaluation.

[0203] S1082, Level-Urgency Dynamic Rewards.

[0204] According to medical task level Determine the basic evaluation weight vector:

[0205] ;

[0206] in, Indicates the level of medical tasks The corresponding basic evaluation weight vector, , and These represent the medical task levels. The corresponding basic evaluation weights for latency, energy consumption, and timeout.

[0207] As one implementation method, the weights of each basic evaluation are taken as positive values ​​and can be normalized to make... The specific values ​​for the basic latency, energy consumption, and timeout evaluation weights can be determined based on the medical task level and optimization objectives.

[0208] As one implementation method, the unnormalized weights are dynamically adjusted based on the anticipated real-time urgency at the decision-making time:

[0209] ;

[0210] ;

[0211] ;

[0212] in, , and These represent the weights for dynamic latency, dynamic energy consumption, and dynamic timeout evaluation before normalization, respectively. , and These represent dynamic adjustment coefficients for the evaluation weights of latency, energy consumption, and timeout, respectively. These dynamic adjustment coefficients increase the evaluation weights for latency and timeout, and decrease the evaluation weight for energy consumption, when the anticipated real-time urgency increases. As one implementation method, this can be achieved by... .

[0213] Let the sum of the three be the normalization factor, then the normalized dynamic weights are:

[0214] ;

[0215] ;

[0216] ;

[0217] Normalize the estimated total completion time and estimated task processing energy consumption at the decision point:

[0218] , ;

[0219] in, This represents the time delay evaluation quantity obtained by normalizing the expected total completion time according to the maximum allowable completion time limit; This represents the energy consumption assessment quantity obtained by normalizing the expected task processing energy consumption to a reference energy consumption level; Indicates medical tasks to be uninstalled The positive reference energy consumption can be determined based on the task's energy consumption limit, the historical energy consumption of similar tasks, or the system's baseline energy consumption.

[0220] Based on the current joint model - node execution unit selection results and environmental state formation, the task-level current decision evaluation reward corresponds to decision time t:

[0221] ;

[0222] in, Indicates medical intelligent agent At the moment of decision Corresponding task-level current decision evaluation reward; three items These are the normalized dynamic latency, energy consumption, and timeout evaluation weights, respectively. and These are the normalized time delay and energy consumption evaluation metrics, respectively. This indicates the estimated timeout evaluation amount for the task.

[0223] when At that time, the corresponding task-level rewards are aggregated, for example, by using an average method:

[0224] ;

[0225] in, This represents the joint policy reward at the current policy decision moment. This indicates the number of medical agents currently participating in the selection of the model-node execution unit.

[0226] The latency, energy consumption, timeout evaluation quantity, and real-time urgency used in this section for reward formation are all based on the decision-making time generated by the joint model-node task offloading strategy. Based on the formation of the baseline; resource access scheduling time The actual execution results are used to update the task readiness, admission, and queuing status of the chain, and are used to update the environment status and evaluation data.

[0227] S109 updates the policy-side network parameters and introduces a continuous learning mechanism.

[0228] The policy network and value network of the MAPPO algorithm are updated based on the joint policy reward, and a continuous learning mechanism is introduced during the update process to obtain a model-node offloading policy network for multi-medical agent collaboration.

[0229] S1091, Basic Policy Update In this embodiment, the update phase is separated from the execution phase.

[0230] During the update phase, policy decision samples are formed based on the current scheduling trajectory and network parameters are updated. During the execution phase, only the updated policy network is used to generate the model-node execution unit to select actions. The centralized value network does not participate in real-time action generation, and parameter gradient updates are not performed during a single real-time task processing.

[0231] Combination Figure 3 The strategy update and continuous learning process shown calculates the time difference error based on the value estimation of the centralized value network and the joint policy reward:

[0232] ;

[0233] in, This represents the time difference error corresponding to the current joint model-node decision sample. Discount factor; and These represent the centralized state value estimates at the current policy decision time and the next policy decision time, respectively. This indicates that the centralized value network at the strategic decision-making moment Received global state, This represents the parameters of a centralized value network.

[0234] Based on the aforementioned time difference error, a collaborative advantage estimate of the current joint model-node decision samples is formed. As one implementation method, a generalized advantage estimation method can be used. This collaborative advantage estimate is denoted as... The aforementioned This serves as a shared advantage signal for medical agents participating in model-node selection at the current decision-making moment when updating their strategies.

[0235] For medical intelligent agents The strategy probability ratio is:

[0236] ;

[0237] in, Indicates medical intelligent agent At the moment of decision The ratio of policy probabilities to the corresponding effective policy samples. This represents the reference old policy parameters used to generate the current training trajectory or the current policy update batch, and remains fixed during the current policy update process.

[0238] Only the set of medical agents currently eligible to participate in model-node selection. The effective policy decision samples are used for calculating the policy probability ratio and the truncated agent objective. The MAPPO truncated agent objective can be expressed as:

[0239] ;

[0240] in, This indicates the truncated agent target for MAPPO policy updates. This represents the expected value or sample average of the effective policy decision samples in the current MAPPO training batch. This indicates the range of truncation parameters for MAPPO policy updates.

[0241] The strategy-side parameters include task encoding, candidate execution unit encoding, task-model node cross-attention relationship extraction, candidate relationship fusion, and actor action evaluation parameters.

[0242] Therefore, dynamic rewards can optimize the reverse update task-model node relationship extraction and Actor action evaluation parts through the MAPPO strategy.

[0243] The loss of a centralized value network can be expressed as:

[0244] ;

[0245] in, This indicates the loss of a centralized value network. This represents the cumulative return or value learning objective obtained from the combined strategy reward sequence.

[0246] The policy side updates policy parameters by truncating the agent target through the MAPPO, and the centralized value network updates value-side parameters according to the value learning target of the current joint trajectory.

[0247] S1092, based on the historically effective model - continuous learning of node execution units.

[0248] Continuous learning training is performed based on the basic MAPPO policy training to adapt to changes in medical task distribution, model deployment relationships, and long-term resource environment. This continuous learning training is part of the policy training phase and does not participate in the real-time model-node action generation, task transmission, resource access, queuing, and model inference execution processes of a single medical task.

[0249] During the basic strategy training process or the long-term data collection process of the system, a historical medical scheduling memory set can be established:

[0250] ;

[0251] in, Represents a collection of historical medical scheduling memories. Indicates the first A historical memory of medical dispatch, Indicates the number of historical medical scheduling memories, subscript It signifies continuous learning.

[0252] Each historical medical scheduling memory includes at least the historical scheduling state, the historical feasible model-node candidate execution set, the historical reference task-model node relationship distribution, and the historical reference model-node action distribution; the historical reference relationship distribution and action distribution are used as fixed reference quantities in the current continuous learning and training and do not participate in gradient updates.

[0253] During continuous learning and training, the current feasible model-node candidate execution set is reconstructed in the current environment based on the candidate qualification rules of the aforementioned step S103, and aligned with the historical candidate set according to the model-node execution unit identity.

[0254] ;

[0255] in, Indicates the first The historical effective model - node candidate set corresponding to each historical medical scheduling memory; Indicates the first Historical feasible models in the memory of medical scheduling - candidate execution set of nodes; Indicates according to the first A set of candidate execution nodes that represents a current feasible model reconstructed from historical medical scheduling memories in the current environment.

[0256] The historical effective model-node candidate set is obtained by taking the intersection of the historical candidate set and the currently reconstructed candidate set according to the alignment of node identifier and model identifier; relation consistency and policy consistency are calculated only on the effective intersection.

[0257] On the historical effective model-node candidate set, the distribution of the current task-model node relationship is compared with the distribution of the historical reference relationship to form a relationship consistency loss:

[0258] ;

[0259] in, Indicates the loss of relational consistency. This represents the expectation based on historical medical scheduling memory and corresponding valid candidates. This function represents a measure of the difference between the historical reference relationship distribution and the current relationship distribution. This represents the distribution of historical reference task-model node relationships. This represents the current task-model node relationship distribution obtained from the current policy-side network.

[0260] On the same historically valid model-node candidate set, compare the current Actor model-node action distribution with the historical reference action distribution to form a policy consistency loss:

[0261] ;

[0262] in, This represents the loss due to policy consistency. This function represents a measure of the difference between the historical reference action distribution and the current action distribution. Represents the historical reference model - node action distribution. This represents the current model-node action distribution.

[0263] During the continuous learning phase, the current medical scheduling trajectory continues to be trained according to the MAPPO strategy. The historical medical scheduling memory is only used to form relationship consistency and strategy consistency constraints, and is not used to recalculate the generalized dominance estimate or MAPPO strategy probability ratio of the historical trajectory.

[0264] As one implementation method, when updating policy network parameters by minimizing the loss function, the negative of the aforementioned MAPPO truncated agent target, or its equivalent policy-side optimization loss, can be denoted as... The policy-side loss during the continuous learning and training phase can be expressed as:

[0265] ;

[0266] in, The total policy-side loss during the continuous learning phase is composed of the MAPPO policy-side loss, relation consistency loss, and policy consistency loss of the current trajectory, weighted average. and These represent the non-negative weight coefficients for relational consistency loss and policy consistency loss, respectively; the centralized value network is still updated according to the current medical scheduling trajectory.

[0267] like Figure 4 As shown, this embodiment provides an electronic device including: one or more processors; and a memory for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors perform steps S101 to S109 in the aforementioned method embodiment.

[0268] The processor controls the overall operation of the electronic device and executes the programs stored in the memory to implement the functions of the aforementioned modules. The memory can be used to store computer programs and process data, such as the task requirement information, the model-node execution unit set, and the set of tasks to be admitted. The memory can be any form of computer-readable storage medium, such as random access memory, read-only memory, or flash memory. The electronic device may also include a communication interface for data interaction with various medical terminals and edge computing nodes. It should be noted that the electronic device in this embodiment may also include other general-purpose components (input devices, display devices, etc.), which are not limited in this invention.

[0269] This embodiment provides a computer-readable storage medium storing a computer program. When executed by a processor, the program implements steps S101 to S109 in the aforementioned method embodiment. The computer-readable storage medium includes, but is not limited to, random access memory, read-only memory, flash memory, magnetic disk, and optical disk.

[0270] The above embodiments illustrate the basic principles and implementation methods of the present invention, aiming to help understand the core concept and key steps of the invention. It should be understood that these embodiments are merely examples and do not limit the scope of application of the present invention. Those skilled in the art, based on their understanding of the concept of the present invention, can make various equivalent improvements to specific steps, parameter configurations, or system structures. These improvements also fall within the protection scope of the present invention, as defined in the appended claims.

Claims

1. A multimodal task offloading method for edge-cloud collaboration in smart healthcare, characterized in that, Includes the following steps: The system acquires the medical tasks to be unloaded generated by each medical terminal, models each medical terminal as a medical intelligent agent, and acquires the task type, medical task level, task data scale, computing requirements, task arrival time, maximum allowable completion time limit and minimum inference service quality requirements of the medical tasks to be unloaded, forming task requirement information. The system acquires information on the medical inference models deployed on the edge computing nodes, the running status of the model instances, and the resource status of the computing nodes, and forms multiple model-node execution units based on the deployment relationship between the medical inference models and the computing nodes. Based on the model service capabilities, service availability status, and basic operating conditions of each model-node execution unit, a set of model-node execution units corresponding to the medical tasks to be unloaded is constructed based on the task requirement information. The task requirement information is feature-encoded to obtain task-side features. The features of each unit in the model-node execution unit set are also feature-encoded to obtain model-node execution unit features. The task-side features are used as query information, and the model-node execution unit features are used as key and value information. Cross-attention operation is performed on the query information and the key and value information of each model-node execution unit to obtain the task-model node relationship representation. The task-model node relationship is input into the policy network of the multi-agent proximal policy optimization MAPPO algorithm. Each medical agent determines the target model-node execution unit within the model-node execution unit set, and the determined target model-node execution units are combined into a joint model-node task offloading strategy. Within the set of tasks to be admitted, the priority relationship of task services is determined based on the medical task level and the initial time limit margin. In accordance with the priority relationship of task services, combined with the concurrent service capabilities of the corresponding medical inference model instance and the allocable computing resources of the computing node, joint resource admission is performed to queue up medical tasks that do not meet the resource admission conditions. Based on the data transmission, task queuing, and model inference status of the medical task to be unloaded, the relevant time margin of the medical task in the target model-node execution unit is determined, and at the decision moment of generating the joint model-node task unloading strategy, its subsequent data transmission, resource access, queuing, and model inference process are predicted to obtain the expected value of the model-node relevant time margin. The task-level reward for the medical task is obtained based on the medical task level and the expected value. The task-level rewards of multiple medical agents are aggregated to form a joint strategy reward. The policy network and value network of the MAPPO algorithm are updated based on the joint policy reward, and a continuous learning mechanism is introduced in the update process to obtain a model-node offloading policy network for multi-medical agent collaboration.

2. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 1, characterized in that, The method for obtaining the set of tasks to be admitted includes: determining the resource admission readiness status of the corresponding medical task to be uninstalled based on the target execution position and task data transmission status of the target model-node execution unit; and unifying the medical tasks to be uninstalled that were previously in a waiting state with the medical tasks to be uninstalled that have newly reached the resource admission readiness status to form a set of tasks to be admitted.

3. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 2, characterized in that, The determination of the resource access readiness status of the corresponding medical task to be uninstalled specifically includes: Medical tasks awaiting unloading whose target model-node execution unit is located on an edge computing node reach the resource admission ready state once the target model-node execution unit is determined. Medical tasks awaiting unloading whose target model-node execution unit is located on an edge computing node or a cloud computing node reach the resource admission ready state after the task data is transmitted to the corresponding computing node. Before reaching the resource admission ready state, the medical tasks awaiting unloading do not occupy the concurrent service location and task-level inference computing resources of the target model instance. Medical tasks awaiting unloading whose target model-node execution unit has been determined but have not reached the resource admission ready state are regarded as in-transit tasks, and their in-transit load participates in the feature encoding.

4. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 1, characterized in that, The method for determining the initial time margin specifically includes: Based on the maximum allowed completion time limit in the task requirement information, the time already consumed up to the current resource admission scheduling time, the current remaining transmission delay, and the expected model inference delay, the initial time limit margin is determined as follows: ; in, For the i-th medical task to be uninstalled For model-node execution units The initial time margin, j represents the computation node, and m represents the medical inference model. Indicates the current resource access scheduling time. , , and These represent the maximum allowed completion time limit, the time already consumed, the remaining transmission delay, and the expected model inference delay, respectively.

5. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 1, characterized in that, The method for calculating the predicted value of the model-node related time margin is based on the difference between the maximum allowable completion time of the medical task to be unloaded and the predicted total completion time, as shown in the following formula: ; ; in, Indicates the moment of decision The i-th medical task to be uninstalled For model-node execution units The model-node related time margin is the predicted value, where j represents the computation node and m represents the medical inference model; Indicates the moment of strategic decision-making The estimated total completion time is predicted based on the known state. Indicates the moment of decision Time already consumed; Indicates the moment of decision Estimated remaining transmission delay; Indicates the moment of decision Expected queuing delay; Indicates the moment of decision Expected model inference latency.

6. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 1, characterized in that, The task-level rewards are determined as follows: The total time delay required for the medical task to be unloaded from the arrival of the task to its expected completion is normalized according to the maximum allowable completion time limit to obtain the time delay evaluation quantity; the expected task processing energy consumption is normalized according to the reference energy consumption to obtain the energy consumption evaluation quantity; when the expected value is negative, the ratio of the absolute value of the expected value to the maximum allowable completion time limit is used as the expected task timeout evaluation quantity; when the expected value is non-negative, it is zero. The relative weights of task completion delay, task processing energy consumption, and task timeout evaluation are applied to the delay evaluation, energy consumption evaluation, and expected task timeout evaluation, respectively, and then summed and negativeed: ; in, This represents the i-th medical task to be uninstalled. At the moment of decision Task-level rewards , and represents the relative weights of task completion latency, task processing energy consumption, and task timeout evaluation, adjusted based on predicted values, respectively; j represents the computing node; and m represents the medical inference model. and These represent the time delay evaluation quantity and the energy consumption evaluation quantity, respectively. The estimated task timeout evaluation value is represented by: the estimated task processing energy consumption is composed of the estimated task data transmission energy consumption and the estimated model inference energy consumption; when the target model-node execution unit is located on the edge computing node, the estimated task data transmission energy consumption is zero; the reference energy consumption is the preset positive reference energy consumption of the medical task to be unloaded; the joint strategy reward is determined according to the average value of the task-level rewards of the medical agents participating in the model-node selection.

7. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 6, characterized in that, The relative weights of task completion latency, task processing energy consumption, and task timeout evaluation are adjusted based on the predicted values, specifically including: Based on the predicted values, the expected real-time urgency level is determined as follows: ; in, This represents the i-th medical task to be uninstalled. For the target model - node execution unit The estimated real-time urgency level, where j represents the computing node and m represents the medical inference model. This indicates the maximum allowed completion time for the medical task to be uninstalled. Indicates the moment of decision The corresponding expected model - node-related time margin, Indicates will Limited to the range; The relative weights of task completion delay, task processing energy consumption, and task timeout evaluation are adjusted based on the base weights determined by the medical task level and the estimated real-time urgency, as follows: ; ; ; in, , , These represent the medical tasks to be uninstalled. The basic weights for task completion delay, task processing energy consumption, and task overtime evaluation are determined based on the medical task level. , , It is a non-negative adjustment coefficient; , , After normalization, the relative weights of the adjusted task completion delay, task processing energy consumption, and task timeout evaluation are used. Normalization makes the sum of the three equal to 1. The value of the adjustment coefficient increases the relative weights of the expected real-time urgency evaluation and timeout evaluation, and decreases the relative weight of the energy consumption evaluation after normalization.

8. The multimodal task offloading method for edge-cloud collaboration in smart healthcare according to claim 1, characterized in that, The introduction of a continuous learning mechanism specifically includes: Establish historical medical scheduling memory, which includes historical scheduling status, historical model-node execution unit set, historical reference task-model node relationship distribution, and historical reference model-node action distribution; Based on the identity of the model-node execution unit, the historical model-node execution unit set is aligned with the current model-node execution unit set reconstructed in the current system environment, and the intersection of the two is taken to form the historical valid model-node execution unit set; On the set of historical effective model-node execution units, a relationship consistency constraint is formed based on the difference between the current task-model node relationship distribution and the historical reference task-model node relationship distribution, and a policy consistency constraint is formed based on the difference between the current model-node action distribution and the historical reference model-node action distribution. The policy-side network parameters are then updated by combining the relationship consistency constraint and the policy consistency constraint. The historical medical scheduling memory is not used to recalculate the advantage estimate or strategy probability ratio of historical trajectories.

9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.