CN115794341A - Task scheduling method, device, equipment and storage medium based on artificial intelligence - Google Patents

Task scheduling method, device, equipment and storage medium based on artificial intelligence Download PDF

Info

Publication number
CN115794341A
CN115794341A CN202211459350.5A CN202211459350A CN115794341A CN 115794341 A CN115794341 A CN 115794341A CN 202211459350 A CN202211459350 A CN 202211459350A CN 115794341 A CN115794341 A CN 115794341A
Authority
CN
China
Prior art keywords
target
task
virtual machine
function
task scheduling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211459350.5A
Other languages
Chinese (zh)
Inventor
刘兴廷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202211459350.5A priority Critical patent/CN115794341A/en
Publication of CN115794341A publication Critical patent/CN115794341A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application belongs to the field of artificial intelligence, and relates to a task scheduling method based on artificial intelligence, which comprises the following steps: acquiring a cloud task to be processed, and splitting the cloud task into subtasks; determining a set of virtual machines from a cluster of virtual machines; constructing a time optimization function and a load evaluation function corresponding to the subtasks based on the virtual machine set; generating a target scheduling function based on the time optimization function and the load evaluation function; determining an optimal task scheduling scheme corresponding to the subtasks based on a target artificial bee colony algorithm and a target scheduling function; and distributing each subtask to a corresponding virtual machine for processing based on the optimal task scheduling scheme. The application also provides a task scheduling device based on artificial intelligence, computer equipment and a storage medium. In addition, the application also relates to a block chain technology, and the optimal task scheduling scheme can be stored in the block chain. The task scheduling mode based on the application can reduce the waiting time of a user and the power consumption of the virtual machine, and improves the timeliness of task scheduling.

Description

Task scheduling method, device and equipment based on artificial intelligence and storage medium
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a task scheduling method and apparatus based on artificial intelligence, a computer device, and a storage medium.
Background
With the development of computer network technology, cloud computing platforms fusing emerging computing models such as distributed computing, virtualization, network storage and the like are also favored by enterprises. A large cloud platform requires a wide variety of computing resources to handle service requests of different users. Under the complex scene, how to reasonably distribute resources in the cloud system, efficiently execute tasks required by users, achieve load balancing, reduce scheduling cost and the like is one of the difficult problems in the field of cloud computing. Task scheduling in a cloud environment is an optimization problem of nondeterministic polynomial combination, and a common optimization method at present has an MIN-MAX algorithm, so that large and small tasks can be scheduled simultaneously, and the diversity of load balancing but not well meeting user requirements is improved; the intelligent optimization algorithms such as the genetic algorithm, the ant colony algorithm, the particle swarm algorithm and the like can efficiently finish the task scheduling of the user on the premise of ensuring the load balance. However, the initialization parameters of the methods are relatively single, and the requirements for scheduling the multi-constraint cloud computing task are strict. Therefore, the existing task scheduling mode has high scheduling cost, cannot realize the task required by the user with high efficiency, and simultaneously achieves the scheduling effect of load balancing.
Disclosure of Invention
An object of the embodiments of the present application is to provide a task scheduling method and apparatus based on artificial intelligence, a computer device, and a storage medium, so as to solve the technical problems that the existing task scheduling method has high scheduling cost, cannot implement a task required by a user with high efficiency, and simultaneously achieves a scheduling effect of load balancing.
In order to solve the above technical problem, an embodiment of the present application provides a task scheduling method based on artificial intelligence, which adopts the following technical solutions:
the method comprises the steps of obtaining a cloud task to be processed, and splitting the cloud task into a plurality of subtasks;
determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the virtual machine set comprises a plurality of virtual machines;
constructing a time optimization function corresponding to the subtasks based on the virtual machine set, and constructing a load evaluation function corresponding to the subtasks;
generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function;
determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
Further, the step of determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function specifically includes:
initializing parameters of the target artificial bee colony algorithm; wherein the parameters at least comprise maximum iteration times, a honey source range, maximum search times and bee population number;
executing population initialization processing, and randomly generating an initial solution based on a preset mapping formula;
neighborhood searching is carried out on the honey source range based on a first bee collector to obtain a first candidate solution in the honey source range;
in a honey collection bee searching stage, based on the first candidate solution and the initial solution, a preset global searching strategy method and a greedy algorithm are used for determining a first designated honey source corresponding to the honey collection bee searching stage;
acquiring honey source information transmitted by the first honey bee plucker through swinging dancing based on the observation bee, and determining a second specified honey source corresponding to the observation bee stage based on a preset free search algorithm and the honey source information;
converting the observation bees into second honey collection bees to perform neighborhood search to obtain corresponding second candidate solutions, and determining a third designated honey source corresponding to the second honey collection bees by using the global search strategy method and the greedy algorithm based on the second candidate solutions;
if the honey source reaches the mining limit corresponding to the maximum search times, converting the second honey-gathering bees into scout bees, and randomly generating a feasible solution based on the scout bees to obtain a fourth designated honey source;
and if the maximum iteration times are reached, recording the optimal solutions found by all the bees at present, and determining the optimal task scheduling scheme corresponding to the subtasks based on the optimal solutions and the target scheduling function.
Further, the step of determining, based on the first candidate solution and the initial solution, a first designated honey source corresponding to the bee sampling search stage by using a preset global search strategy method and a greedy algorithm specifically includes:
acquiring a global optimal solution corresponding to the global search strategy method;
carrying out probability cross processing on the global optimal solution and the first candidate solution to obtain a new third candidate solution;
comparing the initial solution with the third candidate solution based on the greedy algorithm to determine a specified solution meeting a preset condition;
and taking the designated solution as the first designated honey source corresponding to the bee collecting search stage.
Further, the step of determining a second designated honey source corresponding to the observation bee stage based on the preset free search algorithm and the honey source information specifically includes:
acquiring the fitness of a target honey source corresponding to the honey source information;
calculating pheromones of the target honey sources based on the fitness;
generating a sensitivity of the bees corresponding to each of the target honey sources;
and determining the second designated honey source corresponding to the observation bee stage based on the numerical comparison relationship between the pheromone and the sensitivity corresponding to each target honey source.
Further, the step of determining an optimal task scheduling scheme corresponding to the subtasks based on the optimal solution and the target scheduling function specifically includes:
substituting the scheduling scheme corresponding to each optimal solution into the target scheduling function for calculation to obtain scheduling benefits corresponding to each optimal solution;
screening out a target optimal solution corresponding to the scheduling yield with the minimum value from all the optimal solutions;
and taking the target scheduling scheme corresponding to the target optimal solution as the optimal task scheduling scheme.
Further, the step of generating the target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function specifically includes:
acquiring the time optimization function and the load evaluation function;
generating a function formula corresponding to a product between the time optimization function and the load evaluation function;
and taking the function formula as the target function.
Further, the step of determining the virtual machine set corresponding to the cloud task from a preset virtual machine cluster specifically includes:
acquiring a task category corresponding to the cloud task;
screening out a target virtual machine corresponding to the task category from the virtual machine cluster;
generating the set of virtual machines based on the target virtual machine.
In order to solve the above technical problem, an embodiment of the present application further provides a task scheduling device based on artificial intelligence, which adopts the following technical scheme:
the cloud task processing system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a cloud task to be processed and splitting the cloud task into a plurality of subtasks;
the first determining module is used for determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the set of virtual machines includes a plurality of virtual machines;
the building module is used for building a time optimization function corresponding to the subtask based on the virtual machine set and building a load evaluation function corresponding to the subtask;
a generating module, configured to generate a target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function;
the second determining module is used for determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and the allocation module is used for allocating each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
the method comprises the steps of obtaining a cloud task to be processed, and splitting the cloud task into a plurality of subtasks;
determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the virtual machine set comprises a plurality of virtual machines;
constructing a time optimization function corresponding to the subtask based on the virtual machine set, and constructing a load evaluation function corresponding to the subtask;
generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function;
determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
the method comprises the steps of obtaining a cloud task to be processed, and splitting the cloud task into a plurality of subtasks;
determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the virtual machine set comprises a plurality of virtual machines;
constructing a time optimization function corresponding to the subtask based on the virtual machine set, and constructing a load evaluation function corresponding to the subtask;
generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function;
determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
the method comprises the steps of firstly obtaining a cloud task to be processed, and splitting the cloud task into a plurality of subtasks; then determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; then, a time optimization function corresponding to the subtask is constructed based on the virtual machine set, and a load evaluation function corresponding to the subtask is constructed; generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function; subsequently, based on a preset improved target artificial bee colony algorithm and the target scheduling function, determining an optimal task scheduling scheme corresponding to the subtasks; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm; and finally, distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme. According to the cloud task scheduling method and device, the cloud task scheduling problem is abstracted into a general mathematical optimization model, then the search strategy and the selection processing of the artificial bee colony algorithm are improved according to the task scene characteristics, the cloud task scheduling optimization is carried out by using the improved target artificial bee colony algorithm and taking the target scheduling function as the target, the optimal task scheduling scheme corresponding to the subtasks can be determined quickly and accurately, and the allocation intelligence and the allocation accuracy of cloud task allocation are improved. Due to the fact that the load balancing and convergence speed of the target artificial bee colony algorithm are greatly improved, the waiting time of a user and the power consumption of a virtual machine can be reduced, and the timeliness of task scheduling is effectively improved.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram to which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of an artificial intelligence based task scheduling method according to the present application;
FIG. 3 is a schematic block diagram illustrating one embodiment of an artificial intelligence based task scheduler according to the application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 101, 102, 103 to interact with a server 105 over a network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the task scheduling method based on artificial intelligence provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the task scheduling apparatus based on artificial intelligence is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flowchart of one embodiment of an artificial intelligence based task scheduling method in accordance with the present application is shown. The task scheduling method based on artificial intelligence comprises the following steps:
step S201, acquiring a cloud task to be processed, and splitting the cloud task into a plurality of sub-tasks.
In this embodiment, an electronic device (for example, a server/terminal device shown in fig. 1) on which the artificial intelligence-based task scheduling method operates may acquire a cloud task to be processed in a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G/5G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, an UWB (ultra wideband) connection, and other wireless connection means now known or developed in the future. The cloud task can also be called a cloud computing task, and according to the cloud computing task scheduling principle, the cloud task to be executed can be split into a plurality of sub-tasks, and the sub-tasks can be scheduled to different virtual servers (virtual machines) for execution. In addition, there is a constraint on task scheduling: one task is processed on only one virtual machine and is independent of each other.
Step S202, determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the set of virtual machines includes a plurality of virtual machines.
In this embodiment, a specific implementation process of determining the virtual machine set corresponding to the cloud task from the preset virtual machine cluster is described in further detail in the following specific embodiments, and will not be described in detail herein.
Step S203, constructing a time optimization function corresponding to the subtask based on the virtual machine set, and constructing a load evaluation function corresponding to the subtask.
In this embodiment, when scheduling a cloud task, it is desirable to obtain a minimum completion time (i.e., a minimum waiting time for a user) after scheduling the task. In addition, when the virtual machine runs a task, the problem of resource load balancing needs to be considered, and reasonable use is guaranteed. Therefore, the jiang shortest task processing time is used as an optimization target and a corresponding time optimization function is constructed, and the resource load balancing problem is used as an evaluation index and a corresponding load evaluation function is constructed. Specifically, (1) the user minimum waiting time, which is the maximum value of the time taken for each virtual machine to finish processing the assigned task, is taken as an optimization target. Here denoted by W, i.e.
Figure BDA0003954821750000101
Wherein sum (j) is the total amount of tasks allocated to the virtual machine Vj; t is t ij Indicating the time required for task Ti to execute on virtual machine Vj. (2) For the load balance of the cloud server, which is denoted by F, there are:
Figure BDA0003954821750000102
wherein d is j Represents the load of the virtual machine Vj (i.e., the time for Vj to complete the task);
Figure BDA0003954821750000103
representing the average load of the virtual machines (i.e., the average time for all virtual machines to complete a task). According to the definition of the two functions, for the cloud task scheduling problem, the task scheduling mode corresponding to the condition that the waiting time of the user is shortest and the product between W and F is minimum can be obtained.
And step S204, generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function.
In this embodiment, the above-mentioned specific implementation process of generating the target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function is further described in detail in the following specific embodiments, and will not be described in detail herein.
Step S205, determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm.
In the embodiment, by improving the search strategy and the selection strategy of the artificial bee colony algorithm, the population diversity is increased to avoid trapping in local optimality, and the convergence speed is accelerated while the honey source search capability of the algorithm is enhanced. And then modeling the cloud computing task scheduling process, and optimizing the task scheduling process by using the improved target artificial bee colony algorithm. The specific implementation process of determining the optimal task scheduling scheme corresponding to the subtask based on the preset improved target artificial bee colony algorithm and the target scheduling function is described in further detail in the following specific embodiments, and will not be described herein.
Step S205, based on the optimal task scheduling scheme, allocating each of the subtasks to a corresponding virtual machine in the virtual machine cluster for processing.
In this embodiment, when the optimal task scheduling scheme is determined, each sub-task may be allocated to a corresponding virtual machine in the virtual machine cluster for processing according to the optimal task scheduling scheme.
The method includes the steps that firstly, a cloud task to be processed is obtained, and the cloud task is divided into a plurality of subtasks; then determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; then, a time optimization function corresponding to the subtask is constructed based on the virtual machine set, and a load evaluation function corresponding to the subtask is constructed; generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function; subsequently, based on a preset improved target artificial bee colony algorithm and the target scheduling function, determining an optimal task scheduling scheme corresponding to the subtasks; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm; and finally, distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme. According to the cloud task scheduling method and device, the cloud task scheduling problem is abstracted into a general mathematical optimization model, then the search strategy and the selection processing of the artificial bee colony algorithm are improved according to the task scene characteristics, the cloud task scheduling optimization is carried out by using the improved target artificial bee colony algorithm and taking the target scheduling function as the target, the optimal task scheduling scheme corresponding to the subtasks can be determined quickly and accurately, and the allocation intelligence and the allocation accuracy of cloud task allocation are improved. Due to the fact that the load balancing and convergence speed of the target artificial bee colony algorithm are greatly improved, the waiting time of a user and the power consumption of a virtual machine can be reduced, and the timeliness of task scheduling is effectively improved.
In some alternative implementations, step S205 includes the following steps:
and initializing parameters of the target artificial bee colony algorithm. Wherein the parameters at least comprise maximum iteration times, honey source range, maximum search times and bee population.
In this embodiment, the values of the maximum iteration number, the honey source range, the maximum search number, and the bee population are not specifically limited, and may be set according to actual business requirements. The bee population number can include 2S, and the bee collecting and observing number is half of the bee population number, namely the number of the bee collecting and observing is S.
And executing population initialization processing, and randomly generating an initial solution based on a preset mapping formula.
In this embodiment, the honey source of the artificial bee colony algorithm is used to represent a possible scheduling manner in the task scheduling process, and the bee colony searches the honey source, that is, a process of searching the optimal scheduling manner, through various methods. By combining the traditional artificial bee colony algorithm, the algorithm strategy is improved as follows: in the cloud task scheduling process, it is assumed that m tasks need to be scheduled to n virtual machines for execution. The honey source is the mapping relation between the tasks and the virtual machine. The initial feasible solution is randomly generated in the artificial bee colony algorithm, and the mapping formula is as follows: x is a radical of a fluorine atom ij =x 1 +rand(0,1)(x 2 -x 1 ) Wherein x is ij Is the position of the honey source; x is the number of 1 Is the minimum value of the split subtask m; x is a radical of a fluorine atom 2 Is the maximum value of m; rand (0, 1) is a random number between 0 and 1. Cloud tasks can be randomly assigned to virtual machines by randomly generating an initial solution using a mapping formula.
And performing neighborhood search on the honey source range based on the first bee to obtain a first candidate solution in the honey source range.
In this embodiment, the first honey bee uses a neighborhood search algorithm to search a feasible solution in the current honey source range to obtain the first candidate solution.
And in the searching stage of the honey collection bees, based on the first candidate solution and the initial solution, determining a first designated honey source corresponding to the searching stage of the honey collection bees by using a preset global search strategy method and a greedy algorithm.
In this embodiment, a specific implementation process of determining the first designated honey source corresponding to the honey collection search stage by using a preset global search strategy method and a greedy algorithm based on the first candidate solution and the initial solution is described in further detail in subsequent specific embodiments, and will not be described in detail herein.
And acquiring honey source information transmitted by the first honey bees through swing dancing based on the observation bees, and determining a second specified honey source corresponding to the observation bee stage based on a preset free search algorithm and the honey source information.
In this embodiment, the specific implementation process of obtaining the honey source information transmitted by the first honey bee through swinging dance based on the observer bee, and determining the second designated honey source corresponding to the observer bee stage based on the preset free search algorithm and the honey source information is described in further detail in the subsequent specific embodiment, which is not described herein.
And converting the observation bees into second honey collection bees to perform neighborhood search to obtain corresponding second candidate solutions, and determining a third designated honey source corresponding to the second honey collection bees by using the global search strategy method and the greedy algorithm based on the second candidate solutions.
In this embodiment, the process of determining the third designated honey source corresponding to the second honey bee by using the global search strategy method and the greedy algorithm based on the second candidate solution may refer to the determination process of the first designated honey source, and is not described herein again.
And if the honey source reaches the mining limit corresponding to the maximum search times, converting the second honey-gathering bees into scout bees, and randomly generating a feasible solution based on the scout bees to obtain a fourth specified honey source.
In this embodiment, the above feasible solution randomly generated based on the scout bees can refer to the above initial solution generation process, which is not described herein in detail.
And if the maximum iteration times are reached, recording the optimal solutions found by all the bees at present, and determining the optimal task scheduling scheme corresponding to the subtasks based on the optimal solutions and the target scheduling function.
In this embodiment, the specific implementation process of determining the optimal task scheduling scheme corresponding to the subtask based on the optimal solution and the target scheduling function is described in further detail in the following specific embodiments, and is not described herein too much.
According to the method and the device, the optimal task scheduling scheme corresponding to the subtasks can be quickly and accurately determined based on the preset improved target artificial bee colony algorithm and the target scheduling function, the target artificial bee colony algorithm is greatly improved in load balance and convergence speed, the distribution intelligence and the distribution accuracy of cloud task distribution are improved, and the timeliness of task scheduling can be effectively improved.
In some optional implementation manners of this embodiment, the determining, based on the first candidate solution and the initial solution, a first designated honey source corresponding to the bee sampling search stage by using a preset global search strategy method and a greedy algorithm includes the following steps:
and acquiring a global optimal solution corresponding to the global search strategy method.
In this embodiment, the conventional artificial bee colony algorithm has a strong neighborhood searching capability, which makes the ability to develop new values weak. In order to enhance the development capability of the algorithm, an improved strategy method combined with global search is provided, namely the global search strategy method. The global search strategy method is defined as follows:
Figure BDA0003954821750000141
wherein x is ij Is the position of the honey source;
Figure BDA0003954821750000142
searching a position for the global honey source; alpha is a random number between-1 and 1; beta is a random number between 0 and 1;
Figure BDA0003954821750000143
the jth component of the globally optimal solution.
And carrying out probability cross processing on the global optimal solution and the first candidate solution to obtain a new third candidate solution.
And comparing the initial solution with the third candidate solution based on the greedy algorithm to determine a specified solution meeting a preset condition.
In this embodiment, the greedy algorithm may be a greedy selection algorithm, and the specified solution of the preset condition refers to a honey source with a short task completion time in task scheduling. Specifically, the fitness value of the third candidate solution may be calculated based on a fitness calculation formula, and then according to a greedy selection algorithm, if it is detected that the fitness value of the third candidate solution is higher than the original initial solution, the third candidate solution is substituted for the candidate solution, that is, the third candidate solution is used as the specified solution, otherwise, the original initial solution is retained and used as the specified solution.
And taking the specified solution as the first specified honey source corresponding to the bee collecting search stage.
In this embodiment, the honey source of the artificial bee colony algorithm represents a possible scheduling mode in the task scheduling process, the bee colony searches the honey source through various methods, that is, a process of searching an optimal scheduling mode, and the honey source can be understood as a mapping relationship between a task and a virtual machine.
According to the method, a global optimal solution corresponding to the global search strategy method is obtained, then probability cross processing is carried out on the global optimal solution and the first candidate solution to obtain a new third candidate solution, the initial solution and the third candidate solution are compared based on the greedy algorithm to determine an appointed solution meeting preset conditions, and the appointed solution is used as the first appointed honey source corresponding to the bee collecting search stage. According to the method and the device, the first designated honey source corresponding to the bee collecting searching stage is generated based on the use of a preset global searching strategy method and a greedy algorithm, the development capacity of a target artificial bee colony algorithm is enhanced, and the accuracy of the generated first designated honey source is ensured.
In some optional implementations, the determining, based on the preset free search algorithm and the honey source information, a second specified honey source corresponding to the observation bee stage includes the following steps:
and acquiring the fitness of the target honey source corresponding to the honey source information.
In the embodiment, in the artificial bee colony algorithm, bees can select a better honey source according to fitness in the process of selecting the honey source, and a poorer honey source is abandoned, so that the diversity of the colony is reduced, the optimizing capability of the algorithm is influenced, and the algorithm is early mature and falls into local optimization. Wherein, assuming that N target honey sources coexist, the fitness of each target honey source is f (x).
And calculating pheromones of the target honey sources based on the fitness.
In the present embodiment, the pheromone of each target honey source can be calculated based on the following formula:
Figure BDA0003954821750000151
wherein f is i The fitness function value of the ith target honey source is the scheduling completion time of the cloud task
Figure BDA0003954821750000152
f min Is the minimum fitness value; f. of max Is the maximum fitness value; o (i) is pheromone of the ith honey source.
Generating a sensitivity of the bees corresponding to each of the target honey sources.
In this embodiment, the sensitivity L (i) of the ith bee corresponding to the target honey source can be randomly generated, and the range is (0, 1).
And determining the second designated honey source corresponding to the observation bee stage based on the numerical comparison relationship between the pheromone and the sensitivity corresponding to each target honey source.
In the embodiment, if the sensitivity L (i) of the ith bee is less than or equal to O (i), performing a domain search and selecting a new honey source; if L (i) > O (i), the honey source position is unchanged.
The method comprises the steps of obtaining fitness of target honey sources corresponding to honey source information, calculating pheromones of the target honey sources based on the fitness, generating sensitivity of bees corresponding to the target honey sources, and determining the second designated honey sources corresponding to observation bee stages based on numerical comparison between the pheromones and the sensitivity of the target honey sources. Therefore, the sensitivity concept in the free search algorithm is introduced into the artificial bee colony algorithm, so that the honey sources with any fitness can be selected, the population diversity is richer, the algorithm can be prevented from falling into local optimum, the excellent honey source selection probability is higher, the direction of observing the bees for selecting the honey sources is ensured, and the accuracy of the generated second designated honey source is ensured.
In some optional implementation manners, the determining an optimal task scheduling scheme corresponding to the subtask based on the optimal solution and the target scheduling function includes the following steps:
and substituting the scheduling scheme corresponding to each optimal solution into the target scheduling function for calculation to obtain scheduling benefits respectively corresponding to each optimal solution.
In this embodiment, after the scheduling gains corresponding to the optimal solutions are obtained, all the scheduling gains may be sorted in the order from small to large to generate corresponding sorting results.
And screening out the target optimal solution corresponding to the scheduling yield with the minimum value from all the optimal solutions.
In this embodiment, the first assigned scheduling benefit of the scheduling benefits may be obtained first, and the optimal solution corresponding to the assigned scheduling benefit may be used as the target optimal solution.
And taking the target scheduling scheme corresponding to the target optimal solution as the optimal task scheduling scheme.
In this embodiment, the task scheduling scheme having the least task scheduling completion time corresponds to the optimal task scheduling scheme.
The scheduling scheme corresponding to each optimal solution is substituted into the target scheduling function for calculation, and scheduling benefits corresponding to each optimal solution are obtained; and then screening out a target optimal solution corresponding to the scheduling benefit with the minimum value from all the optimal solutions, and taking a target scheduling scheme corresponding to the target optimal solution as the optimal task scheduling scheme, so that the optimal task scheduling scheme corresponding to the subtasks is quickly and accurately determined, and the allocation intelligence and the allocation accuracy of cloud task allocation are improved.
In some optional implementations of this embodiment, step S204 includes the following steps:
and acquiring the time optimization function and the load evaluation function.
And generating a function formula corresponding to the product between the time optimization function and the load evaluation function.
In this embodiment, if the time optimization function is represented by W and the load evaluation function is represented by F, the function formula may include: w x F.
And taking the function formula as the target function.
In this embodiment, according to the definitions of the time optimization function and the load evaluation function, for the task scheduling problem, we need to care about obtaining a task scheduling manner that minimizes the user waiting time and balances the load, that is, a case where the product between the time optimization function and the load evaluation function, that is, the above-mentioned W and F, is the smallest.
The time optimization function and the load evaluation function are obtained; and generating a function formula corresponding to the product of the time optimization function and the load evaluation function, and taking the function formula as the target function. According to the method and the device, the influence of task processing time and resource load balance on task scheduling is considered at the same time, and then the target scheduling function corresponding to the subtasks is generated based on the time optimization function and the load evaluation function, so that the optimal task scheduling scheme corresponding to the subtasks can be determined quickly and accurately based on the target artificial bee colony algorithm which is improved through presetting and the target scheduling function in the follow-up process.
In some optional implementations of this embodiment, step S202 includes the following steps:
and acquiring a task category corresponding to the cloud task.
In this embodiment, for each different task, a task category matching the task is created separately.
And screening out a target virtual machine corresponding to the task type from the virtual machine cluster.
In this embodiment, a plurality of virtual machines are stored in the virtual machine cluster, and corresponding processing task categories may be respectively allocated to each virtual machine in advance according to actual service requirements, so as to serve as identification information of the corresponding virtual machine.
Generating the set of virtual machines based on the target virtual machine.
In this embodiment, all the screened target virtual machines may be integrated to construct and obtain the virtual machine set. All of the target virtual machines are included within the set of virtual machines.
According to the cloud task processing method and device, the task category corresponding to the cloud task is obtained, the target virtual machine corresponding to the task category is screened from the virtual machine cluster, the virtual machine set is generated based on the target virtual machine, so that follow-up subtasks obtained by dividing the cloud task can be intelligently distributed to the target virtual machine matched with the task category to which the cloud task belongs to execute, and the normalization of cloud task processing is guaranteed.
It should be emphasized that, in order to further ensure the privacy and security of the optimal task scheduling scheme, the optimal task scheduling scheme may also be stored in a node of a block chain.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless otherwise indicated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of a task scheduling apparatus based on artificial intelligence, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the task scheduling device 300 based on artificial intelligence according to this embodiment includes: an acquisition module 301, a first determination module 302, a construction module 303, a generation module, a second determination module 305, and an assignment module 306. Wherein:
an obtaining module 301, configured to obtain a cloud task to be processed, and split the cloud task into multiple subtasks;
a first determining module 302, configured to determine, from a preset virtual machine cluster, a virtual machine set corresponding to the cloud task; wherein the virtual machine set comprises a plurality of virtual machines;
a building module 303, configured to build a time optimization function corresponding to the subtask based on the virtual machine set, and build a load evaluation function corresponding to the subtask;
a generating module 304, configured to generate a target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function;
a second determining module 305, configured to determine, based on a preset improved target artificial bee colony algorithm and the target scheduling function, an optimal task scheduling scheme corresponding to the subtasks; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
an allocating module 306, configured to allocate each sub-task to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the second determining module 305 includes:
the first processing submodule is used for initializing parameters of the target artificial bee colony algorithm; wherein the parameters at least comprise maximum iteration times, a honey source range, maximum search times and bee population number;
the second processing submodule is used for executing population initialization processing and randomly generating an initial solution based on a preset mapping formula;
the first generation submodule is used for carrying out neighborhood search on the honey source range based on a first bee collection to obtain a first candidate solution in the honey source range;
the first determining submodule is used for determining a first designated honey source corresponding to the honey collection bee searching stage by using a preset global searching strategy method and a greedy algorithm based on the first candidate solution and the initial solution in the honey collection bee searching stage;
the second determining submodule is used for acquiring honey source information transmitted by the first honey-gathering bee through swing dancing based on the observation bee, and determining a second specified honey source corresponding to the observation bee stage based on a preset free search algorithm and the honey source information;
a third determining submodule, configured to convert the observation bee into a second honey collection bee, perform neighborhood search to obtain a corresponding second candidate solution, and determine, based on the second candidate solution, a third designated honey source corresponding to the second honey collection bee by using the global search strategy method and the greedy algorithm;
the second generation submodule is used for converting the second honey-collecting bees into scout bees if the honey source reaches the mining limit corresponding to the maximum search times, and randomly generating a feasible solution based on the scout bees to obtain a fourth designated honey source;
and the fourth determining submodule is used for recording the optimal solution found by all the bees at present if the maximum iteration times is reached, and determining the optimal task scheduling scheme corresponding to the subtasks based on the optimal solution and the target scheduling function.
In this embodiment, the operations that the modules or units are respectively configured to execute correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the first determining sub-module includes:
the first acquisition unit is used for acquiring a global optimal solution corresponding to the global search strategy method;
the processing unit is used for carrying out probability cross processing on the global optimal solution and the first candidate solution to obtain a new third candidate solution;
a first determining unit, configured to compare the initial solution with the third candidate solution based on the greedy algorithm, and determine a specified solution meeting a preset condition;
a second determining unit, configured to use the specified solution as the first specified honey source corresponding to the honey collection stage.
In this embodiment, the operations that the modules or units are respectively configured to execute correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the second determining sub-module includes:
the second acquisition unit is used for acquiring the fitness of the target honey source corresponding to the honey source information;
the first calculating unit is used for calculating pheromones of the target honey sources based on the fitness;
a generating unit for generating the sensitivity of bees corresponding to each of the target honey sources;
and the third determining unit is used for determining the second designated honey source corresponding to the observation bee stage based on the numerical comparison relationship between the pheromone and the sensitivity corresponding to each target honey source.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the fourth determining sub-module includes:
the second calculating unit is used for substituting the scheduling scheme corresponding to each optimal solution into the target scheduling function for calculation to obtain scheduling benefits respectively corresponding to each optimal solution;
the screening unit is used for screening out a target optimal solution corresponding to the scheduling benefit with the minimum value from all the optimal solutions;
and a fourth determining unit, configured to use the target scheduling scheme corresponding to the target optimal solution as the optimal task scheduling scheme.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the generating module 304 includes:
the first obtaining submodule is used for obtaining the time optimization function and the load evaluation function;
the third generation submodule is used for generating a function formula corresponding to the product of the time optimization function and the load evaluation function;
a fifth determining submodule, configured to use the function formula as the target function.
In this embodiment, the operations that the modules or units are respectively configured to execute correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In some optional implementations of this embodiment, the first determining module 302 includes:
the second obtaining submodule is used for obtaining the task category corresponding to the cloud task;
the screening submodule is used for screening out a target virtual machine corresponding to the task category from the virtual machine cluster;
and the fourth generation submodule is used for generating the virtual machine set based on the target virtual machine.
In this embodiment, the operations that the modules or units are respectively configured to execute correspond to the steps of the artificial intelligence based task scheduling method in the foregoing embodiment one to one, and are not described herein again.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, and a network interface 43, which are communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including flash memory, hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the computer device 4. Of course, the memory 41 may also include both an internal storage unit of the computer device 4 and an external storage device thereof. In this embodiment, the memory 41 is generally used for storing an operating system and various application software installed on the computer device 4, such as computer readable instructions of an artificial intelligence based task scheduling method. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, execute computer readable instructions of the artificial intelligence based task scheduling method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, a cloud task to be processed is obtained firstly, and the cloud task is split into a plurality of subtasks; then determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; then, a time optimization function corresponding to the subtask is constructed based on the virtual machine set, and a load evaluation function corresponding to the subtask is constructed; generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function; subsequently, based on a preset improved target artificial bee colony algorithm and the target scheduling function, determining an optimal task scheduling scheme corresponding to the subtasks; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm; and finally, distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme. According to the cloud task scheduling method and device, the cloud task scheduling problem is abstracted into a general mathematical optimization model, then the search strategy and the selection processing of the artificial bee colony algorithm are improved according to the task scene characteristics, the cloud task scheduling optimization is carried out by using the improved target artificial bee colony algorithm and taking the target scheduling function as the target, the optimal task scheduling scheme corresponding to the subtasks can be determined quickly and accurately, and the allocation intelligence and the allocation accuracy of cloud task allocation are improved. Due to the fact that the load balancing and convergence speed of the target artificial bee colony algorithm are greatly improved, the waiting time of a user and the power consumption of a virtual machine can be reduced, and the timeliness of task scheduling is effectively improved.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the artificial intelligence based task scheduling method as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, a cloud task to be processed is obtained firstly, and the cloud task is split into a plurality of subtasks; then determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; then, a time optimization function corresponding to the subtasks is constructed based on the virtual machine set, and a load evaluation function corresponding to the subtasks is constructed; generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function; subsequently, based on a preset improved target artificial bee colony algorithm and the target scheduling function, determining an optimal task scheduling scheme corresponding to the subtasks; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm; and finally, distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme. According to the cloud task scheduling method and device, the cloud task scheduling problem is abstracted into a general mathematical optimization model, then the search strategy and the selection processing of the artificial bee colony algorithm are improved according to the task scene characteristics, the cloud task scheduling optimization is carried out by using the improved target artificial bee colony algorithm and taking the target scheduling function as the target, the optimal task scheduling scheme corresponding to the subtasks can be determined quickly and accurately, and the allocation intelligence and the allocation accuracy of cloud task allocation are improved. Due to the fact that the target artificial bee colony algorithm is greatly improved in load balancing and convergence speed, user waiting time and virtual machine power consumption can be reduced, and timeliness of task scheduling is effectively improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It should be understood that the above-described embodiments are merely exemplary of some, and not all, embodiments of the present application, and that the drawings illustrate preferred embodiments of the present application without limiting the scope of the claims appended hereto. This application is capable of embodiments in many different forms and the embodiments are provided so that this disclosure will be thorough and complete. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields, and all the equivalent structures are within the protection scope of the present application.

Claims (10)

1. A task scheduling method based on artificial intelligence is characterized by comprising the following steps:
the method comprises the steps of obtaining a cloud task to be processed, and splitting the cloud task into a plurality of subtasks;
determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the set of virtual machines includes a plurality of virtual machines;
constructing a time optimization function corresponding to the subtask based on the virtual machine set, and constructing a load evaluation function corresponding to the subtask;
generating a target scheduling function corresponding to the subtasks based on the time optimization function and the load evaluation function;
determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
2. The artificial intelligence based task scheduling method of claim 1, wherein the step of determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function specifically comprises:
initializing parameters of the target artificial bee colony algorithm; wherein the parameters at least comprise maximum iteration times, a honey source range, maximum search times and bee population;
executing population initialization processing, and randomly generating an initial solution based on a preset mapping formula;
performing neighborhood search on the honey source range based on a first bee to obtain a first candidate solution in the honey source range;
in a honey collection bee searching stage, based on the first candidate solution and the initial solution, a preset global searching strategy method and a greedy algorithm are used for determining a first designated honey source corresponding to the honey collection bee searching stage;
acquiring honey source information transmitted by the first honey bee plucker through swinging dancing based on the observation bee, and determining a second specified honey source corresponding to the observation bee stage based on a preset free search algorithm and the honey source information;
converting the observation bees into second honey collection bees to perform neighborhood search to obtain corresponding second candidate solutions, and determining a third designated honey source corresponding to the second honey collection bees by using the global search strategy method and the greedy algorithm based on the second candidate solutions;
if the honey source reaches the mining limit corresponding to the maximum search times, converting the second honey-gathering bees into scout bees, and randomly generating a feasible solution based on the scout bees to obtain a fourth designated honey source;
and if the maximum iteration times are reached, recording the optimal solutions found by all the bees at present, and determining the optimal task scheduling scheme corresponding to the subtasks based on the optimal solutions and the target scheduling function.
3. The artificial intelligence based task scheduling method according to claim 2, wherein the step of determining a first designated honey source corresponding to the bee sampling search stage by using a preset global search strategy method and a greedy algorithm based on the first candidate solution and the initial solution specifically includes:
acquiring a global optimal solution corresponding to the global search strategy method;
carrying out probability cross processing on the global optimal solution and the first candidate solution to obtain a new third candidate solution;
comparing the initial solution with the third candidate solution based on the greedy algorithm to determine a specified solution meeting a preset condition;
and taking the specified solution as the first specified honey source corresponding to the bee collecting search stage.
4. The artificial intelligence based task scheduling method according to claim 2, wherein the step of determining a second designated honey source corresponding to the observation bee stage based on the preset free search algorithm and the honey source information specifically includes:
acquiring the fitness of a target honey source corresponding to the honey source information;
calculating pheromones of the target honey sources based on the fitness;
generating the sensitivity of the bees corresponding to each of the target honey sources;
and determining the second designated honey source corresponding to the observation bee stage based on the numerical comparison relationship between the pheromone and the sensitivity corresponding to each target honey source.
5. The artificial intelligence based task scheduling method according to claim 2, wherein the step of determining the optimal task scheduling scheme corresponding to the subtask based on the optimal solution and the target scheduling function specifically includes:
substituting the scheduling scheme corresponding to each optimal solution into the target scheduling function for calculation to obtain scheduling benefits respectively corresponding to each optimal solution;
screening out a target optimal solution corresponding to the scheduling yield with the minimum value from all the optimal solutions;
and taking the target scheduling scheme corresponding to the target optimal solution as the optimal task scheduling scheme.
6. The artificial intelligence based task scheduling method according to claim 1, wherein the step of generating the target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function specifically includes:
acquiring the time optimization function and the load evaluation function;
generating a function formula corresponding to a product between the time optimization function and the load evaluation function;
and taking the function formula as the target function.
7. The artificial intelligence based task scheduling method according to claim 1, wherein the step of determining the virtual machine set corresponding to the cloud task from a preset virtual machine cluster specifically includes:
acquiring a task category corresponding to the cloud task;
screening out a target virtual machine corresponding to the task type from the virtual machine cluster;
generating the set of virtual machines based on the target virtual machine.
8. An artificial intelligence based task scheduling apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a cloud task to be processed and splitting the cloud task into a plurality of subtasks;
the first determining module is used for determining a virtual machine set corresponding to the cloud task from a preset virtual machine cluster; wherein the set of virtual machines includes a plurality of virtual machines;
the building module is used for building a time optimization function corresponding to the subtask based on the virtual machine set and building a load evaluation function corresponding to the subtask;
a generating module, configured to generate a target scheduling function corresponding to the subtask based on the time optimization function and the load evaluation function;
the second determining module is used for determining an optimal task scheduling scheme corresponding to the subtasks based on a preset improved target artificial bee colony algorithm and the target scheduling function; the target artificial bee colony algorithm is obtained by carrying out search strategy improvement and selection strategy improvement on the artificial bee colony algorithm;
and the distribution module is used for distributing each subtask to a corresponding virtual machine in the virtual machine cluster for processing based on the optimal task scheduling scheme.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the artificial intelligence based task scheduling method of any of claims 1 to 7.
10. A computer-readable storage medium having computer-readable instructions stored thereon which, when executed by a processor, implement the steps of the artificial intelligence based task scheduling method of any one of claims 1 to 7.
CN202211459350.5A 2022-11-16 2022-11-16 Task scheduling method, device, equipment and storage medium based on artificial intelligence Pending CN115794341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211459350.5A CN115794341A (en) 2022-11-16 2022-11-16 Task scheduling method, device, equipment and storage medium based on artificial intelligence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211459350.5A CN115794341A (en) 2022-11-16 2022-11-16 Task scheduling method, device, equipment and storage medium based on artificial intelligence

Publications (1)

Publication Number Publication Date
CN115794341A true CN115794341A (en) 2023-03-14

Family

ID=85439605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211459350.5A Pending CN115794341A (en) 2022-11-16 2022-11-16 Task scheduling method, device, equipment and storage medium based on artificial intelligence

Country Status (1)

Country Link
CN (1) CN115794341A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339955A (en) * 2023-05-25 2023-06-27 中国人民解放军国防科技大学 Local optimization method and device for computing communication framework and computer equipment
CN116932164A (en) * 2023-07-25 2023-10-24 和光舒卷(广东)数字科技有限公司 Multi-task scheduling method and system based on cloud platform
CN117707797A (en) * 2024-02-06 2024-03-15 湘江实验室 Task scheduling method and device based on distributed cloud platform and related equipment
CN118590548A (en) * 2024-08-01 2024-09-03 苏州爱雄斯通信技术有限公司 Method and system for optimizing multi-task scheduling in optical communication device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339955A (en) * 2023-05-25 2023-06-27 中国人民解放军国防科技大学 Local optimization method and device for computing communication framework and computer equipment
CN116339955B (en) * 2023-05-25 2023-08-11 中国人民解放军国防科技大学 Local optimization method and device for computing communication framework and computer equipment
CN116932164A (en) * 2023-07-25 2023-10-24 和光舒卷(广东)数字科技有限公司 Multi-task scheduling method and system based on cloud platform
CN116932164B (en) * 2023-07-25 2024-03-29 和光舒卷(广东)数字科技有限公司 Multi-task scheduling method and system based on cloud platform
CN117707797A (en) * 2024-02-06 2024-03-15 湘江实验室 Task scheduling method and device based on distributed cloud platform and related equipment
CN117707797B (en) * 2024-02-06 2024-05-03 湘江实验室 Task scheduling method and device based on distributed cloud platform and related equipment
CN118590548A (en) * 2024-08-01 2024-09-03 苏州爱雄斯通信技术有限公司 Method and system for optimizing multi-task scheduling in optical communication device

Similar Documents

Publication Publication Date Title
Abd Elaziz et al. Advanced optimization technique for scheduling IoT tasks in cloud-fog computing environments
Pham et al. A cost-and performance-effective approach for task scheduling based on collaboration between cloud and fog computing
Hamad et al. Genetic-based task scheduling algorithm in cloud computing environment
CN115794341A (en) Task scheduling method, device, equipment and storage medium based on artificial intelligence
Rahbari et al. A security aware scheduling in fog computing by hyper heuristic algorithm
Mechalikh et al. PureEdgeSim: A simulation framework for performance evaluation of cloud, edge and mist computing environments
Mahmoud et al. Multiobjective task scheduling in cloud environment using decision tree algorithm
CN107291337A (en) A kind of method and device that Operational Visit is provided
CN111950622B (en) Behavior prediction method, device, terminal and storage medium based on artificial intelligence
CN112036483B (en) AutoML-based object prediction classification method, device, computer equipment and storage medium
Li et al. Research on QoS service composition based on coevolutionary genetic algorithm
CN112529477A (en) Credit evaluation variable screening method, device, computer equipment and storage medium
CN113191533A (en) Warehouse employment prediction method, device, equipment and storage medium
Wang et al. Decomposition-based multi-objective evolutionary algorithm for virtual machine and task joint scheduling of cloud computing in data space
Sana et al. Improved particle swarm optimization based on blockchain mechanism for flexible job shop problem
CN114462780A (en) Robot scheduling method and device, computer equipment and storage medium
Oliveira et al. Optimizing query prices for data-as-a-service
WO2023207630A1 (en) Task solving method and apparatus therefor
Senthilkumar et al. Energy aware task scheduling using hybrid firefly-GA in big data
CN115860835A (en) Advertisement recommendation method, device and equipment based on artificial intelligence and storage medium
US11269625B1 (en) Method and system to identify and prioritize re-factoring to improve micro-service identification
Du et al. OctopusKing: A TCT-aware task scheduling on spark platform
CN117519996B (en) Data processing method, device, equipment and storage medium
CN115239185A (en) Service provider distribution method, service provider distribution device, computer equipment and storage medium
CN117806951A (en) Intelligent scheduling method and related equipment applied to distributed operation of test cases

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination