Service placement and task offloading method and system based on computing reuse in edge environment
By establishing a service placement and task offloading method for computing reuse on edge servers, using cloud servers to cache computing results and perform joint optimization, the problem of resource waste caused by task similarity is solved, and the resource utilization and task processing capabilities of edge servers are improved.
Patent Information
- Application Number
- CN202310349412.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-04-04
AI Technical Summary
Existing service placement works fail to effectively consider the similarity between tasks, resulting in computational redundancy and resource waste, affecting the resource utilization of edge servers.
By establishing a service placement and task offloading method for computational reuse on edge servers, using cloud servers to preprocess task requests and cache computation results, the edge servers jointly optimize service placement and task offloading based on task similarity and resource constraints, and adopting a greedy algorithm to select the service placement scheme and determine the optimal resource allocation.
It improves the task processing capability of edge servers under limited resource conditions, improves resource utilization, and reduces computing latency and resource waste.
Smart Images

Figure CN116320016B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing, and specifically relates to a method and system for service placement and task offloading based on computing reuse in an edge environment. Background Art
[0002] With the advent of the 5G era, an increasing number of mobile applications are emerging, such as facial recognition, voice recognition, and augmented reality. These applications typically generate massive amounts of data processing and require low latency. Sending all this data to cloud servers for processing typically results in high latency, potentially leading to network congestion and the risk of user data privacy leaks. Therefore, a new computing paradigm, mobile edge computing, is gaining industry attention. Mobile edge computing allocates resources, such as computing and storage, to edge servers to ensure that mobile devices can promptly process their corresponding task requests, thereby ensuring low latency execution.
[0003] Mobile edge computing typically deploys edge servers near base stations and deploys corresponding services on these edge servers to handle various user task requests within their coverage area. However, due to limited resources on edge servers, the rational placement of various services is crucial. Fortunately, extensive research has been conducted on the scheduling and allocation of edge resources, primarily focusing on algorithm optimization and AI-assisted decision-making to investigate resource allocation strategies. However, these studies rarely consider the impact of computational redundancy caused by repeated computation of large numbers of similar or identical requests on resource allocation. This similarity stems from the fact that user behavior within the edge server's coverage area is generally similar, resulting in spatiotemporal correlations between task requests. For example, for autonomous vehicles, multiple vehicles may recognize the same road sign at the same intersection, or the same vehicle may recognize the same road sign at different intersections. This generates similar task requests, and computing all of these requests wastes computing resources on the edge server. Therefore, for this phenomenon, the results of previously calculated tasks can be cached. The next time a request of the same type comes in, the similarity with the corresponding task in the cache can be compared first. If the similarity is higher than a given threshold, the previously cached result can be returned without the server recalculating the task, thereby saving the server's computing resources. This computing mode of reusing previously calculated results is called computation reuse.
[0004] Existing service placement research has barely considered the impact of this new computing model on service placement. Services are blindly placed without considering the similarities between tasks, resulting in insufficient server resource utilization. Therefore, to address this shortcoming, it is necessary to propose a service placement and task offloading scheme that considers the impact of this new computing model on service placement and task offloading. Summary of the Invention
[0005] A method for service placement and task offloading based on computing reuse in an edge environment includes the following steps:
[0006] (1) The edge server collects parameters corresponding to various services and obtains the reuse rates corresponding to various services from the cloud server. The reuse rates corresponding to various services are obtained by the cloud server after pre-processing the task requests corresponding to various services and waiting until the system stabilizes and converges;
[0007] (2) The edge server establishes a constrained optimization problem for joint service placement and task offloading based on the collected parameters. The goal of service placement in the optimization problem is to enable the edge server to process as many task requests as possible based on the similarity between various tasks and the various resource constraints of the edge server.
[0008] (3) The edge server solves the optimization problem. For service placement, the edge server attempts to select a service for placement in each iteration. That is, after the placement of such a service, the number of requests that can be processed in this iteration is maximized. Then, the edge server selects another service from the remaining services in turn. The above operation is repeated until the stopping condition is reached and the service placement plan is obtained.
[0009] (4) After determining the placement plan, the edge server allocates the best resources to the various services placed on the edge server based on its own computing resources and storage resources, determines the computing mode corresponding to the requests of each service, and establishes the optimal task offloading plan.
[0010] Furthermore, in step (1), the reuse rate corresponding to each type of service is obtained by the following method: the cloud server performs model calculation on the requests corresponding to each type of service, and after obtaining the calculation results of the requests corresponding to each type of service, it caches them. When a similar request arrives next time, it first performs a similarity comparison with the results stored in the cache. If the similarity is greater than the set threshold, the result of the new task is directly returned through the result in the cache; if the similarity is less than the set threshold, the result of the request is obtained through model calculation; until the system is stable, the reuse rate of the tasks corresponding to each type of request is obtained, and the reuse rate is the ratio of the number of requests processed by calculation reuse in each type of request to the total number of requests of each type processed during the convergence period.
[0011] Furthermore, in step (1), the edge server collects parameters corresponding to various services, including: the edge server counts the storage resources required for the service called by each request based on the number of requests arriving at the service within a specified time, the computing resources required to process the number of requests, the reuse rate of the called service, and the computing resource overhead required for reuse.
[0012] Furthermore, in step (2), the optimization goal of the optimization problem is:
[0013]
[0014] S i (X, Y) = (σ i λ i +(1-σ i )x i λ i )y i
[0015] The constraints are:
[0016] Feasible domain constraints for service placement decisions: y i ∈{0, 1};
[0017] Feasible domain restrictions for task offloading decisions: x i ∈[0, 1];
[0018] Limitations on edge server storage resources:
[0019] Limitations on edge server computing resources:
[0020] Restrictions on uninstallation decision variables and service placement decision variables: x i ≤y i ;
[0021] Where, σ i represents the service reuse rate, λ i represents the service request volume, x i represents the task offloading decision variable, which means the proportion of the i-th type of request processed by the edge server, y i represents the decision variable for service placement, where y i =1 means that the i-th type of service is placed on the edge server, y i =0 means that the i-th type of service has not been placed on the edge server, c i represents the storage resources required for the i-th type of service, μ i represents the computing resources required to process the corresponding requests of the i-th service, γ irepresents the computing resources required to multiplex the computing for processing the corresponding request volume of the i-th type of service, C represents the total storage resources that the edge server can provide, R represents the total computing resources that the edge server can provide, k represents the total number of service types, x is the task offloading decision variable, and Y is the service placement decision variable.
[0022] Furthermore, solving the optimization problem includes:
[0023] For each fixed service placement scheme, assume that the placed services are H1, H2, H3..., H l (l≤k), the optimization problem becomes:
[0024]
[0025] Constraints:
[0026] (1)
[0027] (2)x i ∈[0, 1]
[0028] Transform constraint (1) into: The transformed problem is a linear programming problem, and its corresponding optimal solution X is found. * , that is, for a fixed service placement scheme, its corresponding task offloading strategy can be obtained. Then the problem becomes how to solve a better service placement scheme so that its corresponding objective function can be maximized. That is, the original problem is transformed into:
[0029]
[0030] The constraints are:
[0031] y i ∈{0, 1}
[0032]
[0033]
[0034] This is an NP-hard problem. The edge server adopts a greedy approach to solve the problem in sequence, that is, selecting services for placement and determining the service placement plan.
[0035] Furthermore, the greedy approach is used to solve the problem in sequence, including: first, a service is selected from the unplaced services for placement. The selected service should increase the total number of requests that the system can handle the fastest, that is, the optimal solution corresponding to the converted optimization problem increases the fastest. This method is used to determine the services to be placed in this round; next, the same method is used to select services from the unplaced services for placement in sequence. Each placement should not only increase the amount of tasks that can be processed, but also maximize the corresponding increment; services are selected for placement until the placed service reaches the computing power or storage capacity of the edge server or the number of requests processed can no longer increase.
[0036] Furthermore, the step (4) includes:
[0037] According to the obtained service placement plan, a final task offloading plan is determined. The task offloading plan determines which requests are to be delivered to the cloud server for calculation and which requests are to be delivered to the edge server for calculation.
[0038] The present invention also provides a service placement and task offloading system based on computing reuse in an edge environment. The system consists of an edge server, a cloud server, and multiple user devices distributed around the edge server. The user device is responsible for generating task requests, and the edge server and cloud server are responsible for processing the requests generated by the device. The cloud server is responsible for the initial preprocessing of the device task to obtain the reuse rate, and the edge server is responsible for service selection and placement. The service selection and placement are performed according to the service placement and task offloading method based on computing reuse in an edge environment described in the present invention.
[0039] Beneficial effects: Starting from the feature that task requests in edge environments have spatiotemporal correlation, the present invention further divides the computing mode of task requests into three computing modes. At the same time, combined with the problems of limited computing resources and storage resources of edge servers, the problem is considered as a joint optimization problem of service placement and task offloading based on computing reuse, thereby greatly improving the ability of edge servers to process task requests under limited resources, greatly improving service quality, and more efficiently utilizing the limited resources of edge servers. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 An overall flow chart of the service placement and task offloading strategy method based on computational reuse for edge environments;
[0041] Figure 2 An example diagram of the solution process for edge server service placement. DETAILED DESCRIPTION
[0042] To facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0043] like Figure 1 As shown, the edge environment service placement and task offloading strategy method based on computing reuse proposed by the present invention includes the following steps:
[0044] Step S1: Various task requests are first pre-processed by the cloud server, which has abundant computing and storage resources. The results of various request processing are saved so that subsequent tasks can be reused. After the system stabilizes and converges, the reuse rate corresponding to each request is obtained.
[0045] The cloud server calculates various requests, and there are two calculation modes: calculation reuse and model calculation. For each type of service corresponding request, when the result is obtained, it will be cached. When a similar request arrives next time, the result (key-value key-value pair) stored in the cache is first compared with the local sensitive hashing (LSH) algorithm and the K-nearest neighbor (KNN) algorithm for similarity. If the similarity is greater than the set threshold, the result of the new task is directly returned through the result in the cache; if the similarity is less than the set threshold, the result of the request is obtained through model calculation. The cache is updated using the least recently used algorithm (LRU). Once the system is stable, the reuse rate of tasks corresponding to various requests can be obtained. The reuse rate is the ratio of the number of requests processed through calculation reuse in each type of request to the total number of requests processed during the convergence period.
[0046] Step S2: The edge server starts processing various task requests of the system class. The edge server obtains the arrival volume of various tasks within a certain time period, and counts the computing resources and storage resources required to process the request volume corresponding to each task, as well as the reuse rate and computing overhead of requesting various services from the cloud server.
[0047] Step S3: The edge server establishes a constrained optimization problem based on its own limited resources. The goal of the optimization problem is to enable the limited resources of the edge server to process the most task requests, and starts the joint optimization calculation of service placement and task offloading.
[0048] Specifically, the goal of service placement is to enable the edge server to process as many task requests as possible based on the differences in similarity between various tasks and the limited resources of the edge server. The constrained optimization problem established is as follows:
[0049] The optimization goal is:
[0050]
[0051] S i(X, Y) = [σ i λ i +(1-σ i )x i λ i ]y i
[0052] The constraints are:
[0053] Feasible domain constraints for service placement decisions: y i ∈{0, 1}
[0054] Feasible domain restrictions for task offloading decisions: x i ∈[0, 1]
[0055] Limitations on edge server storage resources:
[0056] Limitations on edge server computing resources:
[0057] Restrictions on uninstallation decision variables and service placement decision variables: x i ≤y i
[0058] Where σ i represents the service reuse rate, λ i represents the service request volume, x i represents the task offloading decision variable, which means the proportion of the i-th type of request processed by the edge server, y i represents the decision variable for service placement, where y i =1 means that the i-th type of service is placed on the edge server, y i =0 means that the i-th type of service has not been placed on the edge server, c i represents the storage resources required for the i-th type of service, μ i represents the computing resources required to process the corresponding requests of the i-th service, γ i represents the computing resources required to multiplex the computing for processing the corresponding request volume of the i-th type of service, C represents the total storage resources that the edge server can provide, R represents the total computing resources that the edge server can provide, k represents the total number of service types, X is the task offloading decision variable, and Y is the service placement decision variable.
[0059] For each fixed service placement scheme, assume that the placed services are H1, H2, H3..., H l (l≤k), the optimization problem becomes
[0060]
[0061] Constraints:
[0062]
[0063] x i ∈[0, 1]
[0064] Further changes are:
[0065]
[0066] Constraints:
[0067]
[0068] x i ∈[0, 1]
[0069] For the transformed problem, it is a linear programming problem, and the corresponding optimal solution X can be easily obtained using the currently mature simplex method or interior point method. * That is, for a corresponding service placement solution, the corresponding task offloading solution can be easily determined. The question then becomes how to find a more optimal service placement solution so that the corresponding objective function is maximized.
[0070] That is, the original problem is transformed into:
[0071]
[0072] The constraints are:
[0073] y i ∈{0,1}
[0074]
[0075]
[0076] This is a multi-dimensional 0-1 knapsack problem, which is an NP-hard problem. The edge server solves the problem in turn using a greedy approach, i.e., selecting services for placement.
[0077] Step S4: The edge server selects services from the collected service information and places them in sequence. The selection rule is to maximize the increase in the number of requests that the edge server can handle in the current selection compared to the number of task requests that can be handled in the first round of selection.
[0078] Step S5: If in each selection, the number of requests processed can be increased without exceeding the edge server resources, then continue with step S4; otherwise, stop service selection.
[0079] In conjunction with steps S4 and S5, specifically, the edge server first selects a service from among those that have not yet been placed for placement. This selected service should maximize the growth in the total number of requests that can be processed, meaning that the optimal solution corresponding to the converted optimization problem has the fastest growth. This method is used to determine the service to be placed in this round. Next, the same method is used to sequentially select services from among those that have not yet been placed for placement. Each placement should not only increase the number of tasks that can be processed, but also maximize the corresponding increment. This selection of services continues until the placed services reach the edge server's computing or storage capacity, or the number of requests processed can no longer increase. At this point, selection of services for placement ceases.
[0080] Step S6: Determine the final placed service plan and calculate its optimal task offloading plan.
[0081] Based on its own computing and storage resources, the edge server optimally allocates resources to the various services placed on it, determines the computational model for task requests corresponding to each service, and establishes an optimal task offloading solution. This task offloading solution determines which requests are delegated to the cloud server for computation and which are delegated to the edge server for computation. Specifically, after obtaining the final service placement solution in step S5, a linear programming problem is constructed for the determined service placement solution according to the process described in step S3. The optimal solution is then determined using the existing simplex method or interior point method to determine the final task offloading solution.
[0082] The following are four services: A, B, C, and D. Figure 2 Taking this as an example, the specific process corresponding to the service placement and task offloading strategy method of the present invention is described:
[0083] 1) Before making a decision, the edge server obtains various parameters corresponding to the four services A, B, C, and D, including the required computing resources, required storage resources, number of task requests, reuse rate, and computing resources required for reuse. It also initializes the service placement benefit parameter (initially 0), its own computing resources, and storage resources.
[0084] 2) The edge server begins its decision-making process, sequentially attempting to place services A, B, C, and D, and determining the potential placement benefits of each of these services. If selecting service A maximizes the service placement benefit and placing service A does not exceed its own resource limits, service A is placed for this round, and the remaining computing and storage resources, as well as the service placement benefit, are updated.
[0085] 3) At this point, the edge server still has remaining resources and continues to attempt to place the remaining services B, C, and D. If it is found that placing service C can maximize the service placement benefit and placing service C will not exceed its own resource limits, then service C is determined to be placed in this round.
[0086] 4) Repeat steps 2)-3). If it is found that the remaining services that have not been placed cannot increase the service placement benefits, or the edge server's own resources cannot support it to continue placing services, then stop selecting services for placement and determine the final service placement plan;
[0087] 5) If the final service placement plan includes services A, C, and D, the edge server calculates the allocation plan for the task requests corresponding to these three services and determines the proportion of their respective task computation modes. For services that have not been placed, their tasks are uploaded to the cloud server for computation. This results in the final service placement and task offloading plan.
[0088] The present invention also provides a service placement and task offloading system based on computing reuse in an edge environment. The system consists of an edge server, a cloud server, and multiple user devices distributed around the edge server. The user device is responsible for generating task requests, and the edge server and cloud server are responsible for processing the requests generated by the device. The cloud server is responsible for the initial preprocessing of the device task to obtain the reuse rate, and the edge server is responsible for selecting and placing services and performing task offloading.
[0089] Specifically, the cloud server preprocesses the initial tasks to obtain the reuse rate, including: the cloud server performs model calculations on the requests corresponding to each type of service, and after obtaining the calculation results of the requests corresponding to each type of service, it caches them. When a similar request arrives next time, it first performs a similarity comparison with the results stored in the cache. If the similarity is greater than the set threshold, the result of the new task is directly returned through the result in the cache; if the similarity is less than the set threshold, the result of the request is obtained through model calculation; until the system stabilizes, the reuse rate of the tasks corresponding to each type of request is obtained. The reuse rate is the ratio of the number of requests processed by calculation reuse in each type of request to the total number of requests of each type processed during the convergence period.
[0090] The methods for selecting and placing services on edge servers include:
[0091] (1) The edge server collects parameters corresponding to various services and obtains the reuse rates corresponding to various services from the cloud server. The reuse rates corresponding to various services are obtained by the cloud server after pre-processing the task requests corresponding to various services and waiting until the system stabilizes and converges;
[0092] (2) The edge server establishes a constrained optimization problem for joint service placement and task offloading based on the collected parameters. The goal of service placement in the optimization problem is to enable the edge server to process as many task requests as possible based on the similarity between various tasks and the various resource constraints of the edge server.
[0093] (3) The edge server solves the optimization problem. For service placement, the edge server attempts to select a service for placement in each iteration. That is, after the placement of such a service, the number of requests that can be processed in this iteration is maximized. Then, the edge server selects another service from the remaining services in turn. The above operation is repeated until the stopping condition is reached and the service placement plan is obtained.
[0094] (4) After determining the placement plan, the edge server allocates the best resources to the various services placed on the edge server based on its own computing resources and storage resources, determines the computing mode corresponding to the requests of each service, and establishes the optimal task offloading plan.
[0095] The process of establishing and solving the optimization problem by the edge server refers to the process in the method described in conjunction with steps S1-S6, and will not be repeated here.
[0096] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A service placement and task offloading method based on computing reuse in an edge environment, characterized in that: The following steps are involved: (1) The edge server collects parameters corresponding to various services and obtains the reuse rates corresponding to various services from the cloud server. The reuse rates corresponding to various services are obtained by the cloud server after pre-processing the task requests corresponding to various services and waiting until the system stabilizes and converges; (2) The edge server establishes a constrained optimization problem for joint service placement and task offloading based on the collected parameters. The goal of service placement in the optimization problem is to enable the edge server to process as many task requests as possible based on the similarity between various tasks and the various resource constraints of the edge server. The optimization goal of the optimization problem is: S i (X,Y)=(σ i l i +(1-s i )x i l i )y i The constraints are: Feasible domain constraints for service placement decisions: y i ∈{0,1}; Feasible domain restrictions for task offloading decisions: x i ∈[0,1]; Limitations on edge server storage resources: Limitations on edge server computing resources: Restrictions on uninstallation decision variables and service placement decision variables: x i ≤y i ; Where, σ i represents the service reuse rate, λ i represents the service request volume, x i represents the task offloading decision variable, which means the proportion of the i-th type of request processed by the edge server, y i represents the decision variable for service placement, where y i =1 means that the i-th type of service is placed on the edge server, y i =0 means that the i-th type of service has not been placed on the edge server, c i represents the storage resources required for the i-th type of service, μ i represents the computing resources required to process the corresponding requests of the i-th service, γ i represents the computing resources required to multiplex the computation for processing the corresponding requests of the i-th service, C represents the total storage resources that the edge server can provide, R represents the total computing resources that the edge server can provide, k represents the total number of service types, X is the task offloading decision variable, and Y is the service placement decision variable; (3) The edge server solves the optimization problem. For service placement, the edge server attempts to select a service for placement in each iteration. That is, after the placement of such a service, the number of requests that can be processed in this iteration is maximized. Then, the edge server selects another service from the remaining services in turn. The above operation is repeated until the stopping condition is reached and the service placement plan is obtained. (4) After determining the placement plan, the edge server allocates the best resources to the various services placed on the edge server based on its own computing resources and storage resources, determines the computing mode corresponding to the requests of each service, and establishes the optimal task offloading plan.
2. The method according to claim 1, characterized in that In step (1), the reuse rate corresponding to each type of service is obtained by the following method: the cloud server performs model calculation on the requests corresponding to each type of service, and after obtaining the calculation results of the requests corresponding to each type of service, it caches them. When a similar request arrives next time, it first performs a similarity comparison with the results stored in the cache. If the similarity is greater than a set threshold, the result of the new task is directly returned through the result in the cache. If the similarity is less than the set threshold, the result of the request is calculated through the model; After the system stabilizes, the reuse rate of tasks corresponding to each type of request is obtained. The reuse rate is the ratio of the number of requests processed by calculating reuse in each type of request to the total number of requests processed during the convergence period.
3. The method according to claim 1, characterized in that In step (1), the edge server collects parameters corresponding to various services, including: based on the number of requests arriving at the service within a specified time, the edge server counts the storage resources required for the service called by each request, the computing resources required to process the request volume, the reuse rate of the called service, and the computing resource overhead required for reuse.
4. The method according to claim 1, wherein Solving the optimization problem includes: For each fixed service placement scheme, assume that the placed services are H1, H2, H3…, H l , l≤k, then the optimization problem becomes: Constraints: (1) (2)x i ∈[0,1] Transform constraint (1) into: The transformed problem is a linear programming problem, and its corresponding optimal solution X is found. * , that is, for a fixed service placement scheme, its corresponding task offloading strategy can be obtained. Then the problem becomes how to solve a better service placement scheme so that its corresponding objective function can be maximized. That is, the original problem is transformed into: The constraints are: y i ∈{0,1} This is an NP-hard problem. The edge server adopts a greedy approach to solve the problem in sequence, that is, selecting services for placement and determining the service placement plan.
5. The method according to claim 4, characterized in that The greedy approach to solving the problem sequentially includes: first, selecting a service from the unplaced services for placement. The selected service should maximize the growth in the total number of requests that the system can handle, that is, the fastest growth in the optimal solution to the converted optimization problem. This method is used to determine the services to be placed in this round. Next, the same method is used to sequentially select services from the unplaced services for placement. Each placement should not only increase the amount of tasks that can be processed, but also maximize the corresponding increment. Services are selected for placement continuously until the placed service reaches the computing power or storage capacity of the edge server or the number of requests processed can no longer increase.
6. The method according to claim 1, characterized in that The step (4) comprises: According to the obtained service placement plan, a final task offloading plan is determined. The task offloading plan determines which requests are to be delivered to the cloud server for calculation and which requests are to be delivered to the edge server for calculation.
7. A service placement and task offloading system based on computing reuse in an edge environment, the system consists of an edge server, a cloud server, and multiple user devices distributed around the edge server, characterized in that: The user device is responsible for generating task requests, and the edge server and cloud server are responsible for processing the requests generated by the device. The cloud server is responsible for the initial preprocessing of the device task to obtain the reuse rate, and the edge server is responsible for service selection and placement. The service selection and placement are carried out according to the service placement and task offloading method based on computing reuse in the edge environment described in any one of claims 1-6.
Citation Information
Patent Citations
Task unloading and service caching joint optimization method based on edge collaboration
CN115297013A
Multi-agent task unloading and resource scheduling joint optimization method
CN115665859A