AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm
By using a multi-task scheduling method based on the MSMPA algorithm, AVS video transcoding tasks are mapped to a virtual machine cluster and optimized for scheduling. This solves the problems of low resource utilization and poor load balancing in traditional cloud transcoding scheduling algorithms, achieving more efficient resource utilization and load balancing, reducing costs and improving user experience.
Patent Information
- Application Number
- CN202310529912.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-05-10
AI Technical Summary
Traditional cloud transcoding scheduling algorithms have low resource utilization efficiency and poor load balancing coordination capabilities, resulting in high operating costs, poor user experience, and a lack of ability to cope with short-term surges in users.
A multi-task scheduling method based on the MSMPA algorithm is adopted. Through mathematical modeling and mapping matrix, AVS video transcoding tasks are mapped to virtual machine clusters. The ocean predator algorithm is improved by using multiple strategies for optimized scheduling, thereby optimizing task allocation to improve resource utilization and load balancing.
It shortens the completion time of video transcoding jobs, saves operating costs for service providers, improves resource utilization, achieves load balancing, and enhances user experience.
Smart Images

Figure CN116527675B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of cloud computing resource scheduling and multimedia content processing, in particular to an AVS cloud transcoding multi-task scheduling method based on an MSMPA algorithm. BACKGROUND
[0002] In recent years, the maturity of 5G technology has accelerated the development of the video industry, and also promoted the development mode of the short video industry and the live broadcast industry. More and more industries choose to use video as a carrier to spread information. The popularity of domestic TikTok and foreign short video software such as TikTok is a microcosm of the development of the video industry. Users can choose to create videos on video platforms, spread them through the Internet, and watch them by other users; choose to play live video in real time and create cultural content for users to watch. With the development of science and technology, the increase of watching platforms, file formats and video streaming technology has created a demand for video transcoding. The video service industry provides video services for video encoding and decoding, which puts high demands on computing power.
[0003] At present, there are many video encoding formats in the world, the mainstream ones being MPEG4, H.264, H.265, AVS, etc. AVS is a video encoding format independently developed by China, and AVS2 and AVS3 have been proposed on this basis. In different video application fields, it is often necessary to convert the input video stream to different encoding formats and display the output. The transcoding between different video encoding formats is a high-complexity computing task. Under the demand of real-time video live broadcast (relay), the network bandwidth is improved with the support of 5G network technology, and the upper limit of the video stream output rate depends on the operation speed of the video transcoding processor. Traditional video transcoding computing task deployment on a single local server is difficult to meet the existing transcoding task computing needs. The software and hardware costs of distributed cluster transcoding servers and the cost of later maintenance are high, and it is difficult to maintain;
[0004] Cloud transcoding based on cloud computing can overcome the limitations of local video transcoding. The resources of the cloud transcoding solution are almost unlimited. Video service providers can pay for the computing power they need at any time and in any place to handle unpredictable demand at a lower cost. Cloud transcoding platforms can provide strong parallel computing capabilities for video service providers, greatly shorten the business completion time, and improve the service quality of video service providers. Deploying video transcoding resources on a cloud computing platform to build a cloud transcoding platform is the mainstream trend in the video industry in recent years.
[0005] In the cloud transcoding platform, the AVS video stream transcoding job is cut into cloud transcoding tasks, due to various inter-frame prediction modes, the reference information exists in the frames in the video, in order to ensure the quality of the transcoded video, the cut AVS transcoded video is taken as the minimum unit of GOP, the GOP is a video sequence starting with an I frame and only having one I frame, the cut AVS video transcoding tasks are distributed on the virtual machines deployed in the cloud transcoding platform to complete transcoding.
[0006] In the multi-task scheduling optimization strategy, the traditional scheduling algorithm has low resource utilization efficiency, poor load balancing coordination ability, is prone to cause high running cost, poor user experience, and lacks peak regulation ability to cope with short-time user surge.
[0007] For example: Chinese invention patent: CN201710933280.5, the disclosed "load balancing method based on elevator scheduling algorithm under SDN architecture", the specification discloses that the traditional load balancing algorithm has round robin algorithm, random algorithm, minimum connection number algorithm, etc. The round robin algorithm and the random algorithm are static load balancing algorithms, which do not combine the real-time load state of the server for shunting, and the load effect is poor. The minimum connection number algorithm is a dynamic load balancing algorithm, but the minimum connection number cannot accurately reflect the real-time load state of the server, although the effect is improved compared with the static load balancing algorithm, but it is still not ideal. Although part of the dynamic load balancing algorithm monitors the load state of the server, the server needs to participate in the calculation when monitoring, which increases the additional burden of the server, especially for a server that is already overloaded, which will produce a vicious cycle. In addition, response time is the most important factor for user experience, however, the traditional server cluster load balancing scheme cannot really use the response time of the server for load balancing due to the limitation of hardware conditions; the above patent can prove the defects existing in the prior art.
[0008] Therefore, we improve it and propose an AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm. SUMMARY
[0009] The purpose of the present application is to solve the problems of the traditional scheduling algorithm, low resource utilization efficiency, poor load balancing coordination ability, high running cost, poor user experience, and lack of peak regulation ability to cope with short-time user surge.
[0010] In order to achieve the above-mentioned purpose of the application, the present application provides an AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm to improve the above-mentioned problems.
[0011] The present application is as follows:
[0012] An AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm, comprising the following steps:
[0013] Comprising the following steps:
[0014] Step one, mapping tasks to a virtual machine cluster;
[0015] Step two, assuming that the cloud transcoding system has N AVS video transcoding tasks to be processed, and the system deploys M virtual machines;
[0016] Step three, determining a scheduling target optimization function, the time spent in processing each AVS video transcoding task is represented by an ETC matrix, and the running time of each task on the virtual machine to which it is allocated is calculated through a mapping matrix MAP to obtain an ETC matrix;
[0017] Step four, multi-strategy improved marine predator algorithm optimization;
[0018] Step five, using the multi-strategy improved marine predator algorithm to perform task scheduling.
[0019] Compared with the prior art, the beneficial effects of the present application are:
[0020] In the scheme of the present application:
[0021] In order to solve the problems of low resource utilization efficiency, poor load balancing and coordination ability, high running cost, poor user experience and lack of peak regulation ability to deal with short-term user surge in the prior art, the present application faces the problem of distributing a large number of AVS video cloud transcoding tasks to a virtual machine cluster, and models it mathematically to solve a multi-objective optimization problem. The transcoding tasks to be processed are mapped to the virtual machine cluster to obtain a mapping matrix and are encoded. The original task scheduling engineering optimization problem can be optimized by using an excellent MSMPA algorithm. Thanks to the strong convergence speed and global search ability of the MSMPA algorithm, the present application shortens the completion time of the entire video transcoding job, saves the running cost of the service provider, improves the utilization rate of resources, and realizes load balancing under the condition of meeting the quality of service. BRIEF DESCRIPTION OF DRAWINGS
[0022] Figure 1 is the overall flowchart of the method of the present application;
[0023] Figure 2 is a flowchart of the task scheduling using the MSMPA algorithm in the present application;
[0024] Figure 3 is a flowchart of the MSMPA algorithm in the present application;
[0025] Figure 4 is a solution diagram of task allocation. DETAILED DESCRIPTION
[0026] In order to make the personnel in the technical field better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0027] As described in the background, the traditional scheduling algorithm has low resource utilization efficiency, poor load balancing coordination ability, and is prone to cause high running cost, poor user experience, and lack of peak shaving ability to cope with short-time user surge.
[0028] To solve this technical problem, the present application provides an AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm, which is applied to shorten the completion time of video transcoding job, save the running cost of service provider, improve the utilization rate of resources, and realize load balancing.
[0029] Specifically, please refer to Figures 1-3 , the AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm specifically includes the following steps:
[0030] Step one, mapping the task to the virtual machine cluster;
[0031] Step two, assuming that the cloud transcoding system has N AVS video transcoding tasks to be processed, and the system deploys M virtual machines;
[0032] Step three, determining the scheduling target optimization function, the time spent for processing each AVS video transcoding task is represented by an ETC matrix, and the running time of each task on the virtual machine is calculated through the mapping matrix MAP to obtain the ETC matrix;
[0033] Step four, multi-strategy improved marine predator algorithm optimization;
[0034] Step five, using the multi-strategy improved marine predator algorithm to perform task scheduling.
[0035] The application provides an AVS cloud transcoding multi-task scheduling method based on an MSMPA algorithm.
[0036] In order to make the personnel in the technical field better understand the application scheme, the technical solutions in the embodiments of the application will be clearly and completely described below in combination with the drawings.
[0037] It should be noted that the embodiments in the application and the features and technical solutions in the embodiments can be combined with each other without conflict.
[0038] It should be noted that: similar labels and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0039] Embodiments
[0040] Please refer to Figures 1-3 A multi-task scheduling method for AVS cloud transcoding based on an MSMPA algorithm, which comprises the following steps:
[0041] Step 1: mapping tasks to a virtual machine cluster, specifically as follows:
[0042] When a user uploads an AVS video job, the cloud transcoding platform converts it into tasks that can be independently transcoded by a virtual machine by using a video segmenter, and puts the several AVS video transcoding tasks Task into a task queue; at the same time, the cloud transcoding platform refines the server resources deployed thereon into a VM virtual machine cluster, and maps the addresses of the to-be-processed cloud transcoding tasks in the task queue to the virtual machine cluster through a task scheduler of the cloud transcoding platform; after determining a scheduling scheme, the cloud transcoding platform uploads the key information of the AVS transcoding task to the virtual machine, and completes transcoding; the completed AVS video transcoding task is combined into a video and downloaded to the user.
[0043] The transcoding system is a service system built on a cloud server for AVS video transcoding, comprising hardware resources and a corresponding software system of cloud computing.
[0044] Step two, the cloud transcoding system has N AVS video transcoding tasks to be processed, the system deploys M virtual machines, the task queue and the virtual machine queue are as follows:
[0045] (1)
[0046] (2)
[0047] The task queue is allocated to the virtual machine queue to obtain a mapping matrix , , indicates that the task is allocated on the virtual machine , each task can only be allocated on one virtual machine, but one virtual machine can deploy multiple tasks, that is, in the row matrix of the mapping matrix MAP, there is and only one element value is 1; In the column matrix, there can be multiple elements with a value of 1;
[0048] Encode the mapping matrix MAP, sequentially convert all row matrices of the matrix MAP into a variable, the value of the variable is the column coordinate of the element 1 in the row matrix, and then arrange and combine the n variables to obtain a sequence with a dimension of n;
[0049] After completing the mapping of the AVS video transcoding task to the virtual machine cluster and encoding the mapping matrix of the task allocation to the virtual machine cluster, the obtained data is mapped to the MSMPA algorithm, representing the coordinate position of the predator or prey in the search space of the algorithm in the MSMPA algorithm;
[0050] For example, the cloud platform has n=8 cloud transcoding tasks and m=4 virtual machines, the tasks are randomly allocated to the virtual machines to obtain a mapping matrix MAP, as follows, the mapping matrix MAP is mathematically modeled and encoded to obtain a sequence s=(1,0,2,3,1,1,2,0) with a dimension of 8, and the value range of each dimension is an integer from 0 to 3. In the MSMPA, the sequence s represents the coordinates of the predator or prey, which means that in the multi-strategy improved marine predator algorithm, each predator or prey represents a solution to the task allocation (see Figure 4 );
[0051] Step three, determine the scheduling target optimization function, the time spent by each AVS video transcoding task for processing is represented by an ETC matrix , calculate the running time of each task allocated to the virtual machine through the mapping matrix MAP to obtain an ETC matrix , which represents the time spent by the virtual machine j to complete the transcoding task i, and calculate the total running time of each virtual machine according to the ETC matrix;
[0052] (3)
[0053] When all the AVS video transcoding tasks are completed, it indicates that the video job is completed, and the video job completion time is determined by the virtual machine with the longest running time in the set of all virtual machines;
[0054] (4)
[0055] Since the total running time of each virtual machine is difficult to be consistent, in order to measure the resource utilization of the virtual machine and meet the load balancing of the cloud transcoding platform, the overall variance of the running time of the entire virtual machine set is proposed to measure the work efficiency of the virtual machine cluster;
[0056] (5)
[0057] According to the AVS video job completion time and the load balancing of the system, a mathematical optimization model of task scheduling is established, as shown in formula (6), which is the optimization function of task scheduling, and α and β are weight factors;
[0058] (6)
[0059] For each task scheduling allocation scheme, the smaller it is, the better the allocation scheme is;
[0060] Step four, multi-strategy improved marine predator algorithm optimization, the overall flow chart of the algorithm is as shown in Figure 3 , and the specific steps are as follows:
[0061] A1, population initialization, assuming that the size of the predator and prey population in the algorithm is n, the algorithm will solve n task scheduling allocation schemes in each iteration, and the Latin hypercube sampling function is used to initialize the prey population to obtain the prey matrix (Prey) and the elite matrix (Elite), as shown in formula (7);
[0062] (7)
[0063] n is the population size, d is the spatial coordinate dimension of each population individual, which corresponds to the prey matrix containing n task scheduling solutions, and there are d cloud transcoding tasks participating in scheduling in the task scheduling, is the position coordinate value of the jth dimension of the ith individual of the prey matrix, are the upper limit and lower limit of the jth vector respectively, R is a uniform random number in [0,1], is a value randomly selected from the integer sequence [0,n-1], and when After the value of is used, an element with the same value will be found from the integer sequence and deleted to ensure that i is not simultaneously... The values are also different;
[0064] Each element of the prey matrix These are continuous values, ranging from [0, m], corresponding to task scheduling, where m is the number of virtual machines participating in task scheduling. After the algorithm is optimized, it needs to be... Data rounding;
[0065] , .
[0066] Optimize the objective function using formula (6) Calculate the fitness values of n individuals in the prey matrix. In the prey matrix, The spatial coordinates (row matrix) of the smallest individual The data is copied to the elite matrix. Since all rows of the elite matrix are identical, the individuals in the elite matrix represent the best individuals in the prey matrix.
[0067] After completing the above steps, the prey matrix and elite matrix are iteratively optimized to find the optimal individual (the best task scheduling scheme).
[0068] A2. Elite Grouping Optimization Phase: The MSMPA algorithm undergoes three optimization phases during the optimization process. Individuals are sorted from largest to smallest fitness value and divided into three groups, each containing n / 3 individuals: the elimination group, the learning group, and the elite group. The grouping distinguishes different optimization phases. The steps are as follows:
[0069] A2.1, Phase 1 (Elimination Group): In the elimination group, prey uses Brownian motion to mimic the prey reproduction process, while the predator remains stationary. This is part of the algorithm's global search process, and the prey's position update formula is as follows:
[0070] (8)
[0071] Let be a random function generated based on a normal distribution, representing Brownian motion, with the symbol . Let p represent matrix multiplication, where p is a constant (p=0.5), and R is a uniform random vector in the range [0,1]. and The product of these terms represents the Brownian motion of the prey. The stride length for Brownian motion towards the prey;
[0072] A2.2, stage 2 (learning group): in the learning group, prey represents algorithm development and predator represents algorithm search, in this stage, prey uses Levy flight model to move, predator uses Brownian motion model to move, where prey and predator motion accounts for half of the learning group, prey position update formula is as follows:
[0073] Learning group first half population position update:
[0074] (9)
[0075] Learning group second half population position update:
[0076] (10)
[0077] Wherein , t and T are the current iteration number, the maximum iteration number, respectively, an adaptive parameter used to control the step length of predator motion, the product of and in formula (8) indicates that the prey makes Levy motion, the product of and in formula (9) indicates that the predator makes Brownian motion, and the prey updates its position by adapting to the position information of the predator;
[0078] A2.3, stage 3 (elite group): in the elite group, the predator will use Levy motion for simulation, while the prey remains stationary, and the prey position update formula is as follows:
[0079] (11)
[0080] The product of indicates that the predator makes Levy motion, and the prey updates its position by adapting to the position information of the predator;
[0081] A3, survival crisis awareness mechanism, survival crisis awareness mechanism can effectively avoid the population into local optimal solution, so as to improve the quality of solution, in the ocean, top predators often in the food rich sea area, in the sea area also gathered a large number of prey, in the food chain of marine carnivores, the food of top predators, often also possible prey predator object, in this living environment, prey exists survival crisis awareness, to avoid top predators, mathematical modeling of the algorithm, the formula is as follows:
[0082] (12)
[0083] r1 is a uniform random number in [0, 1], W and R are respectively prey crisis consciousness sensitivity value, safety value, W=0.8, R is a uniform random number in [0, 1], Q is a random value subject to normal distribution, L is a 1xd all-1 matrix, d is the dimension size of the prey population, when R
[0084] A4, vortex formation and FAD effect, after completing the above optimization stage, further avoid the MSMPA algorithm from falling into a local optimal solution through vortex formation and FAD effect, the formula for jumping out of the local optimal solution is as follows:
[0085] (13)
[0086] In the formula, is the lower bound and the upper bound, FADs is the probability of FAD affecting the optimization process, FADs=0.2 is taken, and r is a uniform random number defined in the interval [0, 1], U is a binary vector, and the array includes 0 and 1. Indicates the random index of the prey matrix;
[0087] A5, ocean memory, this step updates the position information of the elite matrix (Elite), in the tth iteration, after the prey undergoes the optimization stage, the survival crisis consciousness mechanism and the vortex formation and FAD effect, the population position information of the prey has changed qualitatively, the position information of each prey individual represents a solution to the task scheduling, according to the formula (6) optimization objective function (also the scheduling objective function), the optimal prey individual (representing the best task scheduling solution) with the smallest fitness value is calculated. The of is compared with the of the individual in the elite matrix, if it is smaller, the spatial position information of is saved and replaces the spatial position information of the individual in the original elite matrix; if it is larger, the spatial position information of the individual in the elite matrix remains unchanged.
[0088] After the algorithm iteration optimization is completed, the individual position information in the elite matrix (Elite) saves the best scheduling scheme of cloud transcoding task scheduling, the position information is integerized and arranged, then decoded and reflected, to obtain the mapping matrix of cloud transcoding task allocation to virtual machines, and the scheduling is completed.
[0089] Step five, use multi-strategy to improve the ocean predator algorithm for task scheduling, specifically including:
[0090] S1, according to the number of transcoding tasks uploaded by the user N and the virtual machine resources deployed by the cloud transcoding platform M, determine the related parameters of the algorithm, the population size n, the population individual position coordinate dimension d(N), the maximum iteration number T, the lower limit and the upper limit of the search space , p = 0.5, crisis consciousness sensitivity value W = 0.8, FAD influence factor FADs = 0.2;
[0091] S2, establish a mathematical model of AVS video transcoding task and virtual machine, map the AVS video transcoding task to the virtual machine cluster, and obtain the mapping matrix MAP;
[0092] S3, calculate the task completion time ETC matrix according to the mapping matrix MAP, establish a mathematical optimization model of task scheduling according to the AVS video job completion time and the load balancing of the system, and determine the scheduling target optimization function ;
[0093] S4, initialize the prey population according to the algorithm related parameters determined in S1, and obtain the prey matrix (Prey) by using formula (7);
[0094] S5, according to the marine memory, use the scheduling optimization function to calculate the prey population individual fitness value, and update the elite matrix (Elite);
[0095] S6, calculate the fitness value of all individuals in the prey population Prey, sort from inferior to superior and divide into three groups: elimination group, learning group and elite group. The population individuals in different groups are executed in different algorithm optimization stages according to formulas (8), (9), (10) and (11) respectively, complete the update of the prey matrix Prey position information, and complete the update of the elite matrix (Elite) by using the marine memory;
[0096] S7, use the prey survival crisis consciousness mechanism, update the prey matrix Prey position information according to formula (12), avoid the prey population from falling into local optimal solution, improve the quality of the solution, and complete the update of the elite matrix (Elite) by using the marine memory;
[0097] S8, according to the vortex formation and FAD effect, update the prey matrix Prey position information according to formula (13), further avoid the prey population from falling into local optimal solution, and update the elite matrix according to the marine memory;
[0098] S9, judge whether t is greater than the maximum iteration number T of the algorithm, if not, go to S6, if yes, go to S10;
[0099] S10, the individual position information of the elite matrix (Elite) is integerized, and then decoded, and the best scheduling scheme of the cloud transcoding task scheduling saved by the individual position information is extracted, the decoded information is reflected, and the mapping matrix MAP of the cloud transcoding task allocation to the virtual machine is obtained, and the cloud transcoding platform completes the scheduling according to the mapping matrix MAP.
[0100] The application distributes a large number of AVS video transcoding tasks submitted by users to the virtual machines deployed on the cloud transcoding platform through the MSMPA optimization scheduling algorithm, and completes the AVS video transcoding task, which can improve the work efficiency of the cloud transcoding platform, reduce the transcoding completion time of the entire AVS video stream, reduce the cost of the cloud transcoding platform, improve the utilization rate of resources, and realize load balancing on the premise of guaranteeing the service quality of the video transcoding task.
[0101] In the present application, unless otherwise explicitly specified and limited, the terms "mounting", "connecting", "connecting", "fixing" and the like should be understood in a broad sense, for example, can be fixedly connected, or can be detachably connected, or integrated; can be mechanically connected, or electrically connected or can communicate with each other; can be directly connected, or indirectly connected through an intermediate medium, can be the internal communication of two elements or the interaction relationship between two elements, unless otherwise explicitly limited. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0102] Obviously, the above-described embodiments are only a part of the embodiments of the present application, and are not all the embodiments. The preferred embodiments of the present application are given in the drawings, but do not limit the patent scope of the present application. The present application can be realized in many different forms, and on the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features. Any equivalent structure made by using the contents of the present application specification and drawings, directly or indirectly applied to other related technical fields, is also within the patent protection scope of the present application.
Claims
1. An AVS cloud transcoding multi-task scheduling method based on an MSMPA algorithm, characterized in that, Comprising the following steps: Step one, mapping tasks to virtual machine clusters; Step two, assuming that the cloud transcoding system has N AVS video transcoding tasks to be processed, and the system deploys M virtual machines; Step three, determine the scheduling target optimization function, the time spent in processing each AVS video transcoding task is represented by an ETC matrix, through the mapping matrix MAP, the running time of each task allocated to the virtual machine is calculated to obtain the ETC matrix; ETC matrix. Step four, multi-strategy improved marine predator algorithm optimization; Step five, using multi-strategy improved marine predator algorithm for task scheduling; The operation of mapping tasks to virtual machine clusters in step one is as follows: When the user uploads the AVS video job, the cloud transcoding platform uses the video segmenter to convert it into a task that can be independently transcoded by a virtual machine, and puts these several AVS video transcoding tasks Task into the task queue; At the same time, the cloud transcoding platform will refine the server resources deployed on it into a VM virtual machine cluster, and through the task scheduler of the cloud transcoding platform, the addresses of the to-be-processed cloud transcoding tasks in the task queue are mapped to the virtual machine cluster. After determining the scheduling scheme, the cloud transcoding platform will upload the key information of the AVS transcoding task to the virtual machine, and complete the transcoding. The completed AVS video transcoding task is combined into a video and downloaded to the user; The transcoding system is a service system built on the cloud server for AVS video transcoding, including hardware resources of cloud computing and corresponding software systems; In step two, the task queue and the virtual machine queue are as follows: (1) (2) The task queue is allocated to the virtual machine queue to obtain a mapping matrix , , The task is allocated on the virtual machine , each task can only be allocated on one virtual machine, but one virtual machine can deploy multiple tasks, that is, in the row matrix of the mapping matrix MAP, there is and only one element with a value of 1; in the column matrix, there can be multiple elements with a value of 1; Encode the mapping matrix MAP, convert all row matrices of the matrix MAP into a variable one by one, and the value of the variable is the column coordinate of the element 1 in the row matrix. Arranging and combining n variables in turn, the mapping matrix MAP is encoded into a sequence with a dimension of n; After completing the mapping of the AVS video transcoding task to the virtual machine cluster and encoding the mapping matrix of the task allocation to the virtual machine cluster, the obtained data is mapped to the MSMPA algorithm, representing the coordinate position of the predator or prey in the algorithm search space in the MSMPA algorithm.
2. The MSMPA algorithm-based AVS cloud transcoding multi-task scheduling method according to claim 1, characterized in that, In step three, represents the time spent by the virtual machine j to complete the transcoding task i, and the total running time of each virtual machine is calculated according to the ETC matrix; (3) When all AVS video transcoding tasks are completed, the video job is completed, and the video job completion time is determined by the virtual machine with the longest running time in the virtual machine set; (4) Since the total running time of each virtual machine is difficult to be consistent, in order to measure the resource utilization of the virtual machine and satisfy the load balancing of the cloud transcoding platform, the overall variance of the total running time of the virtual machine set is proposed to measure the working efficiency of the virtual machine cluster; (5) According to the AVS video job completion time and the system load balancing, a mathematical optimization model for task scheduling is established, as shown in formula (6), which is the optimization function of task scheduling, and α and β are weight factors; (6) Optimize the objective function by using equation (6) Calculate the fitness of the n individuals in the prey matrix Copy the spatial coordinates of the individual with the smallest fitness in the prey matrix to the elite matrix The row matrix of the elite matrix is the same as the row matrix of the prey matrix The individual in the elite matrix represents the best individual in the prey matrix After the above steps, the prey matrix and the elite matrix are iteratively optimized to find the optimal individual.
3. The MSMPA algorithm-based AVS cloud transcoding multi-task scheduling method according to claim 2, characterized in that, The multi-strategy improved marine predator algorithm optimization method specifically includes steps A1, A2, A3, A4, and A5; A1 is as follows: Population initialization, set the size of the predator and prey population in the algorithm is n, the algorithm each iteration will be solved n task scheduling allocation scheme, using Latin hypercube sampling function to initialize the prey population, get the prey matrix Prey and elite matrix Elite As shown in equation (7); (7) n is the population size, d is the dimension of the spatial coordinate of each individual in the population, corresponding to the prey matrix containing n task scheduling solutions, and there are d cloud transcoding tasks participating in scheduling in the task scheduling, is the position coordinate value of the ith individual of the prey matrix in the jth dimension, are the upper and lower limits of the jth vector respectively, and R is a uniform random number in [0, 1], is a value randomly selected from the integer sequence [0, n-1], and when The value of is used, the element with the same value is deleted from the integer sequence, so that i is not the same The value of is also different; Each element of the prey matrix is a continuous value, ranging from [0, m], corresponding to the task scheduling, m is the number of virtual machines participating in the task scheduling, and the data of needs to be rounded after the algorithm is optimized. , 。 4. The MSMPA algorithm-based AVS cloud transcoding multi-task scheduling method according to claim 3, characterized in that, The objective function is optimized by using formula (6) The fitness of n individuals in the prey matrix is calculated The individual with the minimum fitness in the prey matrix is copied to the elite matrix The spatial coordinates of the individual are a row matrix The individual is copied to the elite matrix, and all row matrices in the elite matrix are identical, so the individual in the elite matrix represents the best individual in the prey matrix After the above steps, the prey matrix and the elite matrix are iteratively optimized to find the optimal individual.
5. The MSMPA algorithm-based AVS cloud transcoding multi-task scheduling method according to claim 4, characterized in that, A2 is as follows: The population elite grouping optimization stage, in the optimization process of the MSMPA algorithm, three optimization stages are experienced, the fitness values of the population individuals are sorted from large to small and divided into three groups, each group accounts for n / 3 individual quantity of the population, which are elimination group, learning group and elite group respectively, the grouping situation is used to distinguish different optimization stages, and the steps are as follows: A2.1, stage 1 is the elimination group: in the elimination group, the prey uses Brownian motion to simulate the prey breeding process, and the predator remains stationary, which belongs to the global search process of the algorithm, and the position update formula of the prey is as follows: (8) is a random function generated based on a normal distribution, representing Brownian motion, the symbol represents matrix multiplication, the variable p is a constant, p = 0.5, and R is a uniform random vector in [0, 1], is the product of , which represents the prey doing Brownian motion, is the step size of the prey doing Brownian motion; A2.2, stage 2 is the learning group: in the learning group, the prey represents the algorithm development and the predator represents the algorithm search, in this stage, the prey moves using the Levy flight model, and the predator moves using the Brownian motion model, wherein the prey and the predator move half of the learning group respectively, and the position update formula of the prey is as follows: The first half of the population position update in the learning group: (9) The second half of the population position update in the learning group: (10) in t and T are the current iteration number and the maximum iteration number, respectively, used as adaptive parameters to control the predator's stride length, in formula (9). and The product of represents the Levy motion of the prey, in formula (8). and The product of these terms represents the predator performing Brownian motion, and the prey adapting by updating its own position based on the predator's positional information. A2.3, stage 3 is the elite group: in the elite group, the predator will use Levy motion for simulation, and the prey remains stationary, and the position update formula of the prey is as follows: (11) The product of the Levy motion, the prey updates its position by adapting to the position information of the predator.
6. The AVS cloud transcoding multi-task scheduling method based on the MSMPA algorithm according to claim 5, characterized in that, A3 is as follows: Survival crisis awareness mechanism: the survival crisis awareness mechanism can effectively avoid the population from falling into local optimal solution, thereby improving the solution quality, in the ocean, the top predator often stays in the sea area rich in food, and a large number of prey also gather in this sea area, in the food chain of marine carnivores, the food of the top predator may also be the prey of the prey, in this survival environment, the prey has survival crisis awareness to avoid the top predator, and the algorithm is mathematically modeled, and the formula is as follows: (12) is a uniform random number in [0, 1], W and R are respectively the prey crisis awareness sensitivity value and the safety value, W = 0.8, R is a uniform random number in [0, 1], Q is a random value subject to a normal distribution, L is a 1xd all-one matrix, d is the dimension size of the prey population, when R < W, the prey is in a safe position, at this time the prey can hunt at will and search extensively, when R > W, the prey realizes crisis and needs to randomly move to other safe positions.
7. The MSMPA algorithm-based AVS cloud transcoding multitasking scheduling method according to claim 6, characterized in that, A4 is as follows: Vortex formation and FAD effect: after the above optimization stages are completed, the vortex formation and FAD effect are used to further avoid the MSMPA algorithm from falling into local optimal solution, and the specific formula for jumping out of the local optimal solution is as follows: (13) where are lower and upper bounds, FADs is the probability that FADs influences the optimization process, FADs = 0.2, r is a uniform random number defined in the interval [0, 1], U is a binary vector, the array includes 0, 1, and r1, r2 represent the random indices of the prey matrix.
8. The AVS cloud transcoding multi-task scheduling method based on MSMPA algorithm according to claim 7, characterized in that, A5 is as follows: Ocean memory, this step is to update the position information of elite matrix, in the tth iteration, after the prey experienced optimization stage, survival crisis consciousness mechanism and vortex formation and FAD effect, its population position information has qualitative change, each prey individual position information represents a solution to the task scheduling, according to formula (6) optimization objective function , it is also the scheduling objective function, calculate the optimal prey individual , represents the best task scheduling solution, has the minimum fitness value , the of is compared with the of the individual in the elite matrix, if less, the spatial position information of is saved and replaces the original spatial position information of the individual in the elite matrix; if greater, the spatial position information of the individual in the elite matrix remains unchanged; After the algorithm iteration optimization is completed, the individual position information in the elite matrix Elite saves the best scheduling scheme of the cloud transcoding task scheduling, the position information is integerized and arranged, then decoded and mapped, to obtain a mapping matrix of the cloud transcoding task allocation to the virtual machines, and the scheduling is completed.
9. The MSMPA algorithm-based AVS cloud transcoding multitasking scheduling method according to claim 8, characterized in that, Step five specifically includes: S1, according to the number of AVS transcoding tasks uploaded by the user N and the virtual machine resources deployed by the cloud transcoding platform M, determine the related parameters of the algorithm, the population size n, the population individual position coordinate dimension d(N), the maximum iteration number T, the lower limit and the upper limit of the search space , p = 0.5, crisis consciousness sensitivity value W = 0.8, FAD influence factor FADs = 0.2; S2, a mathematical model of AVS video transcoding task and virtual machine is established, the AVS video transcoding task is mapped to the virtual machine cluster to obtain a mapping matrix MAP; S3、According to the mapping matrix MAP, a task completion time ETC matrix is calculated, a mathematical optimization model of task scheduling is established according to the AVS video task completion time and the load balancing of the system, and a scheduling target optimization function is determined ; S4, according to the algorithm related parameters determined in S1, the prey population is initialized by using formula (7) to obtain a prey matrix Prey; S5、According to the marine memory, using the scheduling optimization function Calculate the fitness value of the prey population individuals, and update the elite matrix Elite; S6, the fitness values of all individuals of the prey population Prey are calculated, and are sorted from inferior to superior and divided into three groups, namely elimination group, learning group and elite group, the population individuals in different groups are executed in different algorithm optimization stages according to formulas (8), (9), (10) and (11) respectively, the position information of the prey matrix Prey is updated, and the elite matrix Elite is updated by using the ocean memory; S7, using the prey survival crisis awareness mechanism, according to formula (12), the prey matrix prey position information update, avoid prey population into local optimal solution, improve the quality of solution, using the ocean memory, complete elite matrix Elite update; S8, according to the vortex formation and FAD effect, according to formula (13), the prey matrix prey position information update, further avoid prey population into local optimal solution, according to the ocean memory, update elite matrix; S9, judge whether t is greater than the maximum number of iterations T of algorithm, if not go to S6, if yes go to S10; S10, the individual position information of elite matrix Elite is integerized, then decoded, the best scheduling scheme of cloud transcoding task scheduling saved by individual position information is extracted, the decoded information is reflected, and the mapping matrix MAP of cloud transcoding task allocation to virtual machine is obtained, and the cloud transcoding platform completes the scheduling according to the mapping matrix MAP.
Citation Information
Patent Citations
Load balancing method based on elevator scheduling algorithm under SDN architecture
CN107634882B
Method for solving job shop scheduling based on improved marine predator algorithm
CN114841611A