Task random scheduling method and device, and storage medium
By modeling task execution time as a normally distributed random variable and combining probability theory and stochastic optimization, the problems of resource waste and service quality in cloud computing task scheduling are solved, achieving efficient task scheduling and maximizing profits for private cloud providers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE GROUP JIANGSU
- Filing Date
- 2022-03-21
- Publication Date
- 2026-06-12
AI Technical Summary
Existing cloud computing task scheduling methods are based on fixed task execution durations, which can lead to untimely task scheduling or waste of cloud space resources, affecting service quality and increasing costs.
By modeling task execution time as a random variable following a normal distribution, and combining stochastic optimization and probability theory, using probability-based deadline constraints, the complete probability distribution information of crowdsourcing application completion time is determined, and the task scheduling order is optimized to maximize the profit of the private cloud provider.
This effectively ensures the scheduling time of crowdsourcing applications and the service quality of private cloud providers, while reducing resource waste and costs.
Smart Images

Figure CN116820699B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hybrid cloud computing technology, specifically to a method, apparatus, and storage medium for random task scheduling. Background Technology
[0002] Crowdsourced task applications (or simply "crowdsourced applications") are applications that consist of multiple independent tasks that can be processed in a highly parallel manner.
[0003] Cloud computing task scheduling is primarily based on task execution duration. Current scheduling methods typically rely on preset fixed task execution durations. However, the actual task execution duration can only be determined after the task is completed, often deviating from the preset fixed execution duration. This can lead to untimely task scheduling or waste of cloud space resources.
[0004] Application content
[0005] To address the aforementioned problems in the existing technology, embodiments of this application provide a method, apparatus, and storage medium for random task scheduling.
[0006] Firstly, this application provides a method for random task scheduling, including:
[0007] Given that a user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0008] The antibody population is initialized, and the initial scheduling solution sequence is determined based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0009] Execute a target iteration process, the target iteration process including:
[0010] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0011] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0012] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0013] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0014] When the preset number of iterations is reached, the scheduling scheme for each task in the multiple crowdsourcing applications is determined based on the optimal scheduling solution sequence in the last target iteration process.
[0015] Optionally, determining the initial scheduling solution sequence based on the deadline violation probability corresponding to each task includes:
[0016] All tasks are sorted in a non-ascending order according to the probability of deadline violation, resulting in the initial scheduling solution sequence for the first-generation antibody population.
[0017] Optionally, the probability of deadline violation satisfies:
[0018]
[0019] Among them, DVP ij This represents the probability of a deadline violation for the j-th task in the i-th crowdsourcing application. Let d represent the probability distribution of the execution time of the j-th task in the i-th crowdsourcing application. i This represents the deadline for all tasks in the i-th crowdsourcing application.
[0020] Optionally, determining the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population includes:
[0021] For the task sequence corresponding to the antibody in the current antibody population, the task sequence is to find a continuous time slot available on the private cloud for each task in the task sequence.
[0022] If a continuous time slot available on a private cloud is found for the target task, the start time is recorded, the execution location of the target task is determined to be the private cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the start time and the execution duration of the target task.
[0023] If no continuous time slot is found available on a private cloud for the target task, the execution location of the target task is determined to be a public cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the execution duration of the target task.
[0024] Optionally, the step of deleting antibodies from the current antibody population that do not meet the probability constraints of the deadline, based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, includes:
[0025] Based on Clark's formula and the probability distribution of the expected completion time of all tasks in each crowdsourcing application, the probability distribution of the expected completion time of each crowdsourcing application is determined.
[0026] If the probability distribution of the expected completion time of the crowdsourcing application meets the probability constraint of the deadline, delete the antibody corresponding to the task sequence in the current antibody population that does not meet the probability constraint of the deadline.
[0027] Optionally, determining the probability that each task in the task sequence corresponding to the antibody remains in its original position based on the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody, includes:
[0028] Determine the difference between the fitness value of the optimal scheduling solution sequence and the fitness value of the task sequence corresponding to the antibody;
[0029] Based on the difference, determine the probability that each task in the task sequence corresponding to the antibody remains in its original position, and initialize the first empty solution sequence and the second empty solution sequence.
[0030] For each task in the task sequence corresponding to the antibody, a random number is generated and the relationship between the probability and the random number is determined. When the probability is greater than the random number, the task at the corresponding position in the task sequence is added to the first empty solution sequence; when the probability is less than the random number, the task at the corresponding position in the task sequence is added to the second empty solution sequence.
[0031] The tasks in the second empty solution sequence are added to the empty positions in the first empty solution sequence with a uniform probability to obtain the mutated antibody.
[0032] Optionally, the probability of each task in the task sequence corresponding to the antibody remaining in its original position is determined based on the difference, satisfying the following calculation formula:
[0033]
[0034] Among them, diff xA represents the fitness value of the task sequence of the x-th antibody and the optimal scheduling solution sequence A in the current antibody population. * fitness value f(A) * The difference between p and p x This represents the probability that each task in the x-th antibody remains in its original position.
[0035] Secondly, this application also provides a task random scheduling apparatus, comprising:
[0036] The acquisition module is used to acquire the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed, when it is determined that the user selects a private cloud space to process multiple crowdsourcing applications; one crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0037] The first determining module is used to initialize the antibody population and determine the initial scheduling solution sequence based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0038] An iteration module is used to execute a target iteration process, which includes:
[0039] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0040] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0041] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0042] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0043] The second determining module is used to determine the scheduling scheme of each task in the multiple crowdsourcing applications based on the optimal scheduling solution sequence in the last target iteration process when a preset number of iterations is reached.
[0044] Thirdly, this application also provides an electronic device, including a memory and a memory storing a computer program, wherein the processor executes the program to implement the steps of the task random scheduling method described in the first aspect.
[0045] Fourthly, this application also provides a processor-readable storage medium storing a computer program for causing the processor to perform the steps of the task random scheduling method described in the first aspect.
[0046] The task random scheduling method, apparatus, and storage medium provided in this application model the task execution time as a random variable that follows a normal distribution. By combining stochastic optimization and probability theory, and using probability-based deadline constraints, the complete probability distribution information of the crowdsourcing application completion time is determined, thereby effectively ensuring the scheduling time of the crowdsourcing application and the service quality of the private cloud provider. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is one of the flowcharts illustrating the task random scheduling method provided in the embodiments of this application;
[0049] Figure 2 This is a second flowchart illustrating the task random scheduling method provided in the embodiments of this application;
[0050] Figure 3 This is a schematic diagram of the structure of the task random scheduling device provided in the embodiments of this application;
[0051] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] To better describe the technical solutions in the embodiments of this application, relevant knowledge is introduced below.
[0053] (1) Crowdsourcing Applications
[0054] Crowdsourcing is a distributed problem-solving and production model. With the widespread adoption of mobile devices, numerous mobile crowdsourcing task applications (or simply crowdsourcing apps) have emerged. Crowdsourcing apps are highly parallelizable applications composed of multiple independent tasks, and are widely used in fields such as computer imaging, computational biology, parametric scanning, fractal computing, and data mining.
[0055] (2) Crowdsourcing application scheduling
[0056] A private cloud refers to computing services provided to select users (not the general public) via the Internet or a dedicated internal network. In a private cloud, users rent cloud servers to complete corresponding tasks, and the cloud server provider guarantees that the tasks required by the user will be completed within a specified time.
[0057] In a private cloud space, cloud server providers need to allocate tasks of different types and durations to ensure that the private cloud can complete the tasks within the constraints and minimize the waste of cloud space resources in order to save costs.
[0058] Current cloud computing task scheduling primarily relies on preset fixed task execution durations, which are typically derived from averages obtained through multiple measurements. Due to the uncertainty of the tasks users need to execute, the actual task execution time can only be determined after the task is completed and is influenced by various factors, often deviating from the preset fixed execution time. If the actual execution time exceeds the specified time, the task cannot be completed on time, impacting the cloud server provider's Quality of Service (QoS); if the actual execution time is less than the specified time, it wastes cloud space resources and increases the service costs for the cloud server provider.
[0059] To address the aforementioned problems in the existing technology, this application provides a task random scheduling method, apparatus, and storage medium. By modeling the task execution time as a random variable that follows a normal distribution, and combining stochastic optimization and probability theory, a probability-based deadline constraint is used to determine the complete probability distribution information of the crowdsourcing application completion time, thereby effectively ensuring the scheduling time of the crowdsourcing application and the service quality of the private cloud provider.
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0061] Figure 1 This is one of the flowcharts illustrating the task random scheduling method provided in the embodiments of this application, such as... Figure 1 As shown, the method includes at least the following steps:
[0062] Step 101: If it is determined that the user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0063] Specifically, a crowdsourcing application can have multiple independent tasks that share the same deadline. In a private cloud, different users provide different crowdsourcing applications. Parsing and arranging these user-uploaded applications yields an initial task sequence, which consists of multiple tasks. This initial task sequence can be generated according to preset task execution durations, task priorities, and other principles to obtain a relatively high-quality initial scheduling solution sequence; alternatively, it can be generated through random arrangement.
[0064] Depending on user needs, task sequences can be pushed to either public or private cloud spaces for processing. If the user chooses a public cloud space, the tasks will be executed according to the initial task sequence randomly generated after parsing by the crowdsourcing application. If the user chooses a private cloud space, the initial task sequence needs to be adjusted based on task execution time, utilization of private cloud space resources, and the profit of the private cloud provider. This ensures the crowdsourcing application completes on time while scheduling it to a server in a hybrid cloud environment (a combination of cloud computing and edge computing) to maximize the profit of the private cloud provider.
[0065] When parsing multiple crowdsourcing applications to be processed, it is necessary to obtain relevant parameters for each task, including deadlines and execution durations. In this embodiment, the execution duration of each task is modeled as a random variable following a normal distribution.
[0066] For example, obtain n crowdsourcing applications A = {a1, a2, ..., a...} to be processed. n For the i-th crowdsourcing application a i It can be obtained through a triple a i = <x iq ,d i ,T i > is used to represent this. Where x is... iq Indicates the type of virtual machine required to execute the i-th crowdsourcing application, d i T represents the deadline for each task in the i-th crowdsourcing application. i This represents the number of tasks contained in the i-th crowdsourcing application.
[0067] For the j-th task t in the i-th crowdsourcing application of the task sequence ij The probability distribution of its corresponding execution time Following a normal distribution, it can be determined by its mean μ. ij and variance To represent, specifically:
[0068]
[0069] Step 102: Initialize the antibody population and determine the initial scheduling solution sequence based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0070] Specifically, this application utilizes a metaheuristic task scheduling algorithm based on an immune algorithm to schedule crowdsourcing applications. An antibody population, P, is initialized, mapping the execution order of tasks to antibodies within the population. Multiple antibodies, P = {A1, A2, ..., A...}, are randomly generated. x ,…}.
[0071] Considering the urgency of completing random tasks before the deadline, based on the probability distribution of the execution time of each task... and deadline d i The Deadline Violation Probability (DVP) of each task is calculated. DVP represents the urgency of a task's completion by the deadline, i.e., the probability that the execution time will exceed the deadline. A smaller DVP value indicates a higher probability that the task will be completed on time. Arranging the DVP values in a specific order yields the initial scheduling solution sequence A. inti The scheduling desequence is mapped to the execution order of each task.
[0072] Step 103: Execute the target iteration process, which includes:
[0073] Step 1031: Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population.
[0074] Specifically, each antibody in the current antibody population corresponds to a task sequence. The system searches for consecutive timestamps usable on a private cloud according to the order of the tasks in the sequence. If found, the start time is recorded, and the execution location is determined to be the private cloud. If not found, the execution location is determined to be the public cloud. The probability distribution of the estimated completion time of the tasks is determined based on the probability distribution of the start time and execution duration.
[0075] For tasks executed on a private cloud, record their start time and their execution duration based on a probability distribution. This allows us to obtain the probability distribution of the expected completion time. For tasks executed on the public cloud, the start time can be considered as 0, and the probability distribution of the expected completion time is the probability distribution of the execution duration.
[0076] Step 1032: Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, delete the antibodies in the current antibody population that do not meet the probability constraint of the deadline.
[0077] Specifically, the probability distribution of the expected completion time of the crowdsourcing application is calculated based on the probability distribution of the expected completion time of each task and Clark's formula. The expected completion time of the crowdsourcing application should not exceed the deadline set by the user. Antibodies with a high probability of not being able to complete the crowdsourcing application on time are removed from the antibody population based on the probability constraint of the deadline.
[0078] Step 1033: Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, determine the fitness value of each antibody in the current antibody population; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function as the optimization objective and using the deadline of each task as the constraint; the objective function is used to represent the profit of the private cloud provider.
[0079] Specifically, the task scheduling model optimizes the scheduling order of tasks by maximizing the objective function and using the deadlines of each task as constraints. By using the deadlines of each task as constraints, it ensures that tasks are completed on time, maintaining the service quality of the private cloud provider.
[0080] The objective function of the task scheduling model can be expressed by the following formula:
[0081] Profit = Income - Cost
[0082] Here, Profit represents the profit of the private cloud provider, Income represents the revenue earned by the private cloud provider in completing tasks submitted by users in the crowdsourced application, and Cost represents the cost incurred by the private cloud provider in completing tasks submitted by users in the crowdsourced application, including the cost of using private cloud resources and the cost of outsourcing tasks to the public cloud.
[0083] For all antibodies in the antibody population, we use the objective function value to measure the quality of the corresponding task sequence. The higher the objective function value of the task sequence, the higher the quality of the task sequence, the higher the fitness value of the antibody, and the higher the profit for the private cloud provider.
[0084] The objective function is calculated based on the probability distribution of the execution position and expected completion time of each task in the task sequence, and the fitness value of each antibody in the current antibody population is determined.
[0085] Step 1034: Based on the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, determine the probability that each task in the task sequence corresponding to the antibody will remain in its original position, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0086] Specifically, the task sequence corresponding to the antibody with the highest fitness value is taken as the optimal scheduling solution sequence in the current antibody population. Based on the difference between the fitness value of each antibody and the highest fitness value, the probability of each character remaining in its original position within the task sequence corresponding to that antibody is determined, thus completing the antibody mutation. After completing the mutation of all antibodies, a new generation of antibody population is obtained.
[0087] Step 104: When the preset number of iterations is reached, determine the scheduling scheme for each task in the multiple crowdsourcing applications based on the optimal scheduling solution sequence in the last target iteration process.
[0088] Specifically, when the preset number of iterations is reached, the optimal scheduling solution sequence in the last target iteration process is output as the scheduling order of all tasks in the multiple crowdsourcing applications to be processed. The execution position of each task in the optimal scheduling solution sequence is taken as the final scheduling position to obtain a complete scheduling scheme.
[0089] The task random scheduling method provided in this application modeles the task execution time as a random variable that follows a normal distribution. Combining stochastic optimization and probability theory, and using probability-based deadline constraints, it determines the complete probability distribution information of the crowdsourcing application's completion time, thereby effectively ensuring the scheduling time of the crowdsourcing application and the service quality of the private cloud provider.
[0090] Optionally, determining the initial scheduling solution sequence of the first-generation antibody population based on the deadline violation probability corresponding to each task includes:
[0091] All tasks are sorted in a non-ascending order according to the probability of deadline violation, resulting in the initial scheduling solution sequence for the first-generation antibody population.
[0092] Specifically, considering the urgency of completing random tasks before the deadline, the execution time of each task is determined based on... Deadline d i Determine the probability of deadline violation for each task.
[0093] Optionally, the probability of deadline violation satisfies:
[0094]
[0095] Among them, DVP ij This represents the probability of a deadline violation for the j-th task in the i-th crowdsourcing application. Let d represent the probability distribution of the execution time of the j-th task in the i-th crowdsourcing application. i This represents the deadline for all tasks in the i-th crowdsourcing application.
[0096] Then with DVP ij Sort all tasks using a non-ascending order of values to generate an initial scheduling solution sequence A. inti Non-ascending order means that the value at the end of the sorted list is less than or equal to the value at the beginning of the sorted list.
[0097] The task random scheduling method provided in this application obtains a relatively high-quality initial scheduling solution sequence by arranging the deadline violation probabilities in a non-ascending order.
[0098] Optionally, determining the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population includes:
[0099] For the task sequence corresponding to the antibody in the current antibody population, the task sequence is to find a continuous time slot available on the private cloud for each task in the task sequence.
[0100] If a continuous time slot available on a private cloud is found for the target task, the start time is recorded, the execution location of the target task is determined to be the private cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the start time and the execution duration of the target task.
[0101] If no continuous time slot is found available on a private cloud for the target task, the execution location of the target task is determined to be a public cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the execution duration of the target task.
[0102] Specifically, for any antibody A in the current antibody population x The target task sequence corresponds to the execution order of all tasks. The process involves finding consecutive time slots available on the private cloud for each task in the task sequence.
[0103] For target task t ij If a continuous time slot is found that can be used on the private cloud, then record the start time st. ij Determine the target task t ij The corresponding execution location is a private cloud (e.g., through decision variable y).ij To indicate the execution location, y ij =0 means t ij (Executed on a private cloud), target task t ij Probability distribution of expected completion time Based on start time st ij Probability distribution of execution time "Confirmed" can be expressed as:
[0104]
[0105] For target task t ij If no consecutive time slots are found available on the private cloud, then there is no need to record the start time or record the start time st. ij Set the value to 0, and define the target task t. ij The corresponding execution location is the public cloud (for example, setting the decision variable y). ij =1), target task t ij Probability distribution of expected completion time Probability distribution based on execution duration "Confirmed" can be expressed as:
[0106]
[0107] Optionally, the step of deleting antibodies from the current antibody population that do not meet the probability constraints of the deadline, based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, includes:
[0108] Based on Clark's formula and the probability distribution of the expected completion time of all tasks in each crowdsourcing application, the probability distribution of the expected completion time of each crowdsourcing application is determined.
[0109] If the probability distribution of the expected completion time of the crowdsourcing application meets the probability constraint of the deadline, delete the antibody corresponding to the task sequence in the current antibody population that does not meet the probability constraint of the deadline.
[0110] Specifically, for any antibody A in the current antibody population x After obtaining the execution position and estimated completion time of each task in the corresponding task sequence, it is necessary to further determine whether the deadline constraint is met.
[0111] A crowdsourcing application can contain multiple tasks, all sharing a common deadline, which must be met by all tasks. The estimated completion time of a crowdsourcing application is the estimated completion time of the task with the latest estimated completion time among all tasks included in the application. Based on Clark's formula and the probability distribution of the estimated completion times of all tasks in each crowdsourcing application, the probability distribution of the estimated completion time for each application is determined, satisfying the following calculation formula:
[0112]
[0113] in, Let represent the probability distribution of the estimated completion time for the i-th crowdsourcing application. This represents the probability distribution of the estimated completion time of the j-th task in the i-th crowdsourcing application, where T is the number of tasks in the i-th crowdsourcing application. i .
[0114] Based on the probability distribution of the estimated completion times of various crowdsourcing applications, determine the probabilistic constraints regarding the deadline:
[0115]
[0116] Where α represents a preset threshold, such as 0.9, 0.85, etc.
[0117] Then, remove the antibodies corresponding to task sequences in the current population that do not meet the probability constraints of the deadline.
[0118] The task random scheduling method provided in this application uses Clark's formula to obtain the probability distribution of the expected completion time of the crowdsourcing application during the iteration process, and deletes antibodies corresponding to task sequences in the antibody population that do not meet the probability constraints of the deadline, so as to ensure that all tasks can be completed on time under the constraint of the deadline.
[0119] Optionally, determining the probability that each task in the task sequence corresponding to the antibody remains in its original position based on the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody, includes:
[0120] Determine the difference between the fitness value of the optimal scheduling solution sequence and the fitness value of the task sequence corresponding to the antibody;
[0121] Based on the difference, determine the probability that each task in the task sequence corresponding to the antibody remains in its original position, and initialize the first empty solution sequence and the second empty solution sequence.
[0122] For each task in the task sequence corresponding to the antibody, a random number is generated and the relationship between the probability and the random number is determined. When the probability is greater than the random number, the task at the corresponding position in the task sequence is added to the first empty solution sequence; when the probability is less than the random number, the task at the corresponding position in the task sequence is added to the second empty solution sequence.
[0123] The tasks in the second empty solution sequence are added to the empty positions in the first empty solution sequence with a uniform probability to obtain the mutated antibody.
[0124] Specifically, calculate each antibody A x fitness value f(A) x This yields the optimal scheduling solution sequence A with the highest fitness value in the current antibody population. * Then calculate task sequence A. x With the optimal scheduling solution sequence A * The difference in fitness (diff) x Based on the difference (diff) x Determine task sequence A x The probability that each task remains in its original position.
[0125] Optionally, the probability that each task in the task sequence corresponding to the antibody remains in its original position is determined based on the difference, satisfying the following calculation formula:
[0126]
[0127] Among them, diff x A represents the fitness value of the task sequence of the x-th antibody and the optimal scheduling solution sequence A in the current antibody population. * fitness value f(A) * The difference between p and p x This represents the probability that each task in the x-th antibody remains in its original position.
[0128] Define the first empty solution sequence Second empty solution sequence A temp For task A x For each task, take a random number λ from the interval [0, 1]. If λ <p x Then A x Add the corresponding task to the middle In the middle; if λ>p x Then A x Add the task at the corresponding position in A temp In the middle. Then A temp The tasks in the process are added with uniformly distributed probability. Non-empty solution sequences are obtained from the empty positions in the sequence. A complete task scheduling scheme consists of a non-empty solution sequence. This refers to the new antibody after mutation.
[0129] The task random scheduling method provided in this application modeles the task execution time as a random variable that follows a normal distribution. Combining stochastic optimization and probability theory, and using probability-based deadline constraints, it determines the complete probability distribution information of the crowdsourcing application's completion time, thereby effectively ensuring the scheduling time of the crowdsourcing application and the service quality of the private cloud provider.
[0130] The technical solution of the embodiments of this application is further illustrated below through a specific example.
[0131] Figure 2 This is a second flowchart illustrating the task random scheduling method provided in the embodiments of this application, as shown below. Figure 2 As shown, the method includes at least the following steps:
[0132] Step 201: Prepare the crowdsourcing application. This is in the case where the user's needs are handled in a private cloud environment:
[0133] (1) Read task-related data. Six independent tasks submitted by the user, contained in two crowdsourcing applications, are read, namely A = {a1, a2}, where a1 = {t}. 11 ,t 12}, a2={t 21 ,t 22 ,t 23 ,t 24 The probability distribution and deadline data of the execution time of each task were obtained, as shown in Table 1.
[0134] Table 1: Execution Duration and Deadline of Crowdsourcing Application Tasks
[0135]
[0136] (2) Establish a task scheduling model. While ensuring the timely completion of crowdsourcing applications, schedule crowdsourcing application tasks to servers in a hybrid cloud environment for execution, maximizing the profit of the private cloud provider. The objective function of the crowdsourcing application task scheduling model is determined to be maximizing the profit of the private cloud provider.
[0137] Profit = Income - Cost
[0138] Here, Profit represents the profit of the private cloud provider, Income represents the revenue earned by the private cloud provider in completing tasks submitted by users in the crowdsourced application, and Cost represents the cost incurred by the private cloud provider in completing tasks submitted by users in the crowdsourced application, including the cost of using private cloud resources and the cost of outsourcing tasks to the public cloud.
[0139] The number of central processing units (CPUs) in the private cloud is set to 8, and the memory capacity is set to 30GB. The types of virtual machines that the hybrid cloud environment can provide and related information are shown in Table 2.
[0140] Table 2: Virtual Machine Types and Related Information in Hybrid Cloud Environments
[0141]
[0142]
[0143] Step 202: Initialization.
[0144] (1) Initialize the antibody population.
[0145] Initialize the antibody population P, and randomly generate 4 antibodies P = {A1, A2, A3, A4}.
[0146] (2) Generate the initial scheduling solution sequence.
[0147] Considering the urgency of completing random tasks before the deadline, based on the probability distribution of the execution time of each task... Deadline d i Determine the probability of deadline violation for each task:
[0148]
[0149] Then with DVP ij Sort all tasks using a non-ascending order of values to generate an initial scheduling solution sequence A. inti =(t 24 ,t 21 ,t 23 ,t 12 ,t 22 ,t 11 ).
[0150] (3) Algorithm parameter settings. This includes the maximum number of iterations (Iter). max Population size |P|.
[0151] Step 203: Generate a scheduling scheme.
[0152] (1) Scheduling location allocation.
[0153] For each antibody's corresponding task sequence, find consecutive time slots available on the private cloud for each task in turn.
[0154] For task t ij If a continuous time slot is found that can be used on the private cloud, then record the start time st.ij Set decision variable y ij =0, indicating that t ij Executed on a private cloud, the estimated completion time is...
[0155] If no continuous time slots are found available on the private cloud, then set the decision variable y. ij =1 indicates that t ij Outsource the processing to a public cloud, starting at st ij Set to 0, estimated completion time is
[0156] (2) Determine the probability constraints regarding the deadline.
[0157] According to Clark's formula:
[0158]
[0159] Combine the estimated completion time for each task To calculate the estimated completion time of two crowdsourcing applications kind The mean and variance of.
[0160] For the crowdsourcing application a1, Assume st 11 and st 12 If 0 and 6 are respectively, then we have Therefore, according to Clark's formula, we can obtain:
[0161] Determine the probability constraints regarding the deadline:
[0162]
[0163] The preset threshold value is α = 0.9, which determines the probability constraint that the estimated completion time of crowdsourcing application a1 meets the deadline.
[0164] Step 204: Update the scheduling solution sequence.
[0165] (1) Calculate the fitness value and obtain the optimal scheduling solution sequence.
[0166] Calculate each antibody A x fitness value f(A) x As shown in Table 3, the optimal scheduling sequence A in the current antibody population is obtained. * Assume f(A2) > f(A3) > f(A0) > f(A1), then A * =A2=(t) 11 , t 23 , t 24, t i2 , t 22 , t 21 ).
[0167] Table 3: Antibody A i scheduling information
[0168] Antibody Task sequence Decision variables fitness value <![CDATA[A1]]> <![CDATA[(t 23 ,t 11 ,t 24 ,t 12 ,t 22 ,t 21 )]]> (0,1,1,0,1) <![CDATA[f(A1)]]> <![CDATA[A2]]> <![CDATA[(t 11 ,t 23 ,t 24 ,t 12 ,t 22 ,t 21 )]]> (1,1,1,0,1) <![CDATA[f(A2)]]> <![CDATA[A3]]> <![CDATA[(t 11 t 22 ,t 21 ,t 23 ,t 24 ,i 12 ,)]]> (1,0,0,1,1) <![CDATA[f(A3) <!-- 11 -->]]> <![CDATA[A4]]> <![CDATA[(t 12 ,t 22 ,t 11 ,t 23 ,t 24 ,t 21 )]]> (1,1,1,1,0) <![CDATA[f(A4)]]>
[0169] (2) Antibody mutation.
[0170] For each antibody A x First, calculate task sequence A. x With the optimal scheduling solution sequence A * The difference in fitness (diff) x :
[0171] diff x =f(A * )-f(A x )
[0172] Then define the empty solution sequence A. temp and empty solution sequence By diff x Calculate the probability p that each task in the task sequence remains in its current position. x :
[0173]
[0174] For task sequence A x For each task, a random number λ is taken from the interval [0, 1]. If λ < p x Then A x Add the corresponding task to the middle In the middle; if λ > p x Then A x Add the task at the corresponding position in A temp In the middle. Then A temp The tasks in the process are added with uniformly distributed probability. Non-empty solution sequences are obtained from the empty positions in the sequence. A complete task scheduling scheme consists of a non-empty solution sequence. This refers to the new antibody after mutation.
[0175] If f(A) * Given f(A1) = 64.9 and f(A1) = 46.3, then diff1 = f(A1) = 46.3. * From f(A1) = 18.6, we can obtain: Table 4 shows antibody A. 1 The process of variation.
[0176] Table 4: Variation process of antibody A1 (p1 = 75.1%)
[0177]
[0178] As shown in Table 4, the 1st, 2nd, 3rd, and 5th tasks in task sequence A1 satisfy λ < p. i Assign the task value corresponding to position A1 to Then the solution sequence of the antibody at this time is Here This represents the empty positions in the sequence, and the remaining tasks will be inserted into the empty positions in a uniform manner.
[0179] A temp There are 2 tasks t 22 and t 12 They are inserted into the [planted objects] with a uniform probability. In the empty positions, assume the sequence after insertion is This refers to the deciphered sequence of the mutated antibody individual.
[0180] Step 205: Determine if the preset number of iterations has been reached. If so, output the optimal scheduling solution sequence A. * If the condition is not met, proceed to steps 203 and 204.
[0181] Based on the final output optimal scheduling solution sequence A * It performs all tasks and provides feedback on the results to the user.
[0182] Figure 3 This is a schematic diagram of the structure of the task random scheduling device provided in the embodiments of this application, as shown below. Figure 3 As shown, the device includes at least:
[0183] The acquisition module 301 is used to acquire the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed when it is determined that the user selects a private cloud space to process multiple crowdsourcing applications; one crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0184] The first determining module 302 is used to initialize the antibody population and determine the initial scheduling solution sequence based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0185] Iteration module 303 is used to execute a target iteration process, the target iteration process including:
[0186] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0187] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0188] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0189] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0190] The second determining module 304 is used to determine the scheduling scheme of each task in the multiple crowdsourcing applications based on the optimal scheduling solution sequence in the last target iteration process when a preset number of iterations is reached.
[0191] Optionally, the first determining module is further configured to:
[0192] All tasks are sorted in a non-ascending order according to the probability of deadline violation, resulting in the initial scheduling solution sequence for the first-generation antibody population.
[0193] Optionally, the probability of deadline violation satisfies:
[0194]
[0195] Among them, DVP ij This represents the probability of a deadline violation for the j-th task in the i-th crowdsourcing application. Let d represent the probability distribution of the execution time of the j-th task in the i-th crowdsourcing application. i This represents the deadline for all tasks in the i-th crowdsourcing application.
[0196] Optionally, the iteration module is further configured to:
[0197] For the task sequence corresponding to the antibody in the current antibody population, the task sequence is to find a continuous time slot available on the private cloud for each task in the task sequence.
[0198] If a continuous time slot available on a private cloud is found for the target task, the start time is recorded, the execution location of the target task is determined to be the private cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the start time and the execution duration of the target task.
[0199] If no continuous time slot is found available on a private cloud for the target task, the execution location of the target task is determined to be a public cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the execution duration of the target task.
[0200] Optionally, the iteration module is further configured to:
[0201] Based on Clark's formula and the probability distribution of the expected completion time of all tasks in each crowdsourcing application, the probability distribution of the expected completion time of each crowdsourcing application is determined.
[0202] If the probability distribution of the expected completion time of the crowdsourcing application meets the probability constraint of the deadline, delete the antibody corresponding to the task sequence in the current antibody population that does not meet the probability constraint of the deadline.
[0203] Optionally, the iteration module is further configured to:
[0204] Determine the difference between the fitness value of the optimal scheduling solution sequence and the fitness value of the task sequence corresponding to the antibody;
[0205] Based on the difference, determine the probability that each task in the task sequence corresponding to the antibody remains in its original position, and initialize the first empty solution sequence and the second empty solution sequence.
[0206] For each task in the task sequence corresponding to the antibody, a random number is generated and the relationship between the probability and the random number is determined. When the probability is greater than the random number, the task at the corresponding position in the task sequence is added to the first empty solution sequence; when the probability is less than the random number, the task at the corresponding position in the task sequence is added to the second empty solution sequence.
[0207] The tasks in the second empty solution sequence are added to the empty positions in the first empty solution sequence with a uniform probability to obtain the mutated antibody.
[0208] Optionally, the probability of each task in the task sequence corresponding to the antibody remaining in its original position is determined based on the difference, satisfying the following calculation formula:
[0209]
[0210] Among them, diff xA represents the fitness value of the task sequence of the x-th antibody and the optimal scheduling solution sequence A in the current antibody population. * fitness value f(A) * The difference between p and p x This represents the probability that each task in the x-th antibody remains in its original position.
[0211] The methods and apparatuses provided in the various embodiments of this application are based on the same concept. Since the methods and apparatuses solve problems in similar ways, the implementations of the apparatuses and methods can refer to each other, and repeated details will not be repeated.
[0212] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 4 As shown, the electronic device may include: a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other via the communication bus 404. The processor 401 can call a computer program in the memory 403 to execute the steps of a task random scheduling method, such as including:
[0213] Given that a user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0214] The antibody population is initialized, and the initial scheduling solution sequence is determined based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0215] Execute a target iteration process, the target iteration process including:
[0216] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0217] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0218] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0219] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0220] When the preset number of iterations is reached, the scheduling scheme for each task in the multiple crowdsourcing applications is determined based on the optimal scheduling solution sequence in the last target iteration process.
[0221] Furthermore, the logical instructions in the aforementioned memory 403 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0222] On the other hand, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to perform the steps of the task random scheduling method provided by the above methods, such as including:
[0223] Given that a user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0224] The antibody population is initialized, and the initial scheduling solution sequence is determined based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0225] Execute a target iteration process, the target iteration process including:
[0226] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0227] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0228] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0229] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0230] When the preset number of iterations is reached, the scheduling scheme for each task in the multiple crowdsourcing applications is determined based on the optimal scheduling solution sequence in the last target iteration process.
[0231] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing the processor to execute the steps of the task random scheduling method provided in the above embodiments, such as including:
[0232] Given that a user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution.
[0233] The antibody population is initialized, and the initial scheduling solution sequence is determined based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline.
[0234] Execute a target iteration process, the target iteration process including:
[0235] Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population;
[0236] Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population.
[0237] Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider.
[0238] The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value.
[0239] When the preset number of iterations is reached, the scheduling scheme for each task in the multiple crowdsourcing applications is determined based on the optimal scheduling solution sequence in the last target iteration process.
[0240] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0241] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0242] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0243] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for random task scheduling, characterized in that, include: Given that a user selects a private cloud space to process multiple crowdsourcing applications, obtain the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed; each crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution. The antibody population is initialized, and the initial scheduling solution sequence is determined based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline. Execute a target iteration process, the target iteration process including: Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population; Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population. Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider. The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value. When the preset number of iterations is reached, the scheduling scheme for each task in the multiple crowdsourcing applications is determined based on the optimal scheduling solution sequence in the last target iteration process.
2. The task random scheduling method according to claim 1, characterized in that, The process of determining the initial scheduling solution sequence based on the deadline violation probability of each task includes: All tasks are sorted in a non-ascending order according to the probability of deadline violation, resulting in the initial scheduling solution sequence for the first-generation antibody population.
3. The task random scheduling method according to claim 2, characterized in that, The probability of deadline violation satisfies: Among them, DVP ij This represents the probability of a deadline violation for the j-th task in the i-th crowdsourcing application. Let d represent the probability distribution of the execution time of the j-th task in the i-th crowdsourcing application. i This represents the deadline for all tasks in the i-th crowdsourcing application.
4. The task random scheduling method according to claim 1, characterized in that, The process of determining the probability distribution of the execution position and estimated completion time of each task in the task sequence corresponding to each antibody in the current antibody population includes: For the task sequence corresponding to the antibody in the current antibody population, the task sequence is to find a continuous time slot available on the private cloud for each task in the task sequence. If a continuous time slot available on a private cloud is found for the target task, the start time is recorded, the execution location of the target task is determined to be the private cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the start time and the execution duration of the target task. If no continuous time slot is found available on a private cloud for the target task, the execution location of the target task is determined to be a public cloud, and the probability distribution of the expected completion time of the target task is determined based on the probability distribution of the execution duration of the target task.
5. The task random scheduling method according to claim 1, characterized in that, The process of deleting antibodies from the current antibody population that do not meet the probability constraints of the deadline, based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, includes: Based on Clark's formula and the probability distribution of the expected completion time of all tasks in each crowdsourcing application, the probability distribution of the expected completion time of each crowdsourcing application is determined. If the probability distribution of the expected completion time of the crowdsourcing application meets the probability constraint of the deadline, delete the antibody corresponding to the task sequence in the current antibody population that does not meet the probability constraint of the deadline.
6. The task random scheduling method according to claim 1, characterized in that, The probability of each task in the task sequence corresponding to the antibody remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody, including: Determine the difference between the fitness value of the optimal scheduling solution sequence and the fitness value of the task sequence corresponding to the antibody; Based on the difference, determine the probability that each task in the task sequence corresponding to the antibody remains in its original position, and initialize the first empty solution sequence and the second empty solution sequence. For each task in the task sequence corresponding to the antibody, a random number is generated and the relationship between the probability and the random number is determined. When the probability is greater than the random number, the task at the corresponding position in the task sequence is added to the first empty solution sequence; when the probability is less than the random number, the task at the corresponding position in the task sequence is added to the second empty solution sequence. The tasks in the second empty solution sequence are added to the empty positions in the first empty solution sequence with a uniform probability to obtain the mutated antibody.
7. The task random scheduling method according to claim 6, characterized in that, The probability of each task in the task sequence corresponding to the antibody remaining in its original position is determined based on the difference, and the following calculation formula is satisfied: Among them, diff x A represents the fitness value of the task sequence of the x-th antibody and the optimal scheduling solution sequence A in the current antibody population. * fitness value f(A) * The difference between p and p x This represents the probability that each task in the x-th antibody remains in its original position.
8. A task random scheduling device, characterized in that, include: The acquisition module is used to acquire the probability distribution of the deadline and execution time of each task in the multiple crowdsourcing applications to be processed, when it is determined that the user selects a private cloud space to process multiple crowdsourcing applications; one crowdsourcing application corresponds to at least one task, and the execution time of each task follows a normal distribution. The first determining module is used to initialize the antibody population and determine the initial scheduling solution sequence based on the deadline violation probability of each task; the deadline violation probability of each task is determined based on the probability distribution of the execution time of each task and the deadline. An iteration module is used to execute a target iteration process, which includes: Determine the probability distribution of the execution position and expected completion time of each task in the task sequence corresponding to each antibody in the current antibody population; Based on Clark's formula and the probability distribution of the expected completion time for each task in the crowdsourcing application, antibodies corresponding to task sequences that do not meet the probability constraints of the deadline are deleted from the current antibody population. Based on the task scheduling model and the probability distribution of the execution location and expected completion time of each task, the fitness value of each antibody in the current antibody population is determined; the task scheduling model is a model that optimizes the scheduling order of each task by maximizing the objective function and using the deadline of each task as a constraint; the objective function is used to represent the profit of the private cloud provider. The probability of each task in the antibody-corresponding task sequence remaining in its original position is determined by the difference between the fitness value of the task sequence corresponding to the antibody and the fitness value of the optimal scheduling solution sequence, thereby determining the mutated antibody and completing the update of the antibody population; the optimal scheduling solution sequence is the task sequence corresponding to the antibody with the highest fitness value. The second determining module is used to determine the scheduling scheme of each task in the multiple crowdsourcing applications based on the optimal scheduling solution sequence in the last target iteration process when a preset number of iterations is reached.
9. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the task random scheduling method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the task random scheduling method as described in any one of claims 1 to 7.