Task scheduling method, non-volatile storage medium and electronic device

By optimizing the task order and image download bandwidth allocation strategy, the problem of inaccurate image download bandwidth allocation in serverless computing was solved, thereby improving the efficiency and accuracy of task scheduling.

CN116668461BActive Publication Date: 2026-01-20PURPLE MOUNTAIN LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310496414.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-04
Publication Date
2026-01-20
Estimated Expiration
2043-05-04

AI Technical Summary

Technical Problem

In serverless computing scenarios, existing technologies fail to effectively consider the issue of image download bandwidth allocation, resulting in low task scheduling efficiency and low accuracy of image download bandwidth allocation.

Method used

By determining the task order based on task characteristics, and combining the pointer network model and task scheduling matrix, the task scheduling strategy and image download bandwidth allocation strategy are optimized. Based on the principle of maximizing the total system benefit, the cloud node allocation scheme and image download bandwidth allocation scheme are quickly calculated.

Benefits of technology

It improves task scheduling efficiency and the accuracy of image download bandwidth allocation, solving the problem of task scheduling complexity in serverless computing scenarios, especially the inefficiency caused by inaccurate image download bandwidth allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116668461B_ABST
    Figure CN116668461B_ABST
Patent Text Reader

Abstract

The application discloses a task scheduling method, a nonvolatile storage medium and an electronic device. The method comprises the following steps: determining the task order of a plurality of tasks based on the task characteristics corresponding to the plurality of tasks; and determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used for indicating the target cloud nodes corresponding to the plurality of tasks, and the target cloud nodes corresponding to the plurality of tasks are the cloud nodes with the maximum system total revenue when the corresponding tasks are executed. The application solves the technical problems of low task scheduling efficiency and low image download bandwidth allocation accuracy caused by the fact that the image download bandwidth allocation problem is not considered in the task scheduling in the serverless computing scene in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of resource scheduling, in particular to a task scheduling method, a non-volatile storage medium and an electronic device. BACKGROUND

[0002] Serverless computing introduces a pay-per-use mode, users only pay for the execution of a certain function, without paying for idle virtual machines or containers. However, in the serverless mode, due to the existence of the cold start process of the function instance and the image download process, the complexity of task scheduling increases. Specifically, first, since the function instance has a very short survival time, when there is no available function instance, a new function instance must be started immediately to provide services; second, the premise of starting a function instance is that the cloud node has a corresponding image, and since the storage resources of the cloud node are limited, when there is no corresponding image, the image must be downloaded from the image source immediately. Most of the existing task scheduling technical solutions do not consider the cold start process and the image download process, and do not involve the image download bandwidth allocation problem, resulting in low task scheduling efficiency and low accuracy of image download bandwidth allocation.

[0003] In view of the above problems, an effective solution has not been proposed yet. SUMMARY

[0004] The embodiments of the present application provide a task scheduling method, a non-volatile storage medium and an electronic device, to solve the technical problems of low task scheduling efficiency and low accuracy of image download bandwidth allocation caused by not considering the image download bandwidth allocation problem in the related art when performing task scheduling in the serverless computing scenario.

[0005] According to an aspect of the embodiments of the present application, a task scheduling method is provided, comprising: determining the task order of a plurality of tasks based on the task characteristics of the plurality of tasks respectively; determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used to indicate the target cloud node corresponding to the plurality of tasks respectively, the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud node corresponding to the plurality of tasks respectively, the target cloud node corresponding to the plurality of tasks respectively is the cloud node with the maximum system total revenue when executing the corresponding task, and the image download bandwidth is the bandwidth required for downloading the image from the image source to the corresponding cloud node.

[0006] According to an aspect of some embodiments of the present application, a task scheduling apparatus is provided, comprising: a first determining module configured to determine a task order of a plurality of tasks based on task characteristics of the plurality of tasks respectively; and a second determining module configured to determine a target task scheduling strategy and a target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used to indicate target cloud nodes corresponding to the plurality of tasks respectively, the target image download bandwidth allocation strategy is used to indicate image download bandwidths corresponding to the target cloud nodes corresponding to the plurality of tasks respectively, and the target cloud nodes corresponding to the plurality of tasks respectively are cloud nodes that generate maximum total system revenue when performing corresponding tasks, and the image download bandwidths are bandwidths required for downloading images from an image source to the corresponding cloud nodes.

[0007] According to another aspect of some embodiments of the present application, a non-volatile storage medium is also provided, the non-volatile storage medium stores a plurality of instructions, and the instructions are adapted to be loaded and executed by a processor to implement any of the task scheduling methods described above.

[0008] According to another aspect of some embodiments of the present application, an electronic device is also provided, comprising one or more processors and a memory, the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any of the task scheduling methods described above.

[0009] In the embodiments of the present application, by determining a task order of a plurality of tasks based on task characteristics of the plurality of tasks respectively, and determining a target task scheduling strategy and a target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used to indicate target cloud nodes corresponding to the plurality of tasks respectively, the target image download bandwidth allocation strategy is used to indicate image download bandwidths corresponding to the target cloud nodes corresponding to the plurality of tasks respectively, and the target cloud nodes corresponding to the plurality of tasks respectively are cloud nodes that generate maximum total system revenue when performing corresponding tasks, and the image download bandwidths are bandwidths required for downloading images from an image source to the corresponding cloud nodes, the purpose of quickly calculating a cloud node allocation scheme and a corresponding image download bandwidth allocation scheme according to an optimal task order obtained is achieved, thereby realizing the technical effects of improving task scheduling efficiency and image download bandwidth allocation accuracy, and further solving the technical problems of low task scheduling efficiency and low image download bandwidth allocation accuracy caused by not considering the image download bandwidth allocation problem in task scheduling in a serverless computing scenario in the related art. BRIEF DESCRIPTION OF DRAWINGS

[0010] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0011] Figure 1 This is a schematic diagram of a task scheduling method according to an embodiment of the present invention;

[0012] Figure 2 This is a schematic diagram of an optional task scheduling method according to an embodiment of the present invention;

[0013] Figure 3 This is a schematic diagram of a task scheduling device according to an embodiment of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Serverless computing introduces a pay-per-use model, where users only pay for the functionality they perform, without incurring costs for idle virtual machines or containers. Compared to traditional cloud service models, serverless computing effectively reduces the cost of cloud services for users while improving the resource utilization of cloud computing systems.

[0017] However, in serverless mode, the complexity of task scheduling increases dramatically due to the cold start process of function instances and the image download process. Specifically, firstly, because function instances have a very short lifespan, a new function instance must be started immediately to provide services when no available function instance is available; secondly, starting a function instance requires the existence of a corresponding image on the cloud node, and due to the limited storage resources of the cloud node, an image must be downloaded immediately from the image source when no corresponding image is available. However, most existing task scheduling technologies do not consider the cold start process and the image download process, nor do they address the issue of image download bandwidth allocation. A joint optimization technique for task scheduling and microservice placement has been proposed in related technologies. This technique considers the cold start process and the image download process, and utilizes the layered characteristics of container images to accelerate the image download process. The core of this technique is an iterative greedy algorithm. In each iteration, the algorithm adds a microservice and selects a placement location that maximizes the system throughput of the microservice, until no more microservices can be added. The above solution has the following problems: (1) It does not take into account the fact that the bandwidth of the mirror source is limited, and therefore does not consider the problem of bandwidth allocation for mirror download; (2) Although the mirror download time is constrained, the impact of the mirror download time on the overall response time of the task is not considered, which is not suitable for application scenarios with strict requirements for task deadlines.

[0018] Based on the above problems, this invention provides a method embodiment for task scheduling. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0019] Figure 1 This is a flowchart of a task scheduling method according to an embodiment of the present invention, such as... Figure 1 As shown, the method includes the following steps:

[0020] Step S102: Determine the task order of the multiple tasks based on the task characteristics corresponding to each task.

[0021] Optionally, task characteristics may include, but are not limited to: task computation amount, task reward, task deadline, and image type. By taking these task characteristics into account when sorting multiple tasks, the accuracy of task order acquisition is improved.

[0022] In an optional embodiment, determining the task order of the multiple tasks based on the task features corresponding to the multiple tasks includes: determining the task order of the multiple tasks by using a pre-trained pointer network model based on the task features corresponding to the multiple tasks, wherein the pointer network model is trained based on the task features corresponding to the multiple sample tasks and the task order of the multiple sample tasks.

[0023] Optionally, the pointer network model described above is trained offline based on the task features corresponding to multiple sample tasks and the task order of these sample tasks. It can be understood that the pre-trained pointer network model can reflect the relationship between the task features and the task order. By inputting the task features corresponding to multiple tasks into the pre-trained pointer network model for training, the task order of multiple tasks can be quickly obtained.

[0024] In one optional embodiment, determining the task order of the multiple tasks based on the task features corresponding to the multiple tasks respectively includes: constructing a task feature matrix based on the task features corresponding to the multiple tasks respectively; and determining the task order of the multiple tasks using a pre-trained pointer network model according to the task feature matrix.

[0025] Optionally, the task features corresponding to the above multiple tasks can be input into a pre-trained pointer network model in the form of a matrix.

[0026] Optionally, the specific process of training the Pointer Network model is as follows:

[0027] The pointer network is trained using a training dataset consisting of multiple sample data points to obtain a trained pointer network model.

[0028] Where the size L of the training dataset is any integer greater than 0, and each training data point can be represented as a pair of tuples.<F,P> F is the task feature matrix composed of task features corresponding to multiple sample tasks, and P is the optimal task order vector corresponding to multiple sample tasks.

[0029] Wherein, the task feature matrix F is a 4-row, M-column matrix composed of the task features of M sample tasks, defined as:

[0030] F = [f1, f2, ..., f M ]

[0031] Where M is any integer greater than 1, corresponding to the number of sample tasks (i.e., the number of columns in the matrix), f m (1≤m≤M) represents the task feature corresponding to the m-th task, defined as:

[0032] f m =[g m ,r m ,t m ,c m ] T

[0033] Wherein, the number of rows in the task feature matrix F corresponds to the number of task features, g m r represents the computational cost required to complete the m-th task among multiple sample tasks. m t represents the task reward obtained by completing the m-th task. m c represents the deadline for the m-th task. m This indicates the image type corresponding to the m-th task.

[0034] The task order vector P consists of M elements, defined as follows:

[0035] P = [p1, p2, ..., p M ]

[0036] Where M equals the number of columns in the task feature matrix F, p m (1≤m≤M) represents the task number corresponding to the multiple sample tasks, and any two p m They are not equal.

[0037] Optionally, based on the task features corresponding to the above multiple tasks, a task feature matrix F is constructed. * Then F * The input is fed into a pre-trained pointer network model to infer the optimal task order vector (denoted as P). * This gives us the task order of multiple tasks.

[0038] Step S104: According to the task order of the above multiple tasks, determine the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the above multiple tasks. The target task scheduling strategy is used to indicate the target cloud nodes corresponding to the above multiple tasks, and the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to the above multiple tasks. The target cloud nodes corresponding to the above multiple tasks are the cloud nodes that generate the largest total system benefit when executing the corresponding tasks, and the image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node.

[0039] Using the above method, based on the obtained optimal task sorting order, the cloud node allocation scheme and the corresponding image download bandwidth allocation scheme are quickly calculated. That is, when making task scheduling decisions, the optimal cloud node allocation scheme is determined for multiple tasks according to the principle of maximizing the overall system benefit, while also taking into account the limited bandwidth of the image source exit, thus providing the optimal image download bandwidth allocation decision.

[0040] Optionally, but not limited to, the target task scheduling strategy and target image download bandwidth allocation strategy for multiple tasks can be determined by constructing a task scheduling matrix and an image download bandwidth allocation matrix, updating the task scheduling matrix and image download bandwidth allocation matrix layer by layer according to the task order of multiple tasks, based on the principle of maximizing system benefit. The task scheduling matrix is ​​an M-row, N-column matrix, where M equals the number of tasks corresponding to the multiple tasks, and N equals the number of cloud nodes in the system; the image download bandwidth allocation matrix is ​​an N-row, K-column matrix, where N equals the number of cloud nodes in the system, and K equals the number of images in the system (corresponding to the types of images). The initial matrices corresponding to both the task scheduling matrix and the image download bandwidth allocation matrix are zero matrices.

[0041] Optionally, select target cloud nodes for executing multiple tasks according to their task order, and simultaneously obtain the corresponding image download bandwidth allocation scheme. That is, starting from the first task corresponding to the task order, P... * For any task (such as the i-th task), select the cloud node that maximizes the total system revenue as the target cloud node. Let the index of the selected target cloud node be h, the corresponding total system revenue be R, and the mirror download bandwidth allocation scheme be u (including the mirror download bandwidth). For example, if the total system revenue R corresponding to the i-th task is negative infinity, then the process ends directly and the result (i.e., the task scheduling matrix a and the mirror download bandwidth allocation matrix w) is given; otherwise, based on the selected target cloud node corresponding to the i-th task and the corresponding mirror download bandwidth, update the task scheduling matrix and the mirror download bandwidth allocation matrix, that is, set the element in the i-th row and h-th column of matrix a to 1, and set w equal to u.

[0042] Optionally, after updating the task scheduling matrix and the image download bandwidth allocation matrix based on the target cloud node corresponding to the selected i-th task and the corresponding image download bandwidth, it is necessary to determine whether the task number i corresponding to any task is greater than or equal to the number of tasks M. If so, the final task scheduling matrix a and the image download bandwidth allocation matrix w are output; otherwise, the task number i is set to i+1, the target cloud node corresponding to the next task (i.e., the i+1-th task) and the corresponding image download bandwidth are determined, and the task scheduling matrix and the image download bandwidth allocation matrix are updated again until the last task in the task order is reached.

[0043] In an optional embodiment, determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the plurality of tasks according to their task order includes:

[0044] According to the task order of the above tasks, each of the above tasks is taken as the current task in turn, and the following operations are performed until there is no candidate scheduling strategy among the multiple candidate scheduling strategies corresponding to the current task whose total system benefit is greater than the preset total system benefit threshold, or the current task is the last of the above tasks:

[0045] Step S1041: Determine the multiple candidate scheduling strategies corresponding to the current task, as well as the system total revenue and image download bandwidth allocation strategies corresponding to the multiple candidate scheduling strategies.

[0046] Optionally, following the task execution order of the above multiple tasks, starting from the first task among the multiple tasks, the image download bandwidth allocation strategy and the target image download bandwidth allocation strategy are determined sequentially.

[0047] In an optional embodiment, determining the multiple candidate scheduling strategies corresponding to the current task, and the system total revenue and image download bandwidth allocation strategies corresponding to the multiple candidate scheduling strategies respectively, includes:

[0048] Step S11: Determine multiple candidate scheduling strategies when the current task is scheduled to multiple cloud nodes respectively, wherein the multiple cloud nodes correspond one-to-one with the multiple candidate scheduling strategies.

[0049] Optionally, following the node order described above, starting with the first task, multiple candidate scheduling strategies are obtained when any one of the tasks is scheduled to multiple cloud nodes.

[0050] Step S12: Determine the image download bandwidth allocation strategy corresponding to each of the above multiple candidate scheduling strategies.

[0051] In one optional embodiment, determining the mirror download bandwidth allocation strategy corresponding to each of the plurality of candidate scheduling strategies includes: updating the task scheduling matrix based on the plurality of candidate scheduling strategies to obtain the candidate task scheduling matrix corresponding to each of the plurality of candidate scheduling strategies; and determining the mirror download bandwidth allocation strategy corresponding to each of the plurality of candidate scheduling strategies based on the candidate task scheduling matrix corresponding to each of the plurality of candidate scheduling strategies.

[0052] Optionally, the number of rows in the task scheduling matrix above represents the total number of tasks, and the number of columns represents the total number of cloud nodes. For example, consider a task matrix with 8 tasks and 5 cloud nodes.Figure 2 This is a flowchart of an optional task scheduling method according to an embodiment of the present invention, such as... Figure 2 As shown, the execution order of the 8 tasks is as follows: 5 6 8 7 1 3 4 2. Initially, the task scheduling matrix is ​​an 8-row, 5-column zero matrix.

[0053] After the cloud node selection for tasks numbered 5 and 6 is completed, the resulting task scheduling matrix is ​​as follows:

[0054]

[0055] As shown above, task number 5 selected cloud node number 2, and task number 6 selected cloud node number 3. Next, a cloud node needs to be selected for task number 8. Since there are 5 candidate cloud nodes, there are 5 candidate task scheduling matrices. In the actual implementation, all candidate task scheduling matrices are generated based on the current task scheduling matrix. The first candidate task scheduling matrix (assuming task 8 is scheduled to cloud node number 1) is as follows:

[0056]

[0057]

[0058] The second candidate task scheduling matrix (assuming task 8 is scheduled to cloud node number 2) is as follows:

[0059]

[0060] The fifth candidate task scheduling matrix (i.e., assuming task 8 is scheduled to cloud node number 5) is as follows.

[0061]

[0062] It can be understood that each candidate task scheduling matrix corresponds to a candidate task scheduling strategy. Based on the above multiple candidate scheduling strategies, the task scheduling matrix (i.e., updating the corresponding scheduling scheme) is updated respectively. Then, the mirror download bandwidth allocation strategy (i.e. the optimal bandwidth allocation scheme) corresponding to the multiple candidate scheduling strategies is solved. The total system benefit corresponding to the mirror download bandwidth allocation strategy corresponding to the multiple candidate scheduling strategies is calculated. Based on the principle of maximizing the total system benefit, the target mirror download bandwidth allocation strategy is determined.

[0063] In an optional embodiment, determining the image download bandwidth allocation strategy corresponding to each of the multiple candidate scheduling strategies based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies includes: determining the image download bandwidth allocation strategy corresponding to any one of the multiple candidate scheduling strategies in the following manner, based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies: obtaining the current number of tasks on the cloud node corresponding to any one of the candidate scheduling strategies; if the current number of tasks is less than the upper limit of the number of tasks, performing iterative optimization calculation based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, with the goal of minimizing the total download cost required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, to obtain the image download bandwidth allocation strategy corresponding to any one of the multiple candidate scheduling strategies.

[0064] By using the above methods, when determining the image download bandwidth allocation strategy, economic factors are taken into account. The goal is to minimize the total download cost. Numerical optimization methods are used for iterative optimization calculations, resulting in more economical image download bandwidth for any cloud node.

[0065] Optionally, based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, and with the objective of minimizing the total download cost required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, an iterative optimization calculation is performed to obtain the image download bandwidth allocation strategy corresponding to any of the above candidate scheduling strategies. This iterative optimization calculation can be performed using, but is not limited to, subgradient methods, interior-point methods, etc. Specifically, this includes: initialization, i.e., setting the optimal system total benefit to... Let the value be equal to negative infinity (i.e., the preset total system revenue threshold); let the mirror download bandwidth allocation matrix u be equal to an N-row, K-column zero matrix, where N equals the number of cloud nodes in the system and K equals the number of mirrors in the system; let the cloud node index j equal to 1. Update the task scheduling matrix b, that is, first let b equal to the current task scheduling matrix a, and then set the element in the i-th row and j-th column of matrix b to 1. Based on the task scheduling matrix b, with the goal of minimizing the total download cost, perform the optimization calculation of the mirror download bandwidth corresponding to each of the above multiple cloud nodes when any of the above tasks are scheduled to multiple cloud nodes.

[0066] In an optional embodiment, before performing iterative optimization calculations based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, with the objective of minimizing the total download cost required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, to obtain the image download bandwidth allocation strategy corresponding to any one of the candidate scheduling strategies, the method further includes: determining the constraint condition for performing the iterative optimization calculation as follows: the total time to complete the multiple tasks is less than or equal to the task deadline, wherein the total time includes: the image download time required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, the task calculation time corresponding to the multiple tasks, and the image cold start time; and the total image download bandwidth required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node is less than or equal to the total outgoing bandwidth of the image source.

[0067] By employing the above methods, when determining the image download bandwidth, constraints are imposed on the total time to complete the multiple tasks being less than or equal to the task deadline, and the total image download bandwidth being less than or equal to the total bandwidth of the image source's outgoing bandwidth. This fully considers the limitations of the image source's outgoing bandwidth and the task deadlines. This ensures that the obtained image download bandwidth for each cloud node is free from interference from factors such as image source outgoing bandwidth and task deadlines, effectively solving the task scheduling problem with strict deadlines in serverless computing scenarios.

[0068] Optionally, the image download time is calculated by dividing the size of the image corresponding to the task by the bandwidth used to download that type of image from the image source to the corresponding cloud node. The task computation time is calculated by dividing the amount of computation required to complete the task by the computing power that the cloud node can provide for the task to be completed.

[0069] Optionally, the formulas corresponding to the objective and constraints of the above iterative optimization calculation are expressed as follows:

[0070]

[0071]

[0072]

[0073] u n,k >0, 1≤n≤N, 1≤k≤K

[0074] Where M represents the number of tasks corresponding to multiple tasks; N represents the number of cloud nodes included in the system; K represents the number of images (i.e., types); b m,n θ represents the element in the m-th row and n-th column of the task scheduling matrix b; nThe first download cost calculation parameter is preset (used to calculate the download cost between the mirror source and the nth cloud node); δ m,k δ is used to indicate the image type required for a task (if completing the m-th task requires an image of the k-th type, then...). m,k Equal to 1, otherwise δ m,k (equal to 0); S k Indicates the size of the k-th type of image; g m β represents the computational cost required to complete the m-th task; n This represents the computing power that the nth cloud node can provide for a single task; d k t represents the cold start time of the k-th type of image; m The m-th task represents the deadline; W represents the total bandwidth of the mirror source; u is the decision variable corresponding to problem (1), u n,k This represents the bandwidth used to download the k-th type of image from the image source to the n-th cloud node (i.e., image download bandwidth).

[0075] Step S13: Based on the mirror download bandwidth allocation strategies corresponding to the above multiple candidate scheduling strategies, determine the total system revenue corresponding to the above multiple candidate scheduling strategies.

[0076] In an optional embodiment, the method further includes: when the current number of tasks is greater than the upper limit of the number of tasks, or when the iterative optimization calculation fails to find a solution, using a preset image download bandwidth allocation strategy as the image download bandwidth allocation strategy corresponding to any of the candidate scheduling strategies.

[0077] Optionally, if the current number of tasks on a cloud node corresponding to any candidate scheduling strategy is less than or equal to the aforementioned task limit, then the cloud node is deemed to meet the corresponding computing capacity constraint. In this case, tasks can be scheduled to the cloud node corresponding to any candidate scheduling strategy, and subsequent judgment operations can be performed. If the current number of tasks on a cloud node corresponding to any candidate scheduling strategy is greater than the task limit, it indicates that the cloud node is currently violating the corresponding computing capacity constraint and cannot add other tasks. In this case, skip the aforementioned cloud node, set the image download bandwidth allocation strategy corresponding to any candidate scheduling strategy to the preset image download bandwidth allocation strategy, stop subsequent judgment operations on that cloud node, and continue to judge the cloud node corresponding to the next candidate scheduling strategy. This simplifies the process and improves task scheduling efficiency while ensuring that each cloud node in the system does not run under overload.

[0078] Optionally, if the iterative optimization calculation fails to find a solution, it indicates that the corresponding minimization problem has no solution. In this case, the mirror download bandwidth allocation strategy corresponding to any of the above candidate scheduling strategies is set as the preset mirror download bandwidth allocation strategy. The preset mirror download bandwidth allocation strategy can be represented by a predetermined matrix, which can be, but is not limited to, a zero matrix.

[0079] In an optional embodiment, based on the image download bandwidth allocation strategies corresponding to the multiple candidate scheduling strategies, the total system revenue corresponding to any one of the multiple candidate scheduling strategies is determined in the following manner: when the image download bandwidth allocation strategy corresponding to any one of the multiple candidate scheduling strategies is not a preset image download bandwidth allocation strategy, the total system revenue corresponding to any one candidate strategy is determined based on the candidate task scheduling matrix corresponding to any one of the multiple candidate scheduling strategies, the image download bandwidth allocation strategy corresponding to any one of the multiple candidate scheduling strategies, the revenue values ​​corresponding to the multiple tasks, the image types and image sizes corresponding to the multiple tasks, and the preset download fee calculation parameters corresponding to the multiple cloud nodes. The preset download fee calculation parameters include preset first download fee calculation parameters and preset second download fee calculation parameters.

[0080] Optionally, after obtaining the image download bandwidth corresponding to each of the multiple cloud nodes when scheduling any one of the above tasks to multiple cloud nodes, the total system benefit obtained by completing any one of the above tasks when scheduling any one of the above tasks to multiple cloud nodes is determined in the following way:

[0081]

[0082] Where, r m ρ represents the reward obtained by completing the m-th task; n The second download cost calculation parameter is preset (used to calculate the download cost between the mirror source and the nth cloud node); u * This represents the solution obtained from solving problem (1), which corresponds to the mirror download bandwidth allocation strategy for any of the above candidate scheduling strategies. Indicate u * The element in the nth row and kth column represents the image type and image download bandwidth corresponding to scheduling the mth task to the nth cloud node.

[0083] In an optional embodiment, the method further includes: when the mirror download bandwidth allocation strategy corresponding to any of the candidate scheduling strategies is a preset mirror download bandwidth allocation strategy, the preset total system revenue threshold is used as the total system revenue corresponding to any of the candidate scheduling strategies. When the current number of tasks exceeds the upper limit of the number of tasks, or when the iterative optimization calculation fails to find a solution, the mirror download bandwidth allocation strategy corresponding to any of the candidate scheduling strategies is the preset mirror download bandwidth allocation strategy, and the corresponding total system revenue is the preset total system revenue threshold (i.e., negative infinity).

[0084] In step S1042, if there is no candidate scheduling strategy among the multiple candidate scheduling strategies that has a total system benefit greater than the preset total system benefit threshold, or if the current task is the last task among the multiple tasks, the candidate scheduling strategy with the largest total system benefit among the multiple candidate scheduling strategies shall be used as the target task scheduling strategy; and the mirror download bandwidth allocation strategy corresponding to the new candidate scheduling strategy with the largest total system benefit shall be used as the target mirror download bandwidth allocation strategy.

[0085] It should be noted that among the candidate scheduling strategies mentioned above, if any candidate scheduling strategy has a total system benefit greater than the preset total benefit threshold, it means that the current task (i.e., any task) can still be scheduled. Only when the total system benefit corresponding to all candidate scheduling strategies is negative infinity does it mean that the current task cannot find any schedulable cloud node. Furthermore, if any task is unschedulable, then all tasks after any of the above-mentioned tasks are unschedulable.

[0086] By combining the image download bandwidth corresponding to multiple cloud nodes in the above manner, the expected total system revenue obtained by scheduling tasks to multiple cloud nodes is calculated, and the target cloud node is selected according to the principle of maximizing total revenue. This ensures that the target task scheduling strategy takes into account both economic factors and the limitations of image download bandwidth.

[0087] Step S1043: If, among the multiple candidate strategies, there exists a candidate scheduling strategy whose total system benefit is greater than a preset total system benefit threshold, and the current task is not the last task among the multiple tasks, then, according to the task order of the multiple tasks, the next task of any one of the tasks is taken as the new current task; determine the multiple new candidate scheduling strategies corresponding to the new current task, and the new total system benefit and new mirror download bandwidth allocation strategies corresponding to the multiple new candidate scheduling strategies respectively; if, among the multiple new candidate scheduling strategies, there is no new candidate scheduling strategy whose total system benefit is greater than the preset total system benefit threshold, or if the new current task is the last task among the multiple tasks, then the new candidate scheduling strategy with the largest total system benefit among the multiple new candidate scheduling strategies is taken as the target task scheduling strategy; and the mirror download bandwidth allocation strategy corresponding to the new candidate scheduling strategy with the largest total system benefit is taken as the target mirror download bandwidth allocation strategy.

[0088] Optionally, if among the multiple candidate strategies, there exists a candidate scheduling strategy with a total system benefit greater than a preset total system benefit threshold, and the current task is not the last task among the multiple tasks, then task scheduling can continue. In this case, the next task of the current task is taken as the new current task, and the operations of steps S1041 to S1042 are re-executed until there is no new candidate scheduling strategy with a total system benefit greater than the preset total system benefit threshold among the multiple new candidate scheduling strategies, or the new current task is the last task among the multiple tasks. In this case, the new candidate scheduling strategy with the largest total system benefit among the multiple new candidate scheduling strategies is taken as the target task scheduling strategy; and the mirror download bandwidth allocation strategy corresponding to the new candidate scheduling strategy with the largest total system benefit is taken as the target mirror download bandwidth allocation strategy.

[0089] Through the above steps S102 to S104, the cloud node allocation scheme and the corresponding image download bandwidth allocation scheme can be quickly calculated based on the obtained optimal task sorting order. This achieves the technical effect of improving task scheduling efficiency and image download bandwidth allocation accuracy, thereby solving the technical problem of low task scheduling efficiency and low image download bandwidth allocation accuracy caused by the failure to consider the image download bandwidth allocation problem when scheduling tasks in serverless computing scenarios in related technologies.

[0090] Based on the above embodiments and optional embodiments, the present invention proposes an optional implementation method, which includes:

[0091] Step S1: Train the pointer network using a training dataset consisting of multiple sample data points to obtain trained pointer network models. The size of the training dataset is any integer greater than 0, and each training data point can be represented as a pair of tuples.<F,P> , where F is the task feature matrix composed of task features corresponding to multiple sample tasks, and P is the optimal task order vector corresponding to multiple sample tasks.

[0092] Step S2, initialization, that is, let the task scheduling matrix (denoted as a) corresponding to multiple tasks be equal to an M-row N-column zero matrix, where M equals the number of tasks corresponding to multiple tasks and N equals the number of cloud nodes in the system; let the image download bandwidth allocation matrix w be equal to an N-row K-column zero matrix, where N equals the number of cloud nodes in the system and K equals the number of images in the system; let i equal 1.

[0093] Step S3: Infer the optimal task order for multiple tasks, i.e., form the task feature matrix F according to the definition in step S1. * Then F * The input is fed into the pointer network model pre-trained in step S1 to infer the optimal task order vector (denoted as P). * This gives us the task order of multiple tasks.

[0094] Step S4: Select the target cloud nodes for executing the multiple tasks according to their task order, and simultaneously obtain the corresponding image download bandwidth allocation scheme. That is, starting from the first task corresponding to the task order, P... * For any task (e.g., the i-th task), select the cloud node that maximizes the total system revenue as the target cloud node. Let the index of the selected target cloud node be h, the corresponding total system revenue be R, and the image download bandwidth allocation scheme be u (including image download bandwidth). Specifically, this includes the following sub-steps:

[0095] Step S41, Initialization, i.e., setting the total revenue of the optimal system to be It equals negative infinity; let the image download bandwidth allocation matrix u be equal to an N-row, K-column zero matrix, where N equals the number of cloud nodes in the system and K equals the number of images in the system; let the cloud node index j equal to 1.

[0096] Step S42: Update the task scheduling matrix b, that is, first set b equal to the current task scheduling matrix a, and then set the element in the i-th row and j-th column of matrix b to 1.

[0097] Step S43: Determine whether the task scheduling matrix b violates the cloud node computing capacity constraint, i.e., whether the number of tasks on each cloud node in the system exceeds the preset upper limit of the number of tasks. If it violates the constraint, proceed to step S48. This includes the following sub-steps:

[0098] Step S431, initialization, i.e., setting n equal to 1.

[0099] Step S432, calculate the number Q of tasks scheduled to the nth cloud node, i.e.

[0100]

[0101] Where M represents the number of tasks; b m,n This represents the element in the m-th row and n-th column of the task scheduling matrix b.

[0102] Step S433: Determine whether the task limit of the nth cloud node is exceeded, i.e., if Q is greater than the task limit α of the nth cloud node. n If the result is not found, then step S43 ends and the result is given (i.e., the task scheduling matrix b violates the cloud node computing capacity constraint).

[0103] Step S434: Determine whether to continue execution. If n is greater than or equal to the number of cloud nodes N, then end step S43 and give the result (i.e., the task scheduling matrix b does not violate the cloud node computing capacity constraint); otherwise, let n equal n+1, and then proceed to step S432.

[0104] Step S44: Based on the task scheduling matrix b, calculate the image download bandwidth allocation matrix, that is, use numerical optimization methods to solve the following optimization problem:

[0105]

[0106]

[0107]

[0108] u n,k >0, 1≤n≤N, 1≤k≤K

[0109] Where M represents the number of tasks corresponding to multiple tasks; N represents the number of cloud nodes included in the system; K represents the number of images (i.e., types); b m,n θ represents the element in the m-th row and n-th column of the task scheduling matrix b; n This is the preset first download cost calculation parameter (used to calculate the download cost between the mirror source and the nth cloud node); δ m,k δ is used to indicate the image type required for a task (if completing the m-th task requires an image of the k-th type, then...). m,k Equal to 1, otherwise δ m,k (equal to 0); S k Indicates the size of the k-th type of image; g m β represents the computational cost required to complete the m-th task;n This represents the computing power that the nth cloud node can provide for a single task; d k t represents the cold start time of the k-th type of image; m The deadline for the m-th task is represented by ; W represents the total bandwidth of the mirror source egress; u is the decision variable for problem (1), u n,k This represents the bandwidth used to download the k-th type of image from the image source to the n-th cloud node (i.e., image download bandwidth).

[0110] Step S45: Determine whether to continue execution. If there is no solution to problem (1), proceed to step S48.

[0111] Step S46, calculate the total system revenue R * The value of is calculated using the following formula:

[0112]

[0113] Where, r m ρ represents the reward obtained by completing the m-th task; n This is a preset second download cost calculation parameter (used to calculate the download cost between the mirror source and the nth cloud node); u * This represents the solution obtained from solving problem (1). Indicate u * The element in the nth row and kth column represents the image type and image download bandwidth corresponding to scheduling the mth task to the nth cloud node.

[0114] Step S47, update the optimal system total revenue and mirror download bandwidth allocation matrix, that is, if R * Greater than Then update the total revenue of the optimal system. The mirror download bandwidth allocation matrix u, i.e. u = u * .

[0115] Step S48: Determine whether to continue execution. If j is greater than or equal to N, then end step S4 and give the result (i.e., cloud node number j, optimal system total benefit). (and the image download bandwidth allocation matrix u); otherwise, let j equal j+1, and then go to step S42.

[0116] Step S5: Determine whether to continue execution. If the total system benefit R obtained in step S4 is negative infinity, then terminate directly and give the result (i.e., task scheduling matrix a and image download bandwidth allocation matrix w).

[0117] Step S6: Based on the target cloud node corresponding to the selected i-th task and the corresponding image download bandwidth allocation matrix, update the task scheduling matrix a and the image download bandwidth allocation matrix w, that is, set the element in the i-th row and h-th column of matrix a to 1, and set w equal to u.

[0118] Step S7: Determine whether to continue execution. If i is greater than or equal to the number of tasks M, then end the process and give the result (i.e., task scheduling matrix a and mirror download bandwidth allocation matrix w). Based on task scheduling matrix a and mirror download bandwidth allocation matrix w, the target task scheduling strategy and target mirror download bandwidth allocation strategy for multiple tasks can be obtained. Otherwise, set i to i+1 and then go to step S4.

[0119] It should be noted that this embodiment of the invention utilizes existing empirical data to train a PointerNetwork model, and uses this PointerNetwork model to quickly infer the optimal task ranking order. Then, based on this optimal task ranking order, it quickly calculates the task scheduling scheme and the corresponding mirror download bandwidth allocation scheme. This approach considers both the limited bandwidth of the mirror source exit, providing the optimal mirror download bandwidth allocation decision while making task scheduling decisions, and the impact of mirror download time on the overall task response time. It is suitable for task scheduling scenarios with very strict deadline requirements.

[0120] This embodiment also provides a task scheduling device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "module" and "device" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.

[0121] According to an embodiment of the present invention, an apparatus embodiment for implementing the above-described task scheduling method is also provided. Figure 3 This is a schematic diagram of the structure of a task scheduling device according to an embodiment of the present invention, such as... Figure 3 As shown, the above-mentioned task scheduling device includes: a first determining module 302 and a second determining module 304, wherein:

[0122] The first determining module 302 is used to determine the task order of the multiple tasks based on the task characteristics corresponding to the multiple tasks respectively.

[0123] The second determining module 304, connected to the first determining module 302, is used to determine the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the multiple tasks according to the task order of the multiple tasks. The target task scheduling strategy is used to indicate the target cloud nodes corresponding to the multiple tasks respectively, and the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to the multiple tasks respectively. The target cloud nodes corresponding to the multiple tasks are the cloud nodes that generate the largest total system benefit when executing the corresponding tasks, and the image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node.

[0124] In this embodiment of the invention, the first determining module 302 is configured to determine the task order of the multiple tasks based on the task characteristics corresponding to each task. The second determining module 304, connected to the first determining module 302, is configured to determine the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the multiple tasks according to the task order. The target task scheduling strategy indicates the target cloud nodes corresponding to the multiple tasks, and the target image download bandwidth allocation strategy indicates the image download bandwidth corresponding to the target cloud nodes corresponding to the multiple tasks. The target cloud nodes corresponding to the multiple tasks are the cloud nodes that generate the largest total system benefit when executing the corresponding tasks. The image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node. This achieves the goal of quickly calculating the cloud node allocation scheme and the corresponding image download bandwidth allocation scheme based on the obtained optimal task order, thereby improving the technical effect of task scheduling efficiency and image download bandwidth allocation accuracy. This solves the technical problem of low task scheduling efficiency and low image download bandwidth allocation accuracy caused by the failure to consider the image download bandwidth allocation problem when scheduling tasks in serverless computing scenarios in related technologies.

[0125] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0126] It should be noted that the first determining module 302 and the second determining module 304 mentioned above correspond to steps S102 to S104 in the embodiments. The instances and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above embodiments. It should be noted that the above modules, as part of the device, can run in a computer terminal.

[0127] It should be noted that the optional or preferred implementation methods of this embodiment can be found in the relevant descriptions in the embodiments, and will not be repeated here.

[0128] The task scheduling device described above may also include a processor and a memory. The first determining module 302, the second determining module 304, etc., are all stored in the memory as program modules, and the processor executes the program modules stored in the memory to realize the corresponding functions.

[0129] The processor contains a core that retrieves the corresponding program modules from memory. One or more cores may be configured. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory includes at least one memory chip.

[0130] According to an embodiment of this application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein, when the program runs, it controls the device where the non-volatile storage medium is located to execute any of the above-mentioned task scheduling methods.

[0131] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals, and the non-volatile storage medium includes stored programs.

[0132] Optionally, during program execution, the device containing the non-volatile storage medium performs the following functions: determining the task order of the multiple tasks based on their respective task characteristics; determining the target task scheduling strategy and target image download bandwidth allocation strategy for the multiple tasks according to their task order, wherein the target task scheduling strategy is used to indicate the target cloud nodes corresponding to the multiple tasks, and the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to the multiple tasks, wherein the target cloud nodes corresponding to the multiple tasks are the cloud nodes that generate the greatest total system benefit when executing the corresponding tasks, and the image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node.

[0133] According to an embodiment of this application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any of the above-described task scheduling methods during runtime.

[0134] According to an embodiment of this application, an embodiment of a computer program product is also provided, which, when executed on a data processing device, is adapted to execute a program that initializes a task scheduling method step that includes any of the above-described steps.

[0135] Optionally, when the aforementioned computer program product is executed on a data processing device, it is suitable to execute an initialization program with the following method steps: determining the task order of the multiple tasks based on the task characteristics corresponding to each of the multiple tasks; determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the multiple tasks according to the task order of the multiple tasks, wherein the target task scheduling strategy is used to indicate the target cloud nodes corresponding to each of the multiple tasks, the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to each of the multiple tasks, the target cloud nodes corresponding to each of the multiple tasks are the cloud nodes that generate the largest total system benefit when executing the corresponding tasks, and the image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node.

[0136] This invention provides an electronic device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining the task order of the multiple tasks based on their respective task characteristics; and determining a target task scheduling strategy and a target image download bandwidth allocation strategy corresponding to the multiple tasks according to their task order. The target task scheduling strategy indicates the target cloud nodes corresponding to the multiple tasks, and the target image download bandwidth allocation strategy indicates the image download bandwidth corresponding to the target cloud nodes corresponding to the multiple tasks. The target cloud nodes corresponding to the multiple tasks are the cloud nodes that generate the greatest total system benefit when executing the corresponding tasks, and the image download bandwidth is the bandwidth required to download the image from the image source to the corresponding cloud node.

[0137] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0138] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0139] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of modules described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between modules, and may be electrical or other forms.

[0140] The modules described above as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0141] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0142] If the integrated modules described above are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned non-volatile storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0143] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A task scheduling method, characterized by, The method comprises the following steps: determining the task order of the plurality of tasks based on the task features corresponding to the plurality of tasks respectively; determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used to indicate the target cloud nodes corresponding to the plurality of tasks respectively, the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to the plurality of tasks respectively, the target cloud nodes corresponding to the plurality of tasks respectively are the cloud nodes with the maximum system total revenue when the corresponding tasks are executed, and the image download bandwidth is the bandwidth required for downloading the image from the image source to the corresponding cloud node.

2. The method of claim 1, wherein, The method comprises the following steps: determining the task order of the plurality of tasks based on the task features corresponding to the plurality of tasks respectively, wherein the pointer network model is trained based on the task features corresponding to the plurality of sample tasks respectively and the task order of the plurality of sample tasks.

3. The method of claim 1, wherein, The method comprises the following steps: determining the target task scheduling strategy and the target image download bandwidth allocation strategy corresponding to the plurality of tasks according to the task order of the plurality of tasks, wherein the target task scheduling strategy is used to indicate the target cloud nodes corresponding to the plurality of tasks respectively, the target image download bandwidth allocation strategy is used to indicate the image download bandwidth corresponding to the target cloud nodes corresponding to the plurality of tasks respectively, the target cloud nodes corresponding to the plurality of tasks respectively are the cloud nodes with the maximum system total revenue when the corresponding tasks are executed, and the image download bandwidth is the bandwidth required for downloading the image from the image source to the corresponding cloud node. The method comprises the following steps: determining the plurality of candidate scheduling strategies corresponding to the current task, and the system total revenue and the image download bandwidth allocation strategy corresponding to the plurality of candidate scheduling strategies respectively; in the case that there is no candidate scheduling strategy with system total revenue greater than the preset system total revenue threshold in the plurality of candidate scheduling strategies, or the current task is the last task in the plurality of tasks, the candidate scheduling strategy with the maximum system total revenue in the plurality of candidate scheduling strategies is taken as the target task scheduling strategy; 4. The method of claim 3, wherein, the image download bandwidth allocation strategy corresponding to the candidate scheduling strategy with the maximum system total revenue is taken as the target image download bandwidth allocation strategy. The method comprises the following steps: determining the plurality of candidate scheduling strategies obtained in the case that the current task is respectively scheduled to the plurality of cloud nodes, wherein the plurality of cloud nodes correspond to the plurality of candidate scheduling strategies one by one; determining the image download bandwidth allocation strategy corresponding to the plurality of candidate scheduling strategies respectively; 5. The method of claim 4, wherein, determining the system total revenue corresponding to the plurality of candidate scheduling strategies respectively based on the image download bandwidth allocation strategy corresponding to the plurality of candidate scheduling strategies respectively. The method comprises the following steps: determining the image download bandwidth allocation strategy corresponding to the plurality of candidate scheduling strategies respectively. The task scheduling matrix is ​​updated based on the multiple candidate scheduling strategies to obtain the candidate task scheduling matrix corresponding to each of the multiple candidate scheduling strategies. Based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, the mirror download bandwidth allocation strategy corresponding to each of the multiple candidate scheduling strategies is determined.

6. The method of claim 5, wherein, The step of determining the mirror download bandwidth allocation strategy corresponding to each of the multiple candidate scheduling strategies based on the candidate task scheduling matrix corresponding to each of the multiple candidate scheduling strategies includes: Based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, the mirror download bandwidth allocation strategy corresponding to any one of the multiple candidate scheduling strategies is determined in the following manner: Obtain the current number of tasks of the cloud node corresponding to any one of the candidate scheduling strategies; When the current number of tasks is less than or equal to the upper limit of the number of tasks, based on the candidate task scheduling matrix corresponding to the multiple candidate scheduling strategies, and with the goal of minimizing the total download cost required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, iterative optimization calculation is performed to obtain the image download bandwidth allocation strategy corresponding to any one of the candidate scheduling strategies.

7. The method of claim 6, wherein, The method further includes: If the current number of tasks exceeds the upper limit of the number of tasks, or if the iterative optimization calculation fails to find a solution, the preset image download bandwidth allocation strategy shall be used as the image download bandwidth allocation strategy corresponding to any of the candidate scheduling strategies.

8. The method of claim 6, wherein, Before performing iterative optimization calculations based on the candidate task scheduling matrices corresponding to the multiple candidate scheduling strategies, with the objective of minimizing the total download cost required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, to obtain the image download bandwidth allocation strategy corresponding to any one of the candidate scheduling strategies, the method further includes: The constraint for performing the iterative optimization calculation is determined as follows: the total time to complete the multiple tasks is less than or equal to the task deadline, wherein the total time includes: the image download time required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node, the task calculation time corresponding to each of the multiple tasks, and the image cold start time; and The total image download bandwidth required to download the images corresponding to the multiple tasks from the image source to the corresponding cloud node is less than or equal to the total outgoing bandwidth of the image source.

9. The method of claim 4, wherein, The step of determining the total system benefit corresponding to each of the multiple candidate scheduling strategies based on the mirror download bandwidth allocation strategy corresponding to each of the multiple candidate scheduling strategies includes: Based on the mirror download bandwidth allocation strategies corresponding to the multiple candidate scheduling strategies, the total system benefit corresponding to any one of the multiple candidate scheduling strategies is determined in the following way: In a case where the mirror image download bandwidth allocation strategy corresponding to the arbitrary one of the candidate scheduling strategies is not the preset mirror image download bandwidth allocation strategy, a total system revenue corresponding to the arbitrary one of the candidate scheduling strategies is determined based on a candidate task scheduling matrix corresponding to the arbitrary one of the candidate scheduling strategies, the mirror image download bandwidth allocation strategy corresponding to the arbitrary one of the candidate scheduling strategies, revenue values respectively corresponding to the plurality of tasks, mirror image types and mirror image sizes respectively corresponding to the plurality of tasks, and preset download cost calculation parameters respectively corresponding to the plurality of cloud nodes.

10. The method of claim 9, wherein, The method further includes: In a case where the mirror image download bandwidth allocation strategy corresponding to the arbitrary one of the candidate scheduling strategies is the preset mirror image download bandwidth allocation strategy, the preset total system revenue threshold is taken as the total system revenue corresponding to the arbitrary one of the candidate scheduling strategies.

11. A non-volatile storage medium, comprising: The non-volatile storage medium stores a plurality of instructions, which are adapted to be loaded and executed by a processor to implement the task scheduling method in any one of claims 1 to 10.

12. An electronic device, comprising: The apparatus includes one or more processors and a memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the task scheduling method in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Network system, service providing and resource scheduling method, equipment and storage medium

    CN111800283A

  • Multi-target dynamic task scheduling method and system based on improved ant colony algorithm

    CN114968510A