Task scheduling method and device for edge side video processing

By introducing the initialization methods of Q-learning and Tent chaotic mapping in the cuckoo algorithm, combining user fairness and task priority indicators, the response delay problem of video processing task scheduling in edge environments is solved, and the efficiency of the algorithm is improved. Accuracy.

CN119166303AActive Publication Date: 2024-12-20INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411225022.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-20
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

When scheduling video processing tasks in edge environments, the cuckoo algorithm has problems of inhomogeneity of initialized populations and high sensitivity to parameter selection, resulting in low solution efficiency and poor accuracy, and high user response delay.

Method used

Adaptive cuckoo algorithm based on Q-learning is used to initialize the population through Tent chaotic mapping, and the parameters are divided into main and secondary parameters. The main parameters are dynamically tuned using Q-learning and the secondary parameters are adaptively updated according to the optimization target. Optimize task scheduling in combination with user fairness and task priority indicators.

Benefits of technology

It improves the algorithm's solution performance and convergence speed, effectively reduces the average response delay and tail delay of users, and improves the efficiency and accuracy of task scheduling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166303A_ABST
    Figure CN119166303A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method for edge side video processing, which comprises the following steps of: constructing a task scheduling model of an edge video processing system and an optimization index of the task scheduling model; generating an objective function and a constraint condition of the task scheduling model based on the optimization index; and using a cuckoo search model, taking a task scheduling scheme corresponding to the target function when the optimization indexes are all minimum values as an optimization scheme, and performing task scheduling operation on the edge video processing system according to the optimization scheme. In order to solve the problem that the response time delay of a user needs to be reduced when video processing task scheduling is carried out in an edge environment, the average response time delay and the tail delay of the user are used as main optimization indexes; and two indexes of user fairness and task priority are respectively adopted to reflect the sequence of task requests submitted by different users and the influence of the execution sequence of different tasks of the same user on the task scheduling problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of edge computing technology, and in particular relates to a method and device for scheduling video processing tasks on an edge cluster. Background Art

[0002] With the development of new generation information technology, a large number of application scenarios with high real-time requirements have emerged. Among these scenarios, video processing tasks using artificial intelligence technology account for an important proportion. Edge computing can sink the computing and storage resources required for tasks from the cloud to the edge, effectively reducing data transmission delays. However, video processing tasks are characterized by high computational intensity and high resource requirements. When scheduling tasks in an edge environment with relatively limited resources, they will face problems such as poor edge cluster performance and high user response latency. The cuckoo algorithm is derived from the specialized parasitic feeding behavior of the cuckoo species. The algorithm combines the extensive exploration of global search and the fine adjustment of local search to more effectively find high-quality solutions in the search space. However, when the cuckoo algorithm is used for task scheduling problems, its shortcomings include: (1) The cuckoo algorithm usually uses a random population initialization method in the initialization stage of the algorithm, which may cause uneven population distribution, which is not conducive to the exploration of the solution space and introduces unstable factors. (2) When solving practical problems, the cuckoo algorithm is sensitive to parameter selection. Inappropriate parameters will lead to low algorithm solution efficiency and poor accuracy. Parameters need to be set according to specific problems. The above problems will lead to low solution efficiency and poor solution accuracy when the cuckoo algorithm is applied to edge environments for video processing task scheduling, resulting in high user response delay. Therefore, there is a need for a reasonable and efficient video processing task scheduling algorithm that can improve the algorithm's solution efficiency and solution accuracy while reducing the user's response delay, so as to improve the service quality of practical applications and provide users with a better experience. Summary of the invention

[0003] In view of the above problems, the present invention proposes a task scheduling method for edge-side video processing, including: constructing a task scheduling model of an edge video processing system and an optimization index of the task scheduling model; based on the optimization index, generating an objective function and constraint conditions of the task scheduling model; using a cuckoo search model, taking the task scheduling scheme corresponding to the objective function when the optimization indexes are all minimum values ​​as the optimization scheme, and performing task scheduling operations on the edge video processing system with the optimization scheme.

[0004] Furthermore, the optimization index includes: User fairness index UF inv , Task Priority Index TP inv , User average response delay index RT avg And tail delay index TL 99th; Among them, the user sequence is constructed from small to large according to the time when the user submits the task, and the response time of each user is used as the value of the element at the corresponding position of the user sequence. The reverse number of the user sequence is calculated as the user fairness index UF inv ; Construct a task sequence from small to large based on the submission time of each task, use the execution time of each task as the value of the element at the corresponding position in the task sequence, calculate the reverse number of the task sequence and sum it up as the task priority index TP inv ; User average response delay indicator represents the response delay of user h, x is the total number of users who submitted requests in the specified time period; the tail delay indicator TL 99th The proportion of response delays higher than the average response delay is higher than 99%.

[0005] Furthermore, the objective function TS

[0006] min TS=ω1RT avg +ω2TL 99th +ω3UF inv +ω4TP inv

[0007] satisfy: and

[0008] Among them, ω1, ω2, ω3 and ω4 are weight values, and ω1+ω2+ω3+ω4=1, Represents task t i On edge devices j The amount of computing resources used on Indicates t i In p j Storage resource usage on Represents the edge device p j The amount of computing resources available on Represents the edge device p j The amount of storage resources available on the .

[0009] Furthermore, in the iterative process of searching the optimization scheme with the cuckoo search model, the global step scale coefficient α and the local distance scale coefficient β of the cuckoo search model are updated using the Q-learning algorithm, including: initializing the Q value table, the state space and the action space of the value set of the objective function; the Q value represents the expected value of the cumulative reward when the action of selecting α and β is executed under a given state s; in each iteration, the action of selecting the α and β values ​​is selected from the Q value table according to the ε-greedy strategy, the selected α and β values ​​are input into the cuckoo search model for solution, and the Q value table is updated with the objective function TS and the reward function R;

[0010] The ε-greedy strategy.

[0011]

[0012] atgmaxV(a) represents the best known action in the current state selected with probability (1-ε); rand(a) represents randomly selecting an action with probability ε in a uniform distribution.

[0013] Furthermore, the Tent chaotic map is used to initialize the population of the cuckoo search model:

[0014]

[0015] Among them, z k is the random number for this iteration, z k+1 is the random number generated in the next iteration after the Tent chaotic mapping, and τ is the control parameter.

[0016] Furthermore, the discovery probability of the cuckoo search model

[0017]

[0018] in, Indicates the average response delay of users in the current iteration. Indicates the initial average user response delay of the user in the current iteration, Indicates the 99th percentile latency of the user in the current iteration. represents the initial 99th percentile latency of the user at the current iteration; ω5 and ω6 are weight values.

[0019] Furthermore, the task scheduling model is represented by a three-dimensional tensor as

[0020]

[0021] Among them, x ijk ∈{0,1}, when any task t i Assigned to the edge computing device p j Processing core c k On, then x ijk =1, otherwise x ijk =0.

[0022] The present invention also proposes a task scheduling device for edge-side video processing, comprising: a model building module, used to build a task scheduling model of an edge video processing system, and an optimization index of the task scheduling model; an optimization target module, used to generate an objective function and constraint conditions of the task scheduling model based on the optimization index; a scheme selection module, used to use a cuckoo search model, and take the task scheduling scheme corresponding to the objective function when the optimization indexes are all minimum values ​​as the optimization scheme, and use the optimization scheme to perform task scheduling operations on the edge video processing system.

[0023] The present invention also proposes a computer-readable storage medium storing computer-executable instructions, characterized in that when the computer-executable instructions are executed, the task scheduling method for edge-side video processing as described above is implemented.

[0024] The present invention also provides an electronic device, comprising the task scheduling device for edge-side video processing as described above.

[0025] The task scheduling method for edge-side video processing of the present invention aims at the problem that the user's response delay needs to be reduced when scheduling video processing tasks in the edge environment, and uses the user's average response delay and tail delay as the main optimization indicators. In addition, considering the actual situation of multiple users submitting task requests, the two indicators of user fairness and task priority are used to reflect the impact of the order of task requests submitted by different users and the execution order of different tasks of the same user on the task scheduling problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flow chart of the task scheduling method for edge-side video processing of the present invention.

[0027] Figure 2 It is a schematic diagram of a task scheduling device for edge-side video processing of the present invention.

[0028] Figure 3 It is a schematic diagram of the model building module of the present invention.

[0029] Figure 4 It is a schematic diagram of a scheme selection module of the present invention.

[0030] Figure 5 It is a schematic diagram of the model optimization module of the present invention.

[0031] Figure 6 It is a schematic diagram of an electronic device of the present invention.

[0032] Figure 7 It is a schematic diagram of the hardware structure of an electronic device of the present invention.

[0033] Wherein, the accompanying drawings are marked as follows:

[0034] 100: Electronic device 10: Model building module

[0035] 11: Task scheduling model building module 12: Optimization index determination module

[0036] 20: Optimization target module 30: Solution selection module

[0037] 31: Model initialization module 32: Model optimization module

[0038] 321: Q value function update module 322: state space partition module

[0039] 323: Action space division module 324: Reward function setting module

[0040] 325: Action selection strategy module 326: Parameter update module

[0041] S1, S2, S3, S11, S12, S31, S32, S311, S312, S313, S314, S315, S321, S322, S323, S324, S325, S326: Steps DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation method described herein is only used to explain the present invention and is not used to limit the present invention.

[0043] The present invention aims at the problem that the user's response delay needs to be reduced when scheduling video processing tasks in edge environments. The present invention takes the user's average response delay and tail delay as the main optimization indicators, models them in the form of weighted sum, and proposes an adaptive cuckoo algorithm based on Q-learning on this basis. Aiming at the limitations of the cuckoo algorithm in solving practical problems, which is highly sensitive to parameter selection and leads to low algorithm solution efficiency and poor accuracy, the present invention divides the parameters required by the algorithm into two categories: main parameters and secondary parameters. The main parameters are dynamically tuned by using the Q-learning algorithm, and the secondary parameters adopt an adaptive update strategy according to the changes in the optimization target. This method can automatically optimize and update the algorithm parameters during the iteration process, thereby improving the algorithm's solution performance. In addition, in order to solve the problems of uneven population distribution and introduction of unstable factors brought about by the cuckoo algorithm in the initialization stage, the present invention changes the initialization method of the cuckoo population through the Tent chaotic mapping, thereby accelerating the convergence speed of the algorithm.

[0044] The technical solution of the present invention includes:

[0045] 1. Construction of task scheduling model in edge environment

[0046] In an edge environment, if the number of users who submit requests in a certain period of time is x, the set of the number of video processing tasks submitted by each user is Y = {y1, y2, …, y x},y x represents the number of tasks submitted by the xth user. The total number of video processing tasks received by the edge cluster during this period is n. The video processing task set is defined as T = {t1, t2, …, t i ,…,t n}, where t i Indicates the i-th task. In the edge cluster, the number of edge computing devices that can participate in task scheduling is m. The edge computing device set is defined as P = {p1, p2, …, p j ,…,p m}, where p j represents the jth edge computing device. The set of cores in each edge computing device is defined as C = {c1, c2, …, c k ,…,c l}, where l is the number of cores in the edge computing device, c k is the kth core in the device. If the number of cores available for an edge computing device is k' (k'≤l), then {c k'+1 ,…,c l} each element is 0.

[0047] The scheduling of a single task can be described as task t i To edge computing devices j Medium Core c k The task scheduling scheme can be expressed as a three-dimensional tensor X of order (n×m×l). nml It is expressed as shown in formula (1):

[0048]

[0049] Among them, x ijk ∈{0,1}, if task t i Assigned to device p j Core c k Up, x ijk =1, otherwise x ijk =0.

[0050] Since the tasks submitted by users may be executed on different edge devices, we define the time set ET = {et1,et2,…,et j ,…,et m}. jrepresents the total completion time of the task assigned to the jth device, at this time et j The task queue time is included. When the user's task is not executed on the device, j = 0. Then the total processing time of the user task is t proc (including task execution time and task queuing time) can be calculated by formula (2):

[0051] t proc =max{et1,et2,…,et j ,…,et m} (2)

[0052] In the scheduling problem of video processing tasks in the edge environment facing the normal request state, the main consideration is to optimize from the perspective of user response delay, so it is necessary to establish a communication model between the user and the edge device. According to the Shannon formula, the calculation formula of the task transmission rate is shown in (3):

[0053]

[0054] Among them, R u represents the task transmission rate corresponding to user u, B w represents the channel bandwidth, τ u Indicates the bandwidth ratio allocated to user u. uj represents the transmission power between the jth edge device and user u, G is the channel gain, σ 2 is the noise power.

[0055] According to the task transmission rate and task data volume, the task transmission time can be calculated:

[0056]

[0057] In the above formula, t tran is the task transmission time, D i is the size of the task data.

[0058] User response delay t resp It is the sum of the total processing time of user tasks and the task transmission time:

[0059] t resp =t proc +t tran (5)

[0060] The average response delay of the user can be calculated by formula (6):

[0061]

[0062] Among them, RT avg represents the average response delay of the user, represents the response delay of user h, and x is the total number of users submitting requests during this time period.

[0063] In order to better improve the overall performance of the system and ensure user experience, the present invention introduces tail latency as one of the optimization goals. Tail latency, also known as high percentage latency, refers to the small proportion of the response time that is significantly higher than the mean. In order to reflect the degree of the situation, tail latency is usually expressed as a percentage. According to the commonly used standards in the industry, the present invention uses the 99th percentile latency description. The calculation method is to sort the response delay of each user from small to large and determine the position of the 99th percentile. The response delay corresponding to this position is the 99th percentile delay, recorded as TL 99th .

[0064] In reality, different users may submit task requests at different times, and each user may determine the order in which tasks are submitted according to their own preferences. The present invention proposes two indicators, user fairness and task priority, to respectively reflect the impact of the order in which different users submit task requests and the order in which different tasks of the same user are executed on the task scheduling problem. In the user fairness indicator, the earlier the user submits the task, the more priority his task needs to be executed; in the task priority indicator, each user can decide the order in which tasks are submitted, and the earlier the task is submitted, the more priority it needs to be executed. In order to construct an optimization model, the present invention uses the concept of reverse order numbers to mathematically describe the above two indicators.

[0065] The user sequence is constructed from the time when the user submits the task in ascending order, and the response time of each user is used as the value of the element at the corresponding position of the sequence. Then, the reverse number of the sequence can be calculated to represent user fairness, which is recorded as UF inv .UF inv The smaller the value, the higher the user fairness. For each user, a sequence is constructed from the submission time of each task in ascending order, and the execution time of each task is used as the value of the element at the corresponding position in the sequence. In this way, a sequence equal to the number of users can be constructed, and the reverse number of each sequence is calculated and summed, which is recorded as TP inv TP inv It can reflect the task priority. The smaller the value, the more likely each user's expected task execution order can be met.

[0066] In summary, in the video processing task scheduling problem for normal request states in the edge environment, the optimization indicators of the present invention include user average response delay, tail delay, user fairness and task priority. In order to give priority to real-time performance, user average response delay and tail delay will be used as the main optimization indicators. The above four indicators are all minimum optimization indicators, that is, the optimization task is to make the indicator value as small as possible. Therefore, the optimization goal of the present invention is to pursue a task scheduling solution that minimizes user average response delay and tail delay while ensuring user fairness and task priority as much as possible. This task scheduling problem belongs to a multi-objective optimization problem, and the objective function is presented in the form of a weighted sum of each indicator:

[0067] min TS=ω1RT avg +ω2TL 99th +ω3UF inv +ω4TP inv (7)

[0068] In the above formula, TS is the objective function; ω1, ω2, ω3 and ω4 are weight values, reflecting the importance of different indicators, and the sum of the weights is equal to 1.

[0069] In order to prevent tasks from being assigned to edge devices with insufficient computing or storage resources during task scheduling, the constraints are as follows:

[0070]

[0071] in, and Respectively represent tasks t i On edge devices j The amount of computing and storage resources used, and They represent edge devices p j The amount of computing and storage resources available.

[0072] 2. Initialize the algorithm using Tent chaos mapping

[0073] The cuckoo algorithm is the main optimization algorithm of the present invention, and each individual in its cuckoo population represents a solution for task scheduling. During the initialization phase of the algorithm, the quality of the initial population has a great influence on the optimization performance of the algorithm. The cuckoo algorithm usually adopts a method of randomly initializing the population, which may cause uneven distribution of the population, is not conducive to solution space exploration, and introduces unstable factors. In order to solve the above problems, the present invention will use Tent chaotic mapping to initialize the population.

[0074] Chaos is a dynamic behavior that is irregular, unpredictable, and highly sensitive to initial conditions. Chaotic mapping is a type of mathematical mapping that exhibits chaotic behavior in nonlinear systems. Since chaotic mapping is highly random and decentralized, the benefits of using chaotic mapping for population initialization include: increasing individual diversity and avoiding individual homogeneity; providing a broader search space and accelerating the convergence of the algorithm to an excellent solution.

[0075] The calculation formula of Tent chaos map is:

[0076]

[0077] Among them, τ is the control parameter, τ∈(0,1); z k is the random number for this iteration, z k+1 is the random number generated in the next iteration after chaotic mapping.

[0078] In order to better describe the process of population initialization using Tent chaotic mapping, the present invention first defines the solution space of the video processing task scheduling problem under normal requests in the edge environment. In the present invention, the horizontal axis and the vertical axis represent the edge device and the core, respectively, and are expressed in the form of natural numbers. Within this range, each coordinate point reflects a core of a certain edge device, such as point (1,1) represents the first core of the first device. The scheduling of a single task is the allocation of tasks to a core in a certain edge device, corresponding to a coordinate point; the task scheduling scheme is the allocation of all tasks, corresponding to the sequence formed by each coordinate point.

[0079] 3. Q-learning algorithm design

[0080] In the cuckoo algorithm, the global search strategy formula is as follows:

[0081]

[0082] The update of the location of the bird's nest represents the process of the algorithm exploring and optimizing in the solution space. In the above formula, and denote the positions of the i-th bird's nest at the t-th generation and the (t+1)-th generation, respectively. represents the location of the optimal nest at the tth generation, representing the optimal solution at the tth iteration; α is the global step size coefficient, the purpose of which is to scale the global step size to an appropriate scale; represents the dot product of vectors, and Levy(s) is the random step length obtained by Levy flight.

[0083] The formula for updating the nest position in the local search strategy of the cuckoo algorithm is as follows:

[0084]

[0085] in, and They represent the positions of the ith bird nest at the tth generation and the (t+1)th generation respectively. β is the local distance scale coefficient, which aims to scale the local movement distance of the bird nest to an appropriate scale. and represents the positions of any two remaining bird nests in the tth generation, obtained by uniform distribution sampling.

[0086] In the cuckoo algorithm, parameters α and β are used as global step size scale coefficients and local distance scale coefficients, respectively, to perform global search and local search on the solution space. In order to more fully traverse the solution space and adjust the accuracy of the solution during the iteration process, parameters α and β have different value ranges. At present, the values ​​of parameters α and β are usually adjusted manually based on experience and the operation of the algorithm. However, the cuckoo algorithm is sensitive to parameter settings, and inappropriate parameter selection will lead to low algorithm solution efficiency and poor accuracy. The above parameter adjustment method is not only time-consuming and labor-intensive, but also difficult to adapt the values ​​of α and β to the operating state of the algorithm, thereby affecting the optimization performance of the algorithm. Reinforcement learning, as a machine learning paradigm, can learn online in an uncertain unknown environment, adjust strategies according to feedback from the environment, and has good generalization ability. Therefore, the present invention introduces the Q-learning algorithm in reinforcement learning, and dynamically finds the optimal combination of the main parameters α and β by revealing the internal structure of the cuckoo population, thereby improving the solution efficiency and accuracy of the cuckoo algorithm.

[0087] The following will introduce the design process of the Q-learning algorithm from six parts: updating the Q-value function, dividing the state space and action space, setting the reward function, the ε-greedy action selection strategy, and the updating steps of the main parameters α and β.

[0088] 1) Update of Q-value function

[0089] The main goal of the Q-learning algorithm is to learn the Q-value function, which represents the expected value of the cumulative reward when a specific action is performed in a given state. For a state-action pair (s, a), the Q-value function is denoted as Q(s, a). The update of the Q-value function uses the Bellman equation:

[0090] Q(s,a) new =Q(s,a) cur +μ[R+γ*maxQ(s',a')-Q(s,a) cur ] (13)

[0091] In the above formula, Q(s,a) new Refers to the new Q value of action a in state s, Q(s,a) curis the current Q value. μ is the learning rate, which reflects the weight of new information each time the Q value is updated; γ is the discount factor, which is used to measure the importance of future rewards. R is the immediate reward obtained after executing action a, and s' is the new state after executing action a. maxQ(s',a') is the maximum Q value expected after executing the new action a' in the new state s'.

[0092] 2) Division of state space

[0093] The value set of the objective function constitutes the state space of the cuckoo search model. In the state space, the number of different state divisions has a great influence on the search results. If the number of state divisions is too large, each iteration process will take a lot of time to find the best solution; if the number of state divisions is too small, the quality of the solution will be reduced. In the task scheduling problem of the present invention, the state space is divided into 15 intervals within 0 to 1, namely [0, 0.4), [0.4, 0.45), [0.45, 0.5), [0.5, 0.54), [0.54, 0.58), [0.58, 0.62), [0.62, 0.66), [0.66, 0.7), [0.7, 0.74), [0.74, 0.78), [0.78, 0.82), [0.82, 0.86), [0.86, 0.9), [0.9, 0.95) and [0.95, 1].

[0094] 3) Division of action space

[0095] In the Q-learning algorithm, the agent will select actions from the action space. In the cuckoo search model, the selection of actions is the selection of main parameters, including the global step scale coefficient α and the local distance scale coefficient β. For the global step scale coefficient α, the present invention divides it into 18 intervals in the range of 0.5 to 5, and the length of each interval is 0.25; for the local distance scale coefficient β, this paper divides it into 15 intervals in the range of 0.05 to 0.8, and the length of each interval is 0.05. The action space is composed of different intervals. When an interval is selected, a value in the interval will be randomly selected as the value of the parameter.

[0096] 4) Setting the reward function

[0097] In order to evaluate the pros and cons of the selection of the global step size coefficient α and the local distance scale coefficient β, it is necessary to select an appropriate reward function. According to the objective function of the cuckoo search model, the reward function R is defined as follows:

[0098]

[0099] in, and represents the average response delay and 99th percentile delay of users in the tth generation, and represents the average response delay and 99th percentile delay of users in the (t-1)th generation. ω5 and ω6 are weight values.

[0100] 5) ε-greedy action selection strategy

[0101] The present invention adopts the ε-greedy strategy to select actions from the action space:

[0102]

[0103] Among them, argmaxV(a) represents the best action known in the current state, which is selected with a probability of (1-ε), and is in the utilization state at this time; rand(a) represents randomly selecting an action in a uniformly distributed manner, which is selected with a probability of ε, and is in the exploration state at this time.

[0104] 6) Update steps of main parameters α and β

[0105] In the cuckoo search model, the individuals in the cuckoo population can be regarded as the intelligent agents in the Q-learning algorithm, which refers to a solution for task scheduling in the present invention. The steps of updating the global step-size scale coefficient α and the local distance scale coefficient β by the Q-learning algorithm are as follows: first, the Q table, state space and action space are initialized, and then in one iteration of the algorithm, an action is selected from the Q table according to the ε-greedy strategy, that is, α and β are selected, and after input into the cuckoo algorithm for solution, the Q table is updated according to the value of the objective function and the reward function, and the above steps are repeated until the total number of iterations of the algorithm is met.

[0106] 4. Adaptive update strategy

[0107] According to the different emphases and advantages of the global search strategy and the local search strategy in the cuckoo algorithm, the global search should be used as the main strategy in the early stage of the algorithm to avoid falling into the local optimal solution, and the proportion of the local search strategy should be gradually increased in the middle and late stages to further improve the quality of the solution. a is a constant, which cannot reflect its role in balancing global search and local search, thus reducing the optimization performance of the algorithm.

[0108] In order to better balance the global search strategy and local search strategy of the algorithm and improve the performance of the algorithm, the present invention will find the probability P a It is defined as a secondary parameter and is adjusted by an adaptive update strategy according to the changes in the optimization objectives under the task scheduling problem. a The update formula is as follows:

[0109]

[0110] in, and Indicates the average response delay of users in the current iteration and the average response delay of initial users. and Indicates the 99th percentile delay and initial 99th percentile delay of the user in the current iteration; ω7 and ω8 are weight values.

[0111] In the early days of the algorithm, due to and The value of is large, so the probability of finding P a The value is small, the algorithm will mainly adopt the global search strategy of Levy flight; with the continuous iteration of the algorithm, and The value of P gradually decreases. a The value will gradually increase, so the possibility of the local search strategy will gradually increase, ensuring a good balance between the global search strategy and the local search strategy. At the same time, if in a certain iteration, and The values ​​of are not updated, and the probability P is found a The value of will remain unchanged, avoiding P a The value is constantly modified as the number of iterations changes, resulting in poor robustness of the algorithm. In addition, when updating P a Taking the average response delay and tail delay of users as variables when valuing , it is more conducive to enhancing the ability of the algorithm to solve the main optimization objectives.

[0112] Based on the above technical solution, in the first embodiment of the present invention, a task scheduling method for edge-side video processing is proposed, such as Figure 1 As shown, including:

[0113] Step S1: constructing a task scheduling model of the edge video processing system and an optimization index of the task scheduling model; specifically including:

[0114] Step S11: Building a task scheduling model in edge environment

[0115] In the edge environment, the number of users who submit requests in a certain period of time is x. The set of the number of video processing tasks submitted by each user is Y = {y1, y2, …, y x},y x represents the number of tasks submitted by the xth user. The total number of video processing tasks received by the edge cluster during this period is n. The video processing task set is defined as T = {t1, t2, …, t i ,…,t n}, where t iIndicates the i-th task. In the edge cluster, the number of edge computing devices that can participate in task scheduling is m. The edge computing device set is defined as P = {p1, p2, …, p j ,…,p m}, where p j represents the jth edge computing device. The set of cores in each edge computing device is defined as C = {c1, c2, …, c k ,…,c l}, where l is the number of cores in the edge computing device, c k is the kth core in the device. If the number of cores available for an edge computing device is k' (k'≤l), then {c k'+1 ,…,c l} each element is 0.

[0116] The scheduling of a single task can be described as task t i To edge computing devices j Medium Core c k The task scheduling scheme can be expressed as a three-dimensional tensor X of order (n×m×l). nml It is represented as shown in formula (1).

[0117] Step S12: Determine the optimization index of the task scheduling model

[0118] Since the tasks submitted by users may be executed on different edge devices, we define the time set ET = {et1,et2,…,et j ,…,et m}. j represents the total completion time of the task assigned to the jth device, at this time et j The task queue time is included. When the user's task is not executed on the device, j = 0. Then the total processing time of the user task is t proc (including task execution time and task queuing time) can be calculated by formula (2).

[0119] In the scheduling problem of video processing tasks facing normal request status in edge environments, the main consideration is to optimize from the perspective of user response delay, so it is necessary to establish a communication model between users and edge devices. According to Shannon's formula, the task transmission rate R u The calculation of is shown in formula (3).

[0120] According to the task transmission rate and task data volume, the task transmission time t can be calculated tran .

[0121] User response delay tresp It is the sum of the total user task processing time and task transmission time.

[0122] Average response time delay RT of users avg It can be calculated by formula (6).

[0123] In order to better improve the overall performance of the system and ensure user experience, the present invention introduces tail latency as one of the optimization goals. Tail latency, also known as high percentage latency, refers to the small proportion of the response time that is significantly higher than the mean. In order to reflect the degree of the situation, tail latency is usually expressed as a percentage. According to the commonly used standards in the industry, the present invention uses the 99th percentile latency description. The calculation method is to sort the response delay of each user from small to large and determine the position of the 99th percentile. The response delay corresponding to this position is the 99th percentile delay, recorded as TL 99th .

[0124] In reality, different users may submit task requests at different times, and each user may determine the order in which tasks are submitted according to their own preferences. The present invention proposes two indicators, user fairness and task priority, to respectively reflect the impact of the order in which different users submit task requests and the order in which different tasks of the same user are executed on the task scheduling problem. In the user fairness indicator, the earlier the user submits the task, the more priority his task needs to be executed; in the task priority indicator, each user can decide the order in which tasks are submitted, and the earlier the task is submitted, the more priority it needs to be executed. In order to construct an optimization model, the present invention uses the concept of reverse order numbers to mathematically describe the above two indicators.

[0125] The user sequence is constructed from the time when the user submits the task in ascending order, and the response time of each user is used as the value of the element at the corresponding position of the sequence. Then, the reverse number of the sequence can be calculated to represent user fairness, which is recorded as UF inv .UF inv The smaller the value, the higher the user fairness. For each user, a sequence is constructed from the submission time of each task in ascending order, and the execution time of each task is used as the value of the element at the corresponding position in the sequence. In this way, a sequence equal to the number of users can be constructed, and the reverse number of each sequence is calculated and summed, which is recorded as TP inv TP inv It can reflect the task priority. The smaller the value, the more likely each user's expected task execution order can be met.

[0126] Step S2: Based on the optimization index, generate the objective function and constraint conditions of the task scheduling model;

[0127] In the video processing task scheduling problem for normal request states in edge environments, the optimization indicators of the present invention include user average response delay, tail delay, user fairness and task priority. In order to give priority to real-time performance, user average response delay and tail delay will be used as the main optimization indicators. The above four indicators are all minimum optimization indicators, that is, the optimization task is to make the indicator value as small as possible. Therefore, the optimization goal of the present invention is to pursue the task scheduling scheme that minimizes the user average response delay and tail delay while ensuring user fairness and task priority as much as possible. This task scheduling problem belongs to a multi-objective optimization problem, and the objective function TS is presented in the form of a weighted sum of each indicator, as shown in formula (7).

[0128] In order to prevent tasks from being assigned to edge devices with insufficient computing or storage resources during task scheduling, the constraints are as shown in formulas (8) and (9).

[0129] Step S3: Using the cuckoo search model, taking the task scheduling scheme corresponding to the objective function when the optimization indexes are all minimum values ​​as the optimization scheme, and performing task scheduling operations on the edge video processing system using the optimization scheme. Including:

[0130] Step S31, tent chaotic mapping is used to initialize the cuckoo search model;

[0131] The cuckoo algorithm is the main optimization algorithm of the present invention, and each individual in its cuckoo population represents a solution for task scheduling. During the initialization phase of the algorithm, the quality of the initial population has a great influence on the optimization performance of the algorithm. The cuckoo algorithm usually adopts a method of randomly initializing the population, which may cause uneven distribution of the population, is not conducive to solution space exploration, and introduces unstable factors. In order to solve the above problems, the present invention will use Tent chaotic mapping to initialize the population.

[0132] Chaos is a dynamic behavior that is irregular, unpredictable, and highly sensitive to initial conditions. Chaotic mapping is a type of mathematical mapping that exhibits chaotic behavior in nonlinear systems. Since chaotic mapping is highly random and decentralized, the benefits of using chaotic mapping for population initialization include: increasing individual diversity and avoiding individual homogeneity; providing a broader search space and accelerating the convergence of the algorithm to an excellent solution.

[0133] The Tent chaotic map is shown in formula (10).

[0134] In order to better describe the process of population initialization using Tent chaotic mapping, the present invention first defines the solution space of the video processing task scheduling problem under normal requests in the edge environment. In the present invention, the horizontal axis and the vertical axis represent the edge device and the core, respectively, and are expressed in the form of natural numbers. Within this range, each coordinate point reflects a core of a certain edge device, such as point (1,1) represents the first core of the first device. The scheduling of a single task is the allocation of tasks to a core in a certain edge device, corresponding to a coordinate point; the task scheduling scheme is the allocation of all tasks, corresponding to the sequence formed by each coordinate point.

[0135] According to the above definition, in the two-dimensional solution space composed of edge devices and cores, the steps of the Tent chaos map initialization algorithm are as follows:

[0136] Step S311: randomly generate a coordinate point as the initial point of iteration, denoted as (x0, y0), where x0, y0∈(0,1) and x0≠y0;

[0137] Step S312: After setting the value of τ, substitute the horizontal and vertical coordinates of the initial point into the z in formula (10) k , generate (x1,y1) and use it as the initial point for the next iteration;

[0138] Step S313: repeat step S312 until the number of coordinate points equal to the number of tasks is generated and the points are sequenced;

[0139] Step S314: Mapping each point in the sequence to the solution space to generate a new sequence, which is an individual in the cuckoo population and represents an allocation scheme for all tasks;

[0140] Step S315: Repeat steps S311 to S314 until a sequence whose number is equal to the number of individuals in the population is generated, thus completing the population initialization of the cuckoo algorithm.

[0141] Step S32, introducing the Q-learning algorithm in reinforcement learning, dynamically finding the optimal combination of main parameters α and β by revealing the internal structure of the cuckoo population, and improving the solution efficiency and accuracy of the cuckoo search model; including six parts: updating of Q-value function, division of state space and action space, setting of reward function, ε-greedy action selection strategy and updating steps of main parameters α and β.

[0142] Step S321: Q value function update

[0143] The main goal of the Q-learning algorithm is to learn the Q-value function, which represents the expected value of the cumulative reward when a specific action is performed in a given state. For a state-action pair (s, a), the Q-value function is represented as Q(s, a). The update of the Q-value function uses the Bellman equation, as shown in formula (13).

[0144] Step S322: Divide the state space

[0145] The value set of the objective function constitutes the state space of the cuckoo search model. In the state space, the number of different state divisions has a great influence on the search results. If the number of state divisions is too large, each iteration process will take a lot of time to find the best solution; if the number of state divisions is too small, the quality of the solution will be reduced. In the task scheduling problem of the present invention, the state space is divided into 15 intervals within 0 to 1, namely [0, 0.4), [0.4, 0.45), [0.45, 0.5), [0.5, 0.54), [0.54, 0.58), [0.58, 0.62), [0.62, 0.66), [0.66, 0.7), [0.7, 0.74), [0.74, 0.78), [0.78, 0.82), [0.82, 0.86), [0.86, 0.9), [0.9, 0.95) and [0.95, 1].

[0146] Step S323: Divide the action space

[0147] In the Q-learning algorithm, the agent will select actions from the action space. In the cuckoo search model, the selection of actions is the selection of main parameters, including the global step scale coefficient α and the local distance scale coefficient β. For the global step scale coefficient α, the present invention divides it into 18 intervals in the range of 0.5 to 5, and the length of each interval is 0.25; for the local distance scale coefficient β, this paper divides it into 15 intervals in the range of 0.05 to 0.8, and the length of each interval is 0.05. The action space is composed of different intervals. When an interval is selected, a value in the interval will be randomly selected as the value of the parameter.

[0148] Step S324: Setting the reward function

[0149] In order to evaluate the selection of the global step size coefficient α and the local distance scale coefficient β, it is necessary to select an appropriate reward function. According to the objective function of the cuckoo search model, the reward function R is shown in formula (14).

[0150] Step S325, set the ε-greedy action selection strategy; use formula (15) as the ε-greedy action selection strategy.

[0151] Step S326: Update main parameters α and β

[0152] In the cuckoo search model, the individuals in the cuckoo population can be regarded as the intelligent agents in the Q-learning algorithm, which refers to a solution for task scheduling in the present invention. The steps of updating the global step scale coefficient α and the local distance scale coefficient β through the Q-learning algorithm are as follows: first, the Q table, state space and action space are initialized, and then in one iteration of the algorithm, an action is selected from the Q table according to the ε-greedy strategy, that is, α and β are selected, and after input into the cuckoo algorithm for solution, the Q table is updated according to the value of the objective function and the reward function, and the above steps are repeated until the total number of iterations of the cuckoo search model is met.

[0153] The present invention proposes an adaptive cuckoo algorithm based on Q-learning. The specific solution process is as follows:

[0154]

[0155]

[0156] It should be noted that, in various embodiments of the present invention, the sequence numbers of the above steps do not mean the order of execution. The order of execution of the steps should be determined by their functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0157] The following is a system embodiment corresponding to the above method embodiment. This embodiment can be implemented in conjunction with the above embodiment. The relevant technical details mentioned in the above embodiment are still valid in this embodiment. In order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.

[0158] In the second embodiment of the present invention, a task scheduling device for edge-side video processing is proposed, such as Figure 2 As shown, the task scheduling device of the present invention includes:

[0159] The model building module 10 is used to build a task scheduling model for the edge video processing system and determine the optimization index of the task scheduling model; Figure 3 As shown, including:

[0160] The task scheduling model building module 11 is used to build the task scheduling model and mark it as a three-dimensional tensor form

[0161]

[0162] The optimization index determination module 12 is used to determine the optimization index of the task scheduling model

[0163] Optimization indicators include user fairness index UF inv , Task Priority Index TP inv , User average response delay index RT avg And tail delay index TL 99th ; Among them, the user sequence is constructed from small to large according to the time when the user submits the task, and the response time of each user is used as the value of the element at the corresponding position of the user sequence. The reverse number of the user sequence is calculated as the user fairness index UF inv ; Construct a task sequence from small to large based on the submission time of each task, use the execution time of each task as the value of the element at the corresponding position in the task sequence, calculate the reverse number of the task sequence and sum it up as the task priority index TP inv ; User average response delay indicator represents the response delay of user h, x is the total number of users who submitted requests in the specified time period; the tail delay indicator TL 99th The proportion of response delays higher than the average response delay is higher than 99%.

[0164] The optimization target module 20 is used to determine the target function and constraint conditions of the task scheduling model based on the optimization index;

[0165] The objective function TS

[0166] min TS=ω1RT avg +ω2TL 99th +ω3UF inv +ω4TP inv

[0167] Satisfy the constraints: and

[0168] Among them, ω1, ω2, ω3 and ω4 are weight values, and ω1+ω2+ω3+ω4=1, Represents task t i On edge devices j The amount of computing resources used on Indicates t i In p j Storage resource usage on Represents the edge device p j The amount of computing resources available on Represents the edge device p j The amount of storage resources available on the .

[0169] The scheme selection module 30 is used to use the cuckoo search model to take the task scheduling scheme corresponding to the objective function when the optimization indexes are all minimum values ​​as the optimization scheme, and perform task scheduling operations on the edge video processing system using the optimization scheme. Figure 4 As shown, including:

[0170] A model initialization module 31 is used to initialize the cuckoo search model using Tent chaotic mapping;

[0171] The cuckoo algorithm is the main optimization algorithm of the present invention, and each individual in its cuckoo population represents a solution for task scheduling. During the initialization phase of the algorithm, the quality of the initial population has a great influence on the optimization performance of the algorithm. The cuckoo algorithm usually adopts a method of randomly initializing the population, which may cause uneven distribution of the population, is not conducive to solution space exploration, and introduces unstable factors. In order to solve the above problems, the present invention will use Tent chaotic mapping to initialize the population.

[0172] Chaos is a dynamic behavior that is irregular, unpredictable, and highly sensitive to initial conditions. Chaotic mapping is a type of mathematical mapping that exhibits chaotic behavior in nonlinear systems. Since chaotic mapping is highly random and decentralized, the benefits of using chaotic mapping for population initialization include: increasing individual diversity and avoiding individual homogeneity; providing a broader search space and accelerating the convergence of the algorithm to an excellent solution.

[0173] The Tent chaotic map is shown in formula (10).

[0174] In order to better describe the process of population initialization using Tent chaotic mapping, the present invention first defines the solution space of the video processing task scheduling problem under normal requests in the edge environment. In the present invention, the horizontal axis and the vertical axis represent the edge device and the core, respectively, and are expressed in the form of natural numbers. Within this range, each coordinate point reflects a core of a certain edge device, such as point (1,1) represents the first core of the first device. The scheduling of a single task is the allocation of tasks to a core in a certain edge device, corresponding to a coordinate point; the task scheduling scheme is the allocation of all tasks, corresponding to the sequence formed by each coordinate point.

[0175] The model optimization module 32 is used to introduce the Q-learning algorithm in reinforcement learning, and dynamically find the optimal combination of the main parameters α and β by revealing the internal structure of the cuckoo population, thereby improving the solution efficiency and accuracy of the cuckoo search model. Figure 5 As shown, it includes a Q-value function updating module 321, a state space partitioning module 322, an action space partitioning module 323, a reward function setting 324, an action selection strategy module 325 and a parameter updating module 326;

[0176] The Q value function updating module 321 is used for updating the Q value function;

[0177] The main goal of the Q-learning algorithm is to learn the Q-value function, which represents the expected value of the cumulative reward when a specific action is performed in a given state. For a state-action pair (s, a), the Q-value function is represented as Q(s, a). The update of the Q-value function uses the Bellman equation, as shown in formula (13).

[0178] The state space partitioning module 322 is used to partition the state space

[0179] The value set of the objective function constitutes the state space of the cuckoo search model. In the state space, the number of different state divisions has a great influence on the search results. If the number of state divisions is too large, each iteration process will take a lot of time to find the best solution; if the number of state divisions is too small, the quality of the solution will be reduced. In the task scheduling problem of the present invention, the state space is divided into 15 intervals within 0 to 1, namely [0, 0.4), [0.4, 0.45), [0.45, 0.5), [0.5, 0.54), [0.54, 0.58), [0.58, 0.62), [0.62, 0.66), [0.66, 0.7), [0.7, 0.74), [0.74, 0.78), [0.78, 0.82), [0.82, 0.86), [0.86, 0.9), [0.9, 0.95) and [0.95, 1].

[0180] The action space division module 323 is used to divide the action space;

[0181] In the Q-learning algorithm, the agent will select actions from the action space. In the cuckoo search model, the selection of actions is the selection of main parameters, including the global step scale coefficient α and the local distance scale coefficient β. For the global step scale coefficient α, the present invention divides it into 18 intervals in the range of 0.5 to 5, and the length of each interval is 0.25; for the local distance scale coefficient β, this paper divides it into 15 intervals in the range of 0.05 to 0.8, and the length of each interval is 0.05. The action space is composed of different intervals. When an interval is selected, a value in the interval will be randomly selected as the value of the parameter.

[0182] The reward function setting 324 is used to set the reward function;

[0183] In order to evaluate the selection of the global step size coefficient α and the local distance scale coefficient β, it is necessary to select an appropriate reward function. According to the objective function of the cuckoo search model, the reward function R is shown in formula (14).

[0184] The action selection strategy module 325 is used to set the ε-greedy action selection strategy; the present invention uses formula (15) as the ε-greedy action selection strategy.

[0185] The parameter updating module 326 is used to update the main parameters α and β

[0186] In the cuckoo search model, the individuals in the cuckoo population can be regarded as the intelligent agents in the Q-learning algorithm, which refers to a solution for task scheduling in the present invention. The steps of updating the global step scale coefficient α and the local distance scale coefficient β through the Q-learning algorithm are as follows: first, the Q table, state space and action space are initialized, and then in one iteration of the algorithm, an action is selected from the Q table according to the ε-greedy strategy, that is, α and β are selected, and after input into the cuckoo algorithm for solution, the Q table is updated according to the value of the objective function and the reward function, and the above steps are repeated until the total number of iterations of the cuckoo search model is met.

[0187] In the third embodiment of the present invention, a computer-readable storage medium is proposed. The task scheduling device for edge-side video processing of the present invention, if its function is implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. Therefore, in the third embodiment of the present invention, a computer-readable storage medium is provided for storing a computer program for executing a task scheduling method for edge-side video processing. It should be understood that the computer-readable storage medium in the embodiment of the present invention may be a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of random access memory (RAM) are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM) and direct rambus RAM (DRRAM).

[0188] Figure 6 Schematic diagram of an electronic device of the present invention. Figure 6As shown, in the fourth embodiment of the present invention, an electronic device 100 is proposed, including a task scheduling device for edge-side video processing as described above. A person of ordinary skill in the art can understand that all or part of the steps in the above method can be completed by instructing related hardware (such as a processor, FPGA, ASIC, etc.) through a program. All or part of the steps of the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module in the above embodiment can be implemented in the form of hardware, such as implementing its corresponding functions through an integrated circuit, or in the form of a software functional module, such as implementing its corresponding functions through a processor executing a program / instruction stored in a memory. The embodiments of the present invention are not limited to any specific form of combination of hardware and software.

[0189] It should be noted that the structure of the electronic device shown in the drawings of the present invention does not constitute a limitation thereto, and the actual knowledge structure recognition device may include more or fewer components than shown in the drawings, or a combination of certain components, or a different arrangement of components.

[0190] The electronic device of the present invention may be any device with data processing capability, and the device with data processing capability may be a device or apparatus such as a computer. The device embodiment may be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the processor of any device with data processing capability reads the corresponding computer program instructions in the non-volatile memory into the memory and runs the instructions. Figure 7 This is a schematic diagram of the hardware structure of an electronic device of the present invention. Figure 7 As shown, from the hardware level, it is a hardware structure diagram of any device with data processing capability where the task scheduling device for edge-side video processing of the present invention is located, except Figure 7 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0191] When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media sets. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium may be a solid-state hard disk.

[0192] The task scheduling method for edge-side video processing of the present invention aims at the problem that the user's response delay needs to be reduced when scheduling video processing tasks in the edge environment, and the average response delay and tail delay of the user are used as the main optimization indicators. In addition, considering the actual situation of multiple users submitting task requests, the two indicators of user fairness and task priority are respectively used to reflect the order in which different users submit task requests and the order in which different tasks of the same user are executed on the task scheduling problem. The present invention models the above indicators in the form of weighted sum, and proposes an adaptive cuckoo algorithm based on Q-learning on this basis. In view of the limitations of the cuckoo algorithm in solving practical problems, which leads to low algorithm solution efficiency and poor accuracy due to its high sensitivity to parameter selection, the present invention divides the parameters required by the algorithm into two categories: main parameters and secondary parameters. The main parameters are dynamically tuned by using the Q-learning algorithm, and the secondary parameters adopt an adaptive update strategy according to the changes in the optimization target. The method can automatically optimize and update the algorithm parameters during the iteration process, thereby improving the algorithm's solution performance. In addition, the algorithm changes the initialization method of the cuckoo population through the Tent chaotic mapping, which accelerates the convergence speed of the algorithm. Simulation experiments show that compared with the other three comparison algorithms, the algorithm of the present invention not only improves the solution efficiency, but also effectively reduces the average response delay and tail delay of users while ensuring user fairness and a reasonable execution order of tasks.

[0193] The above implementation modes are only used to illustrate the present invention, but not to limit the present invention. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent technical solutions also belong to the scope of the present invention. The patent protection scope of the present invention should be defined by the claims.

Claims

1. A task scheduling method for edge-side video processing, characterized in that: include: Construct a task scheduling model for edge video processing systems and the optimization indicators of the task scheduling model; Based on the optimization index, generate the objective function and constraint conditions of the task scheduling model; The cuckoo search model is used, and the task scheduling scheme corresponding to the objective function when the optimization indicators are all minimum values ​​is taken as the optimization scheme, and the task scheduling operation of the edge video processing system is performed with the optimization scheme.

2. The task scheduling method according to claim 1, characterized in that: The optimization indicators include: User fairness index UF inv , Task Priority Index TP inv , User average response delay index RT avg And tail delay index TL 99th ;in, The user sequence is constructed from the time when the user submits the task in ascending order, and the response time of each user is used as the value of the element at the corresponding position of the user sequence. The reverse number of the user sequence is calculated as the user fairness index UF. inv ; The task sequence is constructed from small to large according to the submission time of each task, and the execution time of each task is used as the value of the corresponding position element of the task sequence. The reverse number of the task sequence is calculated and summed up as the task priority index TP inv ; Average user response delay indicator represents the response delay of user h, and x is the total number of users who submitted requests in the specified time period; Tail latency indicator TL 99th The proportion of response delays higher than the average response delay is higher than 99%.

3. The task scheduling method according to claim 2, characterized in that: The objective function TS min TS=ω1RT avg +ω2TL 99th +ω3UF inv +ω4TP inv satisfy: and Among them, ω1, ω2, ω3 and ω4 are weight values, and ω1+ω2+ω3+ω4=1, Represents task t i On edge devices j The amount of computing resources used on Indicates t i In p j The amount of storage resources used on Represents the edge device p j The amount of computing resources available on Represents the edge device p j The amount of storage resources available on the .

4. The task scheduling method according to claim 1, characterized in that: In the iterative process of searching the optimization solution with the cuckoo search model, the global step size coefficient α and the local distance scale coefficient β of the cuckoo search model are updated using the Q-learning algorithm, including: Initialize the Q value table, the state space and action space of the value set of the objective function; the Q value represents the expected value of the cumulative reward when performing the actions of selecting α and β in a given state s; In each iteration, the action with the selected α and β values ​​is selected from the Q value table according to the ε-greedy strategy, the selected α and β values ​​are input into the cuckoo search model for solution, and the Q value table is updated with the objective function TS and the reward function R; and the next iteration is performed; The ε-greedy strategy: argmaxV(a) represents the best known action in the current state selected with probability (1-ε); rand(a) represents randomly selecting an action with probability ε in a uniform distribution; The reward function R is: represents the average response delay of users in the tth generation, The 99th percentile latency of users at generation t, represents the average response delay of users in the (t-1)th generation, represents the 99th percentile latency of the user at the (t-1)th generation, and ω5 and ω6 are weight values.

5. The task scheduling method according to claim 1, characterized in that: Use Tent chaos map to initialize the population of the cuckoo search model: Among them, z k is the random number for this iteration, z k+1 is the random number generated in the next iteration after the Tent chaotic mapping, and τ is the control parameter.

6. The task scheduling method according to claim 1, characterized in that: The discovery probability of the cuckoo search model in, Indicates the average response delay of users in the current iteration. Indicates the initial average user response delay of the user in the current iteration, Indicates the 99th percentile latency of the user in the current iteration. represents the initial 99th percentile latency of the user at the current iteration; ω7 and ω8 are weight values.

7. The task scheduling method according to claim 1, characterized in that: The task scheduling model is represented by a three-dimensional tensor: Among them, x ijk ∈{0,1}, when any task t i Assigned to the edge computing device p j Processing core c k On, then x ijk =1, otherwise x ijk =0.

8. A task scheduling device for edge-side video processing, characterized in that: include: A model building module, used to build a task scheduling model of an edge video processing system and an optimization index of the task scheduling model; An optimization target module is used to generate the objective function and constraint conditions of the task scheduling model based on the optimization index; The scheme selection module is used to use the cuckoo search model to take the task scheduling scheme corresponding to the objective function when the optimization indicators are all minimum values ​​as the optimization scheme, and use the optimization scheme to perform task scheduling operations on the edge video processing system.

9. A computer-readable storage medium storing computer-executable instructions, characterized in that: When the computer executable instruction is executed, the task scheduling method for edge-side video processing as described in any one of claims 1 to 7 is implemented.

10. An electronic device comprising the task scheduling device for edge-side video processing according to claim 8.

Citation Information

Patent Citations

  • A data resource pre-scheduling method based on edge computing

    CN109819030A

  • Orchestrating edge service workloads across edge hierarchies

    US20220400085A1