Mobile edge computing task unloading method and device based on auction mechanism
By adopting a task offloading method based on the auction mechanism in the mobile edge computing system to handle tasks with a certain amount of calculation and uncertainty, the problem of assuming a known task cycle in the existing technology is solved, and the dynamic optimization of resources and the improvement of system utility are achieved. promote.
Patent Information
- Application Number
- CN202410844908.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-22
AI Technical Summary
Existing mobile edge computing task offloading methods assume that the number of task processing cycles is known, which is unrealistic in practice and cannot effectively handle tasks with determined and uncertain computational amounts.
A mobile edge computing task offloading method based on the auction mechanism is adopted. By setting the task to include a known or unknown number of unit task combinations, the edge server receives and broadcasts the unit task information, and selects mobile devices that consume less power than the remaining power to participate in the auction. , set the bidding function according to the remaining power, select the winning device and assign tasks, and handle tasks with certain and uncertain computing amounts.
It achieves dynamic optimization of resource allocation in the mobile edge computing system, extends the battery life of mobile devices, improves system utility, can handle situations where the amount of calculation is determined and uncertain, and maximizes social utility.
Smart Images

Figure CN118819832A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile edge computing, and in particular to a method and device for offloading mobile edge computing tasks based on an auction mechanism. Background Art
[0002] With the rapid development of IoT sensors and various smart devices, the demand for latency-sensitive and computationally intensive tasks is growing. To support these needs, Mobile Edge Computing (MEC) has emerged. MEC can provide low-latency, high-bandwidth services for mobile devices with limited resources by adding computing and storage resources at the edge of the network, such as base stations and access points.
[0003] In the MEC system, edge sites can be small base stations or WiFi hotspots, with scheduling applications deployed to distribute end-user workloads to edge mobile devices (MDs). Due to the high density of small base stations and WiFi hotspots, there is a large overlap in service coverage areas. Mobile devices move frequently and randomly, which makes it more challenging to design offline strategies. Therefore, it becomes necessary to design a collaborative network of edge sites that can collaboratively process computing tasks.
[0004] In order to motivate mobile devices to handle other people's computing tasks, an auction mechanism can be designed. In this mechanism, edge sites act as auctioneers, and mobile devices act as bidders to compete with each other to provide services. The site receives the computing task information of the service requester and broadcasts it to the mobile device. After analyzing the task requirements, the mobile device independently decides whether to provide the service and makes a bid. Based on the auction results, the site determines the winning mobile device and assigns the task. By participating in the auction, the mobile device can get rewards to compensate for its resource consumption.
[0005] However, existing MEC offline computing task offloading methods mostly assume that the number of processing cycles of the task is known, which is impractical in practice. Summary of the invention
[0006] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a mobile edge computing task offloading method and device based on an auction mechanism, which can handle tasks with certain and uncertain computing amounts and maximize the social utility of the mobile edge computing ecosystem.
[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0008] The mobile edge computing task offloading method based on the auction mechanism includes the following steps:
[0009] Set the task as a combination of unit tasks with a known or unknown number;
[0010] The edge server receives the unit task and broadcasts the unit task information;
[0011] Select mobile devices whose power consumption per unit task is less than a certain percentage of the current remaining power to participate in the auction;
[0012] For all mobile devices participating in the auction, the number of CPU cycles required to execute the unit task is obtained, each mobile device sets a predetermined CPU frequency according to the current remaining power and constructs a bidding function based on the predetermined CPU frequency and the current remaining power;
[0013] After receiving all the bidding functions, the edge server selects the mobile device that wins the bid and sends a unit task offloading instruction to the mobile device that wins the bid;
[0014] After receiving the instruction, the winning mobile device executes the unit task according to the predetermined CPU frequency and consumes the corresponding remaining power;
[0015] The jump edge server receives the unit task and broadcasts the unit task information until all unit tasks are executed.
[0016] Furthermore, the method for selecting mobile devices whose unit task power consumption is less than a certain proportion of the current remaining power to participate in the auction is:
[0017] The mobile device estimates the amount of power consumed by a unit computing task based on historical experience;
[0018] The total amount of unit task data is obtained. The mobile device obtains the power consumption of the unit task through the power value consumed by the unit calculation task and the total amount of unit task data.
[0019] The mobile device monitors the current remaining power of the battery in real time and obtains the ratio of the power consumed by the unit task to the current remaining power;
[0020] Set a ratio threshold and obtain mobile devices whose ratio is less than the ratio threshold.
[0021] Furthermore, based on historical experience, the mobile device estimates the power consumption of a unit computing task as follows:
[0022] Set the unit task type, and the mobile device obtains a certain amount of historical unit tasks;
[0023] The mobile device obtains the power consumption value of the initial unit computing task based on the unit task data volume and the corresponding power consumption of each historical unit task, and allocates each historical unit task to a corresponding task type;
[0024] Steps for obtaining the power consumption value of a unit computing task: for a certain type of unit task, the power consumption value of all initial unit computing tasks is weighted averaged to obtain the power consumption value of the unit computing task of this type;
[0025] Repeat the step of obtaining the power consumption value of the unit computing task until the power consumption values of the unit computing tasks corresponding to various types of unit tasks are obtained;
[0026] After executing a new unit task, the step of obtaining the power consumption value of the unit computing task is repeated to update the power consumption value of the unit computing task of the type corresponding to the unit task.
[0027] Furthermore, the method for obtaining the number of CPU cycles required to execute the unit task is:
[0028] Determine whether the number of CPU cycles required to process each bit is certain;
[0029] If determined, according to method 1, the expression for obtaining the number of CPU cycles W1 required to execute the unit task is:
[0030] W1=L×X
[0031] Where L is the number of bits in the task; X is the number of CPU cycles required for each bit;
[0032] If it is uncertain, according to method 2, the expected value of the number of CPU cycles required for each bit is obtained through a probability distribution model (such as Gamma distribution), and the number of CPU cycles W2 required to execute the unit task is obtained. Then W2 is also a random variable, and the expression for obtaining W2 is:
[0033] W2=L×E(X)
[0034] Where E(X) is the expected value of X.
[0035] Furthermore, the method for obtaining the probability distribution model is:
[0036] Collect the executed unit tasks of a certain number of mobile devices and record the actual number of CPU cycles of each executed unit task;
[0037] Perform statistical analysis on all actual CPU cycle numbers, fit the probability distribution curve, and determine the distribution type;
[0038] Use parameter estimation methods to perform parameter fitting on different distribution types to obtain different distribution types and corresponding distribution parameters;
[0039] Statistical methods are used to test the goodness of fit of different distribution types to the actual number of CPU cycles of unit tasks, and the distribution type with the best goodness of fit is selected as the probability distribution model;
[0040] After the probability distribution model is obtained, the probability distribution model is verified using the number of CPU cycles of the new unit task, and the probability distribution model is updated periodically.
[0041] Furthermore, the VCG mechanism is used to select the winning mobile device, and the specific method is as follows:
[0042] Get the cost c of the jth unit task ij :
[0043] c ij =b ij -h i
[0044] Among them, h i represents the social utility when the i-th mobile device is not selected, b ij represents the bidding function of the i-th mobile device for the j-th unit task;
[0045] For the jth unit task, select the i*th mobile device with the minimum cost:
[0046]
[0047] Get the social utility of multiple unit tasks:
[0048]
[0049] Among them, q j represents the utility of the jth unit task, J is the total number of unit tasks, and I is the total number of mobile devices;
[0050] The server finally selects the one with the largest social utility U from all possible combinations:
[0051] x*=arg max x U(x).
[0052] Furthermore, after the winning mobile device consumes the corresponding amount of electricity, it needs to replenish the ambient energy as electricity. The specific method is:
[0053] Based on the probability distribution of ambient energy, the process of obtaining ambient energy is regarded as a random process to obtain the ambient energy obtained each time. The ambient energy obtained multiple times is added up to obtain the total amount of ambient energy. The total amount of ambient energy obtained is converted into electrical energy using conversion efficiency and stored in the battery.
[0054] A mobile edge computing task offloading device based on an auction mechanism, comprising:
[0055] A setting module, used to set the task as a combination of unit tasks with a known or unknown number;
[0056] Unit task publishing module, used for edge server to receive unit tasks and broadcast unit task information;
[0057] A mobile device acquisition module, used to select mobile devices whose unit task power consumption is less than a certain proportion of the current remaining power to participate in the auction;
[0058] A bidding function building module, used for obtaining the number of CPU cycles required to execute unit tasks for all mobile devices participating in the auction, each mobile device setting a predetermined CPU frequency according to the current remaining power and building a bidding function based on the predetermined CPU frequency and the current remaining power;
[0059] A task unloading module is used for the edge server to select a mobile device that wins the bid after receiving all bidding functions, and send a unit task unloading instruction to the mobile device that wins the bid;
[0060] The unit task execution module is used for the mobile device that wins the bid to execute the unit task according to the predetermined CPU frequency and consume the corresponding remaining power after receiving the instruction;
[0061] The completion module is used to jump to the edge server to receive the unit task and broadcast the unit task information until all unit tasks are completed.
[0062] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned mobile edge computing task offloading method based on the auction mechanism when executing the program.
[0063] A non-transitory computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned mobile edge computing task offloading method based on an auction mechanism.
[0064] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0065] The present invention does not need to determine the number of unit tasks in advance, and can handle tasks with definite and uncertain computing amounts. The task is set as a combination of unit tasks containing a known or unknown number, which is convenient for unloading the unit tasks in sequence. For each unit task, the auction mechanism can be used to coordinate the selection of mobile devices so that each unit task can be completed well, thereby dynamically optimizing resource allocation in the mobile edge computing system, extending the battery life of mobile devices, and improving system utility. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The illustrative embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0067] Figure 1 It is a flow chart of the mobile edge computing task offloading method based on the auction mechanism of the present invention;
[0068] Figure 2 A flow chart of a method for selecting a mobile device whose unit task power consumption is less than a certain proportion of the current remaining power to participate in an auction according to the present invention;
[0069] Figure 3 A flow chart of a method for estimating the power consumption of a unit computing task based on historical experience of a mobile device of the present invention;
[0070] Figure 4 A flow chart of a method for obtaining the number of CPU cycles required to execute a unit task according to the present invention;
[0071] FIG5(a) is a bar graph comparing the power consumption obtained by obtaining the number of CPU cycles according to method 1 of the present invention with the power consumption obtained by the random selection algorithm and the power consumption obtained by the greedy selection algorithm;
[0072] FIG5( b ) is a bar graph comparing the social utility obtained by obtaining the number of CPU cycles according to method 1 of the present invention with the social utility obtained by the random selection algorithm and the social utility obtained by the greedy selection algorithm;
[0073] FIG5(c) is a bar graph comparing the power consumption obtained after the CPU cycle number is obtained according to method 2 of the present invention with the power consumption obtained by the random selection algorithm and the power consumption obtained by the greedy selection algorithm;
[0074] FIG5(d) is a bar graph comparing the social utility obtained by obtaining the number of CPU cycles according to method 2 of the present invention with the social utility obtained by the random selection algorithm and the social utility obtained by the greedy selection algorithm;
[0075] Figure 6 It is a schematic diagram of a mobile edge computing task offloading device based on an auction mechanism of the present invention. DETAILED DESCRIPTION
[0076] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0077] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0078] Example 1
[0079] Task offloading refers to transferring part or all computing tasks from mobile devices or terminals to more powerful computing resources, such as cloud servers or edge servers.
[0080] In the related technology, the existing MEC offline computing task offloading methods mostly assume that the number of task processing cycles is known, which is impractical in practice. Therefore, in order to handle tasks with uncertain computing cycles, it is necessary to design an online task offloading algorithm that adapts to uncertain tasks to improve the performance of mobile consumer electronic devices.
[0081] This embodiment provides a mobile edge computing task offloading method based on an auction mechanism, such as Figure 1 As shown, the following steps are included:
[0082] Step S1: setting the task as a combination of unit tasks with a known or unknown number;
[0083] Step S2: The edge server receives the unit task and broadcasts the unit task information;
[0084] Step S3: selecting a mobile device whose unit task power consumption is less than a certain percentage of the current remaining power to participate in the auction;
[0085] Step S4: For all mobile devices participating in the auction, the number of CPU cycles required to execute the unit task is obtained, each mobile device sets a predetermined CPU frequency according to the current remaining power and constructs a bidding function based on the predetermined CPU frequency and the current remaining power;
[0086] Step S5: After receiving all the bidding functions, the edge server selects the mobile device that wins the bid and sends a unit task unloading instruction to the mobile device that wins the bid;
[0087] Step S6: After receiving the instruction, the mobile device that wins the bid executes the unit task according to the predetermined CPU frequency and consumes the corresponding remaining power;
[0088] Step S7: The jump edge server receives the unit task and broadcasts the unit task information until all unit tasks are completed.
[0089] The mobile edge computing task unloading method based on the auction mechanism provided in this embodiment does not need to determine the number of unit tasks in advance, and can handle tasks with determined and uncertain computing amounts. The task is set as a combination of unit tasks containing a known or unknown number, which is convenient for unloading the unit tasks in sequence. For each unit task, the auction mechanism can be used to coordinate the selection of mobile devices so that each unit task can be completed well, thereby dynamically optimizing resource allocation in the mobile edge computing system, extending the battery life of mobile devices, and improving system utility.
[0090] The jump edge server receives the unit task and broadcasts the unit task information, and enters the next auction cycle until all unit tasks are completed. By repeating the auction cycle, the system can dynamically optimize task unloading and select the solution with the greatest social utility. The present invention can handle situations where the amount of calculation is certain or uncertain. The auction mechanism gives mobile devices the right to actively select tasks, effectively utilizes mobile device resources, prolongs device battery life, and improves system utility.
[0091] The following is a detailed description of the mobile edge computing task offloading method based on the auction mechanism provided by this embodiment through a specific implementation method. The mobile edge computing system implemented in this embodiment is composed of M edge servers and N mobile devices. The edge server is deployed with a scheduler, which can receive computing tasks from service requesters and communicate with mobile devices through a WiFi network. The task offloading method of this embodiment performs an auction in each time slot, taking the offloading of a unit task as an example.
[0092] In step S1 of this embodiment, the unit task information includes task data volume, task deadline, task type and task reward.
[0093] In the specific implementation of this embodiment, it is assumed that the number of mobile devices N in the system is 50, the number of edge servers M is 3, the amount of task data L is 5000 bits, and the task deadline T is 100 ms.
[0094] In step S3 of this embodiment, Figure 2 As shown, the method for selecting mobile devices whose unit task power consumption is less than a certain proportion of the current remaining power to participate in the auction is:
[0095] Step S301: The mobile device estimates the amount of power consumed by a unit computing task based on historical experience;
[0096] Step S302: Obtain the total amount of unit task data. The mobile device obtains the unit task power consumption value through the unit calculation task power consumption value and the total amount of unit task data.
[0097] Step S303: the mobile device monitors the current remaining power of the battery in real time, and obtains the ratio of the power consumed by the unit task to the current remaining power;
[0098] Step S304: setting a ratio threshold, and acquiring mobile devices whose ratios are smaller than the ratio threshold.
[0099] If the ratio of the power consumption of the mobile device unit task to the current remaining power is greater than the ratio threshold, the mobile device is selected to participate in the auction, otherwise it will not participate in the auction.
[0100] For the current unit task, the mobile device can evaluate the amount of computing it can support, and the calculation formula is:
[0101]
[0102] Where F is the supported computing capacity. The mobile device can compare this estimated value with the received unit task power consumption requirement to make a decision on whether to participate in this round of bidding.
[0103] For example, if the current remaining power of the mobile device is B = 2000mAh, based on historical experience, the power consumed by a unit computing task is e = 0.1mAh / bit. For a unit task data volume of L = 5000bit, the unit task power consumption is expected to be E = L*e = 500mAh. If E is less than half of the current remaining power B, the current remaining power is sufficient; if E is greater than half of B, the current remaining power is insufficient. If sufficient, the mobile device can choose to participate in the auction, otherwise it will not participate.
[0104] In step S301 of this embodiment, Figure 3 As shown, based on historical experience, the method for mobile devices to estimate the power value e consumed by a unit computing task is:
[0105] Step S2011: Setting the unit task type, the mobile device acquires a certain amount of historical unit tasks;
[0106] Step S2012: the mobile device obtains the power consumption value of the initial unit calculation task based on the unit task data volume and the corresponding power consumption of each historical unit task, and allocates each historical unit task to a corresponding task type;
[0107] Step S2013: Step of obtaining the power consumption value of the unit computing task: for a certain type of unit task, the power consumption value e of the unit computing task of this type is obtained by weighted averaging the power consumption values of all initial unit computing tasks;
[0108] Step S2013: repeating the step of obtaining the power consumption value of the unit computing task until the power consumption values e of the unit computing tasks corresponding to various types of unit tasks are obtained;
[0109] Step S2014: after executing a new unit task, repeat the step of obtaining the power value consumed by the unit computing task to update the power value e consumed by the unit computing task of the corresponding type of the unit task.
[0110] In step S4 of this embodiment, Figure 4 As shown, the method for obtaining the number of CPU cycles required to execute a unit task is:
[0111] Determine whether the number of CPU cycles required to process each bit is certain;
[0112] If determined, according to method 1, the expression for obtaining the number of CPU cycles W1 required to execute the unit task is:
[0113] W1=L×X
[0114] Where L is the number of bits in the task; X is the number of CPU cycles required for each bit;
[0115] If it is uncertain, according to method 2, the expected value of the number of CPU cycles required for each bit is obtained through a probability distribution model (such as Gamma distribution), and the number of CPU cycles W2 required to execute the unit task is obtained. Then W2 is also a random variable, and the expression for obtaining W2 is:
[0116] W2=L×E(X)
[0117] Where E(X) is the expected value of X.
[0118] Specifically, the method for obtaining the probability distribution model is:
[0119] Collect the executed unit tasks of a certain number of mobile devices and record the actual number of CPU cycles of each executed unit task;
[0120] Perform statistical analysis on all actual CPU cycle numbers, fit the probability distribution curve, and determine the distribution type (such as gamma distribution, normal distribution, etc.);
[0121] Use parameter estimation methods (such as least squares method, maximum likelihood estimation method, etc.) to perform parameter fitting on different distribution types to obtain different distribution types and corresponding distribution parameters;
[0122] Statistical methods (such as chi-square test, KS test, etc.) are used to test the goodness of fit of different distribution types to the actual number of CPU cycles of unit tasks, and the distribution type with the best goodness of fit is selected as the probability distribution model;
[0123] After the probability distribution model is obtained, the probability distribution model is verified using the number of CPU cycles of the new unit task, and the probability distribution model is updated regularly to maintain the accuracy of the probability distribution model.
[0124] Specifically, in the specific implementation of this embodiment, the number of CPU cycles required to execute the unit task can be given: According to method 1, the number of CPU cycles required for each unit task to process one bit of data is X=2 cycles / bit, and the number of CPU cycles required to execute the unit task is:
[0125] W=L×X=5000×2=10000.
[0126] In step 4, the mobile device constructs a bidding function as follows:
[0127] The bidding function takes the form of the current remaining battery power of the mobile device minus the estimated power consumption of the execution unit task:
[0128] b=B-α×ε
[0129] Among them, b is the bidding function value, B is the current remaining power, ε is the estimated power consumption of the execution unit task, and α is the weight parameter.
[0130] The power consumption of the mobile device by the unit task can be given as follows: the power consumption of the unit computing task is e=0.1 mAh, and the total power consumption of the task is E=We=10000*0.1=1000 mAh.
[0131] In step S4 of this embodiment, the VCG mechanism is used to select the mobile device that wins the bid. The specific method is as follows:
[0132] Get the cost c of the jth unit task ij :
[0133] c ij =b ij -h i
[0134] Among them, h i represents the social utility when the i-th mobile device is not selected, b ij represents the bidding function of the i-th mobile device for the j-th unit task;
[0135] For the jth unit task, select the i*th mobile device with the minimum cost:
[0136]
[0137] Get the social utility of multiple unit tasks:
[0138]
[0139] Among them, q j represents the utility of the jth unit task, J is the total number of unit tasks, and I is the total number of mobile devices;
[0140] The server finally selects the one with the largest social utility U from all possible combinations:
[0141] x*=arg max x U(x).
[0142] Specifically, in a specific implementation, for example, after the edge server receives bids from three mobile devices for three different unit tasks, it uses this mechanism to determine the winner. Assume that the bidding function is:
[0143] Unit task 1: b11=3000, b21=3200, b31=3500.
[0144] Unit task 2: b12=3300, b22=3100, b32=3000.
[0145] Unit task 3: b13=3400, b23=3600, b33=3200.
[0146] For Unit Task 1:
[0147] h1(1)=3200+3500=6700;
[0148] h1(2)=3000+3500=6500;
[0149] h1(3)=3000+3200=6200;
[0150] c11=3000-6700=3700;
[0151] c21=3200-6500=3300;
[0152] c31=3500-6200=2700.
[0153] For Unit Task 2:
[0154] h2(1)=3100+3000=6100;
[0155] h2(2)=3300+3000=6300;
[0156] h2(3)=3300+3100=6400;
[0157] c12=3300-6100=2800;
[0158] c22=3100-6300=3200;
[0159] c32=3000-6400=3400.
[0160] For Unit Task 3:
[0161] h3(1)=3600+3200=6800;
[0162] h3(2)=3400+3200=6600;
[0163] h3(3)=3400+3600=7000;
[0164] c13=3400-6800=3400;
[0165] c23=3600-6600=3000;
[0166] c33=3200-7000=3800.
[0167] According to the principle of minimum cost, we can derive the following allocation scheme:
[0168] Unit task 1 is assigned to equipment 3 (cost is 2700);
[0169] Unit task 2 is assigned to equipment 1 (cost is 2800);
[0170] Unit task 3 is assigned to device 2 (cost is 3000).
[0171] Assuming that the utility of the unit task is: q1 = 7000, q2 = 6500, q3 = 7500, the total social utility is: U = (q1-c31) + (q2-c12) + (q3-c23) = (7000-2700) + (6500-2800) + (7500-3000) = 4300 + 3700 + 4500
[0172] =12500.
[0173] Now, consider several possible allocations:
[0174] Scenario 1:
[0175] Unit task 1 is assigned to equipment 3 (cost is 2700);
[0176] Unit task 2 is assigned to equipment 1 (cost is 2800);
[0177] Unit task 3 is assigned to device 2 (cost is 3000).
[0178] Scenario 2:
[0179] Unit task 1 is assigned to device 2 (cost is 3300);
[0180] Unit task 2 is assigned to equipment 1 (cost is 2800);
[0181] Unit task 3 is assigned to device 3 (cost is 3800).
[0182] Scenario 3:
[0183] Unit task 1 is assigned to equipment 1 (cost is 3700);
[0184] Unit task 2 is assigned to device 2 (cost is 3200);
[0185] Unit task 3 is assigned to device 3 (cost is 3800).
[0186] Assume that the utilities of unit tasks are: q1=7000, q2=6500, q3=7500.
[0187] Calculate the social utility of each option:
[0188] Social utility of Option 1:
[0189] U1=(q1-c31)+(q2-c12)+(q3-c23)=(7000-2700)+(6500-2800)+(7500-3000)=4300+3700+4500=12500.
[0190] The social utility of Option 2:
[0191] U2=(q1-c21)+(q2-c12)+(q3-c33)
[0192] =(7000-3300)+(6500-2800)+(7500-3800)
[0193] =3700+3700+3700=11100.
[0194] Social utility of option 3:
[0195] U3=(q1-c11)+(q2-c22)+(q3-c33)
[0196] =(7000-3700)+(6500-3200)+(7500-3800)
[0197] =3300+3300+3700=10300.
[0198] Comparing the social utility of these three options, we can see that:
[0199] U1=12500>U2=11100>U3=10300.
[0200] Therefore, the server will choose Scheme 1 as the final allocation scheme because it can maximize the social utility U.
[0201] In step S5 of this embodiment, after the winning mobile device consumes the corresponding amount of electricity, it needs to supplement the environmental energy as electricity. The specific method is:
[0202] Based on the probability distribution of ambient energy, the process of obtaining ambient energy is regarded as a random process to obtain the ambient energy obtained each time. The ambient energy obtained multiple times is added up to obtain the total amount of ambient energy. The total amount of ambient energy obtained is converted into electrical energy using conversion efficiency and stored in the battery.
[0203] Specifically, after a mobile device wins a computing task, its battery power will decrease and needs to be replenished in time. The acquisition of environmental energy is affected by various random factors and can be regarded as a random process. The amount of environmental energy that can be obtained each time is:
[0204] e~P(λ)
[0205] Where P(λ) represents the probability distribution of ambient energy, and λ is the parameter of the distribution. The total amount of energy that can be obtained by a mobile device within a certain collection period is:
[0206] E=∑e
[0207] The obtained ambient energy E is then converted and stored in the battery using the conversion efficiency η.
[0208] For example, in the previous step, device 3 performs the computing task at a CPU frequency of 2 GHz, and its estimated energy consumption is 1500 mAh. Then the battery power of device 3 will be reduced from the original 2500 mAh to 2500-1500=1000 mAh.
[0209] Mobile devices can collect energy to replenish batteries through the environmental energy collection module. Device 3 can obtain a certain amount of power through the environmental energy collection module for replenishment. Assuming that the environmental energy collected this time is 500mAh and the conversion efficiency is 40%, the amount of power that can be replenished is 500*40%=200mAh. In this way, the battery power of device 3 becomes 1000+400=1200mAh.
[0210] like Figure 5(a)-5(d) As shown, it can be seen that the power consumption obtained after the CPU cycle number of the present invention is obtained according to method one or the power consumption obtained after being obtained according to method two is lower than the power consumption obtained by the random selection algorithm and the power consumption obtained by the greedy selection algorithm. The social utility obtained after the CPU cycle number of the present invention is obtained according to method one or the social utility obtained after being obtained according to method two is higher than the power consumption obtained by the random selection algorithm and the social utility obtained by the greedy selection algorithm, indicating that the present invention can dynamically optimize resource allocation in the mobile edge computing system, extend the battery life of mobile devices, and improve system utility.
[0211] In summary, this embodiment proposes a mobile edge computing task offloading method based on an auction mechanism, which can handle tasks with certain and uncertain computational amounts and maximize the social utility of the mobile edge computing ecosystem.
[0212] Example 2
[0213] Embodiment 2 provides a mobile edge computing task offloading device based on an auction mechanism, such as Figure 6 As shown, including:
[0214] A setting module, used for setting the task as a combination of unit tasks with a known or unknown number;
[0215] Unit task publishing module, used for edge server to receive unit tasks and broadcast unit task information;
[0216] A mobile device acquisition module, used to select mobile devices whose unit task power consumption is less than a certain proportion of the current remaining power to participate in the auction;
[0217] A bidding function building module, used for obtaining the number of CPU cycles required to execute unit tasks for all mobile devices participating in the auction, each mobile device setting a predetermined CPU frequency according to the current remaining power and building a bidding function based on the predetermined CPU frequency and the current remaining power;
[0218] A task unloading module is used for the edge server to select a mobile device that wins the bid after receiving all bidding functions, and send a unit task unloading instruction to the mobile device that wins the bid;
[0219] The unit task execution module is used for the mobile device that wins the bid to execute the unit task according to the predetermined CPU frequency and consume the corresponding remaining power after receiving the instruction;
[0220] The completion module is used to jump to the edge server to receive the unit task and broadcast the unit task information until all unit tasks are completed.
[0221] Example 3
[0222] Embodiment 3 provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned mobile edge computing task offloading method based on the auction mechanism when executing the program.
[0223] Example 4
[0224] Embodiment 4 provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the mobile edge computing task offloading method based on the auction mechanism is implemented.
[0225] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0226] It should be understood that the parts not elaborated in detail in this specification belong to the prior art. The above description of the preferred embodiment is relatively detailed, but it cannot be regarded as a limitation on the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.
[0227] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A mobile edge computing task offloading method based on an auction mechanism, characterized in that: The following steps are involved: Set the task as a combination of unit tasks with a known or unknown number; The edge server receives the unit task and broadcasts the unit task information; Select mobile devices whose power consumption per unit task is less than a certain percentage of the current remaining power to participate in the auction; For all mobile devices participating in the auction, the number of CPU cycles required to execute the unit task is obtained, each mobile device sets a predetermined CPU frequency according to the current remaining power and constructs a bidding function based on the predetermined CPU frequency and the current remaining power; After receiving all the bidding functions, the edge server selects the mobile device that wins the bid and sends a unit task offloading instruction to the mobile device that wins the bid; After receiving the instruction, the winning mobile device executes the unit task according to the predetermined CPU frequency and consumes the corresponding remaining power; The jump edge server receives the unit task and broadcasts the unit task information until all unit tasks are executed.
2. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 1, characterized in that: The method for selecting mobile devices whose unit task power consumption is less than a certain percentage of the current remaining power to participate in the auction is: The mobile device estimates the amount of power consumed by a unit computing task based on historical experience; The total amount of unit task data is obtained. The mobile device obtains the power consumption of the unit task through the power value consumed by the unit calculation task and the total amount of unit task data. The mobile device monitors the current remaining power of the battery in real time and obtains the ratio of the power consumed by the unit task to the current remaining power; Set a ratio threshold and obtain mobile devices whose ratio is less than the ratio threshold.
3. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 2, characterized in that: Based on historical experience, the method by which mobile devices estimate the amount of power consumed by a unit computing task is: Set the unit task type, and the mobile device obtains a certain amount of historical unit tasks; The mobile device obtains the power consumption value of the initial unit computing task based on the unit task data volume and the corresponding power consumption of each historical unit task, and allocates each historical unit task to a corresponding task type; Steps for obtaining the power consumption value of a unit computing task: for a certain type of unit task, the power consumption value of all initial unit computing tasks is weighted averaged to obtain the power consumption value of the unit computing task of this type; Repeat the step of obtaining the power consumption value of the unit computing task until the power consumption values of the unit computing tasks corresponding to various types of unit tasks are obtained; After executing a new unit task, the step of obtaining the power consumption value of the unit computing task is repeated to update the power consumption value of the unit computing task of the type corresponding to the unit task.
4. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 1, characterized in that: The method to obtain the number of CPU cycles required to execute a unit task is: Determine whether the number of CPU cycles required to process each bit is certain; If determined, according to method 1, the expression for obtaining the number of CPU cycles W1 required to execute the unit task is: W1=L×X Where L is the number of bits in the task; X is the number of CPU cycles required for each bit; If it is uncertain, according to method 2, the expected value of the number of CPU cycles required for each bit is obtained through a probability distribution model (such as Gamma distribution), and the number of CPU cycles W2 required to execute the unit task is obtained. Then W2 is also a random variable, and the expression for obtaining W2 is: W2=L×E(X) Where E(X) is the expected value of X.
5. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 4 is characterized in that: The method to obtain the probability distribution model is: Collect the executed unit tasks of a certain number of mobile devices and record the actual number of CPU cycles of each executed unit task; Perform statistical analysis on all actual CPU cycle numbers, fit the probability distribution curve, and determine the distribution type; Use parameter estimation methods to perform parameter fitting on different distribution types to obtain different distribution types and corresponding distribution parameters; Statistical methods are used to test the goodness of fit of different distribution types to the actual number of CPU cycles of unit tasks, and the distribution type with the best goodness of fit is selected as the probability distribution model; After the probability distribution model is obtained, the probability distribution model is verified using the number of CPU cycles of the new unit task, and the probability distribution model is updated periodically.
6. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 1, characterized in that: The VCG mechanism is used to select the winning mobile device. The specific method is as follows: Get the cost c of the jth unit task ij : c ij =b ij -h i Among them, h i represents the social utility when the i-th mobile device is not selected, b ij represents the bidding function of the i-th mobile device for the j-th unit task; For the jth unit task, select the i*th mobile device with the minimum cost: Get the social utility of multiple unit tasks: Among them, q j represents the utility of the jth unit task, J is the total number of unit tasks, and I is the total number of mobile devices; The server finally selects the one with the largest social utility U from all possible combinations: x*=arg max x U(x)。 7. The method for offloading mobile edge computing tasks based on an auction mechanism according to claim 1, characterized in that: After the winning mobile device consumes the corresponding amount of electricity, it needs to replenish the ambient energy as electricity. The specific method is: Based on the probability distribution of ambient energy, the process of obtaining ambient energy is regarded as a random process to obtain the ambient energy obtained each time. The ambient energy obtained multiple times is added up to obtain the total amount of ambient energy. The total amount of ambient energy obtained is converted into electrical energy using conversion efficiency and stored in the battery.
8. A mobile edge computing task offloading device based on an auction mechanism, characterized in that: include: A setting module, used to set the task as a combination of unit tasks with a known or unknown number; Unit task publishing module, used for edge server to receive unit tasks and broadcast unit task information; A mobile device acquisition module, used to select mobile devices whose unit task power consumption is less than a certain proportion of the current remaining power to participate in the auction; A bidding function building module, used for obtaining the number of CPU cycles required to execute unit tasks for all mobile devices participating in the auction, each mobile device setting a predetermined CPU frequency according to the current remaining power and building a bidding function based on the predetermined CPU frequency and the current remaining power; A task unloading module is used for the edge server to select a mobile device that wins the bid after receiving all bidding functions, and send a unit task unloading instruction to the mobile device that wins the bid; The unit task execution module is used for the mobile device that wins the bid to execute the unit task according to the predetermined CPU frequency and consume the corresponding remaining power after receiving the instruction; The completion module is used to jump to the edge server to receive the unit task and broadcast the unit task information until all unit tasks are completed.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the mobile edge computing task offloading method based on the auction mechanism is implemented.
10. A non-transitory computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the above-mentioned mobile edge computing task offloading method based on the auction mechanism is implemented.
