A video cloud transcoding task scheduling method based on HHO algorithm
By combining the improved Harris Eagle Optimization (HHO) algorithm with video cloud transcoding task scheduling, the problem of imbalance between long and short task execution in traditional algorithms is solved, achieving more efficient task scheduling and resource utilization, and improving the scheduling efficiency of cloud service providers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2022-11-30
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional cloud transcoding task scheduling algorithms cannot effectively balance the execution of long and short tasks, resulting in low task scheduling efficiency. Furthermore, existing swarm optimization algorithms are prone to getting trapped in local optima and have low convergence accuracy.
An improved Harris Eagle Optimization (HHO) algorithm is used for video cloud transcoding task scheduling. By using a reverse learning strategy and logarithmic spiral factor optimization, a dual objective function of transcoding time and overhead is established. The improved HHO algorithm is then used for iterative optimization to find the optimal mapping scheme.
It improves the completion time of video transcoding tasks, reduces user costs, meets users' QoS requirements, and enhances the task scheduling efficiency of cloud service providers.
Smart Images

Figure CN116954888B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of cloud computing optimization and scheduling technology, and in particular relates to a video cloud transcoding task scheduling method based on the HHO algorithm. Background Technology
[0002] The development of the internet and 5G technology has spurred the rise of online video, bringing great convenience to people's lives. Video calls facilitate emotional communication between family and friends, live streamers help promote agricultural products from remote areas, teachers can publish recorded videos of their classes online to help more students learn, and people also enrich and entertain their lives by watching or posting videos on platforms such as Douyin, Kuaishou, and Toutiao.
[0003] The varying resolutions and network bandwidths of different users' mobile devices lead to different demands for video transcoding services, resulting in vastly different computational resource requirements. Choosing the appropriate virtual machine to provide the necessary resources for video transcoding not only meets users' QoS requirements but also improves the task scheduling efficiency of video cloud service providers.
[0004] Traditional cloud transcoding task scheduling algorithms all have some shortcomings. For example, the FCFS scheduling algorithm prioritizes the transcoding tasks that arrive first. If the first task to arrive is a long task, the process will only process the next task after the long task has been transcoded, which is not conducive to the execution of short tasks. SJF is a short task priority scheduling algorithm, which selects one or more tasks with the shortest expected transcoding time from the existing transcoding task queue for processing. However, the transcoding of long tasks cannot be guaranteed.
[0005] Due to the heterogeneity of cloud computing resources and the high complexity of scheduling problems, traditional scheduling algorithms can no longer meet the multi-objective needs of users. In recent years, some researchers have used swarm optimization algorithms such as genetic algorithms, ant colony optimization, and particle swarm optimization to solve scheduling problems in cloud computing, but these algorithms also have drawbacks such as being prone to getting trapped in local optima and having low convergence accuracy.
[0006] Based on this, the present invention designs a video cloud transcoding task scheduling method based on the HHO algorithm to solve the above problems. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of traditional cloud transcoding task scheduling algorithms, such as the FCFS scheduling algorithm, which prioritizes the first transcoding task to arrive. If the first task is a long task, the process will only process the next task after the long task has been transcoded, which is not conducive to the execution of short tasks. SJF is a short task priority scheduling algorithm, which selects one or more tasks with the shortest expected transcoding time from the existing transcoding task queue for processing. However, the transcoding of long tasks cannot be guaranteed. Therefore, this invention proposes a video cloud transcoding task scheduling method based on the HHO algorithm.
[0008] To achieve the above objectives, the present invention adopts the following technical solution:
[0009] A video cloud transcoding task scheduling method based on the HHO algorithm includes the following steps:
[0010] S1: Split the video stream into multiple GOP tasks that can be independently transcoded using a video splitter;
[0011] S2: Establish the objective function required for scheduling video cloud transcoding tasks;
[0012] S3: Transform the video transcoding task scheduling problem into a solution process using the HHO algorithm;
[0013] S4: Use the improved HHO algorithm for iterative optimization to find the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme;
[0014] S5: Based on the plan, the task is mapped to the virtual machine for transcoding, completing the multi-objective optimized scheduling of video cloud transcoding.
[0015] As a further description of the above technical solution:
[0016] The transcoding task in step S1 is represented by the following formula:
[0017]
[0018] in, This indicates the overall video transcoding task. Indicates the first in the total task Each subtask is a GOP task that can be transcoded independently.
[0019] As a further description of the above technical solution:
[0020] In step S2, the objective function consists of transcoding time and transcoding overhead, which are introduced... A matrix can be used to predict the transcoding time required for GOP tasks. Indicates GOP task In virtual machine The virtual machine will execute the expected time. The time required to complete all GOP tasks on this node is calculated by the following formula:
[0021]
[0022] The transcoding time is the time required for all virtual machines to complete the transcoding task, and it is determined by the virtual machine in the cluster that takes the longest to execute the task. The formula is as follows:
[0023] .
[0024] As a further description of the above technical solution:
[0025] The transcoding overhead is the cost required for all virtual machines to complete the transcoding task, and its formula is as follows:
[0026]
[0027] in, Represents virtual machine Cost per unit of running time.
[0028] As a further description of the above technical solution:
[0029] The objective function for scheduling the cloud transcoding task is defined as follows:
[0030]
[0031] in, This represents the weighting factor.
[0032] As a further description of the above technical solution:
[0033] The process of converting the video transcoding task scheduling problem into a solution using the HHO algorithm in step S3, i.e., the solution to the task scheduling problem of representing the position of an individual Harris Eagle, is as follows:
[0034]
[0035] in, This indicates the population size of the Harris Eagle, i.e. Various scheduling schemes The dimensions representing the problem, i.e. A GOP task awaiting transcoding. Indicates the first The position of the eagle, that is, the first A scheduling scheme.
[0036] As a further description of the above technical solution:
[0037] The fitness function of the HHO algorithm is the objective function sought by the video transcoding task scheduling, as shown in the following formula:
[0038]
[0039] in, This represents the fitness function of the HHO algorithm. Indicates the current number The fitness value of the eagle's position is the first... The objective function value of the scheduling scheme, Indicates the first The time required for each scheduling scheme Indicates the first The overhead required for each scheduling scheme;
[0040] fitness function The smaller the value, the smaller the objective function value, which means the less time and cost the scheduling scheme requires. The optimal solution for video transcoding task scheduling is the minimum value of the fitness function obtained by the HHO algorithm.
[0041] As a further description of the above technical solution:
[0042] The specific steps of step S4 are as follows:
[0043] S401: Parameter settings, including population size N, problem dimension D, maximum number of iterations T, and search limit. and lower limit ;
[0044] S402: Population Initialization: A reverse learning strategy is used to initialize the population. Fitness values are calculated and sorted, and the top N excellent individuals are selected as the new population. This improves the richness of the population and speeds up the convergence of the algorithm. The specific formula is as follows:
[0045]
[0046] in, Indicates the current location of the population. Indicates the position of the reverse population. , These are the boundary values of the search space;
[0047] S403: Update Harris Hawk position, HHO algorithm based on energy factor The formula for determining whether an algorithm is in the global exploration phase or the local development phase is as follows:
[0048]
[0049] in, , and Indicates the current iteration number and the maximum iteration number;
[0050] S4031: When At this point, HHO will enter the global exploration phase, based on random numbers. The mathematical model used to determine whether to roost randomly or based on the location of other eagles and prey is as follows:
[0051]
[0052] in, Indicates the first The updated position of the eagle, i.e., the updated scheduling scheme. This indicates the current position of the eagle, i.e., the current scheduling plan. This indicates the location of the prey, i.e., the optimal scheduling plan. This indicates the average position of the current population. Represents a random number between 0 and 1;
[0053] S4032: When At that time, HHO will enter a partial development phase;
[0054] when and At that time, the eagles launched a soft encirclement attack. and At that time, the eagle flock launched a hard siege. A logarithmic spiral factor was added during both the soft and hard siege phases to enhance the algorithm's local exploitation performance. The position update formula is as follows:
[0055]
[0056]
[0057]
[0058] in, Represents the logarithmic spiral factor. , yes A random number between [the two numbers] , indicating the jumping distance of the prey.
[0059] As a further description of the above technical solution:
[0060] The when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula:
[0061]
[0062]
[0063]
[0064] in, yes 3D random vector, for Flight function, Represents the fitness function. This represents the fitness value of the current Harris Hawk position, which is the objective function value of the current video transcoding task scheduling strategy.
[0065] As a further description of the above technical solution:
[0066] The when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula:
[0067]
[0068]
[0069]
[0070] S404: Calculate the fitness values of all updated Harris Eagle individuals to find the optimal solution and best position;
[0071] S405: Determine if the maximum number of iterations has been reached. If not, return to step S402. If the maximum number of iterations has been reached, stop iterating and output the global optimal solution. and best position This leads to the finding of the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme.
[0072] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0073] This invention combines the HHO algorithm with the video cloud transcoding scheduling problem, designing a Harris Eagle optimized scheduler to schedule video transcoding tasks. A back-learning strategy and a logarithmic spiral factor are used to improve the HHO algorithm, enhancing its convergence speed and optimization accuracy. A dual objective function of transcoding time and transcoding overhead is established, and the improved HHO algorithm is used to iteratively optimize the objective function, finding the optimal mapping scheme between video transcoding tasks and virtual machine resources. This invention can reduce video transcoding completion time and user costs, better meet the QoS requirements of video users, and improve the task scheduling efficiency of cloud service providers. Attached Figure Description
[0074] Figure 1 This is an overall framework diagram of a video cloud transcoding task scheduling method based on the HHO algorithm proposed in this invention;
[0075] Figure 2 This is a flowchart of the improved HHO algorithm in the video cloud transcoding task scheduling method based on the HHO algorithm proposed in this invention. Detailed Implementation
[0076] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0077] Example 1
[0078] A video cloud transcoding task scheduling method based on the HHO algorithm includes the following steps:
[0079] S1: Split the video stream into multiple GOP tasks that can be independently transcoded using a video splitter;
[0080] S2: Establish the objective function required for scheduling video cloud transcoding tasks;
[0081] S3: Transform the video transcoding task scheduling problem into a solution process using the HHO algorithm;
[0082] S4: Use the improved HHO algorithm for iterative optimization to find the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme;
[0083] S5: Based on the plan, the task is mapped to the virtual machine for transcoding, completing the multi-objective optimized scheduling of video cloud transcoding.
[0084] Specifically, the transcoding task in step S1 is represented by the following formula:
[0085]
[0086] in, This indicates the overall video transcoding task. Indicates the first in the total task Each subtask is a GOP task that can be transcoded independently.
[0087] Specifically, in step S2, the objective function consists of transcoding time and transcoding overhead, which are introduced... A matrix can be used to predict the transcoding time required for GOP tasks. Indicates GOP task In virtual machine The virtual machine will execute the expected time. The time required to complete all GOP tasks on this node is calculated by the following formula:
[0088]
[0089] The transcoding time is the time required for all virtual machines to complete the transcoding task, and it is determined by the virtual machine in the cluster that takes the longest to execute the task. The formula is as follows:
[0090] .
[0091] Specifically, the transcoding overhead is the cost required for all virtual machines to complete the transcoding task, and its formula is as follows:
[0092]
[0093] in, Represents virtual machine Cost per unit of running time.
[0094] Specifically, the objective function for scheduling the cloud transcoding task is defined as follows:
[0095]
[0096] in, This represents the weighting factor.
[0097] Specifically, the process of converting the video transcoding task scheduling problem into an HHO algorithm solution in step S3, i.e., the solution to the Harris Eagle individual position representation task scheduling problem, is as follows:
[0098]
[0099] in, This indicates the population size of the Harris Eagle, i.e. Various scheduling schemes The dimensions representing the problem, i.e. A GOP task awaiting transcoding. Indicates the first The position of the eagle, that is, the first A scheduling scheme.
[0100] Specifically, the fitness function of the HHO algorithm is the objective function sought by the video transcoding task scheduling, as shown in the following formula:
[0101]
[0102] in, This represents the fitness function of the HHO algorithm. Indicates the current number The fitness value of the eagle's position is the first... The objective function value of the scheduling scheme, Indicates the first The time required for each scheduling scheme Indicates the first The overhead required for each scheduling scheme;
[0103] fitness function The smaller the value, the smaller the objective function value, which means the less time and cost the scheduling scheme requires. The optimal solution for video transcoding task scheduling is the minimum value of the fitness function obtained by the HHO algorithm.
[0104] Specifically, the steps of step S4 are as follows:
[0105] S401: Parameter settings, including population size N, problem dimension D, maximum number of iterations T, and search limit. and lower limit ;
[0106] S402: Population Initialization: A reverse learning strategy is used to initialize the population. Fitness values are calculated and sorted, and the top N excellent individuals are selected as the new population. This improves the richness of the population and speeds up the convergence of the algorithm. The specific formula is as follows:
[0107]
[0108] in, Indicates the current location of the population. Indicates the position of the reverse population. , These are the boundary values of the search space;
[0109] S403: Update Harris Hawk position, HHO algorithm based on energy factor The formula for determining whether an algorithm is in the global exploration phase or the local development phase is as follows:
[0110]
[0111] in, , and Indicates the current iteration number and the maximum iteration number;
[0112] S4031: When At this point, HHO will enter the global exploration phase, based on random numbers. The mathematical model used to determine whether to roost randomly or based on the location of other eagles and prey is as follows:
[0113]
[0114] in, Indicates the first The updated position of the eagle, i.e., the updated scheduling scheme. This indicates the current position of the eagle, i.e., the current scheduling plan. This indicates the location of the prey, i.e., the optimal scheduling plan. This indicates the average position of the current population. Represents a random number between 0 and 1;
[0115] S4032: When At that time, HHO will enter a partial development phase;
[0116] when and At that time, the eagles launched a soft encirclement attack. and At that time, the eagle flock launched a hard siege. A logarithmic spiral factor was added during both the soft and hard siege phases to enhance the algorithm's local exploitation performance. The position update formula is as follows:
[0117]
[0118]
[0119]
[0120] in, Represents the logarithmic spiral factor. , yes A random number between [the two numbers] , indicating the jumping distance of the prey.
[0121] Specifically, the aforementioned when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula:
[0122]
[0123]
[0124]
[0125] in, yes 3D random vector, for Flight function, Represents the fitness function. This represents the fitness value of the current Harris Hawk position, which is the objective function value of the current video transcoding task scheduling strategy.
[0126] Specifically, the aforementioned when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula:
[0127]
[0128]
[0129]
[0130] S404: Calculate the fitness values of all updated Harris Eagle individuals to find the optimal solution and best position;
[0131] S405: Determine if the maximum number of iterations has been reached. If not, return to step S402. If the maximum number of iterations has been reached, stop iterating and output the global optimal solution. and best position This leads to the finding of the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme.
[0132] Working principle and usage:
[0133] S1: Split the video stream into multiple GOP tasks that can be independently transcoded using a video splitter;
[0134] S2: Establish the objective function required for scheduling video cloud transcoding tasks;
[0135] S3: Transform the video transcoding task scheduling problem into a solution process using the HHO algorithm;
[0136] S4: Use the improved HHO algorithm for iterative optimization to find the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme;
[0137] S5: Based on the plan, the task is mapped to the virtual machine for transcoding, completing the multi-objective optimized scheduling of video cloud transcoding.
[0138] Example 2
[0139] A video cloud transcoding task scheduling method based on the HHO algorithm, the overall framework of which is as follows: Figure 1 As shown, it includes the following steps:
[0140] S1: The video stream to be transcoded is split into multiple GOP tasks that can be transcoded independently using a video splitter, as shown in the following formula:
[0141]
[0142] in, This indicates the overall video transcoding task. Indicates the first in the total task Each subtask, that is, each GOP task that can be independently transcoded;
[0143] S2: Analyze the video cloud transcoding task scheduling problem and virtual machine resources, and set the transcoding time and transcoding overhead as the objective function required for video cloud transcoding task scheduling;
[0144] Suppose there are GOP tasks to be transcoded. There are [number] virtual machine resources. One; Introduction Matrix for prediction The task is in The time required for transcoding on each resource node; Indicates GOP task In virtual machine The virtual machine will execute the expected time. The time required to complete all GOP tasks on this node is calculated by the following formula:
[0145]
[0146] The transcoding time is the time required for all virtual machines to complete the transcoding task, and it is determined by the virtual machine in the cluster that takes the longest to execute the task. The formula is as follows:
[0147]
[0148] The transcoding overhead is the cost required for all virtual machines to complete the transcoding task, and its formula is as follows:
[0149]
[0150] in, Represents virtual machine The cost per unit of runtime; therefore, the objective function for cloud transcoding task scheduling is defined as follows:
[0151]
[0152] in, Representing the weighting factors, respectively, they represent the weighting factors for transcoding time. and transcoding overhead The degree of importance attached to it;
[0153] S3: Encode the task and transform the video transcoding task scheduling problem into a solution process using the Harris Eagle optimization algorithm;
[0154] The position of an individual Harris Eagle represents a solution to the task scheduling problem, as shown in the following formula:
[0155]
[0156] in, This indicates the population size of the Harris Eagle, i.e. Various scheduling schemes; The dimensions representing the problem, i.e. One GOP task awaiting transcoding; Indicates the first The position of the eagle, that is, the first Various scheduling schemes;
[0157] This indicates the search scope of the problem, specifically the minimum and maximum number of virtual machines.
[0158] Given 8 GOP tasks to be transcoded, 3 virtual machine resources, and 2 scheduling schemes, if ,but This indicates the first scheduling scheme, which means using virtual machine number 1 for the task. Transcode and use virtual machine #2 for the task. Transcode and use virtual machine #3 for the task. Transcode; This indicates the second scheduling scheme, which means using virtual machine number 1 for the task. Transcode and use virtual machine #2 for the task. Transcode and use virtual machine #3 for the task. Transcode;
[0159] The fitness function of the Harris Eagle optimization algorithm is the objective function sought in video transcoding task scheduling, as shown in the following formula:
[0160]
[0161] in, This represents the fitness function of the Harris Eagle algorithm. Indicates the current number The fitness value of the eagle's position is the first... The objective function value of the scheduling scheme, This represents the time required for the i-th scheduling scheme. Indicates the cost required for the i-th scheduling scheme;
[0162] fitness function The smaller the value, the smaller the objective function value, meaning the less time and overhead the scheduling scheme requires. Therefore, finding the optimal solution and the best scheme for video transcoding task scheduling is equivalent to using the Harris Eagle optimization algorithm to find the minimum value of the fitness function and the Harris Eagle position corresponding to the minimum value.
[0163] S4: Use the improved Harris Eagle optimization algorithm for iterative optimization to find the optimal value of the video transcoding task scheduling objective function and the best mapping scheme, such as... Figure 2 As shown, the steps are as follows:
[0164] S4.1 Parameter Settings: Input population size N, problem dimension D, maximum number of iterations T, search upper limit and lower limit ;
[0165] S4.2 Population Initialization: The reverse position of the random initial position is obtained using the reverse learning strategy. The fitness values of the random initial position and the reverse position are calculated and sorted. The top N populations are selected as the new population. The specific formula for the reverse learning strategy is as follows:
[0166]
[0167] in, This indicates the location of the randomly initialized population. Indicates the location of the reverse population. , The threshold for the search space;
[0168] S4.3 Update Harris Hawk Location: Calculate Energy Factor The value when At that time, the Harris Eagle will enter the overall exploration phase, when At that time, the Harris Eagle algorithm will enter a partial development phase; energy factor The calculation formula is as follows:
[0169]
[0170] in, , and Indicates the current iteration number and the maximum iteration number;
[0171] S4.3.1 Global Exploration Phase: When random numbers At that time, the location is updated using a random habitat method. At that time, they roost based on the locations of other eagles and their prey, and the mathematical model for this is as follows:
[0172]
[0173] in, Indicates the first The updated position of the eagle, i.e., the updated scheduling scheme; This indicates the current position of the eagle, i.e., the current scheduling plan; This indicates the location of the prey, i.e., the optimal scheduling plan; Indicates the average position of the current population; Represents a random number between 0 and 1;
[0174] S4.3.2 Partial Development Phase;
[0175] when and At that time, an improved soft siege strategy is used for position updates, using the following formula:
[0176]
[0177] when and At that time, an improved hard siege strategy is adopted for position update, as shown in the following formula:
[0178]
[0179]
[0180] in, Represents the logarithmic spiral factor. , yes A random number between [the two numbers] , indicating the jumping distance of the prey.
[0181] when and At that time, the eagle flock adopted a gradual and rapid soft encirclement strategy, as shown in the following formula:
[0182]
[0183]
[0184]
[0185] in, yes 3D random vector, for Flight function, Represents the fitness function. This represents the fitness value of the current Harris Hawk position, which is the objective function value of the current video transcoding task scheduling strategy;
[0186] when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula:
[0187]
[0188]
[0189]
[0190] S4.4 After updating the positions of all populations through S4.3, calculate the updated fitness values of the populations and update the optimal solution and the best position.
[0191] S4.5 Determine if the maximum number of iterations has been reached. If not, return to step S4.3. If the maximum number of iterations has been reached, stop iterating and output the global optimal solution. and best position Thus, the optimal value of the objective function for scheduling video transcoding tasks and the best mapping scheme are found;
[0192] S5: Using the best solution output by S4.5, the task is mapped to the virtual machine for transcoding, completing the multi-objective optimized scheduling of video cloud transcoding.
[0193] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A video cloud transcoding task scheduling method based on the HHO algorithm, characterized in that, Includes the following steps: S1: Split the video stream into multiple GOP tasks that can be independently transcoded using a video splitter; S2: Establish the objective function required for scheduling video cloud transcoding tasks; S3: Transform the video transcoding task scheduling problem into a solution process using the HHO algorithm; S4: Use the improved HHO algorithm for iterative optimization to find the optimal value of the objective function for video transcoding task scheduling and the best mapping scheme; S5: Map the task to the virtual machine for transcoding according to the plan, and complete the multi-objective optimized scheduling of video cloud transcoding; In step S2, the objective function consists of transcoding time and transcoding overhead, which are introduced... A matrix can be used to predict the transcoding time required for GOP tasks. Indicates GOP task In virtual machine The virtual machine will execute the expected time. The time required to complete all GOP tasks on this node is calculated by the following formula: The transcoding time is the time required for all virtual machines to complete the transcoding task, and it is determined by the virtual machine in the cluster that takes the longest to execute the task. The formula is as follows: ; The specific steps of step S4 are as follows: S401: Parameter settings, including population size N, problem dimension D, maximum number of iterations T, and search limit. and lower limit ; S402: Population Initialization: A reverse learning strategy is used to initialize the population. Fitness values are calculated and sorted, and the top N best individuals are selected as the new population. The specific formula is as follows: in, Indicates the current location of the population. Indicates the location of the reverse population. ; S403: Update Harris Hawk position, HHO algorithm based on energy factor The formula for determining whether an algorithm is in the global exploration phase or the local development phase is as follows: in, , and Indicates the current iteration number and the maximum iteration number; S404: Calculate the fitness values of all updated Harris Eagle individuals to find the optimal solution and best position; S405: Determine if the maximum number of iterations has been reached. If not, return to step S402. If the maximum number of iterations has been reached, stop iterating and output the global optimal solution. and best position Thus, the optimal value of the objective function for scheduling video transcoding tasks and the best mapping scheme are found; S4031: When At this point, HHO will enter the global exploration phase, based on random numbers. The mathematical model used to determine whether to roost randomly or based on the location of other eagles and prey is as follows: in, Indicates the first The updated position of the eagle, i.e., the updated scheduling scheme. This indicates the current position of the eagle, i.e., the current scheduling plan. This indicates the location of the prey, i.e., the optimal scheduling plan. This indicates the average position of the current population. Represents a random number between 0 and 1. S4032: When At that time, HHO will enter a partial development phase; when and At that time, the eagles launched a soft encirclement attack. and At that time, the eagle flock launched a hard siege. A logarithmic spiral factor was added during both the soft and hard siege phases to enhance the algorithm's local exploitation performance. The position update formula is as follows: in, Represents the logarithmic spiral factor. , yes A random number between [the two numbers] , indicating the jumping distance of the prey.
2. The video cloud transcoding task scheduling method based on the HHO algorithm according to claim 1, characterized in that, The transcoding task in step S1 is represented by the following formula: in, This indicates the overall video transcoding task. Indicates the first in the total task Each subtask is a GOP task that can be transcoded independently.
3. The video cloud transcoding task scheduling method based on the HHO algorithm according to claim 2, characterized in that, The transcoding overhead is the cost required for all virtual machines to complete the transcoding task, and its formula is as follows: in, Represents virtual machine Cost per unit of running time.
4. The video cloud transcoding task scheduling method based on the HHO algorithm according to claim 3, characterized in that, The objective function for scheduling the cloud transcoding task is defined as follows: in, Indicates the weighting factor. Indicates the time required for the scheduling plan. This indicates the overhead required for the scheduling scheme.
5. A video cloud transcoding task scheduling method based on the HHO algorithm according to claim 4, characterized in that, The process of converting the video transcoding task scheduling problem into a solution using the HHO algorithm in step S3, i.e., the solution to the task scheduling problem of representing the position of an individual Harris Eagle, is as follows: in, This indicates the population size of the Harris Eagle, i.e. Various scheduling schemes The dimensions representing the problem, i.e. A GOP task awaiting transcoding. Indicates the first The position of the eagle, that is, the first A scheduling scheme.
6. A video cloud transcoding task scheduling method based on the HHO algorithm according to claim 5, characterized in that, The fitness function of the HHO algorithm is the objective function sought by the video transcoding task scheduling, as shown in the following formula: in, This represents the fitness function of the HHO algorithm. Indicates the current number The fitness value of the eagle's position is the first... The objective function value of the scheduling scheme, Indicates the first The time required for each scheduling scheme Indicates the first The overhead required for each scheduling scheme; fitness function The smaller the value, the smaller the objective function value, which means the less time and cost the scheduling scheme requires. The optimal solution for video transcoding task scheduling is the minimum value of the fitness function obtained by the HHO algorithm.
7. A video cloud transcoding task scheduling method based on the HHO algorithm according to claim 6, characterized in that, The when and At that time, the eagle flock adopted a gradual, rapid, and hard-hitting strategy, as shown in the following formula: in, yes 3D random vector, for Flight function, Represents the fitness function. This represents the fitness value of the current Harris Hawk position, which is the objective function value of the current video transcoding task scheduling strategy.