Calculation unloading and resource allocation joint optimization method and system for smart power grid
By building a network model of a multi-device single server scenario in the smart grid, the optimization problem is decomposed and optimization is used to optimize the transmission power resource allocation and computing resource allocation, and the binary search method and gradient descent method are used to optimize it. Finally, through the non-cooperative game optimization calculation and offloading strategy, the problem of failure to achieve joint optimization of computing offloading, resource allocation and power resource optimization in the traditional method is solved, and the low latency and low energy consumption goals of smart grid equipment are achieved.
Patent Information
- Application Number
- CN202510256598.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-20
AI Technical Summary
In traditional mobile edge computing, computational offloading and resource allocation methods fail to effectively solve the demands of smart grid equipment for delay and energy consumption, especially when computing tasks are inseparable, and simultaneous optimization of the three (computing offloading, resource allocation and power resources) cannot be achieved.
A joint optimization method for computing offloading and resource allocation for smart grids is proposed. By building a network model in a multi-device single server scenario in the smart grid, a local computing model and an edge computing server calculation model are established, and the total overhead problem is optimized, which is decomposed into two sub-problems of transmit power resource allocation and computing resource allocation. The binary search method and gradient descent method are used for optimization, and finally the calculation offloading strategy is optimized through non-cooperative game.
It effectively meets the demand for low latency and low energy consumption of smart grid equipment. Through joint optimization of calculation offloading and resource allocation, the total system overhead is significantly reduced.
Smart Images

Figure CN120179393A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grids, and specifically, to a joint optimization method and system for computing offloading and resource allocation for smart grids. Background Art
[0002] With the progress of technology and the expansion of the power grid, traditional power grid systems are evolving towards intelligence and informatization. Many problems have gradually emerged in traditional power grid systems, such as the inability to process data in real time or the inability to intelligently monitor the status of the entire system, which can no longer meet our requirements for the real-time performance of the power grid. The Smart Grid (SG) integrates advanced information technology, communication technology, and automation technology to achieve efficient regulation and intelligent management of the power system. Its main advantages include improving energy utilization efficiency, supporting the access of renewable energy, enhancing the reliability and security of the power grid, meeting the diverse needs of users, promoting green and low-carbon development, and reducing the operating cost of the power grid, providing key support for the global energy transformation and sustainable development. During the development process, a large number of computing tasks will be generated, and these computing tasks have relatively high requirements for real-time performance. Generally, these tasks are computed locally or uploaded to an Elastic Computer Service (ECS). However, cloud servers are usually located at a relatively far distance, and large transmission delays and transmission energy consumption will be caused during the transmission process, which may not meet the latency requirements of Smart Grid Devices (SGDs). Mobile Edge Computing (MEC) has been proposed as a supplement to cloud computing. By providing cloud computing functions close to SGDs, edge computing shows good performance in terms of processing latency.
[0003] Edge computing is an emerging distributed computing architecture that migrates computing, storage, and application services from traditional cloud data centers to the network edge close to data sources or end users to achieve real-time data processing and higher efficiency. By directly processing data on devices or local servers, the real-time response ability and data security are enhanced, and this method effectively solves the problems of high security and high latency. However, the computing offloading and resource allocation methods in traditional mobile edge computing consider the case where computing tasks are indivisible, and usually only consider the joint optimization of offloading strategies and computing resources or power resources, without considering the joint optimization of all three simultaneously.
[0004] The patent application document CN116089091A discloses a resource allocation and task offloading method based on Internet of Things edge computing, belonging to the field of Internet of Things technology, including the following steps: S1: Construct an Internet of Things edge computing system based on an edge server; S2: Construct the system's effect function; S3: Decompose the system effect function into a resource allocation optimization function under the initial given task offloading decision and a task offloading optimization function based on the resource optimization allocation result; S4: Quadratically decompose the resource allocation optimization function into a power allocation optimization function for the terminal user device and a computing resource allocation optimization function for the edge server; S5: Solve to obtain the optimal transmission power allocation scheme for the terminal user device; S6: Solve to obtain the optimal computing resource allocation scheme; S7: Substitute the optimal allocation scheme back into the original problem system effect function to solve for the optimal task offloading strategy. However, this patent cannot completely solve the existing technical problems and cannot meet the requirements of the present invention. Summary of the Invention
[0005] Aiming at the defects in the prior art, the purpose of the present invention is to provide a joint optimization method and system for computing offloading and resource allocation for smart grids.
[0006] According to the joint optimization method for computing offloading and resource allocation for smart grids provided by the present invention, it includes:
[0007] Step S1: Construct a network model in the scenario of multiple devices and a single server in the smart grid;
[0008] Step S2: Based on the network model, construct a local computing model and a computing model for the edge computing server, and calculate the total overhead;
[0009] Step S3: Model the total overhead optimization problem, including optimizing the model and the joint computing offloading and resource allocation problem;
[0010] Step S4: Decompose and solve the optimization problem, including decomposing the joint computing offloading and resource allocation problem into two sub-problems, using the binary search method and the gradient descent method to optimize the transmission power resource allocation and the computing resource allocation respectively, and using non-cooperative game to optimize the computing offloading strategy, and finally performing iterative optimization.
[0011] Preferably, the network model is as follows:
[0012] In the smart grid scenario, the system includes a mobile edge computing (MEC), K smart grid devices (SGD), each SGD k∈K is randomly distributed in various places of the system, and communicates with the MEC through a wireless link;
[0013] For the computing task of SGD k, it is represented by a triple k∈K, and d k, s k , respectively represent the input data volume, the required number of CPU cycles, and the maximum tolerable delay of the computing task.
[0014] Preferably, the constructed local computing model is as follows:
[0015] When the task part is computed locally, it includes the local computing delay which is expressed as:
[0016]
[0017] where, represents the local computing ability of SGD k, and α k is the local computing ratio of SGD k;
[0018] The local computing energy consumption is calculated as:
[0019]
[0020] where, represents the energy consumption of SGD k per unit time.
[0021] Preferably, the constructed edge computing model is as follows:
[0022] When SGD transmits data to the MEC, the uplink transmission power is first considered. In the smart grid, SGD remains stationary throughout the offloading process. Therefore, the effective channel gain coefficient is regarded as a constant within a time period, and the corresponding channel power gain G k is:
[0023]
[0024] where, j k represents the distance between SGD k and the MEC, and ε represents the path loss factor;
[0025] In the uplink, frequency division multiple access technology is adopted to achieve channel sharing among users, and interference is ignored. The uplink transmission power of SGD k is:
[0026]
[0027] where, B represents the total uplink bandwidth, N is the number of SGDs participating in ES offloading in the current time slot, and p k is the transmission power of SGD k, and σ 2 is the noise power;
[0028] Let f k represent the computing resources of the MEC, and satisfy the constraint 0 ≤ f k≤F k ,F k is the maximum computing resource of the MEC, and the computing delay of the MEC is expressed as:
[0029]
[0030] where, represents the computing delay for executing the computing task in the MEC, is the time required for the SGD k to upload the task; let represent the energy consumption of the MEC per unit time, then the total energy consumption of the ES computing task is obtained by the following method:
[0031]
[0032] where, represents the computing energy consumption for executing the computing task in the MEC, is the transmission energy consumption required for the SGD k to upload the task;
[0033] Use T k and E k to represent the actual completion time and energy consumption of the task respectively. The tasks in the SGD and the edge server are executed in parallel, then the total delay of the SGD k task is:
[0034]
[0035] The total energy consumption of the SGD k task is:
[0036]
[0037] Therefore, the total overhead corresponding to the offloading model composed of local computing and edge server computing is:
[0038]
[0039] where, are used to specify the urgency of the task completion time and energy consumption of the SGD k respectively, and satisfy and The larger the value, the more sensitive the computing task is to processing delay.
[0040] Preferably, the optimization objective is to minimize the total overhead of the system by optimizing the offloading strategy ξ, the transmission power P, and the computing resource F. The optimization problem of joint computing offloading and resource allocation is expressed as:
[0041]
[0042] Among them, constraints C1 and C2 indicate that each SGD distributes its own tasks to the local and ES for parallel computing according to a preset ratio; constraint C3 indicates that the time delay of the computing task should be less than the maximum tolerable time delay; constraint C4 indicates that the available computing resources of each SGD should be non - negative; constraints C5 and C6 indicate that the MEC must allocate a positive computing resource to the associated SGD, and the computing resources allocated to all associated SGDs are less than the maximum allocable computing resources of the MEC; constraint C7 indicates that the transmission power of each SGD cannot exceed the maximum transmission power.
[0043] Preferably, step S4 includes:
[0044] Step S4.1: Calculate the offloading problem;
[0045] Step S4.2: Solve the resource allocation problem;
[0046] Step S4.3: Solve the transmit power allocation problem;
[0047] Step S4.4: Solve the computing resource allocation problem.
[0048] Preferably, the transmit power allocation problem is solved by the binary search method, and the solution steps are as follows:
[0049] Step S5.1: Input a feasible offloading strategy, peak power, and tolerance;
[0050] Step S5.2: Determine whether the condition is satisfied after substituting the peak power;
[0051] Step S5.3: Set the optimal transmit power value to the peak power;
[0052] Step S5.4: Initialize the upper bound value and the lower bound value;
[0053] Step S5.5: Calculate the mid - point value, and determine whether the mid - point value satisfies the condition; if so, update the lower bound to the mid - point value; if not, update the upper bound to the mid - point value;
[0054] Step S5.6: Determine whether the upper bound value - lower bound value is greater than the tolerance, update the optimal transmit power value to the mid - point value, and output the optimal transmit power value.
[0055] Preferably, the computing resource allocation problem is solved by the gradient descent method, and the solution steps are as follows:
[0056] Step S6.1: Input a feasible offloading strategy, unit resource size, attenuation rate, and minimum unit resource;
[0057] Step S6.2: Initialize the remaining computing resources, allocable steps, and gain;
[0058] Step S6.3: Select the computing task with the minimum gain and update the remaining computing resources, gain, and counter;
[0059] Step S6.4: Update the unit resource size and recalculate the allocable steps; determine whether the counter is less than the allocable steps. If so, return to Step S6.3 to recalculate the computing task with the minimum gain and update the remaining computing resources, gain, and counter; if not, obtain the optimal computing resource allocation.
[0060] Preferably, the joint computing offloading and resource allocation problem is solved using non - cooperative game, and the solution steps are as follows:
[0061] Step S7.1: Input the computing requirements, total bandwidth, local unit energy consumption, and edge server unit energy consumption of the computing tasks;
[0062] Step S7.2: Initialize the computing strategy and assign it to the optimal computing strategy;
[0063] Step S7.3: Traverse each smart grid device and randomly select a computing strategy for it;
[0064] Step S7.4: Use the binary search algorithm to calculate the optimal transmit power value;
[0065] Step S7.5: Use the gradient descent method to obtain the optimal computing resource allocation value; determine whether the game - theoretic utility function meets the conditions. If so, update the strategy to the latest strategy; if not, keep the original strategy unchanged;
[0066] Step S7.1: Determine whether the iteration condition is met. If so, output the optimal computing strategy, optimal transmit power allocation, and optimal computing resource allocation; if not, return to Step S7.2 to initialize the computing strategy and assign it to the optimal computing strategy.
[0067] According to the joint optimization system for computing offloading and resource allocation for smart grid provided by the present invention, it includes:
[0068] Module M1: Construct a network model in the scenario of multiple devices and a single server in the smart grid;
[0069] Module M2: Based on the network model, construct a local computing model and an edge computing server computing model, and calculate the total overhead;
[0070] Module M3: Model the total overhead optimization problem, including optimization model modeling, joint computing offloading and resource allocation problem;
[0071] Module M4: Optimize problem decomposition and solution, including decomposing the joint computing offloading and resource allocation problem into two sub-problems, using the binary search method and the gradient descent method to optimize the transmit power resource allocation and computing resource allocation respectively, using non-cooperative game to optimize the computing offloading strategy, and finally performing iterative optimization.
[0072] Compared with the prior art, the present invention has the following beneficial effects:
[0073] To meet the requirements of high time-delay sensitivity and low energy consumption of grid equipment in the smart grid, MEC is introduced, and an optimization method for the joint computing offloading and resource allocation problem is proposed. With the goal of minimizing time delay and energy consumption, the problem is divided into two sub-problems, and the resource allocation problem is divided into the transmit power allocation problem and the computing resource allocation problem. The binary search method is used to optimize the transmit resource allocation, and the gradient descent method is used to optimize the computing resource allocation. Finally, the selection of the computing offloading strategy is optimized through non-cooperative game, effectively meeting the goals of low time-delay and low energy consumption of smart grid equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] By reading the detailed description of the non-restrictive embodiments with reference to the following drawings, other features, objectives, and advantages of the present invention will become more obvious:
[0075] Figure 1 It is a schematic diagram of the overall process in the present invention;
[0076] Figure 2 It is a schematic diagram of the joint optimization problem decomposition process in the present invention;
[0077] Figure 3 It is a schematic diagram of the transmit power allocation optimization algorithm process in the present invention;
[0078] Figure 4 It is a schematic diagram of the computing resource allocation optimization algorithm process in the present invention;
[0079] Figure 5 It is a schematic diagram of the joint optimization algorithm process of computing offloading and resource allocation in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0080] The present invention will be described in detail below with reference to specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all belong to the protection scope of the present invention.
[0081] Embodiment
[0082] The present invention provides an optimization method for the joint computing offloading and resource allocation problem, as Figure 1 shown, including:
[0083] S100. Construct a network model in the scenario of multiple devices and a single server in the smart grid;
[0084] In the smart grid scenario, the system includes one MEC and K smart grid devices (SMDs), and the set is represented as K ∈ {1, 2..., K}; each SGD k ∈ K is randomly distributed in various places in the system and can communicate with the MEC through a wireless link. The MEC has certain computing resources and limited memory resources and can provide computing offloading services for the SGDs within its coverage. It is assumed that each SGD generates only one computationally intensive task at a time, and the task can be split, with part of it computed locally and the other part offloaded to the MEC for computing.
[0085] For the computing task of SGD k, we use a triple k ∈ K to represent it, d k , s k , respectively representing the input data volume, the required number of CPU cycles, and the maximum tolerable delay of the computing task.
[0086] In addition, the offloading strategy of each task is defined as ξ k ∈ {a k , β k}, where α k represents the proportion of the task computed locally, and β k represents the proportion of the task offloaded to the ES for computing, satisfying α k + β k = 1, and 0 ≤ α k , β k ≤ 1.
[0087] S200. Construct a local computing model and an edge computing server computing model;
[0088] When part of the task is computed locally, it mainly includes the local computing delay which can be expressed as:
[0089]
[0090] where, represents the local computing ability of SGD k, and α k is the proportion of SGD k computed locally.
[0091] Let Denote the energy consumption of SGD k per unit time. At this time, the local computing energy consumption can be calculated as:
[0092]
[0093] When the task part is computed on the edge server, the main latency includes transmission latency and computing latency, and the main energy consumption includes transmission energy consumption and computing energy consumption.
[0094] When SGD transmits data to MEC, the uplink transmission power is considered first. Considering that in the smart grid, SGD is in a stationary state during the entire offloading process, so the effective channel gain coefficient can be regarded as a constant within a time period. Then the corresponding channel power gain G k can be obtained as:
[0095]
[0096] where j k represents the distance between SGD k and MEC, and ε represents the path loss factor. In this paper, frequency division multiple access technology is adopted in the uplink to achieve channel sharing among users, and interference is ignored. Therefore, the uplink transmission power of SGD k is:
[0097]
[0098] where B represents the total uplink bandwidth, N is the number of SGDs participating in MEC offloading in the current time slot, p k is the transmission power of SGD k, and σ 2 is the noise power. In addition, the maximum transmission power of SGD k is P k , and we can deduce that SGD k can adjust its rate by controlling its transmission power.
[0099] When SGD k selects a certain proportion (β k ) of tasks to offload to MEC, it needs to upload the data to MEC first and receive the result returned from MEC after execution. In this case, let f k represent the computing resources of MEC, and satisfy the constraint 0 ≤ f k ≤ F k , where F k is the maximum value of the computing resources of MEC. The computing latency of MEC can be expressed as:
[0100]
[0101] where represents the computing latency of executing the computing task in MEC, is the time required for SGD k to upload the task. Let Denote the energy consumption of the MEC per unit time. Then, the total energy consumption of the ES computing task can be obtained as follows:
[0102]
[0103] Let T k and E k represent the actual completion time and energy consumption of the task respectively. It should be noted that the tasks in SGD and the edge server are executed in parallel. Therefore, the total delay of the SGD k task is:
[0104]
[0105] The total energy consumption of the SGD k task is:
[0106]
[0107] Therefore, the total overhead corresponding to the offloading model composed of local computing and edge server computing is:
[0108]
[0109] where, are used to specify the urgency of the task completion time and energy consumption of SGD k respectively, and satisfy and Specifically, The larger, the more sensitive the computing task is to the processing delay. On the contrary, the computing task is more sensitive to the processing energy consumption.
[0110] S300. Optimization problem modeling;
[0111] The optimization objective is to minimize the total overhead of the system by optimizing the offloading decision ξ, the transmit power allocation P, and the computing resource allocation F. According to the above discussion, the optimization problem of joint computing offloading and resource allocation can be formulated as:
[0112]
[0113] Constraint C1 and constraint C2 mean that each SGD can distribute its own tasks to the local and ES for parallel computing in a certain proportion. Constraint C3 means that the time delay of the computing task should be less than the maximum tolerable time delay. Constraint C4 means that the available computing resources of each SGD should be non-negative. Constraint C5 and C6 mean that the MEC must allocate a positive computing resource to the associated SGD, and the computing resources allocated to all associated SGDs are less than the maximum allocable computing resources of the MEC. Constraint C7 means that the transmission power of each SGD cannot exceed the maximum transmit power.
[0114] S400. Optimization problem decomposition and solution.
[0115] The above optimization problem has both binary variables and continuous non-integer variables. Therefore, the optimization problem is a Mixed-Integer Nonlinear Programming (MINLP) problem, which belongs to NP-hard. Therefore, we decompose the above optimization problem of joint computing offloading and resource allocation into two sub-problems, and the resource allocation problem can be further divided into two sub-problems for separate solution, as Figure 2 :
[0116] S400A. Computing offloading problem;
[0117]
[0118] where J * (ξ) is the optimal solution of the computing and power resource allocation problem.
[0119] S400B. Resource allocation problem;
[0120]
[0121] It should be noted that since the computing offloading constraints and resource allocation constraints are decoupled, the decomposition of the above problems will not affect the optimality of the final problem. The solutions to the two problems will be specifically described below to obtain the optimal solution of the original problem.
[0122] The resource allocation problem can be decomposed into two sub-problems as follows:
[0123] S400B1. Transmit power allocation problem;
[0124] S400B2. Computing resource allocation problem.
[0125] By setting an appropriate offloading strategy and substituting it into Equation (12) for decomposition and rearrangement, we can obtain:
[0126]
[0127] where W is a constant term not related to the variables to be optimized. The first term in the equation is the computing resource allocation problem, and the second term is the transmit power resource allocation problem. Therefore, we can conclude that the computing resource allocation problem and the transmit power resource allocation problem are two independent sub-problems and can be solved separately.
[0128] For the transmit power allocation problem, that is:
[0129]
[0130] where, When Q(p k ) reaches its minimum value, it is optimal. However, Q(p k) The second derivative of () is not always positive within the domain, so the function is non-convex. However, it is convex in a part of the domain, so this problem is a quasiconvex optimization problem, as follows:
[0131]
[0132] Q′(p k ) is completely determined by the numerator on the right side of the equal sign. Let Find the first derivative of as follows:
[0133]
[0134] The present invention uses the binary search method to solve the optimization, and the specific steps are as Figure 3 shown:
[0135] S510. Input a feasible offloading strategy Peak power P k and tolerance ε;
[0136] S520. Determine whether the peak power meets the condition; that is: if then at this time is always negative within the domain, and Q(p k ) obtains the optimal solution at the peak power P k . S530A. Set the optimal transmit power as the peak power. Otherwise, S530B. Initialize the upper bound value and the lower bound value, that is, p l = 0, p h = P k ;
[0137] S530B-1. Calculate the midpoint value p m = (p h + p l ) / 2;
[0138] After step S530B-1, step S530B-2 is also included: Determine whether Q′(p m ) < 0. If yes, update the lower bound to the midpoint value; if not, update the upper bound to the midpoint value;
[0139] S530B-3. Determine whether the upper bound value - the lower bound value is greater than the tolerance, that is, whether p h - p l is less than ε;
[0140] S530B-3Y. Update the optimal transmit power value to the midpoint value;
[0141] S530B-3N. Return to step S5300B-1 to calculate the midpoint value again;
[0142] S540. Output the optimal transmission power value.
[0143] Regarding the computing resource allocation problem, that is:
[0144]
[0145] Since Problem 17 is a strictly convex optimization problem. In this study, the gradient descent method is used for optimization. The specific algorithm process is as Figure 4 shown, and the specific steps are as follows:
[0146] S610. Input a feasible offloading strategy Unit resource size b, attenuation rate σ, and minimum unit resource z;
[0147] S620. Initialize the remaining computing resources The allocable number of steps m k and the gain τ;
[0148] S630. Select the computing task with the minimum gain and update the remaining computing resources, gain, and counter;
[0149] S640. Update the unit resource size and recalculate the allocable number of steps;
[0150] After step S640, there is also step S640A: Determine whether the counter is less than the allocable number of steps. If yes, return to step S630 to recalculate the computing task with the minimum gain and update the remaining computing resources, gain, and counter; if no, obtain the optimal computing resource allocation.
[0151] For the joint computing offloading and resource allocation problem, non - cooperative game is used for solution. In the game - theory framework, each SGD is regarded as a rational game participant, and their goal is to optimize their computing offloading decisions while considering their total computing cost.
[0152] The game is defined as G = {K, ξ k , J k}, where K is the set of rational game players, ξ k is the strategy set of each player, and J k is the total system cost of each player. Since the decisions of different SGDs will affect each other, we introduce the important concept of Nash equilibrium (NE) to solve the proposed non - cooperative game.
[0153] The present invention uses the marginal - utility theory to measure the impact of a certain decision - making behavior on the entire system. The utility function of the game participant is:
[0154]
[0155] Among them, ξ -k is the offloading strategy of devices other than SGD k, and J k (ξ k , ξ -k ) is the system overhead of SGD k, and J i (ξ i , ξ -i / k ) is the system overhead of SGD i when SGD k does not perform any operation. Therefore, J i (ξ i , ξ -i ) - J i (ξ i , ξ -i / k ) is the impact of the behavior of SGD k on other devices.
[0156] After the resource allocation step, the game updates the offloading strategy until the NE is obtained. Then, the uplink power allocation and computing resource allocation are optimized to minimize the total task overhead of all SGDs after each SGD submits the offloading strategy. Through mutual iteration, the system enters a stable state, and the specific details are as Figure 5 shown:
[0157] S710. Input the computing requirements C k of the computing task, the total bandwidth B, the local unit energy consumption and the unit energy consumption of the edge server
[0158] S720. Initialize the computing strategy ξ i , and assign it to the optimal computing strategy;
[0159] S730. Traverse each smart grid device and randomly select a suitable computing strategy for it
[0160] S740. Use the binary search algorithm to calculate the optimal transmit power value;
[0161] S750. Use the gradient descent method to obtain the optimal computing resource allocation value;
[0162] After step S750, there is also step S750A: Determine whether the game theory utility function satisfies the condition, that is, U i (ξ′ k , ξ -i ) < U k (ξ k , ξ -k ). If so, update the strategy to the latest strategy; if not, keep the original strategy unchanged;
[0163] S760. Determine whether the iteration condition is satisfied. If yes, output the optimal computing strategy, the optimal transmit power allocation, and the optimal computing resource allocation; if not, return to S720 to initialize the computing strategy and assign it to the optimal computing strategy.
[0164] The present invention models the computing offloading decision and resource allocation optimization problem for the multi-device single-MEC scenario in the smart grid and for some divisible tasks. By formulating the local computing delay and energy consumption, as well as the edge server computing delay and energy consumption, under multiple constraints, the system delay and energy consumption are taken as the total cost to establish an objective function for joint solution, which is decomposed into a computing offloading problem and a resource allocation problem. Then, the resource allocation problem is decomposed into a transmit power allocation problem and a computing resource allocation problem. Finally, the transmit power allocation problem is optimized by the binary search method, the computing resource allocation problem is optimized by the gradient descent method, and the computing offloading problem is optimized by non-cooperative game. After that, iterative optimization is continuously performed until the Nash equilibrium is reached to obtain the optimal result. Through simulation experiments, it is proved that this algorithm has better performance than other baseline algorithms such as the greedy strategy in terms of algorithm convergence, delay, energy consumption, and total computing overhead.
[0165] Those skilled in the art know that in addition to implementing the systems, devices, and their respective modules provided by the present invention in the form of pure computer-readable program codes, the method steps can be logically programmed to enable the systems, devices, and their respective modules provided by the present invention to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to implement the same program. Therefore, the systems, devices, and their respective modules provided by the present invention can be regarded as a kind of hardware component, and the modules included therein for implementing various programs can also be regarded as the structures within the hardware component; the modules for implementing various functions can also be regarded as both software programs for implementing the method and the structures within the hardware component.
[0166] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific implementation manners, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be arbitrarily combined with each other.
Claims
1. A joint optimization method for computing offloading and resource allocation for smart grid, characterized in that: include: Step S1: construct a network model for a multi-device single server scenario in a smart grid; Step S2: Based on the network model, build a local computing model and an edge computing server computing model, and calculate the total cost; Step S3: Modeling based on the total cost optimization problem, including optimization model modeling, joint computing offloading and resource allocation problems; Step S4: Decomposition and solution of the optimization problem, including decomposing the joint computing offloading and resource allocation problem into two sub-problems, using binary search method and gradient descent method to optimize the transmission power resource allocation and computing resource allocation respectively, using non-cooperative game to optimize the computing offloading strategy, and finally performing iterative optimization.
2. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 1, characterized in that: The network model is as follows: In the smart grid scenario, the system consists of a mobile edge computing MEC, K smart grid devices SGD, each SGD k∈K is randomly distributed in various places in the system and communicates with MEC through wireless links; For the SGD k computation task, use a triple k∈K represents, d k ,s k , They represent the amount of input data, the number of required CPU cycles, and the maximum tolerable delay of the computing task respectively.
3. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 2, characterized in that: The local computing model constructed is as follows: When part of the task is calculated locally, including the local calculation delay It is expressed as: in, represents the local computing power of SGD k, α k is the proportion of SGD k calculated locally; The local computing energy consumption is calculated as: in, represents the energy consumption per unit time of SGD k.
4. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 3, characterized in that: The constructed edge computing model is as follows: When SGD transmits data to MEC, the uplink transmission power is considered first. In the smart grid, SGD is in a static state during the entire unloading process, so the effective channel gain coefficient Considered as a constant within a period of time, the corresponding channel power gain G k for: Among them, j k represents the distance between SGD k and MEC, and ε represents the path loss factor; Frequency division multiple access technology is used in the uplink to achieve channel sharing between users, and interference is ignored. The uplink transmission power of SGD k is: Where B represents the total uplink bandwidth, N is the number of SGDs participating in ES offloading in the current time slot, and p k is the transmission power of SGD k, σ 2 is the noise power; Let f k represents the computing resources of MEC and satisfies the constraint 0≤f k ≤F k , F k is the maximum value of MEC computing resources, then the MEC computing delay is expressed as: in, Represents the computational latency of executing computational tasks in MEC. The time required to upload a task for SGD k; let Represents the energy consumption of MEC per unit time, and the total energy consumption of ES computing tasks is obtained by the following method: in, Represents the computing energy consumption of executing computing tasks in MEC, The transmission energy consumption required to upload the task for SGD k; Use T k and E k They represent the actual completion time and energy consumption of the task respectively. The tasks in SGD and edge servers are executed in parallel. Then the total delay of SGD k task is: The total energy consumption of SGD k tasks is: Therefore, the total cost of the offloading model consisting of local computing and edge server computing is: in, They are used to specify the urgency of task completion time and energy consumption of SGD k, and satisfy and The larger the value, the more sensitive the computing task is to processing delays.
5. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 4, characterized in that: The optimization goal is to minimize the total system overhead by optimizing the offloading strategy ξ, the transmission power P and the computing resources F. The optimization problem of joint computing offloading and resource allocation is expressed as: Among them, constraints C1 and C2 mean that each SGD distributes its tasks to the local and ES for parallel computing according to a preset ratio; constraint C3 means that the delay of the computing task must be less than the maximum tolerable delay; constraint C4 means that the available computing resources of each SGD should be a non-negative number; constraints C5 and C6 mean that MEC must allocate a positive computing resource to the associated SGD, and the computing resources allocated to all associated SGDs must be less than the maximum allocatable computing resources of MEC; constraint C7 means that the transmission power of each SGD cannot exceed the maximum transmission power.
6. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 1, characterized in that: The step S4 comprises: Step S4.1: Calculate the offloading problem; Step S4.2: Resource allocation problem; Step S4.3: Transmit power allocation problem; Step S4.4: Calculate resource allocation problem.
7. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 6, characterized in that: The transmit power allocation problem is solved by using a binary search method, and the solution steps are as follows: Step S5.1: Input feasible unloading strategies, peak power and tolerance; Step S5.2: Determine whether the conditions are met after substituting the peak power; Step S5.3: setting the optimal transmission power value as the peak power; Step S5.4: Initialize the upper limit value and the lower limit value; Step S5.5: Calculate the midpoint value and determine whether the midpoint value meets the conditions; if so, update the lower bound to the midpoint value; if not, update the upper bound to the midpoint value; Step S5.6: Determine whether the upper limit value minus the lower limit value is greater than the tolerance, update the optimal transmit power value to the midpoint value, and output the optimal transmit power value.
8. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 6, characterized in that: The computing resource allocation problem is solved by the gradient descent method, and the solution steps are as follows: Step S6.1: Input feasible unloading strategies, unit resource size, decay rate and minimum unit resource; Step S6.2: Initialize the remaining computing resources, allocatable steps and gains; Step S6.3: Select the computing task with the smallest gain and update the remaining computing resources, gain and counter; Step S6.4: Update the unit resource size and recalculate the number of allocatable steps; determine whether the counter is less than the number of allocatable steps. If so, return to step S6.3 to recalculate the computing task with the smallest gain and update the remaining computing resources, gain and counter; if not, obtain the optimal computing resource allocation.
9. The method for joint optimization of computation offloading and resource allocation for smart grid according to claim 1, characterized in that: The joint computing offloading and resource allocation problem is solved by non-cooperative game, and the solution steps are as follows: Step S7.1: Input the computing requirements, total bandwidth, local unit energy consumption, and edge server unit energy consumption of the computing task; Step S7.2: Initialize the calculation strategy and assign it to the optimal calculation strategy; Step S7.3: traverse each smart grid device and randomly select a computing strategy for it; Step S7.4: Use a binary search algorithm to calculate the optimal transmit power value; Step S7.5: Use the gradient descent method to obtain the optimal computing resource allocation value; determine whether the game theory utility function meets the conditions, if so, update the strategy to the latest strategy; if not, keep the original strategy unchanged; Step S7.1: Determine whether the iteration conditions are met. If so, output the optimal calculation strategy, optimal transmission power allocation, and optimal computing resource allocation; if not, return to step S7.2 to initialize the calculation strategy and assign it to the optimal calculation strategy.
10. A joint optimization system for computing offloading and resource allocation for smart grid, characterized in that: The method for joint optimization of computing offloading and resource allocation for smart grids according to any one of claims 1 to 9 comprises: Module M1: Constructing a network model for a multi-device single server scenario in a smart grid; Module M2: Based on the network model, build the local computing model and the edge computing server computing model, and calculate the total cost; Module M3: Modeling based on total cost optimization problems, including optimization model modeling, joint computing offloading and resource allocation problems; Module M4: Optimization problem decomposition and solution, including decomposing the joint computing offloading and resource allocation problem into two sub-problems, using binary search and gradient descent methods to optimize the transmission power resource allocation and computing resource allocation respectively, using non-cooperative game to optimize the computing offloading strategy, and finally performing iterative optimization.
Citation Information
Patent Citations
Resource allocation and task unloading method based on Internet of Things edge computing
CN116089091A