Heterogeneous cloud task scheduling method and device, electronic equipment and storage medium

By defining the total time of node task processing and system load balancing, and using multiple strategies to improve tuna school optimization algorithm for task scheduling, the problem of unbalanced load in cluster nodes is solved, the task completion time and load balancing are taken into account, and the cloud is improved The efficiency and availability of computing systems.

CN119127444APending Publication Date: 2024-12-13SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411278304.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, when task scheduling is performed, the problem of unbalanced load of cluster nodes cannot be dynamically adjusted to adapt to application load changes, resulting in a decrease in efficiency and availability.

Method used

By defining the total time of node task processing, system load balancing and task scheduling objective function, multi-strategy improvement tuna school optimization algorithm is called, task scheduling is performed on each node, and a scheduling strategy that takes into account the task completion time and system load balancing is generated.

Benefits of technology

On the basis of ensuring the shortest completion time of task processing, load balancing of the entire system is achieved, the problem of unbalanced load of cluster nodes is solved, and the service quality and resource utilization of cloud computing systems are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127444A_ABST
    Figure CN119127444A_ABST
Patent Text Reader

Abstract

The invention provides a heterogeneous cloud task scheduling method and device, electronic equipment and a storage medium. The heterogeneous cloud task scheduling method comprises the following steps: firstly, establishing a node set and a user task set; for a single node, the total task processing time of the single node is defined. And based on the total task processing time of the single node, defining the total task processing time of all nodes. And based on the total task processing time of the single node, defining an average value of the task processing time of all nodes. And defining the system load balance degree based on the single-node task processing total time and the average value. And establishing a task scheduling objective function based on the total task processing time of all nodes and the system load balance degree. And finally, based on the task scheduling objective function, calling a multi-strategy improved tuna swarm optimization algorithm to perform task scheduling on each node. On the basis of ensuring the shortest task processing completion time, the load balancing of the whole system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a method, device, electronic device and storage medium for heterogeneous cloud task scheduling. Background Art

[0002] Cloud computing is a service that virtualizes computer resources and can dynamically apply for and release resources according to user needs. With the expansion of the Internet and the continuous increase in application demand, the efficiency and availability of cloud computing services are determined by effectively scheduling cloud computing resources according to user task needs.

[0003] However, in the prior art, when performing task scheduling, only static scheduling can be implemented, which only considers the task completion time and cannot be dynamically adjusted as the application load changes, which can easily lead to the problem of unbalanced load on cluster nodes. Summary of the invention

[0004] In view of this, the present application provides a method, device, electronic device and storage medium for heterogeneous cloud task scheduling to solve the problem of unbalanced load of cluster nodes when performing task scheduling in the prior art.

[0005] To achieve the above objectives, this application provides the following technical solutions:

[0006] The first aspect of the present application discloses a method for heterogeneous cloud task scheduling, comprising:

[0007] Establishing a node set and a user task set; wherein the user tasks include common tasks and AI tasks; the common tasks are tasks that only require CPU processing; the AI ​​tasks are tasks that require CPU and GPU processing together;

[0008] For a single node, define the total processing time of a single node task;

[0009] Based on the total processing time of the single node task, define the total processing time of all node tasks;

[0010] Based on the total task processing time of the single node, define an average value of the task processing time of all nodes;

[0011] Based on the total processing time of the single node task and the average value, define the system load balance degree;

[0012] Establishing a task scheduling objective function based on the total task processing time of all nodes and the system load balance;

[0013] Based on the task scheduling objective function, a multi-strategy improved tuna school optimization algorithm is called to schedule tasks for each node.

[0014] Optionally, in the above method, defining the total task processing time of a single node for a single cluster node includes:

[0015] For a single node, a first task processing time and a second task processing time are defined; wherein the first task processing time is the task processing time for the common task; and the second task processing time is the task processing time for the AI ​​task;

[0016] The total task processing time of the single node is defined based on the first task processing time and the second task processing time.

[0017] Optionally, in the above method, based on the task scheduling objective function, calling the multi-strategy improved tuna school optimization algorithm to schedule tasks for each node includes:

[0018] Initialize tuna school parameters, wherein the tuna school parameters include population size, number of user tasks, maximum number of iterations, basic parameter λ, basic parameter Z and individual tuna positions;

[0019] Generate a random number, and update the individual position of the tuna based on the random number;

[0020] Output task scheduling data that satisfies the objective function; wherein the task scheduling data is mapping data of scheduling each of the user tasks to each of the nodes.

[0021] Optionally, in the above method, generating a random number and updating the individual position of the tuna based on the random number comprises:

[0022] If the random number is less than the basic parameter Z, the individual position of the tuna is updated based on the Tent chaotic mapping strategy;

[0023] If the random number is not less than a preset threshold, updating the individual position of the tuna based on a parabolic foraging strategy;

[0024] If the random number is less than the preset threshold and greater than the ratio of the current number of iterations to the maximum number of iterations, updating the individual position of the tuna based on the random position reference point;

[0025] If the random number is less than the preset threshold and is not greater than the ratio of the current number of iterations to the maximum number of iterations, the position of the tuna individual is updated based on the best individual known in the current population.

[0026] Optionally, the above method further includes:

[0027] The multi-strategy improved tuna school optimization algorithm is optimized using a reverse learning strategy.

[0028] The second aspect of the present application discloses a device for heterogeneous cloud task scheduling, including:

[0029] A first establishing unit is used to establish a node set and a user task set; wherein the user task includes a common task and an AI task; the common task is a task that only needs to be processed by the CPU; and the AI ​​task is a task that needs to be processed by both the CPU and the GPU;

[0030] The first definition unit is used to define the total processing time of a task on a single node generally for a single node;

[0031] A second definition unit is used to define the total processing time of all node tasks based on the total processing time of the single node task;

[0032] A third definition unit, configured to define an average value of the task processing time of all nodes based on the total task processing time of the single node;

[0033] A fourth definition unit, configured to define a system load balance degree based on the total processing time of the single node task and the average value;

[0034] A second establishing unit is used to establish a task scheduling objective function based on the total task processing time of all nodes and the system load balance;

[0035] The scheduling unit is used to call the multi-strategy improved tuna school optimization algorithm to schedule tasks for each node based on the task scheduling objective function.

[0036] Optionally, in the above device, the first definition unit includes:

[0037] A first definition subunit is used to define a first task processing time and a second task processing time for a single node; wherein the first task processing time is the task processing time for the common task; and the second task processing time is the task processing time for the AI ​​task;

[0038] The second definition subunit is used to define the total task processing time of the single node based on the first task processing time and the second task processing time.

[0039] Optionally, in the above device, the scheduling unit includes:

[0040] An initialization subunit, used to initialize tuna school parameters, wherein the tuna school parameters include population size, number of user tasks, maximum number of iterations, basic parameter λ, basic parameter Z and individual tuna positions;

[0041] An updating subunit, used for generating a random number and updating the individual position of the tuna based on the random number;

[0042] The output subunit is used to output task scheduling data that satisfies the objective function; wherein the task scheduling data is mapping data of scheduling each of the user tasks to each of the nodes.

[0043] The third aspect of the present application discloses an electronic device, comprising:

[0044] one or more processors;

[0045] a storage device having one or more programs stored thereon;

[0046] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the first aspects of the present application.

[0047] A fourth aspect of the present application discloses a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method described in any one of the first aspects of the present application is implemented.

[0048] It can be seen from the above technical scheme that in a method for heterogeneous cloud task scheduling provided by the present application, a node set and a user task set are first established. For a single node, the total task processing time of a single node is defined. Based on the total task processing time of a single node, the total task processing time of all nodes is defined. Based on the total task processing time of a single node, the average value of the task processing time of all nodes is defined. Based on the total task processing time of a single node and the average value, the system load balance is defined. Based on the total task processing time of all nodes and the system load balance, a task scheduling objective function is established. Finally, based on the task scheduling objective function, a multi-strategy improved tuna swarm optimization algorithm is called to schedule tasks for each node. Using the method of the present application, based on the task scheduling objective function, a multi-objective task scheduling strategy that takes into account both task completion time and system load balance is generated by a multi-strategy improved tuna swarm optimization algorithm, and load balancing of the entire system is achieved on the basis of ensuring the shortest task processing completion time. The problem of unbalanced load of cluster nodes when performing task scheduling in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0050] Figure 1A flowchart of a method for heterogeneous cloud task scheduling disclosed in an embodiment of the present application;

[0051] Figure 2 This is a variation trend diagram of the position update weight parameters α1, α2 before and after improvement disclosed in another embodiment of the present application;

[0052] Figure 3 A schematic diagram of a heterogeneous cloud task scheduling device disclosed in another embodiment of the present application;

[0053] Figure 4 A schematic diagram of an electronic device disclosed in another embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0056] Furthermore, in this document, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0057] As can be seen from the background technology, in the prior art, when performing task scheduling, only static scheduling can be implemented, which only considers the task completion time and cannot be dynamically adjusted as the application load changes, which can easily lead to the problem of unbalanced load on cluster nodes.

[0058] In view of this, the present application provides a method, device, electronic device and storage medium for heterogeneous cloud task scheduling to solve the problem of unbalanced load of cluster nodes when performing task scheduling in the prior art.

[0059] The present application embodiment provides a method for heterogeneous cloud task scheduling, such as Figure 1 As shown, specifically including:

[0060] S101, establishing a node set and a user task set; wherein user tasks include common tasks and AI tasks; common tasks are tasks that only require CPU processing; AI tasks are tasks that require both CPU and GPU processing.

[0061] It should be noted that, assuming that the current K8s cluster has m nodes and the user has n independent tasks to be processed (independent tasks here refer to user tasks that have no dependencies and execution order between each other), the cluster node set Node and the user task set Task are established as follows:

[0062] Node={node1,node2,…,node m}

[0063] Task={t1,t2,…,t n}

[0064] Ordinary tasks are tasks that only require CPU processing, and AI tasks are tasks that require both CPU and GPU processing. Indicates the computing power of node i on CPU and GPU, through the two-tuple Indicates the CPU and GPU processing power required to complete user independent tasks.

[0065] S102. For a single node, define the total task processing time of the single node.

[0066] It should be noted that in order to reflect the task processing capability of each node, the total task processing time of a single node is defined for a single node.

[0067] Optionally, in another embodiment of the present application, an implementation of step S102 may include:

[0068] For a single node, a first task processing time and a second task processing time are defined; wherein the first task processing time is the task processing time for a common task; and the second task processing time is the task processing time for an AI task.

[0069] Based on the first task processing time and the second task processing time, a total task processing time of a single node is defined.

[0070] It should be noted that for common tasks, the time it takes to complete the execution of common task j after assigning it to node i, that is, the first task processing time, is defined as:

[0071]

[0072] For AI tasks, the task execution completion time after assigning AI task j to node i is defined as the larger of the CPU computing time and the GPU computing time, that is, the second task processing time is defined as:

[0073]

[0074] Assuming that each node will execute the assigned tasks serially in a certain order, the total time for node i to complete all its assigned tasks, that is, the total processing time of a single node task, is:

[0075]

[0076] S103. Based on the total processing time of a single node task, define the total processing time of all node tasks.

[0077] It should be noted that task completion time is an important optimization target in cloud computing task scheduling. Since K8s cluster nodes generally run in parallel, the maximum value of the sum of all task completion times on a single node is calculated for all nodes, that is, the total task processing time of all nodes is obtained as:

[0078]

[0079] S104: Based on the total task processing time of a single node, define an average value of the task processing time of all nodes.

[0080] It should be noted that the total task processing time of a single node is used to define the average task processing time of all nodes:

[0081]

[0082] S105. Define the system load balance based on the total processing time and average value of a single node task.

[0083] It should be noted that if only the task completion time is used as the optimization target, all tasks may be scheduled to the node with the strongest computing power, resulting in an unbalanced load on the system. Therefore, load balancing is also an important indicator in cloud computing task scheduling, which is closely related to the service quality and resource utilization of the cloud computing system. Based on the total processing time and average value of a single node task obtained above, the system load balance degree DB of the cloud computing system is defined as:

[0084]

[0085] The system load balance DB can be used to measure the balance of cloud computing resource consumption of all nodes in the system when executing user tasks. The smaller the DB, the better the system load balance.

[0086] S106: Establish a task scheduling objective function based on the total task processing time of all nodes and the system load balance.

[0087] It should be noted that when scheduling tasks, the total processing time of all node tasks and the system load balance need to be considered in order to better schedule tasks. Therefore, based on the total processing time of all node tasks and the system load balance, the task scheduling objective function is established:

[0088] Obj_func=min(ω1·Makespan+ω2·DB)

[0089] Among them, ω1 and ω2 are weight coefficients, satisfying ω1+ω2=1, ω1, ω2∈[0,1]. At the same time, the constraints of the task scheduling problem are defined as:

[0090]

[0091] In the formula, for task j, if it is assigned to node i, then otherwise The above formula indicates that each task in the task set Task can only be handed over to one node for processing.

[0092] S107, based on the task scheduling objective function, calling the multi-strategy improved tuna school optimization algorithm to schedule tasks for each node.

[0093] It should be noted that based on the task scheduling objective function, the multi-strategy improved tuna swarm optimization algorithm (also known as ITSO algorithm) is called to schedule tasks for each node, so as to achieve load balancing of the entire system while ensuring the shortest task processing completion time.

[0094] Optionally, in another embodiment of the application, an implementation of the above step S107 may include:

[0095] Initialize the tuna school parameters, including the number of populations, the number of user tasks, the maximum number of iterations, the basic parameter λ, the basic parameter Z, and the individual positions of tuna.

[0096] Generate random numbers and update individual tuna positions based on the random numbers.

[0097] Output the mapping data from user tasks to nodes that satisfies the objective function.

[0098] It should be noted that the number of populations in the tuna swarm intelligence method is set to M, the number of user tasks is N, and the maximum number of iterations is iter max , initialize the basic parameters λ,z, deploy tuna individuals according to the population size M, and get the individual positions of tuna.

[0099] Then iterate to generate a random number rand, and update the individual position of the tuna based on the random number. After the number of iterations reaches the maximum number of iterations, the optimal mapping data from user tasks to nodes that satisfies the objective function is output:

[0100] Map={(node1,t1),(node2,t2),…,(node n ,t m )}

[0101] According to the optimal mapping data, it can be obtained which task is scheduled to which node for processing. The optimal mapping data is the task scheduling data.

[0102] Optionally, in another embodiment of the present application, the above-mentioned method of generating a random number and updating the individual position of the tuna based on the random number may include:

[0103] If the random number is less than the basic parameter Z, the individual position of the tuna is updated based on the Tent chaotic mapping strategy.

[0104] If the random number is not less than the preset threshold, the individual position of the tuna is updated based on the parabolic foraging strategy.

[0105] If the random number is less than the preset threshold and greater than the ratio of the current number of iterations to the maximum number of iterations, the individual position of the tuna is updated based on the random position reference point.

[0106] If the random number is less than the preset threshold and not greater than the ratio of the current number of iterations to the maximum number of iterations, the individual position of the tuna is updated based on the best individual known in the current population.

[0107] It should be noted that if rand < z, the individual positions in the tuna school are updated based on the Tent chaotic map using the following formula:

[0108]

[0109] in, is the position vector of tuna individual i at the tth iteration, ub and lb are the upper and lower limits of the algorithm search space, respectively. is the individual position generated based on the Tent chaotic map and has the following form:

[0110]

[0111] Where α is a random number in the range [0,1].

[0112] If the random number is not less than the preset threshold, which can be set according to the actual situation, for example, 0.5, then when rand ≥ 0.5, a parabolic foraging strategy is adopted to update the individual positions in the tuna school:

[0113]

[0114] in, It is a variable related to the number of iterations iter. It represents the best individual position known in the current population at the tth iteration. TF is a random value of 1 or -1. levy_step is the step size of the Levy flight strategy introduced into the tuna school optimization algorithm, which has the following form:

[0115]

[0116] In the formula, the parameter β is generally taken as 1.5, and μ and ν are normal distributions that meet the following definition:

[0117]

[0118] Where Γ(x) is the Gamma function as shown below:

[0119]

[0120] If the random number is less than the preset threshold and greater than the ratio of the current number of iterations to the maximum number of iterations, that is, rand < 0.5 and The following formula is used to introduce the Levy flight strategy based on random position reference points to update the individual position of the tuna:

[0121]

[0122] The random number is less than the preset threshold and not greater than the ratio of the current number of iterations to the maximum number of iterations, that is, rand < 0.5 and The following formula is used to introduce the Levy flight strategy to update the position of the tuna population based on the best individual known in the current population:

[0123]

[0124] In the formula, is the position reference point randomly generated in the search space at the tth iteration, and the distance weight parameter β is a function of the Levy flight step length and has the following form:

[0125] β=e k·levy_step ·cos(2π·levy_step)

[0126] Among them, k is the parameter of the spiral foraging motion and has the following form:

[0127]

[0128] The position update weight parameters α1, α2 are calculated using the following nonlinear strategy:

[0129]

[0130] In the formula, The expected starting and ending points of the nonlinear change of weight parameters α1 and α2. 1, α2 introduces a nonlinear update rule. The standard tuna school optimization algorithm uses two position update weight parameters α when updating individual positions based on the spiral foraging strategy. 1, α2 is used to control the weight of individuals moving to the global reference point and adjacent individuals, which changes linearly with the number of iterations. The nonlinear update rule introduced by the proposed multi-strategy improved tuna school optimization algorithm ensures that the weight parameter α 1, α2 changes rapidly, and the individuals in the population will move faster to the global optimal individual position or random reference point, which improves the global search ability of the tuna school optimization algorithm and speeds up the convergence of the algorithm. In the later stage of iteration, the changes of α1 and α2 slow down, allowing the individuals in the population to explore their surrounding space to a certain extent, reducing the possibility of the tuna school optimization algorithm falling into the local optimum. The change trend of the position update weight parameters α1 and α2 before and after the improvement is shown in the figure. Figure 2 As shown, the vertical axis Value is the value of the weight parameters α1, α2, and the horizontal axis Iteration is the cumulative number of iterations.

[0131] Optionally, in another embodiment of the present application, the heterogeneous cloud task scheduling method may further include:

[0132] The reverse learning strategy is used to optimize the multi-strategy improved tuna school optimization algorithm.

[0133] It should be noted that reverse learning mainly generates the reverse solution of the known solution in the search space through a certain mapping relationship, enriching the diversity of solutions. By calculating its value in the objective function, the solution with a better fitness value can be selected as the solution of the algorithm in the current iteration, thereby improving the probability of the algorithm finding the optimal solution.

[0134] The reverse solution of individual i in the t+1th iteration With the original solution The mapping relationship is:

[0135]

[0136] After the algorithm completes the update of the individual position vector through the selected foraging strategy in each iteration, the reverse solution of each individual in the search space is calculated by the above formula, and the fitness values ​​of the original solution and the reverse solution in the objective function are calculated respectively, and the solution with the smaller value is selected as the current solution to improve the optimization efficiency of the multi-strategy improved tuna school optimization algorithm.

[0137] In a method for heterogeneous cloud task scheduling provided in an embodiment of the present application, a node set and a user task set are first established. For a single node, the total task processing time of a single node is defined. Based on the total task processing time of a single node, the total task processing time of all nodes is defined. Based on the total task processing time of a single node, the average value of the task processing time of all nodes is defined. Based on the total task processing time of a single node and the average value, the system load balance is defined. Based on the total task processing time of all nodes and the system load balance, a task scheduling objective function is established. Finally, based on the task scheduling objective function, a multi-strategy improved tuna swarm optimization algorithm is called to schedule tasks for each node. Using the method of the present application, based on the task scheduling objective function, a multi-objective task scheduling strategy that takes into account both task completion time and system load balance is generated by a multi-strategy improved tuna swarm optimization algorithm, and load balancing of the entire system is achieved on the basis of ensuring the shortest task processing completion time. The problem of unbalanced load of cluster nodes when performing task scheduling in the prior art is solved.

[0138] Another embodiment of the present application also provides a device for heterogeneous cloud task scheduling, such as Figure 3 As shown, specifically including:

[0139] The first establishing unit 301 is used to establish a node set and a user task set; wherein the user tasks include ordinary tasks and AI tasks; ordinary tasks are tasks that only require CPU processing; AI tasks are tasks that require CPU and GPU processing together.

[0140] The first definition unit 302 is used to define the total processing time of a task on a single node generally for a single node.

[0141] The second definition unit 303 is used to define the total processing time of all node tasks based on the total processing time of a single node task.

[0142] The third definition unit 304 is used to define an average value of the task processing time of all nodes based on the total task processing time of a single node.

[0143] The fourth definition unit 305 is used to define the system load balance based on the total processing time and average value of a single node task.

[0144] The second establishing unit 306 is used to establish a task scheduling objective function based on the total task processing time of all nodes and the system load balance.

[0145] The scheduling unit 307 is used to call the multi-strategy improved tuna school optimization algorithm to perform task scheduling on each node based on the task scheduling objective function.

[0146] In this embodiment, the specific execution process of the first establishment unit 301, the first definition unit 302, the second definition unit 303, the third definition unit 304, the fourth definition unit 305, the second establishment unit 306 and the scheduling unit 307 can be referred to the corresponding Figure 1 The content of the method embodiment will not be repeated here.

[0147] In a heterogeneous cloud task scheduling device provided by an embodiment of the present application, first, a first establishment unit 301 establishes a node set and a user task set. The first definition unit 302 defines the total processing time of a single node task for a single node. The second definition unit 303 defines the total processing time of all node tasks based on the total processing time of a single node task. The third definition unit 304 defines the average value of the task processing time of all nodes based on the total processing time of a single node task. The fourth definition unit 305 defines the system load balance based on the total processing time of a single node task and the average value. The second establishment unit 306 establishes a task scheduling objective function based on the total processing time of all node tasks and the system load balance. Finally, the scheduling unit 307 calls the multi-strategy improved tuna swarm optimization algorithm to schedule tasks for each node based on the task scheduling objective function. Using the method of the present application, based on the task scheduling objective function, a multi-objective task scheduling strategy that takes into account both the task completion time and the system load balance is generated by the multi-strategy improved tuna swarm optimization algorithm, and the load balance of the entire system is achieved on the basis of ensuring the shortest task processing completion time. The problem of unbalanced load of cluster nodes when performing task scheduling in the prior art is solved.

[0148] Optionally, in another embodiment of the present application, an implementation of the first definition unit 302 may include:

[0149] The first definition subunit is used to define a first task processing time and a second task processing time for a single node; wherein the first task processing time is the task processing time for a common task; and the second task processing time is the task processing time for an AI task.

[0150] The second definition subunit is used to define the total task processing time of a single node based on the first task processing time and the second task processing time.

[0151] In this embodiment, the specific execution process of the first definition subunit and the second definition subunit can be found in the corresponding method embodiment described above, and will not be repeated here.

[0152] Optionally, in another embodiment of the present application, an implementation of the scheduling unit 307 may include:

[0153] The initialization subunit is used to initialize the parameters of the tuna school, wherein the parameters of the tuna school include the population size, the number of user tasks, the maximum number of iterations, the basic parameter λ, the basic parameter Z and the individual position of the tuna.

[0154] The updating subunit is used to generate random numbers and update the individual positions of tuna based on the random numbers.

[0155] The output subunit is used to output task scheduling data that meets the objective function; wherein the task scheduling data is the mapping data of each user task scheduling to each node.

[0156] In this embodiment, the specific execution process of the initialization subunit, the update subunit and the output subunit can refer to the corresponding method embodiment content mentioned above, which will not be repeated here.

[0157] Another embodiment of the application also provides an electronic device, such as Figure 4 As shown, specifically including:

[0158] One or more processors 401 .

[0159] The storage device 502 stores one or more programs.

[0160] When one or more programs are executed by one or more processors 401 , the one or more processors 401 implement any one of the methods in the above embodiments.

[0161] Another embodiment of the present application further provides a computer storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, any one of the methods in the above embodiments is implemented.

[0162] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0163] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0164] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for heterogeneous cloud task scheduling, characterized in that: include: Establishing a node set and a user task set; wherein the user tasks include common tasks and AI tasks; the common tasks are tasks that only require CPU processing; the AI ​​tasks are tasks that require CPU and GPU processing together; For a single node, define the total processing time of a single node task; Based on the total processing time of the single node task, define the total processing time of all node tasks; Based on the total task processing time of the single node, define an average value of the task processing time of all nodes; Based on the total processing time of the single node task and the average value, define the system load balance degree; Establishing a task scheduling objective function based on the total task processing time of all nodes and the system load balance; Based on the task scheduling objective function, a multi-strategy improved tuna school optimization algorithm is called to schedule tasks for each node.

2. The method according to claim 1, characterized in that For a single cluster node, the total time for processing a single node task is defined, including: For a single node, a first task processing time and a second task processing time are defined; wherein the first task processing time is the task processing time for the common task; and the second task processing time is the task processing time for the AI ​​task; The total task processing time of the single node is defined based on the first task processing time and the second task processing time.

3. The method according to claim 1, characterized in that Based on the task scheduling objective function, calling the multi-strategy improved tuna school optimization algorithm to schedule tasks for each node includes: Initialize tuna school parameters, wherein the tuna school parameters include population size, number of user tasks, maximum number of iterations, basic parameter λ, basic parameter Z and individual tuna positions; Generate a random number, and update the individual position of the tuna based on the random number; Output task scheduling data that satisfies the objective function; wherein the task scheduling data is mapping data of scheduling each of the user tasks to each of the nodes.

4. The method according to claim 3, characterized in that The generating of a random number and updating the individual position of the tuna based on the random number comprises: If the random number is less than the basic parameter Z, the individual position of the tuna is updated based on the Tent chaotic mapping strategy; If the random number is not less than a preset threshold, updating the individual position of the tuna based on a parabolic foraging strategy; If the random number is less than the preset threshold and greater than the ratio of the current number of iterations to the maximum number of iterations, updating the individual position of the tuna based on the random position reference point; If the random number is less than the preset threshold and is not greater than the ratio of the current number of iterations to the maximum number of iterations, the position of the tuna individual is updated based on the best individual known in the current population.

5. The method according to claim 1, characterized in that Also includes: The multi-strategy improved tuna school optimization algorithm is optimized using a reverse learning strategy.

6. A device for heterogeneous cloud task scheduling, characterized in that: include: A first establishing unit is used to establish a node set and a user task set; wherein the user task includes a common task and an AI task; the common task is a task that only needs to be processed by the CPU; and the AI ​​task is a task that needs to be processed by both the CPU and the GPU; The first definition unit is used to define the total processing time of a task on a single node generally for a single node; A second definition unit is used to define the total processing time of all node tasks based on the total processing time of the single node task; A third definition unit, configured to define an average value of the task processing time of all nodes based on the total task processing time of the single node; A fourth definition unit, configured to define a system load balance degree based on the total processing time of the single node task and the average value; A second establishing unit is used to establish a task scheduling objective function based on the total task processing time of all nodes and the system load balance; The scheduling unit is used to call the multi-strategy improved tuna school optimization algorithm to schedule tasks for each node based on the task scheduling objective function.

7. The device according to claim 6, characterized in that The first definition unit includes: A first definition subunit is used to define a first task processing time and a second task processing time for a single node; wherein the first task processing time is the task processing time for the common task; and the second task processing time is the task processing time for the AI ​​task; The second definition subunit is used to define the total task processing time of the single node based on the first task processing time and the second task processing time.

8. The device according to claim 6, characterized in that The scheduling unit comprises: An initialization subunit, used to initialize tuna school parameters, wherein the tuna school parameters include population size, number of user tasks, maximum number of iterations, basic parameter λ, basic parameter Z and individual tuna positions; An updating subunit, used for generating a random number and updating the individual position of the tuna based on the random number; The output subunit is used to output task scheduling data that satisfies the objective function; wherein the task scheduling data is mapping data of scheduling each of the user tasks to each of the nodes.

9. An electronic device, characterized in that: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method according to any one of claims 1 to 5.

10. A computer storage medium, characterized in that: A computer program is stored thereon, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Cited By

  • Heterogeneous cloud task scheduling method and apparatus, electronic device, and storage medium

    WO2026056478A1