Task unloading method and device, product, equipment and medium
By using heterogeneous computing resources and utility models to optimize task offloading strategies in edge computing, the problem that the CPU computing architecture cannot meet high-performance parallel computing is solved, and the task processing with low latency and low energy consumption is achieved, which improves the user and edge servers Experience.
Patent Information
- Application Number
- CN202411505672.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2024-11-26
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In edge computing, traditional CPU-based computing architectures cannot fully meet the needs of high-performance parallel computing, resulting in large processing delays and high energy consumption.
By obtaining the task unloading request of the terminal device and using heterogeneous computing resources to process tasks on the edge server, combining the user utility model and the edge server benefit model, optimizing the task unloading strategy, and selecting the edge server with the lowest utility value and the highest benefit value for tasks Processing, adjust resource allocation for load balancing.
It effectively reduces processing delay and energy consumption, improves user experience and edge server vendors' experience, and ensures task processing efficiency and resource utilization.
Smart Images

Figure CN119025186A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of edge computing, and in particular to a method, device, product, equipment and medium for task offloading. Background Art
[0002] With the emergence of more and more computing-intensive and latency-sensitive applications, such as augmented reality, driverless driving, and cloud gaming, users have put forward higher requirements for low latency, high bandwidth, and low energy consumption. Mobile edge computing deploys computing resources and storage resources to the edge to process computing tasks, solving many problems such as high resource utilization and large task processing delays when computing tasks are processed in the cloud.
[0003] In edge computing, edge servers are generally deployed at the edge and central processing unit (CPU) resources are used to process tasks. However, the traditional CPU-based computing architecture cannot fully meet the needs of high-performance parallel computing, resulting in large processing delays and high energy consumption.
[0004] It can be seen that improving a new way to offload tasks to edge servers is a technical problem that people in this field need to solve urgently. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, product, equipment and medium for task offloading to solve the technical problem that the traditional CPU-based computing architecture cannot fully meet the needs of high-performance parallel computing in edge computing, resulting in large processing delays and high energy consumption.
[0006] In order to solve the above technical problems, the present invention provides a method for task offloading, comprising: An edge server is obtained to execute a task to be unloaded by a terminal device and a task unloading request is obtained from at least one terminal device; wherein at least one heterogeneous computing resource in the edge server is to execute the task to be unloaded by the terminal device; A user uninstallation preference list is obtained according to a pre-established user utility model, and a target edge server is obtained; wherein the user utility model is a model used to characterize the utility of a terminal device when processing an uninstallation task on an edge server; the user uninstallation preference list includes utility values when a user uses different edge servers to process an uninstallation task; the target edge server is an edge server determined according to the ranking of utility values in the user uninstallation preference list; when it is detected that the resources of the target edge server meet the preset resource requirements, the target edge server is controlled to receive and respond to a request sent by a terminal device for characterizing an uninstallation task; When it is detected that the resources of the target edge server do not meet the preset resource requirements, the benefit value of the target edge server when processing the offloading tasks of each terminal device is obtained according to a pre-established edge server benefit model, the offloading tasks of the target terminal device are eliminated according to the ranking of the benefit values, and the detection is returned to see whether the resources of the target edge server meet the preset resource requirements; wherein the edge server benefit model is a model used to characterize the benefits obtained when the edge server processes the offloading tasks.
[0007] On the one hand, the user utility model is established according to the energy consumption on the terminal device during task offloading, the task offloading delay, and the cost of offloading the task to the edge server, including: Obtaining a first product of a time delay for a terminal device to upload a task to a central processing unit server, a pre-allocated channel bandwidth of the terminal device, and a cost value per unit time and per unit bandwidth; The user utility model is established based on the energy consumption on the terminal device when the task is unloaded, the task unloading delay, the total cost of all heterogeneous computing resources that execute the task unloaded by the terminal device when the task is unloaded to the edge server, and the first sum of the first product.
[0008] On the other hand, establishing the edge server benefit model according to the cost of the terminal device offloading the task to the edge server and the energy consumption cost of the edge server when processing the offloaded task includes: Obtain a second sum result of the sum of the first products corresponding to all terminal devices and the total cost of all heterogeneous computing resources that perform the tasks unloaded by the terminal devices when all terminal devices unload the tasks to the corresponding edge servers; The edge server benefit model is established according to the difference between the second summation result and the energy consumption cost of the edge server when processing the offload task.
[0009] On the other hand, the total cost of all heterogeneous computing resources that perform tasks offloaded by the terminal device when offloading the tasks to the corresponding edge server includes: Obtaining a third sum result of the total cost of computing power resources and the total cost of memory resources of all heterogeneous computing resources that perform the task offloaded by the terminal device when the task is offloaded to the corresponding edge server; The third sum is used as the total cost of all heterogeneous computing resources that execute the task offloaded from the terminal device.
[0010] On the other hand, before obtaining the user uninstall preference list according to the pre-established user utility model, the method further includes: Determine whether the parameters during task offloading meet the corresponding preset parameter requirements; wherein the parameters during task offloading at least include the task offloading delay, the cost of offloading the task to the edge server, the pre-allocated channel bandwidth of the terminal device, and the task to be completely offloaded to a heterogeneous computing resource or the value of the parameter used to characterize the situation where the task is offloaded to the heterogeneous computing resource is within a preset range; If yes, proceed to the step of obtaining the user uninstall preference list according to the pre-established user utility model.
[0011] On the other hand, the parameter of the task unloading is the task unloading delay, and the preset parameter requirement satisfied by the task unloading delay is: the task unloading delay is less than or equal to the preset maximum processing delay; wherein the preset maximum processing delay is the maximum value of all preset processing delays; The parameter for task offloading is the cost of offloading the task to the edge server, and the cost of offloading the task to the edge server satisfies the preset parameter requirement that the total cost of all heterogeneous computing resources that execute the task offloaded by the terminal device is less than or equal to the preset maximum cost; wherein the preset maximum cost is the maximum value of all preset costs; The parameter for task unloading is the channel bandwidth of the pre-allocated terminal device, and the preset parameter requirement satisfied by the channel bandwidth of the pre-allocated terminal device is: the channel bandwidth of the pre-allocated terminal device is less than or equal to the preset minimum transmission bandwidth requirement; wherein the preset minimum transmission bandwidth requirement is the minimum value of all preset transmission bandwidth requirements.
[0012] On the other hand, the target edge server is the edge server corresponding to the smallest utility value among all utility values recorded in the user uninstall preference list; Detecting whether the resources of the target edge server meet the preset resource requirements includes: If it is detected that the sum of the pre-allocated channel bandwidths of all terminal devices is less than or equal to the maximum bandwidth resources provided by the base station, the computing power resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers are less than or equal to the computing power resources of the pre-configured heterogeneous computing resources, and the memory resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers are less than or equal to the memory resources of the pre-configured heterogeneous computing resources, and if the value of the parameter used to characterize the situation of offloading tasks to heterogeneous computing resources is a preset value, there are resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers, then it is determined that the resources of the target edge server meet the preset resource requirements; Otherwise, it is determined that the resources of the target edge server do not meet the preset resource requirement.
[0013] On the other hand, the target terminal device is a terminal device corresponding to the smallest benefit value among all benefit values; after eliminating the uninstallation task of the target terminal device according to the ranking of the benefit value, before returning to detect whether the resources of the target edge server meet the preset resource requirements, it also includes: The task offloading request of the terminal device corresponding to the minimum benefit value is stored in a first set, and the target edge server is used as an element in the set of non-uninstallable edge servers corresponding to the terminal device when the benefit value is minimum; wherein the elements in the first set are the task offloading requests of the terminal device that are eliminated.
[0014] On the other hand, after returning to detect whether the resources of the target edge server meet the preset resource requirements, if it is detected that the resources of the target edge server meet the preset resource requirements, then after controlling the target edge server to receive the request sent by the terminal device for characterizing the offloading task, it also includes: The non-uninstallable edge server set of the terminal device is updated, and the request for representing the unloading task sent by the terminal device and received by the target edge server is removed from the first set, so as to update the first set.
[0015] On the other hand, after controlling all the target edge servers to receive the request for characterizing the offloading task sent by the terminal device, and before controlling the target edge server to respond to the request for characterizing the offloading task sent by the terminal device, the method further includes: Obtaining a load balancing value for characterizing a load balancing situation of the target edge server; Determine whether the load balancing value of the target edge server is greater than a load balancing threshold; If not, output the unloading strategy corresponding to the task; wherein the unloading strategy includes the value of the parameter used to characterize the situation of unloading the task to the heterogeneous computing resources, the computing power resources of the heterogeneous computing resources allocated to the terminal device by each of the target edge servers, and the memory resources of the heterogeneous computing resources allocated to the terminal device by each of the target edge servers; If yes, then adjust the edge server to which the task is to be offloaded, and return to the step of obtaining the load balancing value used to characterize the load balancing situation of the target edge server; The controlling the target edge server to respond to the request sent by the terminal device for representing the offloading task includes: The target edge server is controlled to respond to a request for representing the offloading task sent by the terminal device according to the offloading policy corresponding to the output task.
[0016] On the other hand, before the output task corresponding to the uninstallation strategy, it also includes: Determine whether the first set is an empty set; If yes, then enter the step of outputting the uninstallation strategy corresponding to the task; If not, return to the step of determining whether the parameters during task offloading meet the corresponding preset parameter requirements.
[0017] On the other hand, the edge server to which the adjustment task is to be offloaded includes: Obtain the edge server with the highest resource utilization rate from all edge servers and remove the request for offloading task with the smallest server benefit value on the edge server with the highest resource utilization rate; A request for removing the offload task with the smallest benefit value is sent to the edge server with the lowest resource occupancy rate among all edge servers, and the process returns to the step of obtaining the load balancing value for characterizing the load balancing situation of the target edge server.
[0018] On the other hand, after sending the request for removing the offloading task with the smallest benefit value to the edge server with the lowest resource occupancy rate among all edge servers, the method further includes: The request of the offload task with the smallest benefit value is used as an element in the user request set used to characterize forwarding; Determining whether the user request set used to characterize forwarding is an empty set; If yes, proceed to the step of determining whether the first set is an empty set; If not, when it is detected that the parameters when the task is unloaded in the new unloading strategy meet the corresponding preset parameter requirements, the task unloading strategy of the terminal device is updated and the request sent by the terminal device for characterizing the unloaded task is removed from the user request set for characterizing forwarding, and the step of determining whether the user request set for characterizing forwarding is an empty set is returned; when it is detected that the parameters when the task is unloaded in the new unloading strategy do not meet the corresponding preset parameter requirements, the request for characterizing the unloaded task is added to the first set, and the request for characterizing the unloaded task is removed from the user request set for characterizing forwarding, and the step of determining whether the user request set for characterizing forwarding is an empty set is returned.
[0019] On the other hand, the obtaining of a load balancing value for characterizing a load balancing situation of the target edge server includes: Obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and the number of the edge servers; wherein all heterogeneous computing resources include computing power resources and memory resources; Determine a mean value of resource utilization of all heterogeneous computing resources of all edge servers according to the overall average occupancy of all heterogeneous computing resources of all edge servers and the number of edge servers; Determine the variance of the overall resource occupancy of all edge servers according to the overall average occupancy of all heterogeneous computing resources of each edge server and the mean; The variance is used as a load balancing value for characterizing the load balancing condition of the target edge server; wherein, a smaller variance indicates a smaller fluctuation in resource occupancy of the server.
[0020] On the other hand, before obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and obtaining the number of edge servers, the method further includes: If it is detected that the resources of the edge server meet the preset resource requirement, the step of obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and obtaining the number of the edge servers is entered.
[0021] On the other hand, before storing the task offloading request of the terminal device corresponding to the minimum benefit value in the first set, the method further includes: Determine whether it is the first time to process the task offloading request of the terminal device; If so, the first set, the set of non-unloadable edge servers controlling the terminal device, and the set of user requests used to characterize forwarding are all empty sets.
[0022] In order to solve the above technical problems, the present invention further provides a task offloading device, comprising: A first acquisition module is used to acquire an edge server for executing tasks to be unloaded by a terminal device and to acquire a task unloading request sent by at least one terminal device; wherein at least one heterogeneous computing resource in the edge server is to execute tasks to be unloaded by the terminal device; The second acquisition module is used to acquire a user uninstallation preference list according to a pre-established user utility model, and acquire a target edge server; wherein the user utility model is a model used to characterize the utility of a terminal device when processing an uninstallation task on an edge server; the user uninstallation preference list includes utility values when the user uses different edge servers to process an uninstallation task; the target edge server is the edge server corresponding to the minimum utility value among all utility values recorded in the user uninstallation preference list; A judgment module, used to judge whether the resources of the target edge server meet the preset resource requirements; if so, trigger the control module; if not, trigger the acquisition and elimination module; The control module is used to control the target edge server to receive and respond to the request sent by the terminal device for representing the offloading task; The acquisition and elimination module is used to obtain the benefit value of the target edge server when processing the unloading tasks of each terminal device according to a pre-established edge server benefit model, eliminate the unloading tasks of the target terminal device according to the ranking of the benefit values, and return to trigger the judgment module; wherein the edge server benefit model is a model used to characterize the benefits obtained when the edge server processes the unloading tasks.
[0023] In order to solve the above technical problem, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above task offloading method when executed by a processor.
[0024] In order to solve the above technical problems, the present invention further provides a task offloading device, comprising: Memory for storing computer programs; A processor is used to implement the steps of the above-mentioned task offloading method when executing the computer program.
[0025] In order to solve the above technical problem, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned task offloading method are implemented.
[0026] The beneficial effects of the present invention are as follows: firstly, compared with deploying edge servers at the edge and using CPU resources for task processing, in the method provided by the present invention, when performing task unloading, at least one heterogeneous computing resource in the edge server is used to execute the task unloaded by the terminal device, thereby realizing the need for parallel computing and effectively reducing processing delay and power consumption; secondly, a user unloading preference list is obtained through a user utility model, and a target edge server is determined according to the ranking of utility values, that is, when determining the target edge server, the user's utility value is taken into consideration, thereby improving the user experience; when the resources of the target edge server do not meet the preset resource requirements, the unloading tasks of the target terminal device are eliminated based on the ranking of the benefit values determined by the edge server benefit model, thereby ensuring that the target edge server can process the tasks unloaded by the terminal device assigned thereto, and taking into consideration the benefits of the target edge server, thereby improving the experience of the edge server supplier.
[0027] In addition, a user utility model is established based on the first sum of the energy consumption on the terminal device when the task is unloaded, the task unloading delay, the total cost of all heterogeneous computing resources that execute the task unloaded by the terminal device when the task is unloaded to the edge server, and the first product (the product of the delay of the terminal device uploading the task to the central processor server, the pre-allocated channel bandwidth of the terminal device and the cost value of the unit bandwidth per unit time). Based on energy consumption, delay, total cost of heterogeneous computing resources, channel bandwidth and cost of channel bandwidth, the accuracy of the established user utility model is guaranteed.
[0028] In the process of establishing the edge server benefit model, the third sum of the total cost of computing power resources and the total cost of memory resources of all heterogeneous computing resources that perform the task unloaded by the terminal device when the task is unloaded to the corresponding edge server is obtained; the third sum is used as the total cost of all heterogeneous computing resources that perform the task unloaded by the terminal device. That is, the costs of different resources (computing power resources and memory resources) of heterogeneous computing resources are fully considered, ensuring the accuracy of the established edge server benefit model.
[0029] The target edge server is the edge server with the smallest utility value among all the utility values recorded in the user's uninstall preference list. For terminal devices, processing the unloaded tasks on the target edge server effectively reduces the user's overhead and improves the user's experience when the terminal device unloads tasks; when the target terminal device is the terminal device corresponding to the smallest benefit value among all the benefit values, the target terminal device is eliminated, which effectively guarantees the benefits of the target edge server when processing the tasks unloaded by the terminal device and improves the experience of the edge server supplier.
[0030] First, determine whether the parameters of the task during offloading meet the corresponding preset parameter requirements. When the preset requirements are met, obtain the user's offloading preference list according to the pre-established user utility model. The parameters of the task during offloading include at least the task offloading delay, the cost of offloading the task to the edge server, the pre-allocated channel bandwidth of the terminal device, and the task to be completely offloaded to a heterogeneous computing resource or the parameter used to characterize the situation of offloading the task to the heterogeneous computing resource. The value is within the preset range, ensuring that the user's needs can be met when offloading the task.
[0031] By storing the task offloading request of the terminal device corresponding to the minimum benefit value in the first set, and taking the target edge server as an element in the non-unloadable edge server set of the terminal device corresponding to the minimum benefit value, it is ensured that the task offloading situation can be understood; and the non-unloadable edge server set of the terminal device and the request for characterizing the offloading task sent by the terminal device received by the target edge server are updated from the first set to update the first set, thereby ensuring that the elements in the set can accurately reflect the task offloading situation.
[0032] After controlling all target edge servers to receive requests sent by terminal devices for representing unloading tasks, and before controlling the target edge servers to respond to requests sent by terminal devices for representing unloading tasks, the edge servers to which the tasks are to be unloaded are adjusted according to the load balancing value of the target edge servers, thereby ensuring the load balancing of the edge servers and realizing the perspective of the utility of user terminal devices (mobile devices), the benefit of edge servers, and finally the load balancing of edge servers, so that the terminal devices (users) and edge servers, as the two parties in the game, continuously change their unloading strategies or resource allocation strategies through three stages to adapt to the strategies of the other party, and finally achieve a balance between the two and the overall optimal utility.
[0033] In addition, the present invention also provides a task offloading device, a computer program product, a task offloading equipment and a non-volatile storage medium, which have the same or corresponding technical features as the task offloading method described above and have the same effects as above. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A schematic diagram of a novel distributed heterogeneous computing architecture system based on FPGA+GPU provided by an embodiment of the present invention; Figure 2 A flowchart of a method for task offloading provided by an embodiment of the present invention; Figure 3 A flowchart of a three-stage game method provided by an embodiment of the present invention; Figure 4 A structural diagram of a task offloading device provided by another embodiment of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The core of the present invention is to provide a method, device, product, equipment and medium for task offloading to solve the technical problem that the traditional CPU-based computing architecture cannot fully meet the needs of high-performance parallel computing in edge computing, resulting in large processing delays and high energy consumption.
[0038] In order to enable personnel in this technical field to better understand the scheme of the present invention, the system architecture of the present invention is first described below by taking the heterogeneous computing resources included in the edge computing device as a field programmable gate array (FPGA) and a graphics processing unit (GPU) as an example. Figure 1 A schematic diagram of a novel distributed heterogeneous computing architecture system based on FPGA+GPU provided by an embodiment of the present invention, such as Figure 1 As shown, the application scenario is a single base station based on a cell network. The entire system is mainly divided into: user-side mobile device 1, base station 2, central processor edge server 3, and edge server 4 including field programmable gate array and graphics processor. The central processor edge server 3 and the edge server 4 including field programmable gate array and graphics processor constitute the edge cloud. It is assumed that the computing tasks of the user-side mobile device 1 can only be completely offloaded to the edge server (not considering local computing). The central processor edge server 3 is mainly responsible for forwarding, forwarding the computing tasks to the edge server 4 including field programmable gate array and graphics processor, and forwarding the results back to the user-side mobile device 1. The edge server 4 including field programmable gate array and graphics processor (FPGA+GPU) is responsible for processing the offloaded tasks. In this multi-user, multi-edge server scenario, multiple user-side mobile devices 1 generate computing tasks at the same time, and according to certain offloading strategies and resource allocation strategies, these tasks are offloaded to the edge server 4 including field programmable gate array and graphics processor for processing.
[0039] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Figure 2 A flowchart of a method for task offloading provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the method includes: S10: Obtain an edge server for a task to be executed by a terminal device and obtain a task offloading request sent by at least one terminal device; Wherein, at least one heterogeneous computing resource in the edge server is to perform a task offloaded by the terminal device; S11: Obtain a user uninstallation preference list according to a pre-established user utility model, and obtain a target edge server; S12: Determine whether the resources of the target edge server meet the preset resource requirements; if so, proceed to step S13; if not, proceed to step S14; S13: Control the target edge server to receive and respond to the request sent by the terminal device for representing the offloading task; S14: Obtain the benefit value of the target edge server when processing the offloading tasks of each terminal device according to the pre-established edge server benefit model, eliminate the offloading tasks of the target terminal device according to the ranking of the benefit values, and return to step S12.
[0040] The edge server benefit model is a model used to characterize the benefits obtained by the edge server when processing offload tasks. The edge server benefit model is determined by the cost of the terminal device offloading tasks to the edge server and the energy consumption cost of the edge server when processing the offload tasks.
[0041] There is no limitation on the number of edge servers for tasks to be offloaded from terminal devices, the number of terminal devices that send task offloading requests, the type and number of heterogeneous computing resources in edge servers for tasks to be offloaded from terminal devices, etc., and they are determined based on actual conditions.
[0042] The user utility model is a model used to characterize the utility of a terminal device when processing an offload task on an edge server. The user utility model is determined by at least the energy consumption on the terminal device when the task is offloaded, the task offloading delay, and the cost of offloading the task to the edge server. Specifically, after determining the target edge server, it is determined that the resources of the target edge server meet the preset resource requirements, and the user utility model is established according to the energy consumption on the terminal device when the task is offloaded, the task offloading delay, and the cost of offloading the task to the edge server, including: Obtaining a first product of a time delay for a terminal device to upload a task to a central processing unit server, a pre-allocated channel bandwidth of the terminal device, and a cost value per unit time and per unit bandwidth; A user utility model is established based on the energy consumption on the terminal device during task offloading, the task offloading delay, the total cost of all heterogeneous computing resources executing the task offloaded by the terminal device when the task is offloaded to the edge server, and the first sum of the first product.
[0043] The user uninstallation preference list includes the utility values when the user uses different edge servers to process the uninstallation task; the target edge server is the edge server determined according to the ranking of the utility values in the user uninstallation preference list. In order to ensure the user's utility value, in implementation, the target edge server is the edge server corresponding to the smallest utility value among all the utility values recorded in the user uninstallation preference list.
[0044] It is worth noting that in order to fully consider user needs and edge server conditions when offloading tasks, in implementation, before obtaining the user offloading preference list according to the pre-established user utility model, it also includes: Determine whether the parameters during task offloading meet the corresponding preset parameter requirements; wherein the parameters during task offloading at least include the task offloading delay, the cost of offloading the task to the edge server, the pre-allocated channel bandwidth of the terminal device, and the task to be completely offloaded to a heterogeneous computing resource or the parameter used to characterize the situation where the task is offloaded to the heterogeneous computing resource. The value of the parameter is within a preset range; If yes, the process proceeds to the step of obtaining the user uninstall preference list according to the pre-established user utility model.
[0045] When the parameter of task unloading is task unloading delay, the preset parameter requirement satisfied by the task unloading delay is: the task unloading delay is less than or equal to the preset maximum processing delay; wherein the preset maximum processing delay is the maximum value of all preset processing delays; The parameter for task offloading is the cost of offloading the task to the edge server. The cost of offloading the task to the edge server satisfies the preset parameter requirement that the total cost of all heterogeneous computing resources that perform the task offloaded by the terminal device is less than or equal to the preset maximum cost; wherein the preset maximum cost is the maximum value of all preset costs; The parameter during task offloading is the pre-allocated channel bandwidth of the terminal device. The pre-allocated channel bandwidth of the terminal device satisfies the preset parameter requirement: the pre-allocated channel bandwidth of the terminal device is less than or equal to the preset minimum transmission bandwidth requirement; wherein the preset minimum transmission bandwidth requirement is the minimum value of all preset transmission bandwidth requirements.
[0046] In implementation, in order to ensure the user's utility value, the target edge server is the edge server corresponding to the minimum utility value among all the utility values recorded in the user's uninstall preference list. After the user utility model is established and the target edge server is determined, it is determined whether the resources of the target edge server meet the preset resource requirements. Specifically, detecting whether the resources of the target edge server meet the preset resource requirements includes: If it is detected that the sum of the pre-allocated channel bandwidths of all terminal devices is less than or equal to the maximum bandwidth resources provided by the base station, the computing power resources of the heterogeneous computing resources allocated to the terminal devices by each target edge server are less than or equal to the computing power resources of the pre-configured heterogeneous computing resources, and the memory resources of the heterogeneous computing resources allocated to the terminal devices by each target edge server are less than or equal to the memory resources of the pre-configured heterogeneous computing resources, and if the value of the parameter used to characterize the situation of offloading tasks to heterogeneous computing resources is a preset value, there are resources of the heterogeneous computing resources allocated to the terminal devices by each target edge server, then it is determined that the resources of the target edge server meet the preset resource requirements; Otherwise, it is determined that the resources of the target edge server do not meet the preset resource requirements.
[0047] If it is determined that the resources of the target edge server meet the preset resource requirements, the target edge server is controlled to receive and respond to the request sent by the terminal device to represent the offloading task; if it is determined that the resources of the target edge server do not meet the preset resource requirements, the benefit value of the offloading task of each terminal device to be processed by the target edge server is obtained according to the pre-established edge server benefit model, and the offloading task of the terminal device corresponding to the smallest benefit value is eliminated from all benefit values.
[0048] When establishing an edge server benefit model based on the cost of offloading tasks from the terminal device to the edge server and the energy consumption cost of the edge server when processing the offloaded tasks, obtaining a second sum of the sum of the first products corresponding to all terminal devices and the total cost of all heterogeneous computing resources that perform the tasks offloaded by the terminal devices when all terminal devices offload tasks to the corresponding edge servers; An edge server benefit model is established according to the difference between the second summation result and the energy consumption overhead of the edge server when processing the offload task.
[0049] The total cost of all heterogeneous computing resources that perform tasks offloaded by the terminal device when offloading the tasks to the corresponding edge server includes: Obtaining a third sum result of the total cost of computing power resources and the total cost of memory resources of all heterogeneous computing resources that perform the task offloaded by the terminal device when the task is offloaded to the corresponding edge server; The third sum result is used as the total cost of all heterogeneous computing resources that perform the task offloaded from the terminal device.
[0050] In order to ensure the benefits of server manufacturers, in implementation, the target terminal devices to be eliminated are the terminal devices corresponding to the smallest benefit value among all benefit values. In order to enable users to understand the progress of task offloading, after eliminating the offloading tasks of the target terminal devices according to the ranking of the benefit values, before returning to detect whether the resources of the target edge server meet the preset resource requirements, it also includes: The task offloading request of the terminal device corresponding to the minimum benefit value is stored in the first set, and the target edge server is used as an element in the set of non-uninstallable edge servers corresponding to the terminal device when the benefit value is minimum; wherein the elements in the first set are the task offloading requests of the terminal device that are eliminated.
[0051] In order to ensure that the correct content is recorded in the collection, after returning to detect whether the resources of the target edge server meet the preset resource requirements, if it is detected that the resources of the target edge server meet the preset resource requirements, after controlling the target edge server to receive the request sent by the terminal device for representing the offloading task, it also includes: The set of edge servers that cannot be uninstalled from the terminal device is updated, and the request for representing the uninstallation task sent by the terminal device and received by the target edge server is removed from the first set, so as to update the first set.
[0052] In order to enable those skilled in the art to better understand the above-mentioned user utility model and edge server benefit model, the process of establishing the user utility model and the edge server benefit model is described below in conjunction with specific formulas.
[0053] Still taking the FPGA+GPU edge computing environment as an example, assume that there are N users, corresponding to N mobile devices, and each mobile device generates a corresponding computing task, represented as a set , the attributes of each task are represented by a tuple as Table 1 shows the specific parameter meanings.
[0054] Table 1
[0055] On the edge server side, there are M FPGA+GPU edge servers (denoted as ), each edge server X FPGA accelerator cards with different computing power levels are configured on the ) and Y GPU accelerator cards (denoted as ),in Indicates the FPGA computing resources that the corresponding accelerator card can provide. Indicates the GPU computing resources that the corresponding accelerator card can provide. Indicates the memory resources that the corresponding FPGA accelerator card can provide. Indicates the memory resources that the corresponding GPU accelerator card can provide.
[0056] Then the computing task offloading strategy of the mobile device is expressed as and ,when , indicating that the task is not offloaded to The server's On an FPGA accelerator card, , indicating that the task is offloaded to The server's On an FPGA accelerator card, similarly, Indicates that the task is not offloaded (or unloaded) to The server's GPU accelerator card.
[0057] The task offloading process of the mobile device needs to be transmitted to the CPU control server through the wireless channel, and then the CPU server forwards the computing task to the FPGA+GPU edge server for processing. Because the FPGA+GPU edge server is deployed next to the CPU server, in this scenario, compared with the transmission process and delay from the device to the CPU server, the transmission between the CPU server and the FPGA+GPU edge server can be ignored. Then according to the Shannon formula, the data transmission rate of the mobile device transmitting the task to the CPU server is expressed as: ; (1) in The channel bandwidth allocated to the mobile device after it accesses the base station. In this scenario, we will Set the scheduling strategy of the edge server to provide bandwidth resources for mobile devices as a variable, satisfying (That is, the total bandwidth resources of each mobile device does not exceed the maximum bandwidth resources that the base station can provide ), is the transmission power of the mobile device, is the wireless channel gain, which is related to the distance between the mobile device and the base station. is the Gaussian white noise in task transmission.
[0058] (1) Task offloading delay.
[0059] The mobile device offloads the computing task to the FPGA+GPU edge server for processing, which mainly includes the following delays: the delay of sending the computing task from the mobile device to the CPU edge server, and then the delay of sending the computing task from the CPU edge server to the FPGA+GPU edge server, the task processing delay on the FPGA+GPU edge server, and the delay of returning the task processing result from the FPGA+GPU edge server to the mobile device via the CPU server. In contrast, the FPGA+GPU edge server is deployed on the CPU server side, the distance is very close, and the data transmission process between the two types of servers can be ignored; in addition, the amount of processed result data is very small, and compared with the process of uploading the computing task, the delay of returning the processing result is negligible. Therefore, the task offloading delay of the mobile device is expressed as: ; (2) in The latency of uploading tasks from mobile devices to CPU servers. is the total latency of computing tasks in the FPGA+GPU edge server. The latency of computing tasks processed by FPGA accelerator cards in FPGA+GPU edge servers. The latency of computing tasks processed by GPU accelerator cards in FPGA+GPU edge servers. FPGA resources allocated to mobile devices by FPGA+GPU edge servers, The GPU resources of the mobile device are allocated to the FPGA+GPU edge server, and the computing tasks can only be offloaded to a certain FPGA or GPU accelerator card.
[0060] (2) Energy consumption of task offloading on mobile devices. Then the energy consumption generated by the mobile device uploading the task to the CPU edge server is for: ; (3) (3) Resource pricing and charging.
[0061] A variety of resources are introduced, including FPGA computing resources, GPU computing resources, FPGA memory resources, GPU memory resources, and bandwidth. Assume that the edge server provider prices the FPGA resources, GPU resources, memory, and bandwidth on a certain edge server as follows: The charging standard for unit FPGA computing resources per unit time is The charging standard for unit GPU computing resources per unit time is The charge standard per unit time and per unit FPGA memory is The charge per unit time and per unit GPU memory is The charging standard per unit time and per unit bandwidth is , then the cost of mobile device n offloading computing tasks to edge server m is expressed as: ; (4) in, Indicates the total cost of resources offloaded to the FPGA or GPU accelerator card. Indicates the FPGA resource cost of offloading to the FPGA for processing. Indicates the memory resource cost of offloading to the FPGA for processing, Indicates the GPU resource cost of offloading to the GPU for processing. Indicates the memory resource cost of offloading to the GPU for processing. Indicates the memory resources allocated by the FPGA accelerator card on the edge server to the mobile device. Indicates the memory resources allocated to mobile devices by the GPU accelerator card on the edge server.
[0062] (4) Energy consumption of edge servers.
[0063] Because the CPU edge server is only used for task forwarding, task calculation and processing, its energy consumption is not considered in this scenario. The energy consumption of the edge server is mainly the energy consumption of FPGA+GPU processing offload tasks. Assume is the mth edge server The power of an FPGA accelerator card when processing tasks, is the mth edge server The power consumption of a GPU accelerator card when processing tasks. Then the energy consumption of FPGA+GPU edge server m for: ; (5) For edge server providers, the electricity fee they need to pay for unit energy consumption is , then the total cost incurred is It is expressed as: ; (6) Based on the above content, when establishing the user utility model of mobile devices, in the scenario of computing task offloading of multiple users on a single base station, for the user's mobile device, under the constraints of latency, budget cost, and edge server resources, by jointly optimizing the offloading strategy and resource allocation strategy, the minimum cost is achieved in terms of task processing latency, device energy consumption, and payment of multiple computing resource costs. The user's utility model is expressed as follows: ; (7) ; ; ; ; ; ; ; ; ; ; ; ; in, to Indicates a condition.
[0064] When establishing the utility optimization model of edge servers, the goal of edge server providers is to provide services to more user mobile devices to maximize revenue. For server providers, the revenue model of all edge servers is It is expressed as follows: ; (8) .
[0065] In the task offloading method provided in this embodiment, firstly, compared with deploying an edge server at the edge end and using CPU resources to process tasks, in the method provided by the present invention, when performing task offloading, at least one heterogeneous computing resource in the edge server is used to execute the task offloaded by the terminal device, thereby realizing the need for parallel computing and effectively reducing processing delay and power consumption; secondly, a user offloading preference list is obtained through a user utility model, and a target edge server is determined according to the ranking of utility values, that is, when determining the target edge server, the user's utility value is taken into consideration, thereby improving the user experience. Specifically, when performing task offloading, a user utility model is established based on the energy consumption on the terminal device during task offloading, the task offloading delay, and the cost of offloading the task to the edge server, so that when selecting the edge server to which the task is offloaded, the edge server corresponding to the minimum utility value can be selected. For terminal devices, the user's expenses are further reduced and the user experience is improved when the terminal device performs task offloading. Thirdly, in addition to the above-mentioned user utility model, the present invention also establishes an edge server benefit model based on the cost overhead of the terminal device offloading tasks to the edge server and the energy consumption overhead of the edge server when processing the offloaded tasks, so that when it is detected that the resources of the target edge server do not meet the preset resource requirements, the offload tasks of the target terminal device are eliminated according to the ranking of the benefit values, and the target edge server can process the tasks offloaded by the terminal devices assigned to it, and the profit of the target edge server is taken into consideration, thereby improving the experience of the edge server supplier. When the target terminal device is the terminal device corresponding to the smallest benefit value among all benefit values, the target terminal device is eliminated, thereby further ensuring the profit of the target edge server and improving the experience of the edge server supplier.
[0066] In order to ensure load balancing between edge servers and avoid excessive resource occupancy of some servers and excessive resource occupancy of some servers, resulting in load imbalance, after controlling all target edge servers to receive requests sent by terminal devices for representing offloading tasks, and before controlling the target edge servers to respond to the requests sent by terminal devices for representing offloading tasks, the method further includes: Obtaining a load balancing value for characterizing a load balancing situation of a target edge server; Determine whether the load balancing value of the target edge server is greater than the load balancing threshold; If not, output the offloading strategy corresponding to the task; wherein the offloading strategy includes the value of the parameter used to characterize the situation of offloading the task to the heterogeneous computing resources, the computing power resources of the heterogeneous computing resources allocated by each target edge server to the terminal device, and the memory resources of the heterogeneous computing resources allocated by each target edge server to the terminal device; If so, the edge server to which the task is to be offloaded is adjusted, and the step of obtaining a load balancing value for characterizing the load balancing condition of the target edge server is returned; The control target edge server responds to the request sent by the terminal device for representing the offloading task including: The target edge server is controlled to respond to the request for representing the offloading task sent by the terminal device according to the offloading policy corresponding to the output task.
[0067] Before outputting the uninstallation strategy corresponding to the task, it also includes: Determine whether the first set is an empty set; If yes, then enter the step of outputting the unloading strategy corresponding to the task; If not, return to the step of determining whether the parameters during task offloading meet the corresponding preset parameter requirements.
[0068] In order to make the edge server selected for the task more appropriate, specifically, adjusting the edge server to which the task is to be offloaded includes: Obtain the edge server with the highest resource utilization rate from all edge servers and remove the request for offloading task with the smallest server benefit value on the edge server with the highest resource utilization rate; A request for removing the offload task with the smallest benefit value is sent to the edge server with the lowest resource occupancy rate among all edge servers, and the step of obtaining a load balancing value for characterizing the load balancing situation of the target edge server is returned.
[0069] After sending the request for removing the offloading task with the smallest benefit value to the edge server with the lowest resource occupancy rate among all edge servers, the method further includes: The request of the offload task with the smallest benefit value is used as an element in the user request set used to characterize forwarding; Determine whether the user request set used to characterize the forwarding is an empty set; If yes, proceed to the step of determining whether the first set is an empty set; If not, when it is detected that the parameters when the task is unloaded in the new unloading strategy meet the corresponding preset parameter requirements, the task unloading strategy of the terminal device is updated and the request sent by the terminal device for characterizing the unloaded task is removed from the user request set used to characterize forwarding, and the step of determining whether the user request set used to characterize forwarding is an empty set is returned; when it is detected that the parameters when the task is unloaded in the new unloading strategy do not meet the corresponding preset parameter requirements, the request used to characterize the unloaded task is added to the first set, and the request used to characterize the unloaded task is removed from the user request set used to characterize forwarding, and the step of determining whether the user request set used to characterize forwarding is an empty set is returned.
[0070] When obtaining a load balancing value for characterizing the load balancing situation of the target edge server, obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and obtaining the number of edge servers; wherein all heterogeneous computing resources include computing power resources and memory resources; Determine the mean value of resource utilization of all heterogeneous computing resources of all edge servers according to the overall average occupancy of all heterogeneous computing resources of all edge servers and the number of edge servers; Determine the variance of the overall resource occupancy of all edge servers according to the overall average occupancy and mean of all heterogeneous computing resources of each edge server; The variance is used as a load balancing value for characterizing the load balancing condition of the target edge server; wherein, the smaller the variance is, the smaller the fluctuation of the resource occupancy rate of the server is.
[0071] In addition, before obtaining the overall average occupancy of all heterogeneous computing resources of all edge servers and obtaining the number of edge servers, it also includes: If it is detected that the resources of the edge server meet the preset resource requirements described above, the step of obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and the number of edge servers is entered.
[0072] It is worth noting that in order to avoid the influence of the original data in the set on the set, in implementation, before storing the task offloading request of the terminal device corresponding to the minimum benefit value in the first set, it also includes: Determine whether it is the first time to process the task offloading request of the terminal device; If so, the first control set, the set of non-unloadable edge servers for the terminal device, and the set of user requests for characterizing forwarding are all empty sets.
[0073] In order to enable those skilled in the art to better understand the above-mentioned process of edge server load balancing, the process of edge server load balancing is described below with reference to a specific formula.
[0074] In order to ensure load balancing among M FPGA+GPU edge servers, we can avoid some servers having too high resource utilization and some servers having too low resource utilization, which will lead to load imbalance. , GPU resource utilization and FPGA memory resource utilization , GPU memory resource usage To measure and evaluate the resource load of edge servers, and to reflect the fluctuation of resource load between edge servers through the variance of resource occupancy rate. The smaller the variance, the smaller the fluctuation of resource occupancy rate between edge servers, and the more balanced the resource load. Then the overall average occupancy rate of FPGA resources of the mth edge server is And the overall average utilization of GPU resources It is expressed as follows: ; (9) ; (10) Then the overall average occupancy rate of FPGA+GPU resources of the mth edge server is as follows: ; (11) The average of the total resource utilization of m edge services It is expressed as follows: ; (12) The variance of the total resource utilization of m edge services It is expressed as: ; (13) In order to optimize the performance of edge servers, during the task offloading process, the load balance of each edge server should be maintained as much as possible, that is, the fluctuation of server resource occupancy rate should be minimized. According to formula (9) to formula (13), the load balancing model is expressed as follows: ; (14) ; In the method provided by the embodiment of the present invention, from the perspective of the utility of the user terminal device (mobile device), then from the perspective of the benefit of the edge server, and finally from the perspective of the load balancing of the edge server, the terminal device (user) and the edge server are made to be the two parties in the game (these processes are called three stages). The process of solving the three-stage game theory algorithm is described below.
[0075] According to the user utility model formula (7) and the edge server revenue model formula (8), users hope that the cost of resource charging is as low as possible, while the charging of computing resources directly reduces the revenue of edge server providers and affects the benefits of edge servers. Therefore, there is a certain contradiction between minimizing the user utility model and maximizing the benefits of edge servers. Therefore, the present invention proposes a three-stage game theory algorithm, which regards users and edge servers as the two parties in the game. Through three stages, users continuously change their unloading strategies or resource allocation strategies to adapt to the strategies of the other party, and finally achieve a balance between the two and the overall optimal utility under the constraints. Figure 3 A flowchart of a three-stage game method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, the method includes: S15: Initialize relevant parameters; S16: Calculating a user uninstallation preference list under a set of non-uninstallable edge servers for each user that satisfies the first constraint condition according to a calculation formula of the user's utility model; S17: Outputting the uninstallation request of each user; S18: Response to the user uninstallation request received by the edge server m; S19: Determine whether the second constraint condition is met; if not, proceed to step S20; if yes, proceed to step S23; S20: Calculate the server benefit generated by each user who sends an offloading request according to the profit model of the edge server; S21: Select the user who generates the least server benefit and reject and remove the request; S22: updating the set of rejected user requests and the set of non-unloadable edge servers for each user; S23: The edge server m accepts the received user uninstallation request; S24: Calculate the resource occupancy rate of each computing edge server and the variance value of the overall load balancing; S25: Determine whether the variance value is greater than the variance threshold; if not, proceed to step S26; if yes, proceed to step S27; S26: Determine whether the set of rejected user requests is empty; if not, return to step S16; if yes, proceed to step S33; S27: Calculate server benefits, and remove user task requests that generate the least server benefits from the edge server with the highest resource usage; S28: Send the eliminated user task requests to the edge server with the lowest resource occupancy rate, and update the forwarded user request set; S29: Determine whether the forwarded user request set is empty; if so, proceed to step S26; if not, proceed to step S30; S30: for the forwarded user request set, confirm whether the user's new uninstallation policy satisfies the first constraint condition and the set of non-uninstallable edge servers for each user; if so, proceed to step S31; if not, proceed to step S32; S31: updating the latest uninstallation policy of the user, and removing the user request from the forwarded user request set; S32: adding the user request to a set of rejected and removed user requests, and removing the user request from a set of forwarded user requests; S33: Update and output the optimal unloading strategy.
[0076] Specifically, the first constraint is , , the set of non-uninstallable edge servers for each user is , the second constraint is , , the calculation formula of the user's utility model corresponds to formula (7), the edge server's revenue model corresponds to formula (8), and the set of rejected user requests is ; Calculate the resource occupancy rate of each computing edge server and the variance value of the overall load balancing according to formula (11) and formula (14).
[0077] In the implementation, the relevant parameters are initialized and the threshold critical point of the variance is set. , the set of rejected user requests (i.e., the first set) is initialized to an empty set, and the set of non-uninstallable edge servers for each user is Initialized to an empty set, the set of forwarded user requests Initialized to an empty set.
[0078] (1) In the first stage, from the perspective of the utility of the user's mobile device, for each user's mobile device n, the user utility model formula (7) is used to calculate the utility of the mobile device n under the constraint condition , And collection The user uninstall preference list under (the list is arranged from small to large according to the utility value of formula (8)) and the corresponding resource allocation strategy.
[0079] (2) The user selects the accelerator card on the edge server with the first utility value (i.e., the smallest utility value) from the user uninstallation preference list and sends an uninstallation request to the corresponding accelerator card. All users have completed the uninstallation strategy selection.
[0080] (3) In the second stage, from the perspective of edge server benefits, according to the offloading strategy selected by the user in step (2) and the corresponding resource allocation strategy, if , If the constraint condition is not met (i.e., not exceeding the maximum computing resources that the accelerator card can provide), the received user offloading request is accepted; if it is not met , If the constraint condition is exceeded (i.e., the maximum computing resources that the accelerator card can provide are exceeded), the server benefit generated by each user who sends an offload request is calculated according to formula (8), and the user with the smallest server benefit is selected to reject and remove the request. If the condition is still not satisfied after removal, , If the constraint condition is met, the request will continue to be rejected and removed in the above manner until it is satisfied. , Complete the second phase of operations for all edge servers and update the set of rejected user requests and a set of non-uninstallable edge servers for each user .
[0081] (4) In the third stage, from the perspective of edge server load balancing, the resource occupancy rate and overall load balancing of each computing edge server are calculated according to formula (11) and formula (14), and the threshold critical point of the variance is set. :1) If satisfied , then the edge server with the highest resource utilization rate will be relieved of user task offloading. The task elimination method calculates the server benefit generated by each user request in step (3), selects the user with the smallest server benefit to reject and eliminate the request, and sends the task to the edge server with the lowest resource utilization rate, and updates the forwarded user request set (i.e., it is forwarded to the edge server with the lowest resource occupancy rate), and then the resource occupancy rate and overall load balancing of each computing edge server are repeatedly calculated according to formula (11) and formula (14), and step (4) is repeated until the variance is within the threshold range, that is, 2) If , indicating that the edge server load balancing is good, then execute step (6).
[0082] (5) The set of user requests forwarded in step (4) , according to the user utility model formula (7), calculate whether the new offloading strategy of each forwarded user request meets the constraint condition , And collection If satisfied, update the latest uninstall policy of the user and send the user request to If the request is not satisfied, the user request is added to the rejected user request set. , and the user request is placed in Remove from the collection. becomes an empty set.
[0083] (6) Set of rejected user requests , each user has a set of non-uninstallable edge servers , execute steps (1) and (2) while satisfying the set ,gather Each user in the set has completed the selection of the uninstallation strategy and sent an uninstallation request to the corresponding accelerator card. Repeat steps (3), (4) and (5) to update the latest uninstallation strategy of the user for the accepted user request and remove the user request from the set Eliminate until the collection It is an empty set, that is, all users' requests are accepted by the edge server.
[0084] (7) Finally output the optimal unloading strategy , , , , and .
[0085] In the method provided by the embodiment of the present invention, in a multi-user, multi-edge server application scenario, the present invention introduces a new edge server with multiple heterogeneous computing resources of FPGA and GPU, and designs a new mode of high-performance FPGA+GPU with parallel computing to collaboratively process edge computing tasks, which effectively reduces processing delay and power consumption; on this basis, a fine-grained segmentation mechanism of computing resources is proposed, including FPGA computing power resources, GPU computing power resources, FPGA memory resources, GPU memory resources and bandwidth resources, and an allocation and scheduling model of multi-dimensional computing resources is established; based on evaluation indicators such as delay, energy consumption, and cost, a load balancing indicator based on multi-dimensional computing resources is introduced, and a new utility evaluation model for the user end and the server end is established; a three-stage game theory solution algorithm is proposed, which takes the user and the edge server as the two parties in the game, and continuously changes its own unloading strategy or resource allocation strategy through three stages to adapt to the other party's strategy, and finally achieves a balance between the two and the overall optimal utility.
[0086] In the above embodiments, the method for task offloading is described in detail, and the present invention also provides embodiments of a task offloading device and a task offloading device. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is based on the functional module perspective, and the other is based on the hardware perspective.
[0087] An embodiment of the present invention provides a task offloading device, based on the perspective of functional modules, including: A first acquisition module is used to acquire an edge server for executing tasks to be unloaded by a terminal device and to acquire a task unloading request sent by at least one terminal device; wherein at least one heterogeneous computing resource in the edge server is to execute tasks to be unloaded by the terminal device; The second acquisition module is used to acquire a user uninstallation preference list according to a pre-established user utility model, and acquire a target edge server; wherein the user utility model is a model used to characterize the utility of a terminal device when processing an uninstallation task on an edge server; the user uninstallation preference list includes utility values when the user uses different edge servers to process an uninstallation task; and the target edge server is an edge server determined according to the ranking of utility values in the user uninstallation preference list; A judgment module is used to judge whether the resources of the target edge server meet the preset resource requirements; if so, the control module is triggered; if not, the acquisition and elimination module is triggered; A control module, used to control the target edge server to receive and respond to a request sent by a terminal device for representing an offloading task; The acquisition and elimination module is used to obtain the benefit value of the target edge server when processing the unloading tasks of each terminal device according to the pre-established edge server benefit model, eliminate the unloading tasks of the target terminal device according to the ranking of the benefit values, and return to the trigger judgment module; wherein the edge server benefit model is a model used to characterize the benefits obtained by the edge server when processing the unloading tasks.
[0088] In some embodiments, the task offloading device further comprises: The first judgment module is used to judge whether the parameters when the task is unloaded meet the corresponding preset parameter requirements; wherein the parameters when the task is unloaded include at least the task unloading delay, the cost of unloading the task to the edge server, the pre-allocated channel bandwidth of the terminal device, and the task is to be completely unloaded to a heterogeneous computing resource or the value of the parameter used to characterize the situation where the task is unloaded to the heterogeneous computing resource is within a preset range; If yes, the second acquisition module is triggered.
[0089] In some embodiments, the task offloading device further comprises: The storage and module is used to store the task offloading request of the terminal device corresponding to the minimum benefit value when eliminated in the first set, and use the target edge server as an element in the set of non-uninstallable edge servers corresponding to the terminal device when the benefit value is minimum; wherein the elements in the first set are the task offloading requests of the eliminated terminal device.
[0090] In some embodiments, the task offloading device further comprises: The updating and removing module is used to update the set of edge servers that cannot be uninstalled by the terminal device and to remove the request for representing the uninstallation task sent by the terminal device and received by the target edge server from the first set, so as to update the first set.
[0091] In some embodiments, the task offloading device further comprises: A third acquisition module is used to obtain a load balancing value used to characterize the load balancing situation of the target edge server; The second judgment module is used to judge whether the load balancing value of the target edge server is greater than the load balancing threshold; if not, the output module is triggered; if yes, the adjustment module is triggered; An output module, used to output an offloading strategy corresponding to the task; wherein the offloading strategy includes the value of a parameter used to characterize the situation of offloading the task to the heterogeneous computing resources, the computing power resources of the heterogeneous computing resources allocated by each target edge server to the terminal device, and the memory resources of the heterogeneous computing resources allocated by each target edge server to the terminal device; The adjustment module is used to adjust the edge server to which the task is to be offloaded, and return to trigger the third acquisition module.
[0092] In some embodiments, the task offloading device further comprises: The third judgment module is used to judge whether the first set is an empty set; if so, the output module is triggered; if not, the first judgment module is triggered.
[0093] In some embodiments, the task offloading device further comprises: A fourth determination module is used to determine whether it is the first time to process the task offloading request of the terminal device; if so, triggering the first control module; The first control module is used to control the first set, the non-uninstallable edge server set of the terminal device, and the user request set used to characterize forwarding to be empty sets.
[0094] Since the embodiments of the device part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the device part, and they will not be repeated here. The effects are the same as above.
[0095] Figure 4 This is a structural diagram of a task offloading device provided by another embodiment of the present invention. This embodiment is based on the hardware perspective, such as Figure 4 As shown, the devices for task offloading include: A memory 20, used for storing computer programs; The processor 21 is used to implement the steps of the task offloading method mentioned in the above embodiment when executing a computer program.
[0096] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), an FPGA, and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU, which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0097] The memory 20 may include one or more non-volatile storage media, which may be non-transitory. The memory 20 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the method for task unloading disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the above-mentioned method for task unloading, etc.
[0098] In some embodiments, the task offloading device may further include a display screen 22 , an input / output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .
[0099] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the task offloading device, and may include more or less components than those shown in the figure.
[0100] The task offloading device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the following method: the task offloading method has the same effect as above.
[0101] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned task offloading method when executed by a processor.
[0102] Finally, the present invention also provides an embodiment corresponding to a non-volatile storage medium. The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.
[0103] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.
[0104] The non-volatile storage medium provided by the present invention includes the above-mentioned task offloading method, and the effect is the same as above.
[0105] The above is a detailed introduction to a method, device, product, equipment and medium for task offloading provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the present invention.
[0106] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
Claims
1. A method for task offloading, characterized in that: include: An edge server is obtained to execute a task to be unloaded by a terminal device and a task unloading request is obtained from at least one terminal device; wherein at least one heterogeneous computing resource in the edge server is to execute the task to be unloaded by the terminal device; A user uninstallation preference list is obtained according to a pre-established user utility model, and a target edge server is obtained; wherein the user utility model is a model used to characterize the utility of a terminal device when processing an uninstallation task on an edge server; the user uninstallation preference list includes utility values when the user uses different edge servers to process an uninstallation task; the target edge server is an edge server determined according to the ranking of utility values in the user uninstallation preference list; When it is detected that the resources of the target edge server meet the preset resource requirements, controlling the target edge server to receive and respond to the request sent by the terminal device for representing the offloading task; When it is detected that the resources of the target edge server do not meet the preset resource requirements, the benefit value of the target edge server when processing the offloading tasks of each terminal device is obtained according to a pre-established edge server benefit model, the offloading tasks of the target terminal device are eliminated according to the ranking of the benefit values, and the detection is returned to see whether the resources of the target edge server meet the preset resource requirements; wherein the edge server benefit model is a model used to characterize the benefits obtained when the edge server processes the offloading tasks.
2. The method for task offloading according to claim 1, characterized in that: The user utility model is established according to the energy consumption on the terminal device during task offloading, the task offloading delay, and the cost of offloading the task to the edge server, including: Obtaining a first product of a time delay for a terminal device to upload a task to a central processing unit server, a pre-allocated channel bandwidth of the terminal device, and a cost value per unit time and per unit bandwidth; The user utility model is established based on the energy consumption on the terminal device when the task is unloaded, the task unloading delay, the total cost of all heterogeneous computing resources that execute the task unloaded by the terminal device when the task is unloaded to the edge server, and the first sum of the first product.
3. The method for task offloading according to claim 2, characterized in that: Establishing the edge server benefit model according to the cost of the terminal device offloading tasks to the edge server and the energy consumption cost of the edge server when processing the offloaded tasks includes: Obtain a second sum result of the sum of the first products corresponding to all terminal devices and the total cost of all heterogeneous computing resources that perform the tasks unloaded by the terminal devices when all terminal devices unload the tasks to the corresponding edge servers; The edge server benefit model is established according to the difference between the second summation result and the energy consumption cost of the edge server when processing the offload task.
4. The method for task offloading according to claim 3, characterized in that: The total cost of all heterogeneous computing resources that perform tasks offloaded from terminal devices when offloading tasks to corresponding edge servers includes: Obtaining a third sum result of the total cost of computing power resources and the total cost of memory resources of all heterogeneous computing resources that perform the task offloaded by the terminal device when the task is offloaded to the corresponding edge server; The third sum is used as the total cost of all heterogeneous computing resources that execute the task offloaded from the terminal device.
5. The method for task offloading according to claim 3, characterized in that: Before obtaining the user uninstall preference list according to the pre-established user utility model, the method further includes: Determine whether the parameters during task offloading meet the corresponding preset parameter requirements; wherein the parameters during task offloading at least include the task offloading delay, the cost of offloading the task to the edge server, the pre-allocated channel bandwidth of the terminal device, and the task to be completely offloaded to a heterogeneous computing resource or the value of the parameter used to characterize the situation where the task is offloaded to the heterogeneous computing resource is within a preset range; If yes, proceed to the step of obtaining the user uninstall preference list according to the pre-established user utility model.
6. The method for task offloading according to claim 5, characterized in that: The parameter of the task unloading is the task unloading delay, and the preset parameter requirement satisfied by the task unloading delay is: the task unloading delay is less than or equal to the preset maximum processing delay; wherein the preset maximum processing delay is the maximum value of all preset processing delays; The parameter for task offloading is the cost of offloading the task to the edge server, and the cost of offloading the task to the edge server satisfies the preset parameter requirement that the total cost of all heterogeneous computing resources that execute the task offloaded by the terminal device is less than or equal to the preset maximum cost; wherein the preset maximum cost is the maximum value of all preset costs; The parameter for task unloading is the channel bandwidth of the pre-allocated terminal device, and the preset parameter requirement satisfied by the channel bandwidth of the pre-allocated terminal device is: the channel bandwidth of the pre-allocated terminal device is less than or equal to the preset minimum transmission bandwidth requirement; wherein the preset minimum transmission bandwidth requirement is the minimum value of all preset transmission bandwidth requirements.
7. The method for task offloading according to claim 5, characterized in that: The target edge server is the edge server corresponding to the smallest utility value among all utility values recorded in the user uninstall preference list; Detecting whether the resources of the target edge server meet the preset resource requirements includes: If it is detected that the sum of the pre-allocated channel bandwidths of all terminal devices is less than or equal to the maximum bandwidth resources provided by the base station, the computing power resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers are less than or equal to the computing power resources of the pre-configured heterogeneous computing resources, and the memory resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers are less than or equal to the memory resources of the pre-configured heterogeneous computing resources, and if the value of the parameter used to characterize the situation of offloading tasks to heterogeneous computing resources is a preset value, there are resources of the heterogeneous computing resources allocated to the terminal devices by each of the target edge servers, then it is determined that the resources of the target edge server meet the preset resource requirements; Otherwise, it is determined that the resources of the target edge server do not meet the preset resource requirement.
8. The method for task offloading according to claim 7, characterized in that: The target terminal device is a terminal device corresponding to the smallest benefit value among all benefit values; after eliminating the uninstallation task of the target terminal device according to the ranking of the benefit values, before returning to detect whether the resources of the target edge server meet the preset resource requirements, it also includes: The task offloading request of the terminal device corresponding to the minimum benefit value is stored in a first set, and the target edge server is used as an element in the set of non-uninstallable edge servers corresponding to the terminal device when the benefit value is minimum; wherein the elements in the first set are the task offloading requests of the terminal device that are eliminated.
9. The method for task offloading according to claim 8, characterized in that: After returning to detect whether the resources of the target edge server meet the preset resource requirements, if it is detected that the resources of the target edge server meet the preset resource requirements, then after controlling the target edge server to receive the request sent by the terminal device for characterizing the offloading task, it also includes: The non-uninstallable edge server set of the terminal device is updated, and the request for representing the unloading task sent by the terminal device and received by the target edge server is removed from the first set, so as to update the first set.
10. The method for task offloading according to claim 9, characterized in that: After controlling all the target edge servers to receive the request for representing the offloading task sent by the terminal device, and before controlling the target edge servers to respond to the request for representing the offloading task sent by the terminal device, the method further includes: Obtaining a load balancing value for characterizing a load balancing situation of the target edge server; Determine whether the load balancing value of the target edge server is greater than a load balancing threshold; If not, output the unloading strategy corresponding to the task; wherein the unloading strategy includes the value of the parameter used to characterize the situation of unloading the task to the heterogeneous computing resources, the computing power resources of the heterogeneous computing resources allocated to the terminal device by each of the target edge servers, and the memory resources of the heterogeneous computing resources allocated to the terminal device by each of the target edge servers; If yes, then adjust the edge server to which the task is to be offloaded, and return to the step of obtaining the load balancing value used to characterize the load balancing situation of the target edge server; The controlling the target edge server to respond to the request sent by the terminal device for representing the offloading task includes: The target edge server is controlled to respond to a request for representing the offloading task sent by the terminal device according to the offloading policy corresponding to the output task.
11. The method for task offloading according to claim 10, characterized in that: Before the output task corresponding to the uninstallation strategy, it also includes: Determine whether the first set is an empty set; If yes, then enter the step of outputting the uninstallation strategy corresponding to the task; If not, return to the step of determining whether the parameters during task offloading meet the corresponding preset parameter requirements.
12. The method for task offloading according to claim 11, characterized in that: The edge server to which the adjustment task is to be offloaded includes: Obtain the edge server with the highest resource utilization rate from all edge servers and remove the request for offloading task with the smallest server benefit value on the edge server with the highest resource utilization rate; A request for removing the offload task with the smallest benefit value is sent to the edge server with the lowest resource occupancy rate among all edge servers, and the process returns to the step of obtaining the load balancing value for characterizing the load balancing situation of the target edge server.
13. The method for task offloading according to claim 12, characterized in that: After sending the request for removing the offloading task with the smallest benefit value to the edge server with the lowest resource occupancy rate among all edge servers, the method further includes: The request of the offload task with the smallest benefit value is used as an element in the user request set used to characterize forwarding; Determining whether the user request set used to characterize forwarding is an empty set; If yes, proceed to the step of determining whether the first set is an empty set; If not, when it is detected that the parameters when the task is unloaded in the new unloading strategy meet the corresponding preset parameter requirements, the task unloading strategy of the terminal device is updated and the request sent by the terminal device for characterizing the unloaded task is removed from the user request set for characterizing forwarding, and the step of determining whether the user request set for characterizing forwarding is an empty set is returned; when it is detected that the parameters when the task is unloaded in the new unloading strategy do not meet the corresponding preset parameter requirements, the request for characterizing the unloaded task is added to the first set, and the request for characterizing the unloaded task is removed from the user request set for characterizing forwarding, and the step of determining whether the user request set for characterizing forwarding is an empty set is returned.
14. The method for task offloading according to any one of claims 10 to 13, characterized in that: The step of obtaining a load balancing value for characterizing a load balancing situation of the target edge server includes: Obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and the number of the edge servers; wherein all heterogeneous computing resources include computing power resources and memory resources; Determine a mean value of resource utilization of all heterogeneous computing resources of all edge servers according to the overall average occupancy of all heterogeneous computing resources of all edge servers and the number of edge servers; Determine the variance of the overall resource occupancy of all edge servers according to the overall average occupancy of all heterogeneous computing resources of each edge server and the mean; The variance is used as a load balancing value for characterizing the load balancing condition of the target edge server; wherein, a smaller variance indicates a smaller fluctuation in resource occupancy of the server.
15. The method for task offloading according to claim 14, characterized in that: Before obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and obtaining the number of edge servers, the method further includes: If it is detected that the resources of the edge server meet the preset resource requirement, the step of obtaining the overall average occupancy rate of all heterogeneous computing resources of all edge servers and obtaining the number of the edge servers is entered.
16. The method for task offloading according to claim 13, characterized in that: Before storing the task offloading request of the terminal device corresponding to the minimum benefit value of the eliminated device in the first set, the method further includes: Determine whether it is the first time to process the task offloading request of the terminal device; If so, the first set, the set of non-unloadable edge servers controlling the terminal device, and the set of user requests used to characterize forwarding are all empty sets.
17. A task offloading device, characterized in that: include: A first acquisition module is used to acquire an edge server for executing tasks to be unloaded by a terminal device and to acquire a task unloading request sent by at least one terminal device; wherein at least one heterogeneous computing resource in the edge server is to execute tasks to be unloaded by the terminal device; A second acquisition module is used to acquire a user uninstallation preference list according to a pre-established user utility model, and to acquire a target edge server; wherein the user utility model is a model used to characterize the utility of a terminal device when processing an uninstallation task on an edge server; the user uninstallation preference list includes utility values when a user uses different edge servers to process an uninstallation task; and the target edge server is an edge server determined according to the ranking of utility values in the user uninstallation preference list; A judgment module, used to judge whether the resources of the target edge server meet the preset resource requirements; if so, trigger the control module; if not, trigger the acquisition and elimination module; The control module is used to control the target edge server to receive and respond to the request sent by the terminal device for representing the offloading task; The acquisition and elimination module is used to obtain the benefit value of the target edge server when processing the unloading tasks of each terminal device according to a pre-established edge server benefit model, eliminate the unloading tasks of the target terminal device according to the ranking of the benefit values, and return to trigger the judgment module; wherein the edge server benefit model is a model used to characterize the benefits obtained when the edge server processes the unloading tasks.
18. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the task offloading method described in any one of claims 1 to 16 are implemented.
19. A task offloading device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the task offloading method as claimed in any one of claims 1 to 16 when executing the computer program.
20. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the task offloading method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
User association and edge computing unloading method for improving operator utility
CN111182570A
Mobile edge computing task unloading and resource allocation method based on game theory
CN112888002A
Task unloading method and device for mobile edge computing, equipment and medium
CN116225575A
Edge computing network optimization method and system based on task unloading
CN118118927A
Method for offloading computing task of mobile user
WO2022121097A1
Cited By
Resource allocation method and device, electronic equipment, storage medium and program product
CN119938275A
