Hierarchical distributed matching method for load balancing of heterogeneous mobile edge computing
By adopting a hierarchical distributed matching method in the mobile edge computing system, dynamically adjusting the matching limits and resource scheduling strategies between users and nodes, the problem of unreasonable resource scheduling in the traditional method is solved, and the task completion delay is shortened and resource resources are achieved. Improved utilization.
Patent Information
- Application Number
- CN202310154924.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2043-02-21
AI Technical Summary
The traditional mobile edge computing load balancing method has problems in heterogeneous task systems with unreasonable resource scheduling, delayed tasks while waiting, and reduced service quality, and cannot effectively adapt to the needs of multi-task users and multiple task systems.
A hierarchical distributed matching method for heterogeneous mobile edge computing is proposed. Through dynamic matching limit adjustment between user layer and node layer and resource scheduling strategy of task layer, the matching between task and node is achieved, the task completion delay is shortened, and the task completion delay is improved. Resource utilization and allocation fairness.
In heterogeneous task systems, shorten the average completion delay of tasks, improve resource utilization and allocation fairness, avoid centralized scheduling roles, and improve resource utilization and fairness of mobile edge computing systems.
Smart Images

Figure CN116233007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to mobile edge computing, matching game, resource scheduling and load balancing methods, and in particular to a hierarchical distributed matching method for heterogeneous mobile edge computing load balancing. Background Art
[0002] With the official arrival of the 5G commercial era and the Internet of Things era, a large number of terminal devices are coming along with the influx of heterogeneous networks, and a series of new applications with the characteristics of intensive computing, delay sensitivity, and high energy consumption are constantly emerging. These applications have large amounts of data and high requirements for delay, and require a large amount of computing resources and energy. The terminal devices are constrained by their physical size, and their own computing power and battery capacity are limited, which cannot meet the needs of application programs. At the same time, facing the explosive growth of terminal devices in 5G+IoT, traditional centralized cloud computing can no longer meet users' task requirements for low latency, low energy consumption, and high reliability. Distributed mobile edge computing is rapidly emerging.
[0003] In traditional mobile edge computing load balancing, a centralized role is often required for global resource scheduling, which does not conform to the distributed characteristics of mobile edge computing. At the same time, since users compete for resources, unreasonable resource scheduling and load balancing strategies will lead to problems such as decreased system resource utilization, longer task waiting delays, and decreased service quality. Wang and Zhang proposed a resource allocation strategy based on the Lyapunov algorithm that takes into account the sleep mechanism and reduces energy consumption and shortens delay (S.Wang, X.Zhang, Z.Yan and W.Wenbo, "Cooperative Edge Computing With Sleep Control Under Nonuniform Traffic in Mobile Edge Networks," in IEEE Internet of Things Journal, vol.6, no.3, pp.4295-4306). This method ignores the type heterogeneity and length heterogeneity of tasks, so it is not well suited for heterogeneous mobile edge computing systems. Dong and Di considered the type heterogeneity of tasks within the edge computing node and formed a dual queue model between and within nodes. This method requires a centralized scheduling center to complete task scheduling, which is no longer applicable in decentralized distributed edge computing systems. Zheng and Xu used matching game to complete load balancing (G.Zheng, C.Xu and L.Tang, "Joint User Association and Resource Allocation for NOMA-Based MEC: A Matching-Coalition Approach," 2020 IEEE Wireless Communications and Networking Conference (WCNC), Seoul, Korea (South), 2020, pp. 1-6), this method only considers static limits and single-task users or single-type tasks, and cannot well meet the needs of multi-task users and multi-type task systems in reality. Summary of the invention
[0004] In order to solve the above problems, the present invention proposes a distributed hierarchical matching method for heterogeneous mobile edge computing load balancing, which fully considers the characteristics of the node layer, user layer and task layer, and dynamically adjusts the matching limits of users and nodes at the user layer and the node layer, that is, determines the tasks and nodes participating in the matching; at the task layer and the node layer, a matching mechanism based on a resource scheduling strategy for heterogeneous tasks is used to complete the selection of task target nodes to achieve load balancing, and at the same time, a source scheduling strategy is used within the node to determine the order in which tasks are processed, thereby shortening the average task completion delay in the heterogeneous task system while improving resource utilization and resource allocation fairness. Compared with the traditional centralized resource scheduling method, this method does not require a centralized scheduling role, and can improve the resource utilization and fairness of the mobile edge computing system.
[0005] The present invention is achieved by at least one of the following technical solutions.
[0006] A hierarchical distributed matching method for heterogeneous mobile edge computing load balancing includes the following steps:
[0007] The user layer confirms the tasks to be matched in the task layer and the matching nodes in the node layer based on the node status information obtained through interaction with the node layer;
[0008] The task layer and the node layer are bilaterally matched to achieve load balancing of the mobile edge computing system. According to the execution status of the matching, each time slot is divided into the matching preparation stage, the matching stage and the matching result execution stage.
[0009] Furthermore, in the matching preparation phase, users at the user layer generate tasks to be offloaded and update the task queue, send messages in the form of broadcasts, request node status, and decide on tasks to enter the matching phase based on the obtained node status information; in the matching phase, users wait for tasks to be matched with nodes; in the matching result execution phase, users offload tasks to the nodes that accept their matching requests.
[0010] Further, whether the task enters the matching phase is determined according to the obtained node status information, including the following steps:
[0011] Step 1: Each task calculates the preference sequence for all nodes within the communication range, and initiates a matching request to the most preferred node, where the request contains the attribute information of the task to be matched.
[0012] Step 2: After the waiting delay, all tasks whose requests are rejected initiate requests to the most preferred node in the preference list that has never rejected their requests;
[0013] Step 3: Repeat step 2 until no task request is rejected within a waiting delay, then the task and the node form a matching pair, and the matching phase ends; in the matching execution phase, the tasks participating in the matching in the user device are offloaded to the node that accepts its matching request.
[0014] Furthermore, in the matching preparation phase, the nodes in the node layer update the pending task queue and reply with their own status information after receiving the user's request. Each node determines the maximum number of matching requests that it can accept in its current time slot based on its own status information. s , including the following steps:
[0015] Step 1: The node receives matching requests for multiple tasks, converts each task into a feasible task vector, and then obtains the node's preference value for the task according to the resource scheduling strategy function. The tasks are arranged from high to low according to the preference value, and the most preferred task is temporarily retained. s requests and reject other requests;
[0016] Step 2: After the waiting delay, the node that receives the request again calculates the preference value for all newly received requests according to the resource scheduling policy function, sorts the requests temporarily reserved in step 1 with the newly received requests, and temporarily retains the most preferred q s requests and reject other requests;
[0017] Step 3: Repeat step 2 until the node does not receive a new request within a waiting delay. At this time, the node accepts all requests temporarily reserved in the previous step, and the task and the node form a matching pair, and the matching phase ends. In the matching result execution phase, the node receives the task uninstalled by the user and completes the resource scheduling within the node according to the resource scheduling strategy function, that is, determines the task to be processed in the current time slot.
[0018] Furthermore, the user generates tasks to be offloaded and updates the task queue in the matching preparation phase in the following steps:
[0019] S501, user generates task:
[0020] N user equipments constitute a set U = {u1,u2,…,u N}, each user u i , 1≤i≤N generates multiple tasks, and a task is represented by a triplet t=<D,R,L> , where D is the amount of data that the task needs to calculate, R is the set of resources required to process the task, including CPU, Storage, and RAM resources. The resource requirement R determines the type, and L is the processing time required after the task is assigned to the resources. When calculating the queue length of the task queue, the contribution of tasks with a processing time less than a single time slot t to the queue length is 1, and the contribution of tasks with a processing time greater than a single time slot to the queue length is ;
[0021] S502, update user queue:
[0022] The tasks to be offloaded in the user are temporarily stored in the device and form a queue. Suppose mobile user u i The number of task types generated is Then form There are queues, and the tasks in each queue are arranged in the order of their generation time. The length of each queue is recorded as Len. k ,
[0023] S503: The user initiates a request to the nodes within the communication range in a broadcasting manner:
[0024] The user sends a request to the node to obtain the node's status information, including the total amount of resources and queue status information. Each user u i The transmission rate is The uplink of node s j connected, where is the user transmission power, σ 2 is the power spectral density of Gaussian white noise, I jk For noise interference from other equipment, B ij For user u i With mobile devices j The bandwidth between ij (t) is user u i Time-varying function to the node;
[0025] S504. The user decides the tasks and matching nodes to be matched based on the node status and the status of the own queue:
[0026] make The length is Array of elements The number of tasks that will enter the matching phase for the kth queue is called the limit for each queue; the channel transmission rate is lower than the threshold Rate Th The edge computing nodes of are considered as unacceptable matching objects, then the sum of all acceptable edge computing nodes is like If the value is greater than the total number of tasks to be uninstalled, all tasks in the user's device can enter the matching stage; Value less than According to Len k Arrange from high to low, among which Len k Indicates the length of the k-th task queue, Each queue gets a quota; use Q k Represents the priority value of the kth queue. If Value greater than First, give each queue a limit, and then calculate the limit of each buffer queue. Q k Sort from high to low, assign a quota to the queue with the largest Q and recalculate the Q value of the queue, repeat the quota assignment and Q value calculation until the quota is allocated;
[0027] S505, each queue head The task enters the matching stage;
[0028] Furthermore, the steps for updating the queue in the matching preparation phase are as follows:
[0029] S601, building a heterogeneous task queue model of nodes;
[0030] Nodes j Can handle V j Tasks to be processed V j Class tasks are divided into V j queues, and the tasks in the queues are arranged in ascending order according to the processing time; For node s j No. v j The length of the task queue in time slot t, is the total length of tasks that need to be processed in time slot t, and the length of the entire queue in time slot t+1 for:
[0031]
[0032]
[0033] In the formula, v j Indicates the vth j queues, is the vth j The queue length of the class task, The vth time slot that needs to be processed is t time slot. j The queue length of the class task, represents the vth j The number of class tasks;
[0034] S602, construct a matrix of feasible task combinations:
[0035] Define a task combination vector in a node as The vth j The number of tasks of this type. When the total resources required by the tasks in the combination does not exceed the total resources of the nodes, the combination is considered feasible. The resources of the current system can constitute At The feasible task combination row vectors are concatenated together to form a t ×V j Task portfolio matrix Among them, N(a t ,v j ) represents the a t The vth task combination j The number of class tasks, v j ∈(1,2,…,V j ), the resource scheduling problem within the node, that is, the problem of which tasks to process in each time slot, is transformed into the selection of matrix row vectors;
[0036] S603, construct node resource scheduling strategy function:
[0037] For each node, its Lyapunov drift function is L(t), which is defined as One step of Lyapunov drift in adjacent time can be expressed as:
[0038]
[0039]
[0040] Let constant Let the optimization goal of the node system be to minimize the average completion time p(t) of all types of completed tasks, that is, Lyapunov drift plus penalty can be written as:
[0041]
[0042] in, For v j The queuing delay of the kth task in the queue up to time t, is its task length, and the sum of the two is the total delay of the task The system resources can accommodate the vth j The maximum number of virtual machines, α is a constant coefficient, and the system objective function is transformed into minimizing the upper bound of ΔL(t)+α·p(t). is a variable that is independent of the scheduling decision, so the resource scheduling strategy function is
[0043] Furthermore, in the matching preparation phase, the node determines the maximum number of tasks that can be matched in the time slot based on its own state. The process is:
[0044] Assume that node s j There are K in the resource pool j resources, the total amount of each resource in the resource pool is make The size is V j ×K j The matrix of For v j The kth task required j The number of resources, is the feasible task combination row vector composed of the tasks that the node is running on the virtual machine in time slot t, node s j The limit when no load is The limit after full load is In time slot t, the ratio of the remaining resources in the current time slot to the total resources is determined Right now
[0045] Furthermore, the steps for generating preference sequences for nodes in the matching phase task are as follows:
[0046] S801, suppose M nodes constitute a set S = {s1, s2, ...s j ,…,s M}, let node s j There are K in the resource pool j resources, the total amount of each resource in the resource pool is Node supports V j Types of tasks, The size is V j ×K j The matrix of For v j The kth task required j The number of resources;
[0047] S802, task t to be uninstalled for node s j The preference is where r ij Represents the user u where task t is located i With node s j The transmission rate of the channel, Representative nodes j The sum of resources, Len represents the queue length of the corresponding type of task t;
[0048] S803, for each task to be uninstalled t, Arranged from high to low, the preference of a task to be offloaded for all individuals in the node set S is represented as a row vector That is, task t prefers s2 to s1 and prefers s1 to s3.
[0049] Furthermore, in the matching stage, the matching process steps between the tasks to be matched and the nodes are as follows:
[0050] S901, the task calculates a preference vector for the node, and each task initiates a matching request to the most preferred node in the preference sequence, and the matching request includes the attributes of the task to be matched;
[0051] S902: The node receives matching requests for multiple tasks, converts each task into a feasible task vector, and then inputs it into the resource scheduling strategy function to obtain the node's preference value for the task. The tasks are arranged from high to low according to the preference value, and the most preferred one is temporarily retained. requests and reject other requests;
[0052] S903, after a waiting delay, the task whose request is rejected initiates a request to a node in the preference list that is the most preferred node and has never rejected its request;
[0053] S904: After the waiting delay, the node that receives the request again calculates the preference value for all newly received requests according to the resource scheduling policy function in step S603, sorts the requests temporarily reserved in step S902 and the newly received requests by preference, and temporarily reserves the most preferred requests. requests and reject other requests;
[0054] S905. Repeat steps S903 and S904 until no task request is rejected and the node does not receive any new request. At this time, the node accepts all requests temporarily retained in the previous steps, and the task forms a matching pair with the node that accepts its request, which is determined as the matching result of the time slot, and this round of matching ends; if a task is not matched to the server in the time slot, it will continue to be cached in the user device queue. If the same user has multiple tasks to be offloaded to the same edge computing node, they will be unloaded in the order of the amount of data to be uploaded from small to large.
[0055] Furthermore, the steps of the resource scheduling process within the node are:
[0056] The scheduling strategy of each time slot is converted into each edge computing node updating the feasible task combination matrix described in step S602 according to its own remaining computing resources in each time slot. Each edge computing node s j All through the matrix Select the feasible task combination row vector that can make the resource scheduling strategy function C(t) after conversion in step S603 reach the minimum value, that is,
[0057]
[0058] Edge computing nodes h By selecting the optimal row vector at time slot t Determines the task that the node starts processing in this time slot.
[0059] Compared with the prior art, the present invention has the following advantages and effects:
[0060] Compared with the traditional centralized single-type task scheduling method, in the hierarchical distributed heterogeneous task mobile edge computing scenario, this method does not require a centralized scheduling role and fully considers the type and length heterogeneity of tasks in the resource scheduling strategy. At the same time, the present invention fully considers the characteristics of users and nodes between the user layer and the node layer to dynamically adjust the matching limit, completes load balancing based on the resource scheduling strategy at the task layer and the node layer, can shorten the average task completion delay and improve resource utilization and resource allocation fairness. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a flow chart of the hierarchical distributed matching method for heterogeneous mobile edge computing load balancing of the present invention;
[0062] Figure 2 The overall system structure diagram of the hierarchical distributed matching method for heterogeneous mobile edge computing load balancing of the present invention;
[0063] Figure 3 This is a diagram of the resource scheduling structure within the edge computing node in the hierarchical distributed matching method for heterogeneous mobile edge computing load balancing of the present invention. DETAILED DESCRIPTION
[0064] In order to clearly illustrate the purpose, technical solutions and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and should not be regarded as the protection scope of the patent of the present invention. The present invention is protected by the attached claims. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0065] like Figure 1 , Figure 2 As shown in the figure, in this embodiment, a distributed matching system for load balancing of hierarchical heterogeneous mobile edge computing systems includes three levels: users, nodes, and tasks. Each time slot can be divided into a matching preparation stage, a matching stage, and a matching result execution stage:
[0066] In this scheme, the mobile edge computing system is divided into three levels: edge computing nodes (referred to as nodes), mobile user devices (referred to as users) and tasks. In each time slot, the user layer confirms the tasks to be matched in the task layer and the matching nodes in the node layer based on the node status information obtained by interacting with the node layer. By completing the bilateral matching between the task layer and the node layer, load balancing of the mobile edge computing system is achieved. According to the execution of the matching, each time slot can be divided into the matching preparation stage, the matching stage and the matching result execution stage.
[0067] User: In the matching preparation phase, the user generates tasks to be offloaded and updates the task queue, sends messages in the form of broadcasts, requests node status, and determines which tasks can enter the matching phase in this time slot based on the obtained node status information; in the matching phase, the user waits for the task to be matched with the node; in the matching result execution phase, the user offloads the task to the node that accepts its matching request;
[0068] Task: In the matching preparation phase, the user decides whether to enter the matching phase for each task; the matching phase requires multiple steps to complete: Step 1: Each task calculates the preference sequence for all nodes within the communication range, and each task initiates a matching request to the most preferred node, and the request contains the attribute information of the task to be matched; Step 2: After a waiting delay, all tasks whose requests have been rejected initiate a request to the most preferred node in the preference list that has not rejected their requests; Step 3: Repeat step 2 until no task request is rejected within a waiting delay, then the task and the node form a matching pair, and the matching phase ends; In the matching execution phase, the tasks participating in the matching in the user device are offloaded to the node that accepts its matching request;
[0069] Node: Nodes have limited resources and can handle multiple tasks at the same time. In the matching preparation phase, nodes update the queue of pending tasks and reply with their own status information after receiving the user's request. Each node determines the maximum number of matching requests it can accept in the time slot based on its own status information. s The matching stage requires multiple steps to complete: Step 1: The node can receive matching requests for multiple tasks, convert each task into a feasible task vector, and then obtain the node's preference value for the task according to the resource scheduling strategy. The tasks are arranged from high to low according to the preference value, and the most preferred q is temporarily retained. s Step 2: After the waiting delay, the node that receives the request again calculates the preference value for all the newly received requests according to the resource scheduling strategy, sorts the requests temporarily reserved in step 1 with the newly received requests, and temporarily retains the most preferred q srequest and reject other requests; Step 3: Repeat step 2 until the node does not receive a new request within a waiting delay. At this time, the node accepts all the requests temporarily reserved in the previous step, then the task and the node form a matching pair, and the matching phase ends; In the matching result execution phase, the node receives the task uninstalled by the user and completes the resource scheduling within the node according to the resource scheduling strategy function, that is, determines the task to be processed in the current time slot.
[0070] Furthermore, the steps for the user to generate and update the queue in the matching preparation stage are as follows:
[0071] S201: User generates task:
[0072] The N user equipments in the system constitute a set U = {u1,u2,…,u N}, each user u i (1≤i≤N) can generate multiple tasks, and a task can be represented as a triplet t=<D,R,L> , where D is the amount of data that the task needs to calculate, R is the set of resources required to process the task, including CPU, Storage, RAM and other resources. R determines the task type, and L is the processing time required after the task is assigned to the resources. When calculating the queue length of the task queue, the contribution of tasks with a processing time less than a single time slot t to the queue length is 1, and the contribution of tasks with a processing time greater than a single time slot to the queue length is
[0073] S202: Update user queue:
[0074] The tasks to be uninstalled in the user will be temporarily stored in the device and form a queue. Assume that the mobile user u i The number of task types that can be generated is Then form There are queues, and the tasks in each queue are arranged in the order of their generation time. The length of each queue is recorded as Len. k ,
[0075] S203: The user initiates a request to the nodes within the communication range in a broadcasting manner:
[0076] The user sends a request to the node to obtain the node's status information, including the total amount of resources and queue information. Each user u i The transmission rate is The uplink of node s j connected, where is the user transmission power, σ 2 is the power spectral density of Gaussian white noise, I jk is the noise interference of other devices. Since the user is mobile, the channel gain h ij(t) is user u i Time-varying function to the node;
[0077] S204: The user decides the tasks and matching nodes to be matched based on the node status and the status of the own queue:
[0078] make The length is An array of represents the number of tasks that will enter the matching phase in the kth queue, called the limit of each queue; the channel transmission rate is lower than the threshold Rate Th The edge computing nodes of are considered as unacceptable matching objects, then the sum of all acceptable edge computing nodes is like If the value is greater than the total number of tasks to be uninstalled, all tasks in the user's device can enter the matching stage; Value less than According to Len k Arrange from high to low, front Each queue gets a quota; if Value greater than First, give each queue a limit, and then calculate the limit of each buffer queue. Q k Sort from high to low, assign a quota to the queue with the largest Q and recalculate the Q value of the queue, repeat the quota assignment and Q value calculation until the quota is allocated;
[0079] S205: Each queue head The task enters the matching stage.
[0080] Furthermore, the node updates the queue process steps in the matching preparation phase as follows:
[0081] S301: Constructing a heterogeneous task queue model of nodes;
[0082] At Nodes j Inside, pending V j Class tasks are divided into V j queues, and the tasks in the queues are arranged in ascending order according to the processing time; j For a queue, is the vth j The queue length of the class task, The vth time slot that needs to be processed is t time slot. j The queue length of the class task, represents the vth j The queue length of the task class is, and the total length of the task that needs to be processed in the t time slot is The length of the entire queue in time slot t+1 can be expressed as
[0083] S302: Construct a matrix of feasible task combinations:
[0084] Define a task combination vector in a node as N v Is the vth j The number of tasks of this type. When the total resources required by the tasks in the combination does not exceed the total resources of the nodes, the combination is considered feasible. The resources of the current system can constitute A t The feasible task combination row vectors are concatenated together to form a t ×V j Task portfolio matrix Where N(a t ,v j ) represents the a t The vth task combination j The number of class tasks,the resource scheduling problem within a node, i.e., the problem of which tasks to process in each time slot,can be transformed into the selection of matrix row vectors;
[0085] S303: Construct node resource scheduling strategy function:
[0086] make is the Lyapunov drift function of the queue length of the entire system. The Lyapunov drift of one step in adjacent time is ΔL(t)=L(t+1)-L(t).
[0087]
[0088] Let constant Let the optimization goal of the node system be to minimize the task completion delay, that is, Lyapunov drift plus penalty can be written as:
[0089]
[0090] Where α is a constant coefficient, and the system objective function is transformed into minimizing the upper bound of ΔL(t)+α·p(t). is a variable that is independent of the scheduling decision, so the resource scheduling policy function can be written as
[0091] As a preferred embodiment, in the matching preparation phase, the node determines the maximum number of tasks that can be matched in the time slot according to its own state. The process is:
[0092] Nodes j The limit when no load is The limit after full load is In time slot t, the ratio of the remaining resources in the current time slot to the total resources is determined Right now
[0093] Furthermore, the steps of generating a preference sequence for nodes in the matching phase task are as follows:
[0094] S501: M nodes in the system constitute a set S = {s1, s2, ..., s M}, assuming that node s j There are K in the resource pool j resources, the total amount of each resource in the resource pool is Node supports V j Types of tasks, The size is V j ×K j The matrix of For v j The kth task required j The number of resources;
[0095] S502: Task to be uninstalled k For node s j The preference is where r ij Representative task t k User u i With node s j The transmission rate of the channel, Representative nodes j The total resources of Len k Representative nodes j In and Task t k The queue length of queues of the same type;
[0096] S503: For each task to be uninstalled t k , for all Arranged from high to low, the preference of a task to be offloaded for all individuals in the node set S can be expressed as a row vector like That is, task t1 prefers s2 over s1 and prefers s1 over s3.
[0097] Furthermore, the matching process steps between the tasks to be matched and the nodes are as follows:
[0098] S601: The task calculates the preference vector for the node according to step S301, and each task initiates a matching request to the most preferred node in the preference sequence, and the matching request includes the attributes of the task to be matched;
[0099] S602: The node may receive matching requests for multiple tasks, convert each task into a feasible task vector, and then insert it into the resource scheduling strategy function in step S403 to obtain the node's preference value for the task. The tasks are arranged from high to low according to the preference value, and the most preferred ones are temporarily retained. requests and reject other requests;
[0100] S603: After a waiting delay, the task whose request is rejected initiates a request to a node in the preference list that is the most preferred node and has never rejected its request;
[0101] S604: After the waiting delay, the node that receives the request again calculates the preference value for all newly received requests according to the resource scheduling policy function in step S303, sorts the requests temporarily reserved in step S602 and the newly received requests by preference, and temporarily reserves the most preferred requests. requests and reject other requests;
[0102] S605: Repeat steps 603 and 604 until no task request is rejected and the node does not receive any new request. At this time, the node accepts all requests temporarily retained in the previous steps, and the task forms a matching pair with the node that accepts its request, which is determined as the matching result of the time slot, and this round of matching ends; if there is a task that is not matched to the server in the time slot, it will continue to be cached in the user device queue. If the same user has multiple tasks to be offloaded to the same edge computing node, they will be unloaded in the order of the amount of data to be uploaded from small to large.
[0103] As another preferred embodiment, the steps of the intra-node resource scheduling process are:
[0104] The scheduling strategy for each time slot can be transformed into: each edge computing node updates the feasible task combination matrix described in step S402 according to its own remaining computing resources in each time slot Each edge computing node s j All through the matrix Select the feasible task combination row vector that can make the resource scheduling strategy function C(t) after conversion in step S403 reach the minimum value, that is,
[0105]
[0106] Edge computing nodes j By selecting the optimal row vector at time slot t Determines the task that the node starts processing in this time slot.
[0107] Therefore, in the embodiment of the present invention, in the hierarchical distributed mobile edge computing system, the tasks and matching nodes involved in the matching are determined between the user layer and the node layer, and the resource scheduling strategy based on heterogeneous tasks is used to match between the task layer and the node layer to complete load balancing and perform task processing within the node. Compared with the traditional unloading and scheduling method, the embodiment of the present invention does not require a centralized scheduling role in the system, and at the same time uses the characteristics of each layer of the hierarchical structure to dynamically adjust the matching limit and complete the matching, which has better resource utilization and resource allocation fairness, thereby shortening the average task completion delay while improving resource utilization and resource allocation fairness.
[0108] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A hierarchical distributed matching method for load balancing of heterogeneous mobile edge computing, characterized in that: The following steps are involved: The user layer confirms the tasks to be matched in the task layer and the matching nodes in the node layer based on the node status information obtained through interaction with the node layer; The task layer and the node layer are bilaterally matched to realize load balancing of the mobile edge computing system. According to the execution status of the matching, each time slot is divided into the matching preparation stage, the matching stage and the matching result execution stage. In the matching preparation phase, users in the user layer generate tasks to be offloaded and update the task queue, send messages in the form of broadcasts, request node status, and decide on the tasks to enter the matching phase based on the node status information obtained; in the matching phase, users wait for tasks to be matched with nodes; In the matching result execution phase, users offload tasks to the nodes that accept their matching requests; In the matching preparation phase, the nodes in the node layer update the pending task queue and reply with their own status information after receiving the user's request. Each node determines the maximum number of matching requests that it can accept in its time slot based on its own status information. s , including the following steps: Step 1: The node receives matching requests for multiple tasks, converts each task into a feasible task vector, and then obtains the node's preference value for the task according to the resource scheduling strategy function. The tasks are arranged from high to low according to the preference value, and the most preferred task is temporarily retained. s requests and reject other requests; Step 2: After the waiting delay, the node that receives the request again calculates the preference value for all newly received requests according to the resource scheduling policy function, sorts the requests temporarily reserved in step 1 with the newly received requests, and temporarily retains the most preferred q s requests and reject other requests; Step 3: Repeat step 2 until the node does not receive a new request within a waiting delay. At this time, the node accepts all requests temporarily reserved in the previous step, and the task and the node form a matching pair, and the matching phase ends. In the matching result execution phase, the node receives the task uninstalled by the user and completes the resource scheduling within the node according to the resource scheduling strategy function, that is, determines the task to be processed in the current time slot. The process of determining whether the task enters the matching phase is based on the obtained node status information, including the following steps: Step 1: Each task calculates the preference sequence for all nodes within the communication range, and initiates a matching request to the most preferred node, where the request contains the attribute information of the task to be matched. Step 2: After the waiting delay, all tasks whose requests are rejected initiate requests to the most preferred node in the preference list that has never rejected their requests; Step 3: Repeat step 2 until no task request is rejected within a waiting delay, then the task and the node form a matching pair, and the matching phase ends; in the matching execution phase, the tasks participating in the matching in the user device are offloaded to the node that accepts its matching request.
2. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to claim 1 is characterized in that: The process steps for users to generate tasks to be offloaded and update the task queue during the matching preparation phase are as follows: S501, user generates task: N user equipments constitute a set U = {u1,u2,…,u N }, each user u i , 1≤i≤N generates multiple tasks, and a task is represented by a triplet t=<D,R,L> , where D is the amount of data that the task needs to calculate, R is the set of resources required to process the task, including CPU, Storage, and RAM resources. The resource requirement R determines the type, and L is the processing time required after the task is assigned to the resources. When calculating the queue length of the task queue, the contribution of tasks with a processing time less than a single time slot t to the queue length is 1, and the contribution of tasks with a processing time greater than a single time slot to the queue length is S502, update user queue: The tasks to be offloaded in the user are temporarily stored in the device and form a queue. Suppose mobile user u i The number of task types generated is Then form queues, and the tasks in each queue are arranged in the order of their generation time. The length of each queue is recorded as S503: The user initiates a request to the nodes within the communication range in a broadcasting manner: The user sends a request to the node to obtain the node's status information, including the total amount of resources and queue information. Each user u i The transmission rate is The uplink of node s j connected, where is the user transmission power, σ 2 is the power spectral density of Gaussian white noise, I jk For noise interference from other equipment, B ij For user u i With mobile devices j The bandwidth between ij (t) is user u i Time-varying function to the node; S504. The user decides the tasks and matching nodes to be matched based on the node status and the status of the own queue: make The length is Array of elements The number of tasks that will enter the matching phase for the kth queue is called the limit for each queue; The channel transmission rate is lower than the threshold Rate Th The edge computing nodes of are considered as unacceptable matching objects, then the sum of all acceptable edge computing nodes is like If the value is greater than the total number of tasks to be uninstalled, all tasks in the user's device can enter the matching stage; Value less than According to Len k Arrange from high to low, among which Len k Indicates the length of the k-th task queue, Each queue gets a quota; use Q k Represents the priority value of the kth queue. If Value greater than First, give each queue a limit, and then calculate the limit of each buffer queue. Q k Sort from high to low, assign a quota to the queue with the largest Q and recalculate the Q value of the queue, repeat the quota assignment and Q value calculation until the quota is allocated; S505, each queue head The task enters the matching stage.
3. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to claim 1 is characterized in that: The steps for a node to update the queue during the matching preparation phase are as follows: S601, building a heterogeneous task queue model of nodes; Nodes j Can handle V j Tasks to be processed V j Class tasks are divided into V j queues, and the tasks in the queues are arranged in ascending order according to the processing time; For node s j No. v j The length of the task queue in time slot t, is the total length of tasks that need to be processed in time slot t, and the length of the entire queue in time slot t+1 for: In the formula, v j Indicates the vth j queues, is the vth j The queue length of the class task, The vth time slot that needs to be processed is t time slot. j The queue length of the class task, represents the vth j The number of class tasks; S602, construct a matrix of feasible task combinations: Define a task combination vector in a node as The vth j The number of tasks of this type. When the total resources required by the tasks in the combination does not exceed the total resources of the nodes, the combination is considered feasible. The resources of the current system can constitute A t The feasible task combination row vectors are concatenated together to form a t ×V j Task portfolio matrix Among them, N(a t ,v j ) represents the a t The vth task combination j The number of class tasks, v j ∈(1,2,…,V j ), the resource scheduling problem within the node, that is, the problem of which tasks to process in each time slot, is transformed into the selection of matrix row vectors; S603, construct node resource scheduling strategy function: For each node, its Lyapunov drift function is L(t), which is defined as One step of Lyapunov drift in adjacent time can be expressed as: Let constant Let the optimization goal of the node system be to minimize the average completion time p(t) of all types of completed tasks, that is, Lyapunov drift plus penalty can be written as: in, For v j The queuing delay of the kth task in the queue up to time t, is its task length, and the sum of the two is the total delay of the task The system resources can accommodate the vth j The maximum number of virtual machines, α is a constant coefficient, and the system objective function is transformed into minimizing the upper bound of ΔL(t)+α·p(t). is a variable that is independent of the scheduling decision, so the resource scheduling strategy function is 4. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to any one of claims 1 to 3, characterized in that: In the matching preparation phase, the node determines the maximum number of tasks that can be matched in the time slot based on its own status. The process is: Assume that node s j There are K in the resource pool j resources, the total amount of each resource in the resource pool is make The size is V j ×K j The matrix of For v j The kth task required j The number of resources, is the feasible task combination row vector composed of the tasks that the node is running on the virtual machine in time slot t, node s j The limit when no load is The limit after full load is In time slot t, the ratio of the remaining resources in the current time slot to the total resources is determined Right now 5. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to claim 4 is characterized in that: The steps for matching stage tasks to generate preference sequences for nodes are: S801, suppose M nodes constitute a set S = {s1, s2, ...s j ,…,s M }, let node s j There are K in the resource pool j resources, the total amount of each resource in the resource pool is Node supports V j Types of tasks, The size is V j ×K j The matrix of For v j The kth task required j The number of resources; S802, task t to be uninstalled for node s j The preference is where r ij Represents the user u where task t is located i With node s j The transmission rate of the channel, Representative nodes j The sum of resources, Len represents the queue length of the corresponding type of task t; S803, for each task to be uninstalled t, Arranged from high to low, the preference of a task to be offloaded for all individuals in the node set S is represented as a row vector That is, task t prefers s2 to s1 and prefers s1 to s3.
6. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to claim 5, characterized in that: In the matching stage, the matching process between the tasks to be matched and the nodes is as follows: S901, the task calculates a preference vector for the node, and each task initiates a matching request to the most preferred node in the preference sequence, and the matching request includes the attributes of the task to be matched; S902: The node receives matching requests for multiple tasks, converts each task into a feasible task vector, and then inputs it into the resource scheduling strategy function to obtain the node's preference value for the task. The tasks are arranged from high to low according to the preference value, and the most preferred one is temporarily retained. requests and reject other requests; S903, after a waiting delay, the task whose request is rejected initiates a request to a node in the preference list that is the most preferred node and has never rejected its request; S904: After the waiting delay, the node that receives the request again calculates the preference value for all newly received requests according to the resource scheduling policy function in step S603, sorts the requests temporarily reserved in step S902 and the newly received requests by preference, and temporarily reserves the most preferred requests. requests and reject other requests; S905. Repeat steps S903 and S904 until no task request is rejected and the node does not receive any new request. At this time, the node accepts all requests temporarily retained in the previous steps, and the task forms a matching pair with the node that accepts its request, which is determined as the matching result of the time slot, and this round of matching ends; if a task is not matched to the server in the time slot, it will continue to be cached in the user device queue. If the same user has multiple tasks to be offloaded to the same edge computing node, they will be unloaded in the order of the amount of data to be uploaded from small to large.
7. The hierarchical distributed matching method for heterogeneous mobile edge computing load balancing according to claim 6, characterized in that: The steps of the resource scheduling process within a node are: The scheduling strategy of each time slot is converted into each edge computing node updating the feasible task combination matrix described in step S602 according to its own remaining computing resources in each time slot. Each edge computing node s j All through the matrix Select the feasible task combination row vector that can make the resource scheduling strategy function C(t) after conversion in step S603 reach the minimum value, that is, Edge computing nodes j By selecting the optimal row vector at time slot t Determines the task that the node starts processing in this time slot.
