Emergency task scheduling method based on multi-server cooperation in computing network environment
By employing a multi-server collaborative adaptive threshold offloading and dual-queue task stealing scheduling method, the problem of executing urgent tasks in dynamic network environments is solved, achieving efficient response and resource sharing for urgent tasks, and reducing network congestion and execution latency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2025-12-03
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies are poorly adaptable to dynamic network environments and lack a mechanism to guarantee the priority of urgent tasks, resulting in urgent tasks failing to be completed within the deadline. Furthermore, the expansion of network scale leads to limited computing power of edge servers and serious congestion problems.
An adaptive threshold collaborative unloading algorithm and a scheduling method based on double-ended queue task theft are adopted. Through multi-server collaboration, resource allocation and task priority are dynamically adjusted to ensure the efficient execution of urgent tasks.
It enables efficient response and execution of urgent tasks in large-scale networks, reduces network congestion and execution latency, and improves the system's adaptability to complex environments.
Smart Images

Figure CN121858221A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of task scheduling and reinforcement learning technology, and more specifically, to an emergency task scheduling method based on multi-server collaboration in a computing network environment. Background Technology
[0002] With the rapid development of the network, the number of mobile devices that need to process and analyze data in real time has exploded, and the number and complexity of various tasks have also continued to rise. Among them, emergency tasks with strict time constraints, such as industrial equipment fault warning and intelligent transportation emergency response, may cause serious chain reactions and security risks if they are not processed in time within the deadline. As an evolutionary architecture of software-defined networks, knowledge-defined networks (KDN) integrate artificial intelligence technology and provide core support for intelligent scheduling and management by constructing a global network view. However, existing research faces two major challenges: (1) Traditional scheduling strategies are poorly adaptable to dynamic network environments and have not established an effective emergency task priority guarantee mechanism, making it difficult for the system to ensure that emergency tasks are completed before the deadline. (2) The continuous expansion of network scale and the limited computing power of edge servers have made congestion problems increasingly serious, which in turn leads to a significant increase in task execution latency. Summary of the Invention
[0003] In view of this, the present invention proposes an emergency task scheduling method based on multi-server collaboration in a computing network environment. It assigns high execution and response priorities to emergency tasks through a task stealing mechanism, dynamically seizing resources and execution order of non-emergency tasks; and balances the load of each server in real time through an adaptive threshold collaborative scheduling strategy that dynamically adjusts thresholds and shares resources among multiple servers, thereby reducing network congestion caused by insufficient resources and solving the problems existing in the prior art.
[0004] To achieve the above objectives, this invention proposes an emergency task scheduling method based on multi-server collaboration in a computing network environment, comprising: With the optimization objective of "completing the task before the deadline with minimal latency and energy consumption", an adaptive threshold collaborative unloading algorithm is adopted to enable the task to be collaboratively unloaded across multiple servers. When there are urgent tasks that need to be prioritized, a scheduling algorithm based on double-ended queue task stealing is adopted. This algorithm ensures that urgent tasks are executed with priority by allowing them to steal the execution order and resources of regular tasks. Once the task theft is complete, a multi-server-based task theft method is used to restore the execution order and resources of the stolen regular tasks.
[0005] Furthermore, the process of constructing the optimization objective also includes setting constraints, which include: The size of the collaborative unload indicator is between 0 and 1, the total execution time of the task is before the deadline, and the available resources of the MEC server are greater than the resources required to complete the task.
[0006] Furthermore, the process of using an adaptive threshold collaborative unloading algorithm to enable task collaborative unloading across multiple servers includes: The initial threshold for each MEC server is determined based on the total number of tasks on the server. When the task resource requirements of the MEC server exceed the initial threshold, a multi-server collaborative scheduling process is triggered. Based on the maximum similarity between the task resource requirements of the MEC server and its own available computing resources, the best cooperating server is selected, and task unloading and computation are performed on the best cooperating server.
[0007] Furthermore, the functional formula for the maximum similarity is as follows:
[0008] in, Indicates server j Available resources Indicates server j The task resource requirements.
[0009] Furthermore, the process of using an adaptive threshold collaborative unloading algorithm to enable task collaborative unloading across multiple servers also includes: use Q-learning The algorithm constructs a state space based on server load, resource utilization, and historical thresholds. Update the action space based on MEC server resource usage; Construct a reward function, and determine whether the set initial threshold reduces system latency and energy consumption based on the reward function; The expected cumulative discount reward obtained after taking an action in a given state is obtained by calculating the Q value, thereby identifying the optimal collaborative server.
[0010] Furthermore, the method for calculating the Q value is as follows:
[0011] in, Indicates the state Take action below The expected value of the cumulative discount rewards that can be obtained later. For learning rate, To indicate a reward for an action.
[0012] Furthermore, scheduling algorithms based on double-ended queue task stealing include: Each server uses a double-ended queue to store tasks. The head of each queue has the highest execution priority, and the tail of the queue has the lowest execution priority. Tasks are taken from the head of the queue for execution. When an emergency task comes up, the system determines which emergency tasks to prepare for scheduling and which regular tasks to keep in the queue based on the deadline of the emergency task. The highest execution priority is assigned to emergency tasks. The highest execution priority of the regular task at the head of the queue is stolen by the task-stealing method. The newly arrived emergency task replaces the regular task at the head of the queue. After the regular task is stolen and its execution order is taken, it will be placed in the position of the emergency task that was originally at the tail of the queue.
[0013] Furthermore, the multi-server-based task theft method includes: The system monitors for any MEC servers with empty queues waiting for scheduled tasks. If such a server is found, it will steal the regular task that has been replaced and placed at the end of the queue, and place the regular task into the queue of an empty MEC server for immediate execution at the next moment.
[0014] Furthermore, a specific server is designated to handle urgent tasks. When any server other than the specific server has more than half of the available computing resources of the system, it is considered to be an MEC server with no scheduled tasks.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: To address the challenge of insufficient computing power and resource capacity of a single server in large-scale networks, this invention introduces multiple MEC servers and designs a multi-server collaborative emergency task scheduling method. This scheme is implemented based on two aspects: adaptive threshold multi-server collaborative offloading and task stealing. Adaptive threshold multi-server collaborative offloading dynamically adjusts the global offloading threshold to reduce the likelihood of network congestion due to insufficient server resources. Task stealing is related to task priority. Emergency tasks have high execution and response priorities, thus allowing the stealing of execution order and resources from non-emergency tasks, thereby ensuring that emergency tasks respond and execute before the deadline.
[0016] This invention presents an emergency task scheduling method jointly optimized by deep reinforcement learning and attention mechanisms. In this method, task scheduling considers the high processing priority of emergency tasks and jointly optimizes task offloading and resource allocation strategies. Prioritizing tasks not only reduces the execution time of emergency tasks but also reduces the overall system execution time. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. In the drawings: Figure 1 This is a schematic diagram of the emergency task scheduling method based on multi-server collaboration in a computing network environment according to the present invention; Figure 2 This is a schematic diagram of double-ended queue task theft in an embodiment of the present invention; Figure 3 This is a schematic diagram of inter-server task theft in an embodiment of the present invention; Figure 4 is a schematic diagram of the resource usage of different algorithms in the embodiments of the present invention; wherein, (a) is the resource usage of DQTS algorithm, (b) is the resource usage of SDNFO algorithm, (c) is the resource usage of MADRL algorithm, (d) is the resource usage of NKDN algorithm, and (e) is the resource usage of NCO algorithm. Figure 5 This is a graph showing the change in the total execution time of different algorithms as a percentage of urgent tasks in embodiments of the present invention; Figure 6 This is a graph showing the total execution time of different algorithms as a function of the number of tasks in this embodiment of the invention. Figure 7 This is a graph showing the total execution time of different algorithms as a function of the number of servers in this embodiment of the invention. Detailed Implementation
[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0019] This embodiment proposes an emergency task scheduling method based on multi-server collaboration in a computing network environment, such as... Figure 1 As shown, it includes: With the optimization objective of "completing the task before the deadline with minimal latency and energy consumption", an adaptive threshold collaborative unloading algorithm is adopted to enable the task to be collaboratively unloaded across multiple servers. When there are urgent tasks that need to be prioritized, a scheduling algorithm based on double-ended queue task stealing is adopted. This algorithm ensures that urgent tasks are executed with priority by allowing them to steal the execution order and resources of regular tasks. Once the task theft is complete, a multi-server-based task theft method is used to restore the execution order and resources of the stolen regular tasks.
[0020] The technical solution and principle of the present invention will be described in detail below based on the above content: In this embodiment, the complex network is viewed as consisting of multiple small regions, each containing MEC servers with certain computing capabilities and mobile terminal devices. When a device issues an urgent request requiring immediate processing, it is necessary to consider whether the task can be responded to and processed in a timely manner and how to reduce system energy consumption. As the network scale and task load increase, the computing power, storage capacity, and bandwidth resources of a single server gradually show certain limitations, making it difficult to adapt to dynamically changing network environments. Furthermore, the optimization of the single-server model is essentially limited by the total amount of resources available, making it difficult to meet the task scheduling requirements in large-scale network scenarios. At the same time, the diversity and suddenness of demands in mobile edge computing scenarios further exacerbate the bottleneck effect of single servers. This embodiment introduces multiple MEC servers and designs an emergency task scheduling scheme based on multi-server collaboration. It aims to overcome the limitations of single servers through distributed computing, task stealing, and resource sharing, improve the system's adaptability to complex environments, and provide an effective solution for emergency task scheduling in large-scale networks.
[0021] The emergency task scheduling problem proposed in this embodiment fully considers the available resources of MEC servers and focuses on optimizing the execution order of emergency tasks in the MEC server cluster. The overall goal is to achieve resource-sharing multi-server collaboration in a MEC computing environment where regular and emergency tasks coexist, so that both regular and emergency tasks are completed before the deadline with minimal latency. To achieve this goal, the multi-server collaborative scheduling problem is first mathematically modeled and formalized, and the symbols are shown in Table 1.
[0022] Table 1 ; Assuming each mobile edge device is within the communication coverage area of the MEC server, and the MEC server has sufficient computing resources, the distance between the mobile edge device and the MEC server is shown in formula (1). Wherein, and These are the coordinates of the mobile edge device and the MEC server, respectively.
[0023] ; The remaining available resources for each MEC server are shown in formula (2).
[0024] ; The initial threshold for the MEC server is shown in formula (3). It is the first The current load of an MEC server is determined by the total number of tasks running on that server.
[0025] ; When the MEC server's task resource requirements Exceeding the initial threshold will trigger resource overload. To alleviate the overload pressure, the MEC server proactively sends a collaborative offload request to the intelligent sensing and decision-making module, triggering a multi-server collaborative scheduling process. As an indicator for collaborative unloading, it is defined as shown in formula (4).
[0026] ; in, , indicating the first When a server is overloaded, it needs to find a collaborating server. A distance-weighted cosine similarity model is used to construct a collaborative offloading strategy among MEC servers. The optimal collaborating server is selected based on the maximum similarity between the computing resources required by the MEC server to process the task and its own available computing resources. The distance-weighted cosine similarity function is shown in formula (5).
[0027] ; When calculating time latency in a multi-server collaboration scenario, the impact of collaboration unloading time needs to be considered. This time is defined as the waiting time of the task during the collaboration process between servers, as shown in formula (6). This indicates the time when the target server begins executing the collaborative task. This indicates the time when the task arrived at the target server.
[0028] ; Therefore, in a multi-server collaboration scenario, the total execution time is composed of the task calculation time of the collaboration server and the waiting time for collaboration between servers, as shown in formula (7).
[0029] ; Since the scheduling energy consumption between MEC servers is much smaller than the scheduling energy consumption between mobile edge devices and MEC servers, the energy consumption generated by the collaborative scheduling of tasks between MEC servers is ignored.
[0030] The overall optimization objective is to minimize the total latency and energy consumption of task scheduling. The scheduling scheme in this embodiment focuses on achieving multi-server collaboration for resource sharing. Therefore, the optimization objective function needs to consider the latency and energy consumption factors generated by multi-server collaboration, as shown in formula (8).
[0031] ; Among them, the collaborative uninstallation indicator It needs to satisfy the constraint of formula (9).
[0032] ; In addition, the total execution time of the task must also meet the deadline constraint, as shown in formula (10).
[0033] ; When handling task scheduling, the MEC server needs to ensure that the available resources are greater than the resources required to complete the task, as shown in formula (11).
[0034] ; In summary, to address network congestion caused by insufficient resources of a single server, this embodiment achieves the scheduling of overloaded tasks and resource sharing through multi-server collaboration. The multi-server collaborative implementation of emergency task scheduling can be formulated as (8), while also satisfying the constraints (9)-(11). It is worth noting that whether the MEC server is overloaded depends on the resources required by the scheduled task, but the task scheduling situation changes dynamically with complex networks. Therefore, this embodiment designs an adaptive threshold collaborative offloading scheme based on reinforcement learning, dynamically adjusting the global collaborative offloading threshold to ensure a reduction in the collaborative execution time of the system in large-scale networks. At the same time, for the coexistence of emergency tasks and regular tasks, a task stealing mechanism is designed to ensure that emergency tasks are scheduled with priority, thereby improving the system's response speed and processing capacity in emergency scenarios. The specific scheme design is described below.
[0035] Emergency Task Coordination and Scheduling Scheme Design Multi-service collaborative emergency task scheduling schemes need to focus on two key issues: how to achieve collaboration among multiple servers and how to ensure priority scheduling of emergency tasks. Based on the aforementioned mathematical modeling, a multi-server collaborative emergency task scheduling scheme based on the concept of task theft is designed. This scheme achieves real-time awareness of emergency tasks and overall resources, and then formulates a globally near-optimal scheduling strategy.
[0036] First, to alleviate network congestion caused by insufficient edge server resources, this embodiment designs an adaptive threshold collaborative offloading algorithm based on reinforcement learning. This reinforcement learning algorithm learns the optimal threshold strategy by interacting with the environment through an agent, thereby adapting to the dynamically changing network environment. By quantitatively analyzing the cosine similarity of server resource features and combining it with distance weights, the global collaborative offloading threshold is dynamically adjusted to achieve the effect of collaborative offloading of tasks among multiple servers.
[0037] Secondly, addressing the issue of prioritizing urgent tasks, this embodiment designs an urgent task scheduling algorithm based on double-ended queue task theft. This algorithm ensures that as many urgent tasks as possible are successfully executed before the deadline, while simultaneously preventing as many regular tasks as possible from being affected by urgent task theft and ensuring their timely completion. The proposed solution will then be described in detail.
[0038] The reinforcement learning-based adaptive threshold collaborative unloading algorithm essentially achieves collaborative task unloading among multiple MEC servers by automatically adjusting thresholds and finding the optimal collaborative unloading server. From the perspective of collaborative unloading, it achieves resource sharing and alleviates network congestion while reducing overall execution time. Specifically, for each incoming task, the intelligent perception and decision-making module selects an action and updates the threshold using an ε-greedy strategy. The MEC server checks whether the resources required for the task exceed the latest threshold. If so, it indicates server overload, and the overloaded MEC server sends a collaborative unloading request to the KDN controller. The controller uploads the request to the knowledge plane, and then the intelligent perception and decision-making module, combining collected network and resource information, calls the multi-server collaborative unloading algorithm. It finds the optimal collaborative unloading server based on the distance-weighted cosine similarity function and sends the collaborative decision to the controller for execution. Simultaneously, the intelligent perception and decision-making module calculates the reward obtained from executing the action corresponding to the current threshold and updates the action value function.
[0039] However, this approach is suitable for scenarios where the task queue contains only regular tasks. When urgent tasks with strict deadlines arrive, even with an adaptive threshold collaborative unloading algorithm, it is still difficult to meet the real-time requirements of urgent tasks, easily leading to task timeouts. To address this, an urgent task scheduling algorithm based on double-ended queue task theft is proposed. Through priority awareness and dynamic resource theft, it achieves real-time scheduling and resource protection for urgent tasks.
[0040] In the urgent task scheduling algorithm based on double-ended queue task theft, urgent tasks ensure their priority execution by stealing the execution order and resources of regular tasks. Each MEC server uses a double-ended queue to mark the order of task execution and storage, with the head of the queue having the highest execution priority and the tail having the lowest. When a regular task arrives, it is stored at the tail of the queue in First Input First Output (FIFO) order. When an urgent task arrives, it steals the execution priority of the regular task at the head of the queue and places the regular task at the tail of the queue.
[0041] While routine tasks do not have strict time constraints, their execution time still needs to be controlled within a reasonable range from the perspective of system performance optimization. However, the existing task stealing mechanism focuses on prioritizing urgent tasks, leading to a significant increase in the waiting time of routine tasks in the queue. Therefore, we consider implementing task stealing and collaborative offloading across multiple servers. We stipulate that urgent tasks can only be executed by specific MEC servers, while routine tasks can be executed on specific servers or collaborating servers. To address the problem of excessively long execution times caused by the backlog of routine tasks in the queue, we adopt inter-server task stealing. The initiator of the stealing is the collaborating server, and the target is the routine tasks at the bottom of the queue on the specific server. The triggering method for inter-server task stealing differs from task stealing within the specific server queue. Task stealing within the specific server queue is triggered when an urgent task is detected, while inter-server task stealing is triggered when the available resources of any server other than the specific server exceed half of a threshold.
[0042] Adaptive threshold collaborative unloading design Multi-server collaborative offloading is an effective technique for achieving resource sharing among servers, alleviating the problem of insufficient computing resources on a single server. When designing a multi-server collaborative mechanism, two questions need to be considered: when to collaborate and how to find the optimal collaborating server.
[0043] Regarding how to find the best collaborative server, this embodiment focuses on formula (5) and selects the best adjacent collaborative MEC server based on the maximum similarity between the amount of computing resources required to process the task and its available computing resources.
[0044] To address the timing of collaborative offloading, this embodiment designs an adaptive thresholding method based on reinforcement learning. This method dynamically sets the optimal threshold based on the current MEC server status. By comparing the server's required resources with the threshold, it determines whether collaborative offloading is necessary to alleviate current resource shortages. In fact, most past studies have used static thresholds. However, static thresholds struggle to handle the dynamic fluctuations in server resources due to network conditions. This can easily lead to situations where the threshold is set too low, resulting in low resource utilization, or too high, causing network congestion.
[0045] The adaptive threshold is implemented using - method, - It is a model-free reinforcement learning algorithm that maintains a... A table is used to store the value estimate for each state-action pair. Values in the table Indicates the state Take action below The expected value of the cumulative discount reward that can be obtained later. The goal of the algorithm is to update the expected value by continuously interacting with the environment. The table is used to find the optimal action strategy. - It has the advantages of offline learning and is updated. The value is not affected in real time, and is obtained through... The table stores the value estimate for each state-action pair, and therefore its action-value function. Equation (5) can be updated to Equation (12). The learning rate, with a value between 0 and 1, determines how new experience influences old experience. The degree of influence of the value. The larger the value, the more importance is placed on current reward information. The smaller the size, the smoother the update process, and the more it relies on past experience.
[0046] ; (1) Training environment: reinforcement learning - The training process is deployed on the knowledge plane. The intelligent perception and decision-making module, acting as the Agent in the reinforcement learning framework, dynamically adjusts the server threshold based on the global network view.
[0047] (2) State: State Represents intelligent agents The current state of the environment, including server load. Resource utilization rate / and historical thresholds Therefore, the state space of each Agent can be represented by formula (13).
[0048] ; (3) Actions: Actions This represents the selectable adjustment operation for the threshold, consisting of a set of actions. Composition. Among them... , respectively, correspond to a 5% decrease in the threshold, no change, and a 5% increase in the threshold. The action needs to be continuously updated based on the resource usage of the MEC server, as shown in (14).
[0049] ; (4) Rewards: Rewards This is used to evaluate whether the set threshold reduces system latency and energy consumption after taking the current action. The reward setting is shown in formula (15). , , These are the weighting coefficients.
[0050] ; Double-ended queue task stealing design The core mechanism of the double-ended queue task stealing approach is: when a thread's task queue is empty, it randomly "steals" tasks from other threads' queues for execution, thereby optimizing resource utilization. This embodiment proposes a double-ended queue task stealing mechanism to solve the problem of scheduling urgent tasks. Details are as follows: First, each server uses a double-ended queue to store tasks, facilitating task stealing. The head of each server's queue has the highest execution priority, and the tail has the lowest. Tasks are retrieved from the head of the queue for execution.
[0051] When an urgent task arrives, the system should determine which urgent tasks to schedule and which regular tasks to keep in the queue based on their deadlines. Due to deadline constraints, urgent tasks should be assigned the highest execution priority, and a task-stealing mechanism should be used to take the highest execution priority from the regular task at the head of the queue. This stealing is essentially a replacement, replacing the regular task at the head of the queue with the newly arrived urgent task. The regular task, after being taken over the execution order, will then be placed in the position that was originally occupied by the urgent task at the tail of the queue.
[0052] The theft process is as follows Figure 2 As shown. Figure 2 Use Represents routine tasks, using Represents an urgent task. (Assume) There are 5 regular tasks waiting to be executed in the time queue. The server queue stores and executes tasks in FIFO order. At any moment, an emergency mission It is coming, and at this time it will be in order. It will be stored at the bottom of the queue awaiting execution, but this will cause urgent tasks to be delayed. The deadline has passed. Following the concept of mission theft, an urgent mission... Upon arrival, it will steal the regular tasks from the head of the queue. Execution order and resources, routine tasks It will be moved to the end of the queue, thus ensuring that it can be executed first when an emergency task comes.
[0053] However, this design is still not perfect. It can only guarantee timely response and execution of emergency tasks, but it does not consider the waiting time of regular tasks that are replaced at the end of the queue. When there are many tasks in the MEC server queue, it can cause regular tasks whose resources have been stolen to be unable to execute for a long time.
[0054] This embodiment addresses the issue of potential timeouts in routine task execution by designing a task-stealing method based on multiple servers. For example... Figure 3 As shown. In At any given time, the system monitors for any MEC servers with empty queues awaiting scheduling tasks. If one is found, that MEC server will steal the replaced regular task placed at the end of its queue. This theft involves placing the regular task into the queue of an empty MEC server, where it waits... It is executed immediately. Specifically, the theft is initiated by a collaborating server, and the target is a regular task at the bottom of a specific server's queue.
[0055] To improve system resource utilization, the task theft triggering method based on multiple servers is defined as follows: when any server other than a specific server has more than half of the available resources, the task theft will occur. For example, if the threshold for a collaborative server is 70% and the remaining available resources are 50%, which is more than half of the threshold, it indicates that the server does not have a heavy workload and can help the specific server mitigate the impact of urgent tasks on regular tasks.
[0056] Emergency Task Cooperative Scheduling Algorithm Design The Adaptive Threshold Collaborative Offloading Algorithm is a distributed decision-making method based on multi-server resource similarity and dynamic threshold adjustment. It aims to optimize task scheduling across multiple servers by quantitatively analyzing the cosine similarity of server resource characteristics and combining it with network distance weights to dynamically adjust the global collaborative offloading threshold. This reinforcement learning algorithm interacts with the environment to perceive server resource changes in real time. When the load on a specific server exceeds a threshold, it selects the collaborative server with the highest resource similarity and the closest network distance to execute the task, thus achieving a near-optimal solution between system latency and load balancing. Its core mechanism is as follows: (1) Dynamic threshold control: The global unloading threshold is adaptively adjusted by the - method to balance resource utilization and congestion control and reduce task failure rate.
[0057] (2) Similarity-driven collaboration: Select the optimal collaboration server based on the weighted cosine similarity of server resources and network distance.
[0058] (3) Online optimization decision-making: Combining the action value function of formula (12), the threshold and collaborative strategy are continuously optimized in the dynamic environment.
[0059] The specific design of the Adaptive Threshold Collaborative Unloading (ATCU) algorithm is shown in Algorithm 1.
[0060] ; The specific design of the Double-ended queue task stealing (DQTS) algorithm is shown in Algorithm 2. There are two types of stealing in this double-ended queue-based task stealing scheme. One is where urgent tasks steal the execution order of regular tasks from a specific server queue; the stealer is the urgent task. The other is where collaborating servers steal regular tasks from the bottom of a specific server queue; the stealer is the collaborating server. The optimization objective of this scheme is measured by two parts: the number of urgent task steals and the number of regular task steals. When the time required to execute an urgent task does not exceed the deadline for urgent task scheduling, the number of tasks successfully stolen by the urgent task is incremented by 1 (lines 7-8). When the task queue of a specific server is not empty and other server queues have sufficient available resources, inter-server task stealing is performed. After a regular task is successfully stolen (lines 12-15), this value is theoretically the same as the number of non-empty collaborating servers.
[0061] ; To verify the effectiveness of the multi-server collaborative emergency task scheduling scheme based on double-ended queue task theft, the DQTS algorithm proposed in this embodiment is compared with the following four algorithms: (1) SDNFO: This algorithm is based on the SDN architecture fog computing system and selects the best offloading node for overloaded fog nodes according to computing requirements and network conditions.
[0062] (2) MADRL: This algorithm uses the DRL method to learn the relationship between network demand patterns and optimal task offloading, and introduces cooperative multi-agent technology to realize task offloading.
[0063] (3) NKDN: This algorithm does not use the KDN architecture. When a server is overloaded, it sends a request to all MEC servers to obtain their available computing resources. The overloaded server then prioritizes the server with the most available resources to handle the task.
[0064] (4) NCO: This algorithm is a non-cooperative unloading algorithm. Each MEC server completes the task independently without needing to process tasks executed on other servers through cooperation.
[0065] First, the experiment set up 15 MEC servers, each containing 9 mobile edge devices. Assuming each mobile edge device generates one computing task, and the initial server resource threshold is 80%, the server resource usage of different algorithms was compared, as shown in Figure 4. Figure 4(a) shows that the resource utilization of the 15 MEC servers in the DQTS algorithm fluctuated relatively little. Its maximum value was 79%, its minimum value was 68%, and its average resource utilization remained stable at 74%. This is the effect of the combined action of the multi-server collaboration mechanism and the dual-queue task stealing mechanism. The system can dynamically adjust the scheduling strategy based on the real-time server load. When the server load exceeds the threshold, it actively triggers task offloading to the best collaborating server, thereby avoiding increased task execution latency due to single-server overload. Furthermore, the algorithm's adaptive threshold mechanism can adaptively adjust according to the current task resource requirements. When resource utilization decreases, the system can release redundant resources to improve utilization efficiency; when server resource utilization increases, by dynamically allocating more resources, it can alleviate the increased latency caused by server overload to a certain extent, thereby optimizing task processing efficiency and service quality. Figures 4(b), (c), and (d) illustrate the server resource usage of the SDNFO, MADRL, and NKDN algorithms, respectively. It can be seen that the resource usage of these three algorithms fluctuates significantly, with maximum resource utilization rates of 98%, 100%, and 100%, respectively, and minimum rates of 27%, 42%, and 43%. The average resource utilization rates are 62%, 67%, and 68%. Some servers have resource utilization rates approaching or even reaching their maximum values, even exhibiting overload, while other servers remain in a low-load idle state. The root cause of this situation lies in the lack of a collaborative offloading mechanism or the unreasonable implementation of the collaborative offloading strategy, leading to an imbalance in server load distribution.
[0066] Figure 4(e) shows the server resource usage of the NCO algorithm. The algorithm's maximum resource utilization rate is 100%, the minimum is 75%, and the average is 87%. Although the fluctuation range of server resource utilization is small, each server exhibits a high resource utilization state. This is because in this algorithm, each MEC server executes tasks independently. As the number of tasks increases, server resource consumption continues to rise, resulting in a generally high resource utilization rate for each server.
[0067] The tasks included both urgent and regular tasks. By adjusting the number of urgent tasks, the impact of different proportions of urgent tasks on the total execution time was tested. The experimental results are as follows: Figure 5As shown, the total execution time of all five algorithms increases with the proportion of urgent tasks. This is because the more urgent tasks there are, the more frequent the data loss becomes, and the more tasks are not completed before the deadline. The DQTS algorithm proposed in this embodiment has the shortest total execution time compared to the other algorithms. The main reason is that this scheme fully considers the scheduling of urgent tasks and designs a task-stealing mechanism based on a double-ended queue. This ensures that most urgent tasks are prioritized by stealing the execution order and resources of regular tasks, thereby reducing the failure rate and queuing time of urgent tasks. In addition, when the task queue of the collaborative MEC server is idle, it steals regular tasks from the bottom of other MEC servers in combination with an adaptive threshold coordination mechanism, reducing the waiting time of regular tasks. The NCO and NKDN algorithms have the worst performance compared to the other three algorithms. This is because when urgent tasks arrive, the non-KDN architecture cannot detect and process them in time, and the failure of overloaded MEC servers to unload in a coordinated manner will lead to a longer task queuing time. Because MADRL and SDNFO algorithms consider network conditions and available server resources, they can sense changes in the environment. Therefore, when urgent tasks occur, they can be assigned to appropriate MEC servers for processing. However, this is only applicable when the number of urgent tasks is small. When the proportion of urgent tasks exceeds 20%, the total execution time of MADRL and SDNFO algorithms increases almost linearly.
[0068] Next, the impact of the number of tasks on the total execution time was compared, such as... Figure 6 As shown in the figure, experimental results indicate that the total execution time of all five algorithms increases with the total number of tasks. The DQTS algorithm proposed in this embodiment has the shortest total execution time compared to the other algorithms. Meanwhile, it can be seen that the NCO algorithm has the longest total execution time compared to the other four algorithms. This is mainly because NCO adopts non-cooperative offloading; even if the number of tasks increases and the server becomes overloaded, it will not choose cooperative offloading but will wait in the task queue for execution, thus resulting in a longer total execution time. The SDNFO algorithm considers computational requirements and network conditions, and can quickly find a suitable MEC server when scheduling tasks. However, because it does not consider server location, it cannot effectively balance distance and network resources, thus its total execution time is slightly longer than the proposed algorithm. MADRL learns network experience by continuously training multiple agents to make offloading decisions, but for scenarios requiring cooperation, multiple agents need to spend a certain amount of time coordinating, which can easily lead to a long task waiting time. NKDN uses a traditional network architecture. When the server is overloaded, it sends requests to all MEC servers to obtain information on the available computing resources, resulting in a long waiting time. This is accompanied by task execution failures or data packet loss. In contrast, the DQTS algorithm can find the best cooperating MEC server in a shorter time, effectively reducing the total execution time.
[0069] The impact of the number of MEC servers on the total execution time in 5 different algorithms is as follows: Figure 7 As shown, the total execution time of all five schemes decreases as the number of available MEC servers in a specific network topology increases. When a single MEC server is overloaded due to insufficient resources, multiple MEC servers need to collaborate to execute the task. As the number of tasks increases, multiple MEC servers may also need to collaborate to complete them. However, when the number of collaborating servers increases to a certain value, the total execution time of all five schemes remains unchanged, indicating the optimal number of servers required for collaborative offloading. It can be seen that the proposed DQTS algorithm reduces the total execution time from 45ms to 19ms when the number of MEC servers is 5, a reduction of approximately 57.8%. When the number of MEC servers continues to increase, the total execution time no longer decreases. Therefore, it can be determined that the optimal number of collaborating MEC servers required at this point is 5. The optimal number of collaborating MEC servers required for the SDNFO, MADRL, NKDN, and NCO algorithms to achieve the shortest total execution time are 7, 7, 6, and 8, respectively. Compared to the DQTS algorithm proposed in this embodiment, these algorithms require more MEC server resources and have a longer total execution time. NCO results indicate that when the computing power of a single MEC server is insufficient to support the completion of the task, failure to implement collaborative offloading will result in longer waiting times.
[0070] In summary, the emergency task scheduling method based on multi-server collaboration in a computing network environment proposed in this invention ensures the priority execution of emergency tasks through adaptive threshold control and task stealing strategies, realizes collaborative offloading of multiple servers, reduces the probability of congestion caused by insufficient network resources, and at the same time ensures the completion rate of both emergency and regular tasks.
[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. An emergency task scheduling method based on multi-server collaboration in a computing network environment, characterized in that, include: With the optimization objective of "completing the task before the deadline with minimal latency and energy consumption", an adaptive threshold collaborative unloading algorithm is adopted to enable the task to be collaboratively unloaded across multiple servers. When there are urgent tasks that need to be prioritized, a scheduling algorithm based on double-ended queue task stealing is adopted. This algorithm ensures that urgent tasks are executed with priority by allowing them to steal the execution order and resources of regular tasks. Once the task theft is complete, a multi-server-based task theft method is used to restore the execution order and resources of the stolen regular tasks.
2. The method according to claim 1, characterized in that, The process of constructing the optimization objective also includes setting constraints, which include: The size of the collaborative unload indicator is between 0 and 1, the total execution time of the task is before the deadline, and the available resources of the MEC server are greater than the resources required to complete the task.
3. The method according to claim 1, characterized in that, The process of using an adaptive threshold collaborative unloading algorithm to enable tasks to be collaboratively unloaded across multiple servers includes: The initial threshold for each MEC server is determined based on the total number of tasks on the server. When the task resource requirements of the MEC server exceed the initial threshold, a multi-server collaborative scheduling process is triggered. Based on the maximum similarity between the task resource requirements of the MEC server and its own available computing resources, the best cooperating server is selected, and task unloading and computation are performed on the best cooperating server.
4. The method according to claim 3, characterized in that, The formula for the maximum similarity is as follows: , in, Indicates server j Available resources Indicates server j The task resource requirements.
5. The method according to claim 3, characterized in that, The process of using an adaptive threshold collaborative unloading algorithm to enable tasks to be collaboratively unloaded across multiple servers also includes: use Q-learning The algorithm constructs a state space based on server load, resource utilization, and historical thresholds. Update the action space based on MEC server resource usage; Construct a reward function, and determine whether the set initial threshold reduces system latency and energy consumption based on the reward function; The expected cumulative discount reward obtained after taking an action in a given state is obtained by calculating the Q value, thereby identifying the optimal collaborative server.
6. The method according to claim 5, characterized in that, The method for calculating the Q value is as follows: , in, Indicates the state Take action below The expected value of the cumulative discount rewards that can be obtained later. For learning rate, To indicate a reward for an action.
7. The method according to claim 1, characterized in that, Scheduling algorithms based on double-ended queue task stealing include: Each server uses a double-ended queue to store tasks. The head of each queue has the highest execution priority, and the tail of the queue has the lowest execution priority. Tasks are taken from the head of the queue for execution. When an emergency task comes up, the system determines which emergency tasks to prepare for scheduling and which regular tasks to keep in the queue based on the deadline of the emergency task. The highest execution priority is assigned to emergency tasks. The highest execution priority of the regular task at the head of the queue is stolen by the task-stealing method. The newly arrived emergency task replaces the regular task at the head of the queue. After the regular task is stolen and its execution order is taken, it will be placed in the position of the emergency task that was originally at the tail of the queue.
8. The method according to claim 1, characterized in that, The multi-server-based task theft method includes: The system monitors for any MEC servers with empty queues waiting for scheduled tasks. If such a server is found, it will steal the regular task that has been replaced and placed at the end of the queue, and place the regular task into the queue of an empty MEC server for immediate execution at the next moment.
9. The method according to claim 8, characterized in that, Only specific servers are designated to handle urgent tasks. When any server other than the designated server has more than half of the available computing resources of the system, it is considered to be an MEC server with no scheduled tasks.