Joint optimization method for resource renting and computing unloading oriented to mobile edge computing
Through reinforcement learning and queuing model optimization technology, the task offloading problem of service providers in the case of edgeless server infrastructure is solved, and low-cost and efficient resource rental and computing offloading are achieved, meeting the low latency in mobile edge computing environments. need.
Patent Information
- Application Number
- CN202410916935.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-11-01
AI Technical Summary
Without edge server infrastructure, how service providers can effectively provide end users with computing resources and optimize task offloading to meet low latency and high efficiency needs.
Using reinforcement learning method to obtain dynamic user task requirements and rental container resource configuration plan for edge servers. By renting multiple edge server resources, optimize container resource configuration plan to minimize costs and meet task processing delays, and use the MG/1 queuing model and Lagrangian multiplication method optimize resource allocation.
On the premise of meeting the task average response delay constraint, the cost of leasing computing resources by service providers is minimized, resource utilization efficiency is improved, and resource waste is avoided.
Smart Images

Figure CN118890355A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing technology, and specifically relates to a joint optimization method for resource leasing and computing offloading for mobile edge computing. Background Art
[0002] With the popularity of mobile devices and the development of mobile applications, the demand for low latency, high bandwidth and real-time performance continues to grow. However, traditional cloud computing is usually located in remote data centers, which increases data transmission latency and cannot meet the requirements for real-time performance. Edge computing has emerged as the times require. Edge computing provides the ability to perform computing and storage close to terminal devices to reduce latency and improve efficiency. At the same time, by reducing the average response time and average energy consumption, user devices will have the illusion that mobile devices have stronger computing power and longer battery life.
[0003] Common participants in edge computing environments include terminal devices, edge devices, data centers, service providers, edge clouds, application developers, etc. These participants together constitute the edge computing ecosystem, which works together to improve computing services with higher efficiency, low latency, and real-time performance. Cooperation and interaction between different participants are essential to realizing the potential advantages of edge computing.
[0004] Traditionally, different operators have built independent edge computing environments, which will lead to many "computing chimneys" in the edge layer in the long run. Each isolated edge computing node faces deficiencies in resources, service capabilities, limited coverage, and high maintenance costs. On the contrary, an ideal promotion method should be to form an edge alliance computing architecture; no matter which operator builds the edge computing environment and cloud computing environment, they can be integrated to share resources and provide users with non-perceived or transparent edge services.
[0005] Based on the proposed concept of edge alliance, we consider that in edge computing environment, service providers play a key role to provide various computing resources, services and solutions for tasks generated by end users (mobile devices). Edge computing involves pushing computing and storage resources close to the data source, and service providers are responsible for building, managing and maintaining these infrastructures at edge locations, which may include edge servers, network equipment, data centers, etc. to meet the needs of users in different geographical locations and industries.
[0006] For the edge servers that service providers are responsible for building, managing and maintaining, sometimes service providers may not have their own edge servers, so they rent edge servers and computing resources provided by third parties. There are three common service models in cloud computing: Infrastructure as a Service (Iaas), Platform as a Service (Paas), and Software as a Service (Saas). They represent different levels of cloud service provision. Users can choose the appropriate model according to their needs to achieve efficient resource utilization and management. Among them, IaaS is the bottom layer of cloud services. IaaS provides basic computing resources such as virtual machines, storage space, and networks. Users can obtain scalable infrastructure through IaaS without worrying about the purchase, configuration, or maintenance of hardware. Therefore, service providers can rent computing resources provided by infrastructure providers to flexibly serve their own users.
[0007] In summary, for service providers without infrastructure, how to offload tasks or allocate computing resources to improve latency and efficiency to complete their users' tasks requires solving two key problems: how to serve the tasks generated by their users without edge server infrastructure, and how to offload these tasks to these resources for computing. Summary of the invention
[0008] In view of this, the object of the present invention is to provide a joint optimization method for resource leasing and computing offloading for mobile edge computing, so as to solve the above-mentioned technical problems.
[0009] In order to achieve the above object, the present invention provides the following technical solutions:
[0010] A joint optimization method for resource leasing and computing offloading for mobile edge computing, comprising:
[0011] Obtain dynamic user task requirements and multiple container resource allocation plans that can be rented in several edge servers, and complete the leasing of container resource allocation plans for dynamic user task requirements based on reinforcement learning methods;
[0012] Calculate the task processing delay of all user task requirements from the target base station to the corresponding leased edge server container resource configuration plan; calculate the total cost of all leased container configuration plans based on the task processing delay;
[0013] Obtaining the cost minimization constraint optimizes the arrival rate of each container resource allocation plan in the total cost.
[0014] Furthermore, dynamic user task requirements and multiple container resource allocation plans that can be rented in several edge servers are obtained, and container resource allocation plans for dynamic user task requirements are rented based on the reinforcement learning method, including:
[0015] Get k rentable edge servers S = {s1, s2, ..., s k};
[0016] Among them, the i-th edge server is represented as s i =(a i , V i , b i ), 1≤i≤k, a i For edge servers i The total resources of the computing resources configured on Indicates that on the edge server s i The above corresponds to the unit cost of each container resource configuration plan, b i For edge servers i The channel bandwidth on
[0017] According to the preset allocation rules, the resources on all edge servers are leased in blocks to obtain container resource allocation plans for q optional solutions on each edge server;
[0018] Among them, the leasing status of q container resource configuration plans on the i-th edge server is expressed as For edge servers i The number of containers that the j-th container resource configuration plan rents, 1≤j≤q, For i The maximum number of the j-th container resource allocation plan rented on the network, f j For i The resource amount of the resource allocation plan of the j-th container rented;
[0019] Based on the reinforcement learning method, the three elements of reinforcement learning are determined:
[0020] State = [λ], indicating the total number of tasks required by each dynamic user task;
[0021] action Indicates the number of each container resource configuration plan rented on each edge server;
[0022] Reward t ;
[0023]
[0024] Among them, formula (1) represents the reward and punishment for whether the rental strategy made by reinforcement learning is legal, l i For edge servers i The total amount of container resource allocation plans rented on
[0025] Formula (2) is used to determine in advance whether the leased container resource configuration plan is sufficient to serve the tasks in the current environment. The total,number,
[0026]
[0027] Formula (3) indicates that after the offloading strategy has been obtained, the average response delay of the task is calculated and the constraint T of the average processing delay of the task is obtained. constraint Compare and give penalties, T is the average task processing delay;
[0028]
[0029] Among them, λ is the total task flow arrival rate, T o The task processing delay for the o-th container resource allocation plan, λ o The arrival rate of the resource allocation plan for the oth container;
[0030] Formula (4) represents the reward given when the cost of renting a container resource allocation plan is used;
[0031] According to the reinforcement learning algorithm A2C and the three elements of reinforcement learning, the reinforcement model is trained until convergence, and the container resource configuration plan rental for dynamic user task requirements is completed.
[0032] Furthermore, the task processing delay of all user task requirements offloading from the target base station to the corresponding leased edge server container resource allocation plan is calculated, including:
[0033] Based on the MG / 1 queuing model theory, the arrival rate λ of the resource allocation plan of the oth container of the corresponding edge server is obtained by unloading the current user task demand from the target base station o ; Among them, the execution requirement of offloading the user task demand from the target base station is r, and the mean is The second moment is The specific task data of offloading the user task requirements from the target base station is d, and the mean is The second moment is
[0034] Get the communication speed b between the target base station and the edge server corresponding to the oth container resource configuration plan o, calculate the processing delay x of the current user task demand from the target base station to the resource allocation plan of the oth container of the corresponding edge server o , average time and The second moment of in, f o The resource amount planned for the oth container resource leased on the corresponding edge server, f o The square of is the square of b.
[0035] According to the arrival rate λ o and average time Calculate the utilization rate of the resource allocation plan for the oth container Among them, ρ o <1;
[0036] According to the arrival rate λ o , utilization rate ρ o and the second moment Calculate the average waiting time for the current user task demand to be unloaded from the target base station to the oth container resource allocation plan of the corresponding edge server
[0037] Based on the average waiting time and average time Calculate the task processing delay of the current user task demand from the target base station to the corresponding edge server's oth container resource allocation plan:
[0038]
[0039] Where m is the total number of container resource configuration plans on all currently leased edge servers. For edge servers i The number of containers that the j-th container resource configuration plans to rent.
[0040] Furthermore, the total cost of all leased container resource allocation plans is calculated based on the average task processing delay, including:
[0041] Obtain the cost coefficient and corresponding task processing delay of each container resource configuration plan, and calculate the total cost of all rented container resource configuration plans. The calculation formula is:
[0042]
[0043] Among them, v oCost coefficient for resource allocation plan of the oth container, T o The task processing delay corresponding to the resource allocation plan for the o-th container.
[0044] Furthermore, the arrival rate of each container resource allocation plan in the total cost is optimized by obtaining the cost minimization constraint, including:
[0045] Determine the objective function based on the total cost:
[0046]
[0047] Subject to:
[0048]
[0049] The above problem is solved based on the Lagrange multiplier method:
[0050] Define the constraint as a function H:
[0051] H(λ1,λ2,...,λ m )=λ1+λ2+...+λ m -λ
[0052] Construct the Lagrangian function:
[0053] L(λ1,λ2,...,λ m ,β)=C(λ1,λ2,...,λ m )+pH(λ1,λ2,...,λ m )
[0054] Derivative Lagrangian function:
[0055]
[0056] Calculate the derivative of the Lagrangian function and get:
[0057]
[0058] Among them, λ o The arrival rate of the resource allocation plan for the o-th container.
[0059] The beneficial effects of the present invention are:
[0060] The present invention proposes a joint optimization method for resource leasing and computing offloading for mobile edge computing. When a service provider does not have corresponding infrastructure and needs to rent computing resources from an infrastructure provider to provide computing offloading services for terminal users within the coverage of a base station, the cost of the service provider leasing these computing resources is minimized while the constraint of the average response delay of the task is met.
[0061] Other advantages, objectives and features of the present invention will be described in the following description and will be apparent to those skilled in the art to some extent, or they may be taught from the practice of the present invention. The purposes and other advantages of the present invention may be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0062] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0064] Figure 1 A method flow chart of a joint optimization method for resource leasing and computing offloading for mobile edge computing in an embodiment of the present invention;
[0065] Figure 2 The effect of learning rate on convergence in a joint optimization method for resource leasing and computing offloading for mobile edge computing in an embodiment of the present invention;
[0066] Figure 3 The invention discloses an effect of a discount factor on convergence in a joint optimization method for resource leasing and computing offloading for mobile edge computing in an embodiment of the present invention.
[0067] Figure 4 It is the average cost under different environments in a joint optimization method for resource leasing and computing offloading for mobile edge computing in an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0069] like Figure 1 As shown, the present invention proposes a joint optimization method for resource leasing and computing offloading for mobile edge computing, including:
[0070] S101, obtaining dynamic user task requirements and multiple container resource configuration plans that can be rented in several edge servers, and completing the leasing of container resource configuration plans for dynamic user task requirements based on a reinforcement learning method;
[0071] Specifically:
[0072] Get k rentable edge servers S = {s1, s2, ..., s k};
[0073] Among them, the i-th edge server is represented as s i =(a i , V i , b i ), 1≤i≤k, a i For edge servers i The total resources of the computing resources configured on Indicates that on the edge server s i The above corresponds to the unit cost of each container resource configuration plan, b i For edge servers i The channel bandwidth on
[0074] According to the preset allocation rules, the resources on all edge servers are leased in blocks to obtain container resource allocation plans for q optional solutions on each edge server;
[0075] Among them, the leasing status of q container resource configuration plans on the i-th edge server is expressed as For edge servers i The number of containers that the j-th container resource configuration plan rents, 1≤j≤q, For i The maximum number of the j-th container resource allocation plan rented on the network, f i For i The resource amount of the resource allocation plan of the j-th container rented;
[0076] Based on the reinforcement learning method, the three elements of reinforcement learning are determined:
[0077] State = [λ], indicating the total number of tasks required by each dynamic user task;
[0078] action Indicates the number of each container resource configuration plan rented on each edge server;
[0079] Reward t ;
[0080]
[0081] Among them, formula (1) represents the reward and punishment for whether the rental strategy made by reinforcement learning is legal, l i For edge servers i The total amount of container resource allocation plans rented on
[0082] Formula (2) is used to determine in advance whether the leased container resource configuration plan is sufficient to serve the total number of tasks in the current environment.
[0083]
[0084] Formula (3) indicates that after the offloading strategy has been obtained, the average response delay of the task is calculated and the constraint T of the average processing delay of the task is obtained. constraint Compare and give penalties, T is the average task processing delay;
[0085]
[0086] Among them, λ is the total task flow arrival rate, T o The task processing delay for the o-th container resource allocation plan, λ o The arrival rate of the resource allocation plan for the oth container;
[0087] Formula (4) represents the reward given when the cost of renting a container resource allocation plan is used;
[0088] According to the reinforcement learning algorithm A2C and the three elements of reinforcement learning, the reinforcement model is trained until convergence, and the container resource configuration plan rental for dynamic user task requirements is completed;
[0089] S102, calculating the task processing delay of all user task requirements from being offloaded from the target base station to the corresponding leased edge server container resource configuration plan;
[0090] Specifically:
[0091] Calculate the task processing delay of all user task requirements from the target base station to the corresponding leased edge server container resource allocation plan, including:
[0092] Based on the MG / 1 queuing model theory, the arrival rate λ of the resource allocation plan of the oth container of the corresponding edge server is obtained by unloading the current user task demand from the target base station o ; Among them, the execution requirement of offloading the user task demand from the target base station is r, and the mean is The second moment is The specific task data of offloading the user task requirements from the target base station is d, and the mean is The second moment is
[0093] Get the communication speed b between the target base station and the edge server corresponding to the oth container resource configuration plan o, calculate the processing delay x of the current user task demand from the target base station to the resource allocation plan of the oth container of the corresponding edge server o , average time and The second moment of in, f o The resource amount planned for the oth container resource leased on the corresponding edge server, f o The square of for b o The square of
[0094] According to the arrival rate λ o and average time Calculate the utilization rate of the resource allocation plan for the oth container Among them, ρ o <1;
[0095] According to the arrival rate λ o , utilization rate ρ o and the second moment Calculate the average waiting time for the current user task demand to be unloaded from the target base station to the oth container resource allocation plan of the corresponding edge server
[0096] Based on the average waiting time and average time Calculate the task processing delay of the current user task demand from the target base station to the corresponding edge server's oth container resource allocation plan:
[0097]
[0098] Where m is the total number of container resource configuration plans on all currently leased edge servers. For edge servers i The number of containers that the j-th container resource configuration plans to rent;
[0099] According to the above steps, the task processing delay of all user task requirements from the target base station to the corresponding leased edge server container resource configuration plan is calculated;
[0100] S103, calculating the total cost of all leased container resource allocation plans based on the average task processing delay;
[0101] Specifically:
[0102] Obtain the cost coefficient and corresponding task processing delay of each container resource configuration plan, and calculate the total cost of all rented container resource configuration plans. The calculation formula is:
[0103]
[0104] Among them, v o Cost coefficient for resource allocation plan of the oth container, T o The task processing delay corresponding to the resource allocation plan for the oth container;
[0105] S104, obtaining the arrival rate of each container resource allocation plan in the total cost optimized by the cost minimization constraint;
[0106] Specifically:
[0107] Determine the objective function based on the total cost:
[0108]
[0109] Subject to:
[0110]
[0111] The above problem is solved based on the Lagrange multiplier method:
[0112] Define the constraint as a function H:
[0113] H(λ1,λ2,...,λ m )=λ1+λ2+...+λ m -λ
[0114] Construct the Lagrangian function:
[0115] L(λ1,λ2,...,λ m ,β)=C(λ1,λ2,...,λ m )+pH(λ1,λ2,...,λ m )
[0116] Derivative Lagrangian function:
[0117]
[0118] Calculate the derivative of the Lagrangian function and get:
[0119]
[0120] Among them, λ o The arrival rate of the resource allocation plan for the oth container;
[0121] According to the optimized λ oOptimize the total cost of renting each container resource configuration plan to minimize the cost of renting these computing resources to the service provider;
[0122] The working principle and beneficial effects of the above technical solution are as follows: For a service provider without infrastructure, how to offload tasks or allocate computing resources to improve latency and efficiency to complete the tasks of its users requires solving two key problems: how to serve the tasks generated by its users without infrastructure such as edge servers, and how to offload these tasks to these resources for computing;
[0123] In view of the above problems, the prior art 1 proposes a hybrid method for allocating cloud resources according to dynamic user demand, including a two-stage algorithm of reservation and dynamic supply, which minimizes the total deployment cost by optimizing the problem while meeting the service quality, and uses a random optimization method to deal with the uncertainty of user demand; however, the scheme does not fully consider the dynamic demand of cloud service consumers for resources; the current practice is usually limited to adapting to the scenario at a specific moment through a static solution, however, this method is not flexible enough when it cannot cope with the rapid changes in user demand, system load fluctuations or dynamic changes in network conditions; the inadequate consideration of dynamic demand may lead to insufficient or wasteful resource allocation, and cannot fully meet the urgent demand of cloud service consumers for real-time and elastic resources;
[0124] In view of the above problems, the prior art 2 proposes a two-stage collaborative resource allocation method and the most cost-effective resource priority algorithm for sorting providers to meet the diverse needs of consumer agents. Cloud joint use of resource expansion and revenue sharing improves the efficiency of cloud providers; the Cournot model based on game theory is proposed, which is superior to other models and improves efficiency and responsiveness; the introduction of physical resource units with specific computing characteristics and a new revenue sharing method enhances cooperation; however, this traditional leasing method does not fully consider the diverse resource distribution and service request differences within the edge server, so it is easy to cause excess resource allocation at certain times or specific tasks, resulting in unnecessary costs and resource waste;
[0125] Based on this, the present invention proposes a joint optimization method for resource leasing and computational offloading for mobile edge computing, and proposes a strategy for using reinforcement learning to rent resources provided by infrastructure providers (IaaS) to serve users. This study considers an application scenario from the perspective of a service provider, that is, we need to rent computing resources from an infrastructure provider to provide computing offloading services to end users within the coverage of a base station, and minimize the cost of the service provider renting these computing resources under the premise that the constraint of the average response delay of the task is met.
[0126] First, in the edge computing environment, the amount of our task requests is changing dynamically, which requires us to make timely rental decisions based on the task volume to meet user requests. To address this issue, we use deep reinforcement learning to train a model that can dynamically and quickly respond to changes in the environment. Secondly, for the second question, we also consider the concept of edge alliance. We assume that the service provider does not build its own infrastructure and rents the infrastructure of other operators in the alliance, that is, edge servers. However, unlike existing research, we consider dividing the resources on each edge server, that is, we have set up several resource containers, so that the service provider can rent the number of each resource container on each edge server according to demand, thus avoiding the waste of resources and cost loss caused by renting the entire edge server at one time.
[0127] Specifically, the present invention proposes a joint optimization scheme for resource leasing and unloading strategies in an environment where a mobile user within the coverage of a base station requests a service from a service provider; the goal is to minimize the cost of leasing resources on the basis of satisfying user requests; the main steps to achieve this goal are as follows: 1) Modeling the leasing decision made based on the MEC environment; 2) Modeling the MEC environment to obtain performance indicators; specifically including Container modeling and performance analysis of resource allocation plan on edge servers, modeling and performance analysis of base station BS, modeling and analysis of service provider costs, and analysis of cost optimization problems that meet performance indicators; 3) Model analysis of reinforcement learning leasing strategies;
[0128] 1) Modeling the rental decisions made based on the MEC environment
[0129] We will again describe the edge computing (Mobile Edge Computing) environment of the present invention in detail. We assume that a mobile device within the coverage of a base station simultaneously requests a service from a service provider. The service provider does not have its own infrastructure, that is, it does not have computing resources that can provide services to the mobile devices applying for services. Consider the scenario where the tasks of the mobile devices applying for services are uniformly sent to the base station, and the service provider uniformly rents resources on the surrounding edge servers and processes the tasks.
[0130] For this environment, we first model the decision of renting resources on other edge servers;
[0131] Assume that there is a base station (BS) and k rentable edge servers (ES) in the MEC environment. We use S = {s1, s2, ..., s k}; We assume that the resources on the edge servers can be rented in blocks, and we call this block the Container resource configuration plan that can be rented by all edge servers. There are q types in total, which represents all the optional solutions for the Container resource rental configuration plan on all edge servers; we use F = {f1, ..., f q} to represent the corresponding q plans, where f j Available computing resources (measured in billions of instructions per second, BIPS);
[0132] The above modeling is used to model the common parts of each edge server. Next, the modeling introduces the information of each edge server;
[0133] From the above list of rentable edge servers S = {s1, s2, ..., s k}, where s i represents the i-th edge server,
[0134] s i =(a i , Vi, bi), 1≤i≤k#(1)
[0135] where a i Represents edge servers i The maximum processing speed (in BIPS) of the computing resources equipped on the system, that is, the total resources; V i Indicates that on the edge server s i The unit cost of renting q types of containers is expressed as Indicates in s i The above corresponds to the rental unit cost of each resource allocation plan, represents the unit cost of renting the jth Container on the i-th edge server; b i Represents edge servers i The channel bandwidth on (in Mb / s);
[0136] Based on the above introduction, we can then rent q resource allocation plans on k edge servers;
[0137] We set represents the i-th edge server s i The rental situation of these q containers is as follows: Represents edge servers i The number of leased containers of the jth type;
[0138] Since the total amount of resources on each edge server is limited, the edge server s iThe maximum number of the jth type of Container that can be rented can be obtained by dividing the total resources on the edge server by the resources for renting a Container (because the edge server may have surplus resources for each Container, we use rounding down to get the maximum value of this type of Container that can be rented):
[0139]
[0140] It can be concluded that the number of leased containers of each type on each edge server is The value range of is:
[0141]
[0142] What we need to do now is to make decisions on how to rent resources on edge servers, expressed in matrix form as follows:
[0143]
[0144] We use reinforcement learning to make decisions for this matrix; the edge server s i The leasing strategy on Edge servers must be satisfied i The total amount of resources required by the rented Container cannot exceed the edge server s i The total amount of resources on
[0145] Use l i Indicates that on the edge server s i The total amount of resources of the rented Containers, plus the product of the number of each type of q Containers and the corresponding amount of resources, can be obtained:
[0146]
[0147] Edge Servers i The total amount of l leased strategies i Need to meet no more than edge server s i Total resources owned:
[0148] l i ≤a i #(6)
[0149] If l i The value is 0, i.e. l i =0, it means that no Container is rented on the edge server, that is, the edge server is not rented;
[0150] To facilitate subsequent calculations, we count the total number of containers on all rented edge servers:
[0151]
[0152] 2) Modeling the MEC environment to derive performance indicators
[0153] a) Container modeling and performance analysis of resource allocation planning on edge servers
[0154] In the present invention, queuing theory is used to model the Container resource allocation plan. We assume that each edge server can rent q resource allocation plans. Since we only use the computing resources on it, it is defined as F = {f1, ..., f q}, represents all the optional solutions for the Container resource leasing configuration plan on all edge servers; according to the description in 1), we rented m Containers, and then we modeled each rented resource configuration plan in detail;
[0155] We regard the rented o-th Container as the M / G / 1 queue model, and its execution speed is described as one of q types as above. We use o as the subscript again to represent it as f o (Unit: BIPS);
[0156] The arrival rate of tasks offloaded from the base station to the oth Container is λ o ; The execution requirement of the offloadable task offloaded from the target base station is r, and the mean is Its second-order moment is (unit: BI); the task data unloaded from the target base station is d (unit: Mb), and the average is Its second-order moment is
[0157] The communication speed between the base station and the edge server si where the oth Container is located is b i , here we also use o as the subscript to represent b o (unit: Mb / s);
[0158] According to the above description, the processing delay of the task offloaded by the base station to the oth Container is:
[0159]
[0160] The average time is:
[0161]
[0162] Its second-order moment is:
[0163]
[0164] The utilization of the oth Container is represented by ρo:
[0165]
[0166] In Container c o The average waiting time of tasks on ([7], p.190):
[0167]
[0168] Average task processing delay:
[0169]
[0170] b) Modeling and performance analysis of base station BS
[0171] We assume that a mobile user within the coverage of a target base station sends a task request to the service provider. All tasks are processed uniformly by the service provider after being sent to the base station. Therefore, it is assumed that the total task flow arrival rate transmitted by these MDs to the base station is λ;
[0172] The unloading strategy vector of the total task flow arrival rate λ on a base station for m rented containers is:
[0173] λ=(λ1,λ2,...,λ m )
[0174] And it must be satisfied that all tasks can be processed
[0175]
[0176] The average response time of offloadable tasks on the base station (BS) (i.e. the average delay of offloading tasks for processing):
[0177]
[0178] c) Modeling and analysis of service provider costs
[0179] The cost calculation principle on the edge server is calculated by time. As mentioned above, although the same type of container can be rented on all edge servers, due to the different pricing principles of each edge server and the different resources provided, the cost coefficient of each container on different edge servers is also different. Therefore, the cost of each container can be calculated by multiplying the cost coefficient by the task processing delay. To calculate, the total cost of all rented Containers is expressed as follows:
[0180]
[0181] d) Analyze the cost optimization problem to meet the performance indicators
[0182] The environment of our invention is to implement a leasing strategy on the base station, and then make an unloading strategy, and finally obtain the total cost of leasing these computing resources to serve the tasks received on the base station; the ultimate goal is to minimize this cost under the constraint of ensuring that all tasks are served;
[0183] The objective function can be written as:
[0184]
[0185] Subject to:
[0186]
[0187] To solve this problem, we use the Langge multiplier method to find;
[0188] First, define the constraint as a function H
[0189] H(λ1,λ2,...,λ m )=λ1+λ2+...+λ m -λ#(18)
[0190] The Lagrangian function is constructed as follows:
[0191] L(λ1,λ2,...,λ m ,β)=C(λ1,λ2,...,λ m )+pH(λ1,λ2,...,λ m )#(19)
[0192] Taking the derivative of the Lagrangian function, we get:
[0193]
[0194] By calculating the formula, we can find the arrival rate on each container:
[0195]
[0196] 3) Model analysis of reinforcement learning rental strategy
[0197] For dynamic edge computing systems, service providers provide services to end users within the coverage of base stations to meet the quality of user services. Since service providers do not have their own infrastructure to complete services, they rent edge servers from surrounding resource providers to meet their own user services. Considering that the number of end users within the coverage of the base station is constantly changing, we use deep reinforcement learning algorithms to dynamically learn how to rent surrounding resources to meet our own user needs. For the agent to learn to update the strategy based on experience, we set the state, action, and reward in the reinforcement learning method as follows:
[0198] Status: Since only the total number of tasks may change in our environment, the status we provide is the total number of tasks each time:
[0199] State=[λ]
[0200] Action: Within the coverage of this base station, we have multiple edge servers, and the resources on each edge server are divided into multiple types. Based on this condition, our action is the number of each resource leased on each edge server.
[0201]
[0202] in Represents edge servers i The number of leased containers of the jth type;
[0203] Reward: A signal received by the agent from the environment to evaluate the quality of its behavior. We set the minimum rental cost under the premise of satisfying two basic conditions, that is, the amount of rented resources on an edge server cannot exceed the total amount of resources on it. At the same time, in order to ensure basic service quality, we limit the average response time to complete this task.
[0204]
[0205] Formula (1) rewards whether the rental strategy made by reinforcement learning is legal, that is, the total resources of all containers rented on an edge server cannot exceed the total resources owned by the edge server, and unreasonable penalties are given; Formula (2) is to determine in advance whether the rented container is sufficient to serve the task volume in the current environment; Since we model the container as a queuing theory, the utilization rate of each container ρ o <1; Based on this condition, we can determine the maximum arrival rate of the task flow that each Container can serve (i.e., o =1),
[0206]
[0207] Then we can find the maximum value of the arrival rate of task flows that all containers can serve:
[0208]
[0209] Formula (3) is our judgment on guaranteeing basic service quality, which is the constraint on the average response delay of tasks after the offloading strategy has been found; Formula (4) is the cost of renting these containers, and also gives a reward;
[0210] The following describes the part that is implemented based on the above modeling;
[0211] The reinforcement learning algorithm we use is A2C. For this algorithm, we analyze the impact of different reinforcement learning parameters on experimental convergence;
[0212] The learning rate controls the magnitude of the model parameter update in each iteration; it is an important hyperparameter that determines the speed and direction of parameter updates; we keep other parameters fixed and change the learning rate. Different learning rates have different effects on the convergence of reinforcement learning, such as Figure 2 As shown;
[0213] The discount factor is used to measure the emphasis of the reinforcement learning algorithm on future rewards; a larger discount factor will place more emphasis on future rewards, thus affecting the long-term decision-making and behavior of the agent. Similarly, keeping other parameters fixed, we study the convergence of different discount factors, such as Figure 3 As shown;
[0214] After the decision model training converges, we can use the converged decision model to make service placement decisions. In order to verify the effectiveness of the decision model we use, we compare the average costs in different environments, such as Figure 4 As shown;
[0215] Figure 4 The horizontal axis represents the arrival rate of the tasks received at the base station within a certain range, and the vertical axis represents the average cost. When the task volume increases, the average cost also increases.
[0216] When the number of task requests in an edge computing environment changes dynamically, it is necessary to make timely decisions based on the number of tasks to meet user requests. To address this problem, we use deep reinforcement learning to train a model that can dynamically and quickly respond to changes in the environment.
[0217] Assume that the service provider does not build its own infrastructure, but rents the infrastructure of other operators in the alliance, that is, the edge server; but unlike existing research, we consider dividing the resources on each edge server, that is, we have set up several resource containers, so that the service provider can rent the appropriate number of each resource container on each edge server according to demand, thus avoiding the waste of resources and cost loss caused by renting the entire edge server at one time.
[0218] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A joint optimization method for resource leasing and computing offloading for mobile edge computing, characterized in that: include: Obtain dynamic user task requirements and multiple container resource allocation plans that can be rented in several edge servers, and complete the leasing of container resource allocation plans for dynamic user task requirements based on reinforcement learning methods; Calculate the task processing delay of all user task requirements from the target base station to the corresponding leased edge server container resource allocation plan; Calculate the total cost of all leased container configuration plans based on task processing latency; Obtaining the cost minimization constraint optimizes the arrival rate of each container resource allocation plan in the total cost.
2. A joint optimization method for resource leasing and computing offloading for mobile edge computing according to claim 1, characterized in that: Obtain dynamic user task requirements and multiple container resource allocation plans that can be rented in several edge servers. Based on the reinforcement learning method, complete the leasing of container resource allocation plans for dynamic user task requirements, including: Get k rentable edge servers S = {s1, s2, ..., s k }; Among them, the i-th edge server is represented as s i =(a i , V i , b i ), 1≤i≤k, a i For edge servers i The total resources of the computing resources configured on Indicates that on the edge server s i The above corresponds to the unit cost of each container resource configuration plan, b i For edge servers i The channel bandwidth on According to the preset allocation rules, the resources on all edge servers are leased in blocks to obtain container resource allocation plans for q optional solutions on each edge server; Among them, the leasing status of q container resource configuration plans on the i-th edge server is expressed as For edge servers i The number of containers that the j-th container resource configuration plan rents, 1≤j≤q, For i The maximum number of the j-th container resource allocation plan rented on the network, f j For i The resource amount of the resource allocation plan of the j-th container rented; Based on the reinforcement learning method, the three elements of reinforcement learning are determined: State state = [λ], indicating the total number of tasks required by each dynamic user task; action Indicates the number of each container resource configuration plan rented on each edge server; Reward t ; Among them, formula (1) represents the reward and punishment for whether the rental strategy made by reinforcement learning is legal, l i For edge servers i The total amount of container resource allocation plans rented on Formula (2) is used to determine in advance whether the leased container resource configuration plan is sufficient to serve the total number of tasks in the current environment. Formula (3) indicates that after the offloading strategy has been obtained, the average response delay of the task is calculated and the constraint T of the average processing delay of the task is obtained. constraint Compare and give a penalty, T is the average processing delay of all tasks in the leased container resource allocation plan; Among them, λ is the total task flow arrival rate, T o The task processing delay for the o-th container resource allocation plan, λ o The arrival rate of the resource allocation plan for the oth container; Formula (4) represents the reward given when the cost of renting a container resource allocation plan is used; According to the reinforcement learning algorithm A2C and the three elements of reinforcement learning, the reinforcement model is trained until convergence, and the container resource configuration plan rental for dynamic user task requirements is completed.
3. A joint optimization method for resource leasing and computing offloading for mobile edge computing according to claim 1, characterized in that: Calculate the task processing delay of offloading the user task demand from the target base station to the corresponding leased edge server container resource allocation plan, including: Based on the MG / 1 queuing model theory, the arrival rate λ of the resource allocation plan of the oth container of the corresponding edge server is obtained by unloading the current user task demand from the target base station o ; Among them, the execution requirement of offloading the user task demand from the target base station is r, and the mean is The second moment is The specific task data of offloading the user task requirements from the target base station is d, and the mean is The second moment is Obtain the communication speed b between the target base station and the edge server corresponding to the oth container resource configuration plan. Calculate the processing delay x of the current user task demand from the target base station to the corresponding edge server oth container resource configuration plan o , average time and The second moment of in, f o The resource amount planned for the oth container resource leased on the corresponding edge server, f o The square of for b o The square of According to the arrival rate λ o and average time Calculate the utilization rate of the resource allocation plan for the oth container Among them, ρ o <1; According to the arrival rate λ o , utilization rate ρ o and the second moment Calculate the average waiting time for the current user task demand to be unloaded from the target base station to the oth container resource allocation plan of the corresponding edge server Based on the average waiting time and average time Calculate the task processing delay of the current user task demand from the target base station to the corresponding edge server's oth container resource allocation plan: Where m is the total number of container resource configuration plans on all currently leased edge servers. For edge servers i The number of containers that the j-th container resource configuration plans to rent.
4. A joint optimization method for resource leasing and computing offloading for mobile edge computing according to claim 1, characterized in that: The total cost of all leased container resource allocation plans is calculated based on the average task processing delay, including: Obtain the cost coefficient and corresponding task processing delay of each container resource configuration plan, and calculate the total cost of all rented container resource configuration plans. The calculation formula is: Among them, v o Cost coefficient for resource allocation plan of the oth container, T o The task processing delay corresponding to the resource allocation plan for the o-th container.
5. The joint optimization method for resource leasing and computing offloading for mobile edge computing according to claim 1 is characterized in that: Obtain the arrival rate of each container resource allocation plan in the total cost by optimizing the cost minimization constraint, including: Determine the objective function based on the total cost: Subject to: The above problem is solved based on the Lagrange multiplier method: Define the constraint as function H: H(λ1,λ2,...,λ m )=λ1+λ2+...+λ m -l Construct the Lagrangian function: L(λ1,λ2,...,λ m ,β)=C(λ1,λ2,...,λ m )+pH(λ1,λ2,...,λ m ) Derivative Lagrangian function: Calculate the derivative of the Lagrangian function and get: Among them, λ o The arrival rate of the resource allocation plan for the o-th container.
