MEC-oriented heterogeneous task scheduling and cache management joint optimization method and system

By combining Lyapunov optimization theory and KM matching algorithm with dynamic programming, the problem of resource allocation for heterogeneous tasks in MEC was solved, which maximized the long-term benefits of MEC cluster and improved resource utilization, reduced task processing latency, and ensured the stability and efficiency of the system.

CN121833202APending Publication Date: 2026-04-10HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2026-01-07
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively address the issue of efficient resource allocation for heterogeneous tasks in mobile edge computing, especially when cache space is limited. They cannot simultaneously consider task computation time, queue backlog status, dynamic priority weights, and the real-time load of the server cluster.

Method used

By employing Lyapunov optimization theory and the KM matching algorithm, combined with dynamic programming, a joint optimization method for task scheduling and cache management is designed. This method optimizes the long-term performance of the MEC cluster by performing reasonable virtual computing task scheduling and cache computing model updates in each time slot.

Benefits of technology

This maximizes the long-term benefits of the MEC cluster, improves resource utilization and computing efficiency, reduces task processing latency, and ensures system stability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833202A_ABST
    Figure CN121833202A_ABST
Patent Text Reader

Abstract

The invention discloses an MEC-oriented heterogeneous task scheduling and cache management joint optimization method and system, and the method comprises the following specific steps: S1, building a system model corresponding to a scene, and planning a long-term profit maximization problem of an MEC cluster; s2, based on the Lyapunov optimization theory, the long-term profit maximization problem of the MEC cluster is converted into an online decision-making problem based on the current time slot, and the online decision-making problem comprises two sub-problems of task scheduling and cache management; s3, task scheduling is carried out on task types which are not hit in the current time slot through a task scheduling algorithm based on Lyapunov optimization and KM matching; and S4, updating the task type of the MEC cache through a cache updating algorithm based on dynamic programming to perform cache management. Through joint optimization of task scheduling and cache management, the overall performance of the MEC system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of edge computing, and relates to a task scheduling and cache management technology for optimizing long-term time average benefits of an edge server cluster, in particular to a heterogeneous task scheduling and cache management joint optimization method and system for MEC, which is suitable for resource allocation and performance optimization in a heterogeneous task scenario. BACKGROUND

[0002] Mobile Edge Computing (MEC) is a technology that sinks computing power to the network edge, which significantly reduces task processing delay and network bandwidth consumption by allowing Internet of Things devices to offload computing tasks to nearby edge servers. The core advantages of task offloading include: 1) reducing the energy consumption of terminal devices; 2) using high-performance computing resources of edge servers to process complex tasks, realizing sharing and sharing of computing resources; 3) improving privacy security by processing sensitive data locally.

[0003] However, the computing tasks offloaded by Internet of Things devices to MEC servers are significantly heterogeneous. For example: real-time video analysis tasks (such as face recognition of surveillance cameras) require high priority and low latency, but have high computational complexity and generate a large amount of intermediate data; industrial sensor periodic reporting tasks (such as temperature monitoring) have small computational complexity but require long-term caching of historical data; augmented reality interactive tasks require high context data reuse rate.

[0004] These tasks differ significantly in computing time, cache space occupation, priority weight, etc. It is difficult to achieve efficient resource allocation using traditional unified scheduling strategies. In addition, when a new task is offloaded to a MEC server, if the server has cached the computing results or context data of the same type of task, it can be directly reused to reduce the computing time delay.

[0005] Therefore, it is particularly important for the field to develop an efficient task scheduling and cache management joint optimization technology for heterogeneous tasks. Specifically, the task computing time, queue backlog state, dynamic priority weight, and real-time load of the server cluster need to be considered; under the condition of limited cache space, the potential cache reuse benefits in the future time need to be balanced. SUMMARY

[0006] To solve the above problems existing in the prior art, the application provides a heterogeneous task scheduling and cache management joint optimization method and system for MEC.

[0007] The application scenario of the application is composed of a mobile edge computing (MEC) server cluster and multiple Internet of Things devices, wherein the Internet of Things devices have tasks offloaded to the MEC server cluster for processing. In this scenario, the application considers modeling by time slots (time slots), i.e., taking a time slot as a unit of task offloading and processing, and the goal is to optimize the task processing performance of the MEC cluster in a long time (multiple time slots). Specifically, the MEC cluster receives computing tasks offloaded by the Internet of Things devices in each time slot, and the computing tasks are classified by type. On the one hand, the MEC cluster deploys multiple virtual computing nodes based on container virtualization technology, and each virtual computing node is responsible for processing a specific type of computing task. On the other hand, the MEC cluster deploys multiple cache computing nodes based on cache computing technology, i.e., caching context information or models generated during the computation of a specific type of task in the server, and computing tasks that hit the cache computing node can be computed with lower latency. The main problem solved by the application is to reasonably schedule virtual computing tasks and update cache computing models in each time slot to maximize the long-term performance of the MEC cluster. Here, virtual computing task scheduling refers to the process of assigning tasks to virtual computing nodes, and cache computing model updating refers to the process of selecting context information or models required for a specific type of task computation to cache in the MEC cluster.

[0008] To achieve the above technical purposes of the application, the technical solution of the application is as follows: The MEC-oriented heterogeneous task scheduling and cache management joint optimization method has the following steps: S1, a system model corresponding to the scenario is established, and a long-term profit maximization problem of the MEC cluster is planned; S2, based on Lyapunov optimization theory, the long-term profit maximization problem of the MEC cluster is converted into an online decision-making problem based on the current time slot, including two sub-problems of task scheduling and cache management; S3, a task scheduling algorithm based on Lyapunov optimization plus KM matching is used to schedule tasks of types that do not hit the current time slot; S4, a cache update algorithm based on dynamic programming is used to update the task types cached in the MEC.

[0009] The method of the application first establishes a time slot model, a task model, a virtual computing model, a cache computing model, a Lyapunov optimization queue model, and a long-term profit maximization optimization problem of the MEC cluster corresponding to the scenario; secondly, based on Lyapunov optimization theory, the problem is decomposed and converted, and the long-term optimization problem is converted into an online decision-making problem based on the current time slot; then, a task scheduling algorithm based on Lyapunov optimization plus KM matching is designed; finally, a cache update algorithm based on dynamic programming is designed.

[0010] As a preferred option, step S1, system modeling and problem planning In this step, each model is described in detail below: S1.1, Time Slot Model Considering a long-term time process, time is discretized into time slots, i.e., T = {1, 2, ..., t, ..., |T|}. Here, |T| represents the number of time slots, and T... solt This represents the length of a time slot, where t represents the time slot number. In each time slot, the MEC cluster receives computational tasks offloaded from IoT devices.

[0011] S1.2, Task Model Assume that the computing tasks of IoT terminals are independent of each other, and the task type is one of K known types. Tasks of the same type must be computed on the same virtual node. Specifically, the computing tasks offloaded by the user to the MEC can be modeled using the following seven-tuple: .in, This is an attribute related to the task type; tasks of the same type should maintain this consistency. Indicates the type of computational task k. Let represent the computational complexity of the k-th type of task. This represents the amount of context data generated during the computation of the k-th task. This indicates the computational priority of the k-th type of task. The larger the value, the higher the priority, the more important the task, and the greater the corresponding benefit. These are inherent attributes of the task itself, and each task is different. This represents the size of the input data for the r-th task in the k-th class. This represents the minimum computation frequency required to compute the r-th task of the k-th class. This represents the latency warning value for the r-th task of the k-th type of task (tasks will be discarded when their age reaches this value, indicating a calculation failure).

[0012] S1.3 Virtual Node Computation Model Non-preemptive offloading technology is used to execute computational tasks on virtual nodes in the MEC, meaning that virtual computing nodes only release resources when the currently executing task is completed. Assume the computation frequency of the v-th virtual node in the MEC cluster is denoted as... The state of the v-th virtual node at time slot t is represented as follows: , This indicates that the node is idle. This indicates that the node is occupied and is currently in the process of computation. The number of time slots occupied when the r-th task of type k is scheduled to be computed on the v-th virtual node is: S1.4, Cache computation model A high-speed memory cache computation technique is adopted to cache the context and model data m of the task type that often needs to be processed in the MEC network k to speed up the task processing speed. It is assumed that the cache space size of the MEC cluster is C Mbit; Adopt y k (t) = {0, 1} to identify the cache decision of the kth type of task at time slot t, y k (t) = 1 indicates caching, otherwise no caching.

[0013] Therefore, the cache constraint needs to be met at each time slot: ; is used to identify the cache list at time slot t.

[0014] When the type of a certain computing task hits in the cache computation model, that is, the type of the computing task has been cached, no matter how many computing tasks there are, the time limit quantity required by these computing tasks is fixed to 1.

[0015] S1.5, Lyapunov optimization queue model The backlog queue is used to describe the backlog of the kth type of task, a k (t) represents the number of type k tasks received and stored in the backlog queue by the MEC server by time slot t.

[0016] At time slot t, the MEC cluster first checks whether the age of any task in its backlog queue exceeds the time limit warning value s k (t). kr If so, the task will be discarded; otherwise, it continues to remain in the backlog queue.G k (t) represents the number of type k tasks discarded at time slot t.

[0017] At the same time, the MEC cluster continues to receive new task offloading requests and saves them to the backlog queue.

[0018] The MEC cluster establishes or updates a Lyapunov (Lyapunov optimization) queue for each type of task, and the Lyapunov queue is used to describe the time slot quantity gain brought by the scheduling of each type of task to the MEC cluster, and the specific modeling process is: wherein, f min represents the time slot number required to compute the rth task of the kth type on the virtual node with the lowest computation frequency.

[0019] denotes the gain in time slots brought by scheduling task Task kr to virtual node v. k (t).

[0020] Therefore, is the total time slot gain brought by the scheduling result of time slot t for Lyapunov queue Q k (t).

[0021] S1.6, Long-term optimization problem of MEC One of the objectives of the present application is to maximize the long-term time average profit of the MEC server. The income of the MEC comes from the offloading service provided by the virtual computing model and the cache computing model, i.e. the profit and it is equal to the income minus the cost obtained by completing the computing task through the two models.

[0022] Virtual computing model profit: when task Task kr is computed by the virtual node, the MEC will generate income and corresponding energy consumption, the higher the priority of the task computation, the less the computing frequency and the number of time slots occupied, the greater the profit.

[0023] Specifically, where w com denotes the gain coefficient of the computing task, a denotes the electricity price of the MEC running per Joule, gamma denotes the energy coefficient of the MEC, T krv denotes the number of time slots occupied by the rth task of the kth type when executed on the virtual node v.

[0024] Cache computing model profit: when task Task kr hits the cache, the MEC will generate income and corresponding cache space consumption. The greater the priority of the task that hits the cache, the less the cache space occupied, the greater the profit.

[0025] Specifically, where m k denotes the context and the amount of computing model data of the kth type task, Cache(t) denotes the cache list at time slot t, w cache denotes the gain coefficient of the cache task, β denotes the consumption of a single bit of cache data; Therefore, the total profit of the MEC cluster at time slot t can be represented as: The optimization problem of the present application can be modeled as: The above optimization problem should be subject to the following constraints: , ; y k (t) represents the cache decision of the kth task type at time slot t, C represents the cache space size of the MEC cluster; a k max , w kr max , b k max is a preset threshold value, which ensures that the variable does not have an extreme impact on the Lyapunov queue; E{•} represents the time average, K represents the task type set, and T represents the time slot set optimized by the system; This ensures that the relevant variables are positive and do not exceed the set maximum threshold value, and the cached task type data does not exceed the maximum cache space constraint of the MEC.

[0026] The above constraints ensure the stability of the Lyapunov queue Q k (t) and ensure that the average arrival rate is not greater than the average departure rate.

[0027] The above optimization problem is a multi-stage random bipartite graph maximum weight matching problem, and it is very challenging to make real-time decisions within each time slot to meet long-term constraints due to the random arrival of task data.

[0028] The present application decomposes it into two sub-problems of task scheduling and cache management for solving, which correspond to decision variables b krv (t) and y k (t) respectively.

[0029] Among them, task scheduling solves the problem of which virtual node should be scheduled for the task type that does not hit the cache for calculation, which can be converted into a weighted bipartite graph matching problem, and then solved by the KM matching algorithm; Cache management is to select a part of the task type completed by the virtual node for calculation in the current time slot to cache or update the cache, which can be converted into a 01 knapsack problem, and then solved by the dynamic programming algorithm.

[0030] The present application will first propose a Lyapunov-based algorithm to solve the task scheduling problem.

[0031] Preferably, step S2, problem transformation and decomposition: First, the original problem is transformed and decomposed.

[0032] In order to maximize the time average profit of the MEC cluster, the present application adopts the drift plus penalty framework in the Lyapunov optimization theory, which can convert the long-term time average optimization problem into an online optimization problem in each time slot.

[0033] Queue vector Q(t) = [Q1(t), Q2(t), Q3(t),...., Q k (t)] represents the queue of all task types.

[0034] The Lyapunov function is defined as follows: represents the change of the Lyapunov queue within a single time slot.

[0035] According to the Lyapunov optimization theory, to achieve the long-term optimization goal of the MEC cluster, the problem can be converted into minimizing the upper bound of the drift plus penalty function.

[0036] The drift plus penalty function is: V’’ is a non-negative parameter for balancing between stabilizing the queue length and maximizing the profit.

[0037] A higher V’’ value tends to prioritize the profit, which may lead to longer queue and lower system stability; a lower V’’ value tends to maintain the queue stability, however, which may sacrifice some profit.

[0038] The derivation process of the drift plus penalty function is as follows: ; wherein, H is a parameter irrelevant to the decision variable.

[0039] Preferably, step S3, the task scheduling algorithm based on Lyapunov optimization plus KM matching: The present application proposes an algorithm aiming to minimize the right boundary of the drift plus penalty, which maximizes the lower bound of P(t) while ensuring the stability of the Lyapunov queue, and through this processing, the algorithm can maximize the long-term time average profit of the MEC.

[0040] In each time slot, the optimization problem is solved based on the Lyapunov queue Q k (t) in the current time slot, the newly arrived task a k (t), and the state of the MEC cluster virtual node.

[0041] By removing the quantity irrelevant to the optimization variable, the above formula is simplified as: The above problem can be further modeled as a weighted bipartite graph matching problem: wherein, Represents the matching weight matrix. Represents the unloading matching matrix, X krv =1 indicates that the r-th task of the k-th class should be scheduled to be computed on the v-th virtual node.

[0042] in, Ensure that a virtual node can only execute one type of task at a time.

[0043] in, Ensure that a task can only be offloaded to a virtual node for execution.

[0044] Task scheduling addresses the question of which type of task should be scheduled to which virtual node for computation.

[0045] However, in real-world MEC networks, the number of task types (K) and the number of computational tasks (N) generated in a single time slot may far exceed the number of virtual compute nodes in the MEC cluster. This invention assumes that virtual compute nodes execute tasks using a single thread. Therefore, for the scheduling problem, it is first necessary to determine which task types and which tasks from which backlog queues should be scheduled.

[0046] First, check the status of the virtual nodes in the MEC cluster, assuming that the number of currently idle virtual nodes is v''; Then, the highest priority v'' tasks are selected from the backlog queue for scheduling. For these R tasks, in order to reduce the time occupied by virtual computing nodes and to successfully compute the tasks within the latency constraints, the following rules are followed.

[0047] Specifically, calculate min{f k1 (t),f k2 (t),f k3 (t),...,f kr (t)}, where f kr (t) represents the minimum computation frequency required for the r-th task of the k-th class to successfully compute before the deadline at time t. The calculation formula is: For each type of task, select f. kr (t) Minimum task Perform scheduling.

[0048] Obtain the computation task. kr and virtual node f v The set of matching pairs is determined, and then task scheduling is performed based on the KM matching algorithm to obtain the number of time slots that the task needs to occupy on the virtual node. The specific process of the KM matching algorithm is as follows: (1) Initialize the left and right vertex sets of the bipartite graph as {Task} kr}、{f v}, initialize {w krv} represents the edge weight between the left and right vertices.

[0049] (2) Initialize feasible top labels: For each left-hand point Task kr Choose the edge with the longest weight that connects to it. Label all right-hand nodes with the label (f). v )=0, initialize an empty match M.

[0050] (3) For each vertex of the left part of the graph, Task kr The algorithm uses depth-first search to attempt to find an augmenting path in the current equality subgraph. The search process follows the pattern of the Hungarian algorithm: starting from Task... kr Starting from the beginning, traverse unmatched edges → matched edges → unmatched edges... until an unmatched right-hand vertex is found. In an equality subgraph, only edges satisfying the condition can be matched. Edges of the condition.

[0051] (4) If an augmenting path is found, augment it (invert the matching state on the path), which is the Task. kr Match successful, proceed to process the next left-side task. kr+1 .

[0052] If no augmenting path can be found, that is, if it is not possible to obtain a path from Task in the equality subgraph. kr Starting from a point and reaching any unmatched right-hand node, denote the sets of left-hand and right-hand nodes already visited in the current search tree as S and T, respectively. The next step is to adjust the vertex indices to add edges that provide new connection possibilities to the equality subgraph. Calculate the increment value. This means finding, among all edges that point from the visited left vertex to the unvisited right vertex. The minimum value. Adjust the top index: for each Perform update For each ,implement After adjusting the top label, keep the current left-side point (Task) unchanged. kr If the above steps remain unchanged, return to step (3) and continue searching for augmenting paths in the new equality subgraph.

[0053] (5) The algorithm terminates when all left-hand edges have been successfully matched. The current matching M is the maximum weight perfect matching. The total weight of the matching is the weight of all matched edges w. krv sum.

[0054] Based on the matching results, the task is scheduled to be computed on the virtual node, and the virtual node status is updated to be occupied.

[0055] Preferably, step S4, cache updating algorithm of cache computing model At time slot t, obtain the computing task type and metadata information m executed by all virtual nodes k Then, empty the backlog tasks in the backlog queue corresponding to the type, and execute the cache updating algorithm.

[0056] The high-speed memory cache space size of the MEC cluster is limited, and all task types cannot be cached. For task type caching, the occupied space size, historical access frequency and computing priority need to be considered comprehensively.

[0057] The application designs a task type-based cache value function, aiming to cache the most valuable task types in limited space.

[0058] The value of the kth type task at time slot t is: wherein, represents the historical access frequency of the kth type task until the current time slot, represents the task priority.

[0059] Based on the above task type value evaluation function, the application models the cache updating problem as a classic 0-1 knapsack problem. Specifically: Maxmize: To solve the problem, the application uses a dynamic programming algorithm for efficient solution, and the specific process is as follows: (1) Construct a two-dimensional state array dp[i][j], which represents the maximum value that can be obtained under the capacity limit j when considering the first i types of tasks.

[0060] (2) Recursively calculate based on the state transition equation according to the task type order. The state transition equation is: for the ith type of task, if j i , update ; otherwise, update , and the boundary condition is ; (3) Determine the optimal cache scheme through backtracking; (4) Update the cache space: release the space of un-cached types, and load new cache type data; In the next time slot t+1, for the computing task set {Task kr} offloaded by the Internet of Things, run programs S1.5, S1.6, S2, S3 and S4.

[0061] Preferably, the algorithm is deployed as follows: The optimized task scheduling and cache management algorithm is deployed to the MEC server cluster environment, and the corresponding execution interface is configured. The deployment scheme supports dynamically loading algorithm parameters such as the number of virtual nodes, calculation frequency, etc. to adapt to edge computing scenarios of different scales.

[0062] Task offloading requests from IoT devices are received through a RESTful API. After the device completes the task preprocessing locally, it uploads the task description information and computing requirements to the server through a secure communication protocol. The deployed algorithm will process these requests in real time and make intelligent scheduling decisions.

[0063] The algorithm continuously analyzes the cluster state and task characteristics during runtime, dynamically adjusts the scheduling strategy and cache configuration. The optimization results are fed back to the device end to guide subsequent task offloading decisions, forming a closed-loop optimization system that significantly improves overall computing efficiency and resource utilization.

[0064] The application also discloses an intelligent scheduling and cache optimization system for MEC heterogeneous tasks, which is used to execute the above method, and includes the following modules: System modeling and problem planning module: responsible for establishing time slot models, task models, virtual node calculation models, cache calculation models, Lyapunov optimization queue models, etc. corresponding to the scene, and planning the long-term profit maximization problem of the MEC cluster; Problem transformation and decomposition module: based on Lyapunov optimization theory, the long-term profit maximization optimization problem is transformed into an online decision-making problem based on the current time slot, including two sub-problems of task scheduling and cache management; Task scheduling module: first, filter available virtual node resources, then build a bipartite graph model of task type-nodes, and apply the Lyapunov optimization plus KM matching task scheduling algorithm to schedule tasks of the task type that does not hit the current time slot; Cache update module: responsible for intelligent allocation of cluster cache resources, considering task access frequency, priority and computing characteristics, and updating the task type of MEC cache based on the dynamic programming cache update algorithm for cache management.

[0065] In summary, the application proposes a task scheduling and cache management joint optimization method and system for MEC heterogeneous tasks, which realizes the long-term revenue maximization of the edge server cluster by establishing a multi-dimensional task model and a queue model based on Lyapunov optimization. The method dynamically collects task state and cluster load information at each time slot, and makes real-time decisions based on optimization theory.

[0066] The application innovatively combines Lyapunov optimization theory and KM matching algorithm, designs an intelligent scheduling algorithm considering task heterogeneity, and develops a cache optimization strategy based on dynamic programming.

[0067] The application improves the overall performance of the MEC system by jointly optimizing task scheduling and cache management. The algorithm uses a virtual queue mechanism to ensure long-term stability of the system, and combines the KM algorithm to achieve optimal matching of tasks and computing nodes, effectively improving resource utilization. In terms of cache management, the intelligent decision algorithm based on dynamic programming can maximize the value of the cache task type and reduce the task processing delay. The entire system adopts a closed-loop optimization design, which can adaptively adjust the scheduling strategy according to real-time load conditions to ensure that the edge server cluster is always in an optimal operating state. The technical solution breaks through the performance bottleneck of traditional scheduling algorithms in heterogeneous task scenarios, and provides reliable technical support for intelligent video analysis, industrial Internet of Things and other 5G / 6G era low-latency edge computing applications. BRIEF DESCRIPTION OF DRAWINGS

[0068] Figure 1 A task scheduling and cache management joint optimization method for MEC heterogeneous tasks according to a preferred embodiment of the application is shown in the flowchart.

[0069] Figure 2 The architecture involved in the task scheduling and cache management joint optimization method for MEC heterogeneous tasks according to a preferred embodiment of the application is shown in the architecture diagram.

[0070] Figure 3 The MEC time average profit changes with time slot.

[0071] Figure 4 The total length of the task backlog queue changes with time slot.

[0072] Figure 5 The MEC time average profit changes with the number of task types K.

[0073] Figure 6 The total length of the task backlog queue changes with the number of task types K.

[0074] Figure 7 A task scheduling and cache management joint optimization system block diagram for MEC heterogeneous tasks according to a preferred embodiment of the application is shown. DETAILED DESCRIPTION

[0075] The preferred embodiment of the application will be described in detail below with reference to the accompanying drawings.

[0076] Example 1 ReferenceFigures 1-2 The embodiment provides a task scheduling and cache management joint optimization method for MEC heterogeneous tasks, and comprises the following steps: S1, system modeling and problem planning.

[0077] This step receives the computing task offloaded by the IOT device, establishes heterogeneous task models, computing and cache models, Lyapunov queue models and the like, and plans a MEC long-term profit maximization problem. Each model is introduced as follows: S1.1, time slot model The time is discretized according to time slots, that is, T = {1, 2,..., t,..., |T|}. Where, |T| represents the number of time slots, T solt represents the length of a time slot, and t represents the time slot number. In each time slot, the MEC cluster receives the computing task offloaded by the IOT device; S1.2, task model: This embodiment focuses on independent and typed tasks, and assumes that there are K types of tasks in the network, and the MEC cluster receives N computing tasks from the network in each time slot.

[0078] The minimum task unit offloaded to the MEC by the user can be represented as ; Where, is an attribute related to the task type, t k represents the type of the kth computing task, c k represents the computing complexity of the kth task; m k represents the context data size generated by the kth task during the computing process; represents the computing priority of the kth task, and the larger the value, the higher the priority, the more important the task, and the greater the corresponding benefit.

[0079] is the attribute of the task itself, wherein, represents the input data size of the rth task of the kth type; represents the computing frequency required for computing the rth task of the kth type.

[0080] s kr represents the time delay warning value of the rth task of the kth type, and the task should be discarded when the age of the task reaches this value.

[0081] S1.3, virtual node computing model The time slot model T = {1, 2,..., t,..., |T|} is used to model the long-term time process. |T| represents the number of time slots, T soltdenotes the length of a time slot. In each time slot, the MEC cluster receives the offloaded computing tasks from the IoT devices.

[0082] The computing frequency of the v-th virtual node of the MEC cluster is denoted as .

[0083] The state of the v-th virtual node at time slot t is denoted as , denotes the node is idle, denotes the node is occupied and is in the process of computing tasks.

[0084] The number of time slots occupied by the r-th task of the k-th type scheduled to the v-th virtual node for computing is calculated as: S1.4, Cache Computing Model The cache space size of the MEC cluster is CMhz, and y k (t) = {0, 1} identifies the cache decision of the k-th type task at time slot t. y k (t) = 1 means caching, otherwise not caching; The cache constraint needs to be met every time slot: .

[0085] S1.5, Lyapunov Queue Model A Lyapunov queue is established or updated for each type of task in the MEC to measure the number of time slots gained by scheduling tasks. The specific modeling method is as follows: Wherein, a k (t) represents the number of tasks of type k received and stored in the backlog queue by the MEC server up to time slot t.

[0086] G k (t) represents the number of tasks of type k discarded due to age reaching the latency warning value in the backlog queue up to time slot t; denotes the number of time slots required to compute the r-th task of the k-th type on the virtual node with the lowest computing frequency.

[0087] denotes the gain in the number of time slots brought by scheduling task Task kr to virtual node v for execution for Lyapunov queue Q k (t).

[0088] is the scheduling result of time slot t for Lyapunov queue Q k(t) the total time slot gain brought by.

[0089] S1.6, Long-term optimization problem of MEC planning The profit calculation formula of MEC cluster is modeled as: Cache(t) represents the cache list of MEC cluster at time slot t, w com and w cache represent the gain of cache hit and task calculation respectively, and a represents the electricity price of MEC running per joule, gamma represents the energy coefficient of MEC, β represents the consumption of single bit data of cache, T krv represents the number of time slots occupied by the rth task of the kth type on the virtual node v.

[0090] The long-term profit maximization problem of MEC is modeled as: The above problem is subject to the following constraints: , ; This ensures that the relevant variables are positive and do not exceed the set maximum threshold, and the task type of cache does not exceed the maximum cache space constraint of MEC.

[0091] The above constraints ensure the stability of Lyapunov queue Q k (t) and ensure that the average arrival rate is not greater than the average departure rate.

[0092] S2, Problem transformation and decomposition based on Lyapunov optimization theory

[0093] Based on the drift plus penalty framework in Lyapunov optimization theory, the long-term time average optimization problem is transformed into an online optimization problem for each time slot.

[0094] Queue vector ɵ(t) = [Q1(t), Q2(t), Q3(t),...., Q k (t)] represents the queue of all task types.

[0095] The Lyapunov function is defined as follows: represents the change of Lyapunov queue within a single time slot.

[0096] Drift plus penalty framework: ; According to Lyapunov optimization theory, to achieve the long-term optimization goal of MEC cluster, the problem can be transformed into minimizing the upper bound of formula drift plus penalty function, and the derivation result is as follows: Wherein, H is a parameter independent of decision variables.

[0097] S3, develop a task scheduling algorithm based on Lyapunov optimization plus KM matching.

[0098] In each time slot, based on the state of Lyapunov task queue Q k (t) in the current time slot, newly arrived task a k (t), idle virtual node, determine the optimal value of b krv (t).

[0099] Minimize ; By removing the quantity independent of optimization variables, the above formula is simplified as: Further model the above problem as a weighted bipartite graph matching problem: Wherein, is the offloading matching matrix, X krv =1 indicates that the rth task of the kth type should be scheduled to the vth virtual node for calculation.

[0100] Ensure that a virtual node can only execute one type of task at the same time.

[0101] Ensure that a task can only be offloaded to one virtual node for execution.

[0102] Solve the task scheduling problem: that is, solve the problem of scheduling which type of which task to which virtual node for calculation.

[0103] First, detect the state of MEC cluster virtual nodes, and assume that the number of currently idle virtual nodes is v’’; Then select the v’’ types of tasks with the highest calculation priority for scheduling.

[0104] For each type of task, calculate min{f k1 (t), f k2 (t), f k3 (t),..., f kr (t)}, where f kr(t) represents the minimum computation frequency required by the r-th task of the k-th class before the deadline at the current time t. The calculation formula is: For each type of task, select f. kr (t) The smallest Task kr Perform scheduling to obtain (computation task type Task) kr —Currently idle virtual node f v The matching pairs are used for task scheduling based on the KM matching algorithm. The specific process of the KM matching algorithm is as follows: (1) Initialize the left and right vertex sets of the bipartite graph as {Task} kr}、{f v}, initialize {w krv} represents the edge weight between the left and right vertices.

[0105] (2) Initialize feasible top labels: For each left-hand point Task kr Choose the edge with the longest weight that connects to it. All right-hand vertex labels... Initialize an empty match M.

[0106] (3) For each vertex of the left part of the graph, Task kr The algorithm uses Depth-First Search (DFS) to attempt to find an augmenting path for the current equality subgraph. The search process follows the pattern of the Hungarian algorithm: starting from Task... kr Starting from the beginning, search for unmatched edges → matched edges → unmatched edges... until an unmatched right-hand vertex is found. In an equality subgraph, only edges satisfying the condition can be matched. The edge of the condition.

[0107] (4) If an augmenting path is found, augment it (invert the matching state on the path), which is the Task. kr Match successful, proceed to process the next left-side task. kr+1 .

[0108] If no augmenting path can be found, that is, if it is not possible to obtain a path from Task in the equality subgraph. kr Starting from a point and reaching any unmatched right-hand node, denote the sets of left-hand and right-hand nodes already visited in the current search tree as S and T, respectively. The next step is to adjust the vertex indices to add edges that provide new connection possibilities to the equality subgraph. Calculate the increment value. This means finding, among all edges pointing from the visited left vertex to the unvisited right vertex. The minimum value. Adjust the top index: for each Perform update For each ,implement . Top mark adjustment, keep the current left point Task kr unchanged, back to step (3), continue to find an augmenting path for it in the new equivalent subgraph.

[0109] (5) When all left points are successfully matched, the algorithm ends. The current matching M is the maximum weight perfect matching. The total weight of the matching is the sum of the w krv of all matching edges.

[0110] According to the matching result, the task is scheduled to the virtual node for calculation, and the virtual node state is updated to occupied.

[0111] After obtaining the calculation result of the task, the backlog task in the corresponding type backlog queue is emptied.

[0112] S4, detect the task calculation metadata information obtained in the current time slot (specifically composed of context-related functions and variables in the task type calculation process), and develop a cache update algorithm based on dynamic programming.

[0113] First, calculate the value of each task type at time slot t. The value of the kth type task can be calculated by the following formula: represents the historical access frequency of the kth type task up to the current time slot, represents the task priority.

[0114] Based on the task type value evaluation function, the cache update problem is modeled as a classic 0-1 knapsack problem. Specifically: Maxmize: Based on the dynamic programming algorithm, cache task type metadata information under the constraint of cache space, so that the maximum value of the cached task type is obtained.

[0115] (1) Construct a two-dimensional state array dp[i][j], which represents the maximum value that can be obtained under the capacity limit j when considering the first i types of tasks.

[0116] (2) Recursively calculate based on the state transition equation according to the task type order. The state transition equation is: for the ith type of task, if j i , update ; otherwise, update , and the boundary condition is ; (3) Determine the optimal cache scheme through backtracking; (4) Update the cache space: release the space of un-cached types and load new cache type data; In the next time slot t+1, for the set of computing tasks offloaded by the Internet of Things .

[0117] If there is relevant task type data in the cache, the success of the low-latency calculation can be calculated.

[0118] For the cache-missed task type, it is stored in the corresponding type of backlog queue. The steps of running S1.5, S1.6, S2, S3, S4 are performed.

[0119] The following experiments are conducted to verify that the technical solutions of the present application have significant technical advantages.

[0120] Using the model and method given in Embodiment 1, the scheme proposed by the present application is simulated, and the experimental results are shown in Figures 3 to 6 .

[0121] The experimental parameters are set as follows: the number of virtual nodes |V| is set to 10, the MEC cache space C is set to 1000Mbit, the virtual node calculation frequency is randomly set to 0.5-2GHz, the task priority is randomly set to 1-10, the task calculation complexity is set to 1200-2000 cycles, the task calculation model data size is set to 40-100Mbit, the task input data size is set to 4-10Mbit, the task latency constraint is set to 6-10s, the single time slot length is set to 1s, the other parameters are set, the MEC running per joule of electricity price a is set to , the energy coefficient of the MEC gamma is set to , the calculation gain coefficient and the cache gain coefficient are set to , the Lyapunov coefficient is set to .

[0122] The various technical solutions of the experiment are described as follows: (1) Greedy Schedule: the highest priority task is assigned to the most powerful node, which can quickly obtain a local optimal solution, but lacks long-term global optimization capability. (2) KM-Based Schedule: based on the Hungarian algorithm for task-node matching, the current time slot revenue is maximized, which can achieve better performance in the short term, but does not consider queue stability. (3) Lyapunov Schedule (the present application): based on the drift-plus-penalty function in the Lyapunov optimization theory, the trade-off between revenue and queue stability is made to optimize the long-term time average performance. (4) No-Cache Schedule: based on the Lyapunov schedule proposed in the present application, but without using the cache technology.

[0123] Figure 3 、 Figure 4 The performance parameters of the comparative schemes are shown to change with the simulation time slot. The present application mainly compares the time average revenue and the backlog queue length of the MEC cluster. In the experiment, the number of task types K received by the MEC cluster is set to 40, and the number of tasks N generated per time slot is set to 80. From the overall trend, the MEC time average revenue increases rapidly with the time slot in the initial stage, and then gradually tends to be stable; while the backlog queue length is at a relatively high level in the initial stage, and then gradually decreases and finally remains stable. This shows that the system gradually converges after a short dynamic adjustment period. In comparison, the Lyapunov Schedule method proposed in the present application performs best in both revenue and queue stability: its time average revenue is significantly higher than that of other algorithms.

[0124] Figure 5 、 Figure 6 The MEC time average profit and the task backlog queue length of the scheduling scheme are shown to change with the number of task types K when the number of tasks N arriving per time slot is fixed at 80. The experimental results show that as K increases, the competition for system resources intensifies, the cache hit rate decreases, resulting in a overall decrease in the profit of all algorithms, and the backlog queue length increases. In comparison, the algorithm proposed in the present application always shows the best overall performance: it has the highest time average profit while maintaining the smallest backlog queue length, significantly better than the Greedy Schedule, the Short-Term Schedule and the No-Cache Schedule. This superior performance is due to the fact that the algorithm is based on the Lyapunov optimization theory, which can effectively perceive and respond to future system state changes to dynamically coordinate computing and cache resources, achieving benefit maximization and system load balancing.

[0125] Embodiment 2 Reference Figure 7The embodiment discloses a task scheduling and cache management joint optimization system for MEC heterogeneous tasks, which is used for executing the above method and comprises the following modules. System modeling and problem planning module: responsible for establishing time slot model, task model, virtual node calculation model, cache calculation model, Lyapunov optimization queue model corresponding to the scene, and planning long-term profit maximization problem of MEC cluster; Problem transformation and decomposition module: based on Lyapunov optimization theory, the long-term profit maximization optimization problem is transformed into an online decision-making problem based on the current time slot; Task scheduling module: first, filter available virtual node resources, then build a bipartite graph model of task type-node, and apply Lyapunov optimization plus KM matching task scheduling algorithm to schedule tasks of the task type that has no hit in the current time slot; Cache update module: responsible for intelligent allocation of cluster cache resources; the module comprehensively considers task access frequency, priority and calculation characteristics, and updates the task type of MEC cache based on a dynamic programming cache update algorithm to manage the cache.

[0126] Other contents of the embodiment can refer to the above method embodiment.

[0127] The above description is only the preferred embodiment of the method of the present application and the applied technical principles. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A method for joint optimization of heterogeneous task scheduling and cache management for MEC, characterized in that, The specific steps are as follows: S1, a system model corresponding to the scene is established, and a long-term profit maximization problem of the MEC cluster is planned; S2, based on Lyapunov optimization theory, the long-term profit maximization problem of the MEC cluster is converted into an online decision problem based on the current time slot, including two sub-problems of task scheduling and cache management; S3, the task scheduling algorithm based on Lyapunov optimization plus KM matching is used to schedule the tasks of the current time slot without hits; S4, the cache update algorithm based on dynamic programming is used to update the cache of the MEC cluster.

2. The method of claim 1, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, In step S1, the system model includes a time slot model, a task model, a virtual node calculation model, a cache calculation model, and a Lyapunov optimization queue model, wherein: The time slot model is as follows: Discretize the time by time slots, that is, T = {1,2,...,t,...,|T |}; Where |T| represents the number of time slots, and t represents the time slot number; In each time slot, the MEC cluster will accept the computing tasks offloaded by the Internet of Things devices; The task model is as follows: The user offloads the computing task on the MEC, which is modeled by the following seven-tuple: ; wherein, is the attribute related to the type of task, and the tasks of the same type are consistent; represents the type of the kth computing task, represents the computing complexity of the kth task, represents the size of the context data generated in the computing process of the kth task, represents the computing priority of the kth task; is the attribute of the task itself, and each task is different; represents the size of the input data of the rth task of the kth type, represents the minimum computing frequency required for computing the rth task of the kth type, s kr represents the time delay warning value of the rth task of the kth type; The virtual node calculation model is as follows: Let the computing frequency of the vth virtual node of the MEC cluster be denoted as f v ; the state of the vth virtual node at time slot t is denoted as , , indicates that the node is idle, , indicates that the node is occupied and is in the process of computing; the number of time slots occupied when the rth task of the kth type is scheduled to the vth virtual node for computing is: where T solt denotes the length of one time slot; The cache calculation model is as follows: Assume that the cache space size of the MEC cluster is C Mbit; Adopt y k (t) = {0, 1} for identifying the caching decision of the kth task at time slot t, y k (t) = 1 means caching, otherwise no caching; Thus, the buffer constraint is satisfied at each time slot: ; for identifying the buffer list at time slot t; The Lyapunov optimization queue model is as follows: The backlog queue is used to describe the backlog of the kth type of task, a k (t) represents the number of tasks of type k received and stored in the backlog queue by the MEC server up to time slot t; At time slot t, the MEC cluster first checks whether the age age k (t) of any task in its backlog queue has exceeded the time limit warning value s kr ; if so, the task is discarded; otherwise, it continues to remain in the backlog queue;G k (t) denotes the number of tasks of type k discarded at time slot t; At the same time, the MEC cluster continues to receive new task offloading requests and saves them to the backlog queue; The MEC cluster establishes or updates the Lyapunov queue for each type of task, and the Lyapunov queue is used to describe the time slot gain brought by the scheduling of each type of task to the MEC cluster, and the modeling process is as follows: wherein, denotes the number of time slots f required to compute the rth task of the kth type on the virtual node with the lowest computation frequency min denotes the computation frequency of the virtual node with the lowest computation frequency; represents the gain in the number of time slots brought by scheduling the task Task kr to the virtual node v for execution, for the Lyapunov queue Q k (t) Thus, is the scheduling result of time slot t for Lyapunov queue Q k (t) brings total time slot gain.

3. The method of claim 2, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, The planning process of the long-term profit maximization problem of the MEC cluster is as follows: The income of the MEC comes from the offloading services provided by the virtual computing model and the cache computing model; Virtual computing model profit: when the task Task kr Through virtual node calculation, MEC generates income and corresponding energy consumption, specifically , wherein w com represents the gain coefficient of the computing task, represents the electricity price of MEC running per joule, represents the energy coefficient of MEC, T krv represents the number of time slots occupied by the rth task of the kth type when executed on the virtual node v; Cache computing model profit: when a task Task kr When hitting the cache, the MEC generates income and the corresponding cache space consumption is specifically , wherein m k represents the context and computing model data size of the kth type of task, Cache(t) represents the cache list at time slot t, w cache represents the gain coefficient of the cached task, represents the consumption of a single bit of data. Therefore, at time slot t, the total profit of the MEC cluster is represented as: The maximum problem is modeled as: The above problems are subject to the following constraints: , ; y k (t) represents the cache decision of the kth type of task at time slot t, C represents the cache space size of the MEC cluster; a k max , w kr max , b k max is a preset threshold; E{•} represents time average, K represents a set of task types, and T represents a set of time slots optimized by the system; The above constraints ensure the stability of the Lyapunov queue Q k (t) and that the average arrival rate is not greater than the average departure rate.

4. The method of claim 3, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, Step S2 is as follows: Using the drift plus penalty framework in Lyapunov optimization theory, the long-term profit maximization problem of the MEC cluster is converted into an online decision problem for each time slot; Queue vector 0(t) = [Q1(t), Q2(t), Q3(t),...., Q k (t)] represents the queues for all task types; The Lyapunov function is defined as follows: represents the change in the Lyapunov queue within a single time slot; According to the Lyapunov optimization theory, the problem is converted into a minimization formula for the upper bound of the drift plus penalty function; The drift plus penalty function is: V’’ is a non-negative parameter used to balance between stable queue length and maximum profit.

5. The method of claim 4, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, In step S3, the task scheduling algorithm based on Lyapunov optimization plus KM matching is as follows: Based on the problem conversion of step S2, in each time slot, the optimization problem is solved based on the Lyapunov queue model Q k (t), the newly arrived task a k (t), the state of the MEC cluster virtual node minimize By removing the quantities that are not relevant to the optimization variable, the above simplifies to: The problem is further modeled as a weighted bipartite graph matching problem: wherein, denotes a matching weight matrix, denotes an offloading matching matrix, X krv =1 states that the rth task of the kth class should be scheduled to the vth virtual node for computation; Ensuring that only one type of task can be executed by a virtual node at the same time; Ensure that a task can only be offloaded to one virtual node for execution; In task scheduling, first detect the MEC cluster virtual node state, assume that the number of currently idle virtual nodes is v'', select the v'' tasks of the type with the highest calculation priority for scheduling, for these types of tasks, calculate min{f k1 (t),f k2 (t),f k3 (t),...,f kr (t)} where f kr (t) represents the minimum calculation frequency required for the rth task of the kth type to successfully complete the task before the deadline at the current time t, and the calculation formula is: For each type of task, select f kr (t) the smallest task Task kr to schedule; Obtaining a computing task Task kr and a matching pair set of virtual nodes f v , and then performing task scheduling based on a KM matching algorithm to obtain a time slot number required by the task on the virtual nodes; According to the matching result, the tasks are scheduled to the virtual nodes for calculation, and the virtual node state is updated.

6. The method of claim 5, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, In step S3, the specific process of KM matching is as follows: (1) initialize the left and right vertex sets of the bipartite graph as {Task kr}, {f v}, and initialize {w krv} to represent the edge weights between the left and right vertices; (2) Initialize feasible top marks: For each left point Task kr , select the maximum edge weight connected to it; all right point top marks , initialize an empty match M; (3) For each vertex Task kr on the left part of the graph, try to find an augmenting path for it using a depth-first search in the current equal subgraph; the search process follows the pattern of the Hungarian algorithm: starting from Task kr , find an unmatched edge → a matched edge → an unmatched edge, until an unmatched right part point is found; in the equal subgraph, the matched edges satisfy the condition; (4) If an augmenting path is found, augment, and go to Task kr Match success, continue to process the next left point Task kr+1 ; If no augmenting path is found, denote the sets of left and right points already visited in the current search tree as S and T, respectively; calculate the increment value. This means finding, among all edges pointing from the visited left vertex to the unvisited right vertex. Minimum value; Adjust the top index: For each Perform update For each ,implement ; After the top mark is adjusted, keep the current left point task kr unchanged, go back to step (3) and continue to find an augmenting path in the new equivalent subgraph; (5) When all the left points are successfully matched, the current matching M is the maximum weight perfect matching, and the total weight of the matching is the sum of the w of all the matching edges. krv of all the matching edges.

7. The method of claim 6, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, In step S4, the cache value function of the kth task type at time slot t is as follows: wherein, represents the historical access frequency of the kth type task up to the current time slot, represents the task priority; Based on the above task type cache value function, the cache update problem is modeled as a classic 0-1 knapsack problem, which is as follows: Maxmize For this problem, the cache update algorithm based on dynamic programming is used to solve it.

8. The method of claim 7, wherein the MEC-oriented heterogeneous task scheduling and cache management joint optimization method is characterized in that, In step S4, the implementation steps of the cache update algorithm are as follows: (1) Construct a two-dimensional state array dp[i][j], which represents the maximum value that can be obtained under the capacity limit of j when considering the first i types of tasks; (2) recursively calculate in order of task type based on state transition equation; the state transition equation is: for the ith type task, if j < m i , update ; otherwise, update , the boundary condition is ; (3) Determine the optimal caching scheme through backtracking; (4) Update the cache space: release the space of uncached types and load new cache type data.

9. The intelligent scheduling and cache optimization system for MEC heterogeneous tasks, configured to perform the method according to any one of claims 1-8, characterized in that, The following modules are included: System modeling and problem planning module: establish the system model corresponding to the scene, and plan the long-term profit maximization problem of MEC cluster; Problem transformation and decomposition module: based on Lyapunov optimization theory, transform the long-term profit maximization optimization problem into an online decision-making problem based on the current time slot, including task scheduling and cache management two sub-problems; Task scheduling module: through the task scheduling algorithm based on Lyapunov optimization plus KM matching, the task types that do not hit in the current time slot are scheduled; Cache update module: based on the dynamic programming cache update algorithm, update the task types of MEC cache for cache management.