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

By establishing a set of nodes and a set of user tasks, defining a task scheduling objective function, and calling a multi-strategy improved tuna swarm optimization algorithm, a scheduling strategy that takes into account both task completion time and system load balancing is generated, which solves the problem of uneven load on cluster nodes and achieves system load balancing.

WO2026056478A1PCT designated stage Publication Date: 2026-03-19INSPUR CLOUD INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

In existing technologies, the problem of uneven load distribution among cluster nodes during task scheduling cannot be dynamically adjusted according to changes in application load.

Method used

By establishing a set of nodes and a set of user tasks, defining the total task processing time of a single node and the system load balancing, establishing a task scheduling objective function, and calling a multi-strategy improved tuna swarm optimization algorithm to schedule tasks for each node, a multi-objective task scheduling strategy that takes into account both task completion time and system load balancing is generated.

Benefits of technology

While ensuring the shortest possible task processing time, load balancing of the entire system was achieved, resolving the issue of uneven load distribution among cluster nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025106562_19032026_PF_FP_ABST
    Figure CN2025106562_19032026_PF_FP_ABST
Patent Text Reader

Abstract

A heterogeneous cloud task scheduling method and apparatus, an electronic device, and a storage medium, relating to the technical field of cloud computing. In the heterogeneous cloud task scheduling method, a node set and a user task set are first established. For a single node, a total task processing time for the single node is defined. On the basis of the total task processing time for the single node, a total task processing time for all nodes is defined. On the basis of the total task processing time for the single node, an average value of task processing times for all the nodes is defined. On the basis of the total task processing time for the single node and the average value, a system load balance degree is defined. On the basis of the total task processing time for all the nodes and the system load balance degree, a task scheduling objective function is established. Finally, on the basis of the task scheduling objective function, a multi-strategy improved tuna swarm optimization algorithm is called to perform task scheduling on the nodes. On the basis of ensuring the shortest task processing completion time, load balancing of the entire system is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for scheduling tasks of heterogeneous cloud, electronic device and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202411278304.4, filed on September 12, 2024, and entitled "Method and device for scheduling tasks of heterogeneous cloud, electronic device and storage medium", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the technical field of cloud computing, and in particular to a method and device for scheduling tasks of heterogeneous cloud, an electronic device and a storage medium. BACKGROUND

[0003] Cloud computing is a service mode of virtualizing computer resources and dynamically applying and releasing resources according to user needs. With the expansion of the Internet and the increasing application needs, effective scheduling of cloud computing resources according to user tasks determines the efficiency and availability of cloud computing services.

[0004] However, in the prior art, when scheduling tasks, only static scheduling can be achieved, only the task completion time is considered, and dynamic adjustment cannot be made according to the changes in application load, which is likely to cause the problem of uneven load of cluster nodes. SUMMARY

[0005] Therefore, the present application provides a method and device for scheduling tasks of heterogeneous cloud, an electronic device and a storage medium to solve the problem of uneven load of cluster nodes in the prior art when scheduling tasks.

[0006] To achieve the above object, the present application provides the following technical solutions:

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

[0008] establishing a node set and a user task set; wherein the user tasks include ordinary tasks and AI tasks; the ordinary tasks are tasks that only need CPU processing; the AI tasks are tasks that need CPU and GPU processing together;

[0009] defining a single-node task processing total time for a single node;

[0010] defining an all-node task processing total time based on the single-node task processing total time;

[0011] defining an average value of the task processing time of all nodes based on the single-node task processing total time;

[0012] defining a system load balancing degree based on the single-node total task processing time and the average value;

[0013] establishing a task scheduling target function based on the total task processing time of all nodes and the system load balancing degree;

[0014] calling a multi-strategy improved tuna swarm optimization algorithm to perform task scheduling on each node based on the task scheduling target function.

[0015] Optionally, the method described above, the single-node total task processing time is defined, comprising:

[0016] defining 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 ordinary task; and the second task processing time is the task processing time for the AI task;

[0017] defining the single-node total task processing time based on the first task processing time and the second task processing time.

[0018] Optionally, the method described above, the multi-strategy improved tuna swarm optimization algorithm is called to perform task scheduling on each node based on the task scheduling target function, comprising:

[0019] initializing tuna swarm parameters, wherein the tuna swarm parameters include population size, user task number, maximum iteration number, basic parameter λ, basic parameter Z, and tuna individual position;

[0020] generating a random number and updating the tuna individual position based on the random number;

[0021] outputting task scheduling data meeting the target function; wherein the task scheduling data is mapping data of each user task scheduled to each node.

[0022] Optionally, the method described above, the random number is generated and the tuna individual position is updated based on the random number, comprising:

[0023] if the random number is less than the basic parameter Z, updating the tuna individual position based on a Tent chaotic mapping strategy;

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

[0025] if the random number is less than the preset threshold and greater than the ratio of the current iteration number to the maximum iteration number, updating the tuna individual position based on a random position reference point;

[0026] If the random number is less than the preset threshold and is not greater than a ratio of a current iteration number to the maximum iteration number, updating the tuna individual position based on a best individual known by a current population.

[0027] Optionally, the method further includes:

[0028] Optimizing the multi-strategy improved tuna swarm optimization algorithm by using a reverse learning strategy.

[0029] The second aspect of the present application discloses a heterogeneous cloud task scheduling device, comprising:

[0030] A first establishing unit is configured to establish a node set and a user task set; wherein the user task includes a normal task and an AI task; the normal task is a task that only needs CPU processing; and the AI task is a task that needs CPU and GPU processing together;

[0031] A first defining unit is configured to define a single node task processing total time for a single node;

[0032] A second defining unit is configured to define an all node task processing total time based on the single node task processing total time;

[0033] A third defining unit is configured to define an average value of task processing times of all nodes based on the single node task processing total time;

[0034] A fourth defining unit is configured to define a system load balancing degree based on the single node task processing total time and the average value;

[0035] A second establishing unit is configured to establish a task scheduling target function based on the all node task processing total time and the system load balancing degree;

[0036] A scheduling unit is configured to call a multi-strategy improved tuna swarm optimization algorithm to perform task scheduling on each node based on the task scheduling target function.

[0037] Optionally, the device further includes:

[0038] A first defining sub-unit is configured to define a first task processing time and a second task processing time for a single node; wherein the first task processing time is a task processing time for the normal task; and the second task processing time is a task processing time for the AI task;

[0039] A second defining sub-unit is configured to define the single node task processing total time based on the first task processing time and the second task processing time.

[0040] Optionally, the apparatus, the scheduling unit comprises:

[0041] an initialization sub-unit, configured to initialize tuna population parameters, wherein the tuna population parameters comprise a population size, a number of user tasks, a maximum number of iterations, a basic parameter λ, a basic parameter Z, and a tuna individual position;

[0042] an updating sub-unit, configured to generate a random number and update the tuna individual position based on the random number;

[0043] an output sub-unit, configured to output task scheduling data satisfying the target function; wherein the task scheduling data is mapping data of scheduling each of the user tasks to each of the nodes.

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

[0045] one or more processors;

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

[0047] When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of the first aspect of the present application.

[0048] The fourth aspect of the present application discloses a computer storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method according to any one of the first aspect of the present application.

[0049] As can be seen from the above technical solutions, in the method for heterogeneous cloud task scheduling provided by the present application, first, a node set and a user task set are established. For a single node, a total single node task processing time is defined. Based on the total single node task processing time, a total all-node task processing time is defined. Based on the total single node task processing time, an average value of the task processing time of all nodes is defined. Based on the total single node task processing time and the average value, a system load balancing degree is defined. Based on the total all-node task processing time and the system load balancing degree, a task scheduling target function is established. Finally, based on the task scheduling target function, a multi-strategy improved tuna population optimization algorithm is called to perform task scheduling on each node. By using the method of the present application, based on the task scheduling target function, a multi-objective task scheduling strategy that takes into account the task completion time and the system load balancing is generated by the multi-strategy improved tuna population optimization algorithm, so as to realize the load balancing of the entire system on the basis of ensuring the shortest task processing completion time. The problem of unbalanced load of cluster nodes in the prior art when performing task scheduling is solved. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description only represent some embodiments of the present application, and for those skilled in the art, other drawings can be obtained based on the provided drawings without any creative effort.

[0051] Fig. 1 is a flow chart of a method for heterogeneous cloud task scheduling according to an embodiment of the present application;

[0052] Fig. 2 is a trend chart of the position update weight parameters α1, α2 before and after improvement according to another embodiment of the present application;

[0053] Fig. 3 is a schematic diagram of a device for heterogeneous cloud task scheduling according to another embodiment of the present application;

[0054] Fig. 4 is a schematic diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments only represent some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of the present application.

[0056] In the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive containing, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of another identical element in the process, method, article or device including the element.

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

[0058] As known from the background art, in the prior art, when performing task scheduling, only static scheduling can be achieved, only the task completion time is considered, and dynamic adjustment cannot be performed according to the change of application load, which is prone to cause the problem of unbalanced load of cluster nodes.

[0059] In view of this, the application provides a method and device for scheduling tasks in a heterogeneous cloud, electronic equipment and a storage medium, to solve the problem of uneven load of cluster nodes in the prior art when scheduling tasks.

[0060] The application provides a method for scheduling tasks in a heterogeneous cloud, as shown in FIG. 1, which specifically includes:

[0061] S101, a node set and a user task set are established; wherein the user tasks include ordinary tasks and AI tasks; the ordinary tasks are tasks that only need CPU processing; and the AI tasks are tasks that need CPU and GPU processing.

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

[0063] Node={node1,node2,...,node m};

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

[0065] The ordinary tasks are tasks that only need CPU processing, and the AI tasks are tasks that need CPU and GPU processing. The computing capacity of node i on the CPU and GPU is represented by a binary tuple i cpu ,CP i gpu > and the CPU and GPU processing capacity required to complete the user independent task is represented by a binary tuple .

[0066] S102, the total task processing time of a single node is defined for a single node.

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

[0068] Optionally, in another embodiment of the application, an implementation of step S102 can include:

[0069] 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 ordinary tasks; and the second task processing time is the task processing time for AI tasks.

[0070] Based on the first task processing time and the second task processing time, define the single node task processing total time.

[0071] It should be noted that for ordinary tasks, the task execution completion time after the ordinary task j is assigned to the node i, that is, the first task processing time is defined as:

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

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

[0074] S103, based on the single node task processing total time, define the total node task processing total time.

[0075] It should be noted that the task completion time is an important optimization target in cloud computing task scheduling, and since K8s cluster nodes are generally run in parallel, the maximum value of the sum of the completion times of all tasks on all nodes, that is, the total node task processing total time, is obtained:

[0076] S104, based on the single node task processing total time, define the average value of the task processing time of all nodes.

[0077] It should be noted that the average value of the task processing time of all nodes is defined based on the single node task processing total time:

[0078] S105, based on the single node task processing total time and the average value, define the system load balancing degree.

[0079] It should be noted that if only the task completion time is used as the optimization target, it is possible that all tasks are scheduled to the node with the strongest computing power, causing the system load to be unbalanced. 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 single node task processing total time and the average value obtained above, the system load balancing degree DB of the cloud computing system is defined:

[0080] The system load balancing degree DB can measure the balance degree of the cloud computing resource consumption of all nodes in the system when executing user tasks, and the smaller the DB, the better the system load balancing.

[0081] S106, establish a task scheduling objective function based on the total time of all node task processing and system load balancing degree.

[0082] It should be noted that when performing task scheduling, the total time of all node task processing and the system load balancing degree need to be considered in order to better perform task scheduling. Therefore, based on the total time of all node task processing and the system load balancing degree, a task scheduling objective function is established:

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

[0084] Where ω1 and ω2 are weight coefficients, satisfying ω1 + ω2 = 1, ω1, ω2 ∈ [0, 1]. At the same time, the constraint condition of the task scheduling problem is defined as:

[0085] 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 processed by one node.

[0086] S107, based on the task scheduling objective function, calling a multi-strategy improved tuna swarm optimization algorithm to perform task scheduling on each node.

[0087] It should be noted that based on the task scheduling objective function, a multi-strategy improved tuna swarm optimization algorithm (also referred to as ITSO algorithm) is called to perform task scheduling on each node, which realizes the load balancing of the entire system on the basis of ensuring the shortest task processing completion time.

[0088] Optionally, in another embodiment of the application, an embodiment of the above step S107 can include:

[0089] Initializing tuna swarm parameters, wherein the tuna swarm parameters include population size, user task number, maximum iteration number, basic parameter λ, basic parameter Z, and tuna individual position.

[0090] Generating a random number and updating the tuna individual position based on the random number.

[0091] Outputting the mapping data of the user task satisfying the objective function to the node.

[0092] It should be noted that the population size in the tuna swarm intelligent method is set to M, the user task number is set to N, the maximum iteration number is set to iter max , the basic parameters λ and z are initialized, the tuna individuals are deployed according to the population size M, and the tuna individual position is obtained.

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

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

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

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

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

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

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

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

[0101] It should be noted that if rand < z, the individual position in the tuna swarm is updated based on the Tent chaotic mapping through the following formula:

[0102] wherein, 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 mapping, which has the following form:

[0103] In the formula, a is a random number in the range of [0, 1].

[0104] If the random number is not less than the preset threshold, which can be set according to the actual situation, for example, 0.5, when rand ≥ 0.5, the parabolic foraging strategy is used to update the individual position in the tuna swarm:

[0105] wherein, is a variable related to the iteration number iter. denotes the best individual position known by the current population at the tth iteration. TF is a random value with value 1 or -1. levy_step is the step length of the Levy flight strategy introduced in the tuna swarm optimization algorithm, which has the following form:

[0106] wherein, the parameter β is generally taken as 1.5, μ , ν is a normal distribution defined as follows:

[0107] wherein, Γ(x) is the Gamma function as follows:

[0108] If the random number is less than the preset threshold value, and greater than the ratio of the current iteration number to the maximum iteration number, i.e. rand < 0.5 and the tuna individual position is updated by the random position reference point based method of the Levy flight strategy through the following formula:

[0109] the random number is less than the preset threshold value, and not greater than the ratio of the current iteration number to the maximum iteration number, i.e. rand < 0.5 and the tuna population position is updated by the current population known best individual based on the Levy flight strategy through the following formula:

[0110] wherein, is a 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, which has the following form:

[0111] β = ek·levy_step·cos(2π·levy_step);

[0112] wherein, k is a parameter of the spiral foraging movement, which has the following form:

[0113] The position update weight parameters α1, α2 are calculated by the nonlinear strategy of the following formula:

[0114] wherein, The expected start and end points of the nonlinear changes in weight parameters α1 and α2 are shown in Figure 2. This application introduces a nonlinear update rule for the position update weight parameters α1 and α2. The standard tuna swarm optimization algorithm, when updating individual positions based on a spiral foraging strategy, uses two position update weight parameters α1 and α2 to control the weights of individuals moving towards the global reference point and neighboring individuals; these weights change linearly with the number of iterations. The proposed multi-strategy improved tuna swarm optimization algorithm, however, introduces a nonlinear update rule that ensures that in the early stages of iteration, the weight parameters α1 and α2 change rapidly, allowing individuals to move more quickly towards the globally optimal individual position or a random reference point, improving the global search capability of the algorithm and accelerating its convergence. In the later stages of iteration, the changes in α1 and α2 slow down, allowing individuals to explore their neighborhood to some extent, reducing the possibility of the algorithm getting trapped in local optima. The trends of the position update weight parameters α1 and α2 before and after the improvement are shown in Figure 2, where the vertical axis (Value) represents the values ​​of weight parameters α1 and α2, and the horizontal axis (Iteration) represents the cumulative number of iterations.

[0115] Optionally, in another embodiment of this application, the above-described heterogeneous cloud task scheduling method may further include:

[0116] We optimize the multi-strategy improved tuna swarm optimization algorithm using a reverse learning strategy.

[0117] It should be noted that reverse learning mainly generates reverse solutions in the search space for known solutions through certain mapping relationships, enriching the diversity of solutions. By calculating the value of the reverse solution 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 increasing the probability of the algorithm finding the optimal solution.

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

[0119] After updating the individual position vector through the selected foraging strategy in each iteration, the algorithm calculates the reverse solution of each individual in the search space using the above formula, and calculates the fitness values ​​of the original solution and the reverse solution in the objective function respectively. The solution with the smaller value is selected as the current solution to improve the optimization efficiency of the multi-strategy improved tuna swarm optimization algorithm.

[0120] The method for heterogeneous cloud task scheduling provided in the embodiments of the present application first establishes a node set and a user task set. For a single node, a total task processing time of the single node is defined. Based on the total task processing time of the single node, a total task processing time of all nodes is defined. Based on the total task processing time of the single node, an average value of the task processing time of all nodes is defined. Based on the total task processing time of the single node and the average value, a system load balancing degree is defined. Based on the total task processing time of all nodes and the system load balancing degree, a task scheduling objective function is established. Finally, based on the task scheduling objective function, a multi-strategy improved swordfish swarm optimization algorithm is called to perform task scheduling on each node. By using the method of the present application, based on the task scheduling objective function, a multi-objective task scheduling strategy that takes into account the task completion time and the system load balancing is generated by the multi-strategy improved swordfish swarm optimization algorithm, so as to realize the load balancing of the entire system on the basis of ensuring the shortest task processing completion time. The problem of unbalanced load of cluster nodes in the prior art when performing task scheduling is solved.

[0121] Another embodiment of the present application also provides a device for heterogeneous cloud task scheduling, as shown in FIG. 3, which specifically comprises:

[0122] A first establishing unit 301 is configured to establish a node set and a user task set; wherein the user task includes a normal task and an AI task; the normal task is a task that only needs CPU processing; and the AI task is a task that needs CPU and GPU processing together.

[0123] A first defining unit 302 is configured to define a total task processing time of a single node for the single node.

[0124] A second defining unit 303 is configured to define a total task processing time of all nodes based on the total task processing time of the single node.

[0125] A third defining unit 304 is 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.

[0126] A fourth defining unit 305 is configured to define a system load balancing degree based on the total task processing time of the single node and the average value.

[0127] A second establishing unit 306 is configured to establish a task scheduling objective function based on the total task processing time of all nodes and the system load balancing degree.

[0128] A scheduling unit 307 is configured to call a multi-strategy improved swordfish swarm optimization algorithm to perform task scheduling on each node based on the task scheduling objective function.

[0129] The specific execution process of the first establishing unit 301, the first defining unit 302, the second defining unit 303, the third defining unit 304, the fourth defining unit 305, the second establishing unit 306, and the scheduling unit 307 in this embodiment can be referred to the method embodiment content of the corresponding above-mentioned FIG. 1, and will not be repeated here.

[0130] In the device for heterogeneous cloud task scheduling provided in the embodiment of the application, first, the first establishing unit 301 establishes a node set and a user task set. The first defining unit 302 defines a single node task processing total time for a single node. The second defining unit 303 defines an all-node task processing total time based on the single node task processing total time. The third defining unit 304 defines an average value of the task processing time of all nodes based on the single node task processing total time. The fourth defining unit 305 defines a system load balancing degree based on the single node task processing total time and the average value. The second establishing unit 306 establishes a task scheduling target function based on the all-node task processing total time and the system load balancing degree. Finally, the scheduling unit 307 calls a multi-strategy improved goldfish swarm optimization algorithm to perform task scheduling on each node based on the task scheduling target function. By using the method of the application, a multi-objective task scheduling strategy that takes into account the task completion time and the system load balancing is generated by the multi-strategy improved goldfish swarm optimization algorithm based on the task scheduling target function, so that the load balancing of the entire system is realized on the basis of ensuring the shortest task processing completion time. The problem of unbalanced cluster node load in the prior art when performing task scheduling is solved.

[0131] Optionally, in another embodiment of the application, one embodiment of the first defining unit 302 can include:

[0132] The first defining sub-unit is configured to define a first task processing time and a second task processing time for a single node, wherein the first task processing time is a task processing time for a normal task, and the second task processing time is a task processing time for an AI task.

[0133] The second defining sub-unit is configured to define a single node task processing total time based on the first task processing time and the second task processing time.

[0134] In this embodiment, the specific execution process of the first defining sub-unit and the second defining sub-unit can be referred to the method embodiment content of the corresponding above-mentioned method embodiment, and will not be repeated here.

[0135] Optionally, in another embodiment of the application, one embodiment of the scheduling unit 307 can include:

[0136] The initialization subunit is configured to initialize tuna population parameters, wherein the tuna population parameters include a population size, a number of user tasks, a maximum number of iterations, a basic parameter λ, a basic parameter Z, and tuna individual positions.

[0137] The updating subunit is configured to generate a random number and update the tuna individual positions based on the random number.

[0138] The output subunit is configured to output task scheduling data satisfying the target function, wherein the task scheduling data is mapping data of scheduling each user task to each node.

[0139] In this embodiment, the specific execution processes of the initialization subunit, the updating subunit, and the output subunit can be refer to the method embodiments described above, and will not be described here.

[0140] Another embodiment of the application further provides an electronic device, as shown in Fig. 4, which specifically comprises:

[0141] One or more processors 401.

[0142] A storage device 502, on which one or more programs are stored.

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

[0144] Another embodiment of the application further provides a computer storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to implement the method in any of the above embodiments.

[0145] Each of the above-described embodiments is described in a progressive manner, and the same or similar parts of each of the embodiments can be referred to each other. Each of the embodiments mainly describes the difference from other embodiments. In particular, the system or system embodiments are basically similar to the method embodiments, and thus are described more simply. The relevant parts can be referred to the part of the method embodiments. The above-described system and system embodiments are merely illustrative, and the units described as separate components can be or can not be physically separated, and the components displayed as units can be or can not be physical units, i.e., can be located in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement without creative labor.

[0146] Those skilled in the art will further realize that the mechanisms of the various examples described herein are capable of being implemented using any number of combinations of the described features. Accordingly, these examples are not limited to the mechanisms described herein, but rather, the intent is to cover all modifications and alternatives equivalent thereto. The preceding description of the examples is illustrative, and not restrictive. Many other examples will be apparent to those of skill in the art upon reviewing the above description. The scope of the examples should, therefore, be determined not with reference to the above description, but instead should be given to the appended claims, along with their full scope of equivalents.

[0147] The above description of disclosed examples is intended to be illustrative, and not restrictive. Many other examples will be apparent to those of skill in the art upon reviewing the above description. The scope of examples should, therefore, be determined not with reference to the above description, but instead should be given to the appended claims, along with their full scope of equivalents.

Claims

1. A method for heterogeneous cloud task scheduling, the method comprising: The method comprises the following steps: establishing a node set and a user task set; wherein the user task comprises a common task and an AI task; the common task is a task that only needs CPU processing; the AI task is a task that needs CPU and GPU processing together; defining a single-node task processing total time for a single node; defining an all-node task processing total time based on the single-node task processing total time; defining an average value of the task processing time of all nodes based on the single-node task processing total time; defining a system load balancing degree based on the single-node task processing total time and the average value; establishing a task scheduling target function based on the all-node task processing total time and the system load balancing degree; calling a multi-strategy improved goldfish swarm optimization algorithm to perform task scheduling on each node based on the task scheduling target function.

2. The method of claim 1, wherein, The method comprises the following steps: defining 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; the second task processing time is the task processing time for the AI task; defining the single-node task processing total time based on the first task processing time and the second task processing time.

3. The method of claim 1, wherein, The method comprises the following steps: initializing goldfish swarm parameters, wherein the goldfish swarm parameters comprise a population size, a user task number, a maximum iteration number, a basic parameter λ, a basic parameter Z, and a goldfish individual position; generating a random number and updating the goldfish individual position based on the random number; outputting task scheduling data that meets the target function; wherein the task scheduling data is mapping data of scheduling each user task to each node.

4. The method of claim 3, wherein, The method comprises the following steps: if the random number is less than the basic parameter Z, updating the goldfish individual position based on a Tent chaotic mapping strategy; if the random number is not less than a preset threshold, updating the goldfish individual position based on a parabolic foraging strategy; if the random number is less than the preset threshold and greater than the ratio of the current iteration number to the maximum iteration number, updating the goldfish individual position based on a random position reference point; if the random number is less than the preset threshold and not greater than the ratio of the current iteration number to the maximum iteration number, updating the goldfish individual position based on a best individual known in the current population.

5. The method of claim 1, wherein, The method further comprises the following steps: optimizing the multi-strategy improved goldfish swarm optimization algorithm by using a reverse learning strategy.

6. An apparatus for heterogeneous cloud task scheduling, the apparatus comprising: The method comprises the following steps: a first establishing unit is configured to establish a node set and a user task set; wherein the user task comprises a common task and an AI task; the common task is a task that only needs CPU processing; the AI task is a task that needs CPU and GPU processing together; The first definition unit is configured to define a total task processing time of a single node for a general task; The second definition unit is configured to define a total task processing time of all nodes based on the total task processing time of the single node; The third definition unit is configured to define an average value of task processing times of all nodes based on the total task processing time of the single node; The fourth definition unit is configured to define a system load balancing degree based on the total task processing time of the single node and the average value; The second establishment unit is configured to establish a task scheduling target function based on the total task processing time of all nodes and the system load balancing degree; The scheduling unit is configured to call a multi-strategy improved goldfish swarm optimization algorithm to perform task scheduling on each node based on the task scheduling target function.

7. The apparatus of claim 6, wherein, The first definition unit includes: The first definition sub-unit is configured to define a first task processing time and a second task processing time for a general task for a single node; the first task processing time is a task processing time for the general task; and the second task processing time is a task processing time for an AI task; The second definition sub-unit is configured 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 apparatus of claim 6, wherein, The scheduling unit includes: The initialization sub-unit is configured to initialize goldfish swarm parameters, wherein the goldfish swarm parameters include a population size, a number of user tasks, a maximum number of iterations, a basic parameter λ, a basic parameter Z, and a goldfish individual position; The updating sub-unit is configured to generate a random number and update the goldfish individual position based on the random number; The output sub-unit is configured to output task scheduling data satisfying the target function; wherein the task scheduling data is mapping data of each user task scheduled to each node.

9. An electronic device, comprising: 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 implement the method of any one of claims 1 to 5. A computer program is stored thereon, wherein the computer program is executed by a processor to implement the method of any one of claims 1 to 5.

10. A computer storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Scheduling method for cloud task loading balance based on BP-Tabu search

    CN107329815A

  • Hadoop load balance task scheduling method based on hybrid metaheuristic algorithm

    CN108170530A

  • Workflow scheduling method and system based on multi-target particle swarm optimization, and storage medium

    CN113627871A

  • Cloud task scheduling method and device based on immune annealing algorithm

    CN114647493A

  • Heterogeneous computing resource dynamic scheduling method

    CN118467162A