Edge computing network unloading distribution and energy management method based on intelligent electric meter
Through the optimization of deep neural network and Lagrangian dual function, the problems of computing power and battery capacity limitation of IoT devices are solved, and efficient computing rate and energy trading returns are achieved.
Patent Information
- Application Number
- CN202510455549.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-08
AI Technical Summary
Traditional methods have limitations in the computing power and battery capacity of IoT devices, making it difficult to quickly find the global optimal solution, resulting in waste of computing resources and low energy transaction returns.
Deep neural network is used to combine Lagrangian dual function and mathematical optimization to obtain unloading decisions through deep reinforcement learning (DRL), optimize the energy allocation ratio, and achieve fast global optimal solutions and high energy trading returns.
It realizes the rapid acquisition of global optimal solutions, improves the calculation rate and energy trading returns, and reduces the waste of computing resources.
Smart Images

Figure CN120282210A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of edge computing network allocation, and particularly relates to an edge computing network offloading allocation and energy management method based on an intelligent electricity meter. This method is applicable to energy management based on an intelligent electricity meter and the 0-1 offloading mode, and decides the allocation scheme of energy distribution management and computing task offloading in the edge computing network to achieve a higher computing rate and energy trading revenue. Background Art
[0002] In recent years, with the rise of the intelligent Internet of Things (IoT), the number of intelligent IoT devices has been increasing, such as autonomous driving, smart home, and smart city. While these intelligent devices provide great convenience to people's lives, they also generate a large number of high-real-time computing tasks. The computing power and battery capacity of traditional IoT devices can no longer meet the needs. Therefore, there is an urgent need for new technologies to solve these two restrictive problems.
[0003] Mobile edge computing (MEC) technology can deploy edge servers near IoT devices to provide low-latency real-time computing services for IoT devices with low computing power, and has gradually become one of the effective methods to solve the computing power problem of IoT devices. Distributed power sources based on renewable energy can provide continuous clean energy for IoT nodes to solve the battery capacity problem of IoT devices. Intelligent electricity meters are used in the network to control the electricity distribution scheme of the entire network. Part of the electric energy generated by renewable energy is used for task calculation, and the other part is used for electricity trading in the power grid to obtain energy trading revenue. Combining MEC technology with distributed renewable power sources and using intelligent electricity meters for power distribution at the same time has become an effective way to break through the bottlenecks of the computing performance and battery capacity of IoT devices.
[0004] An edge computing network generally needs to consider the computing methods of tasks, including local computing and edge computing. Edge computing includes two task offloading strategies. One is the partial offloading strategy, which allows tasks to be calculated separately, that is, part of the tasks are calculated locally and the other part is calculated on the edge server; the other is the 0-1 offloading strategy, which regards the task as a whole and cannot be calculated separately. Traditional heuristic or methods that only use mathematical optimization generally need to search the entire behavior space and rely on empirical rules. As the number of devices increases, it is easy to produce local optima and requires a large amount of computing resources. Summary of the Invention
[0005] The purpose of the present invention is to provide an edge computing network offloading allocation and energy management method based on an intelligent electricity meter, which can quickly generate a global optimal solution, and optimize the energy allocation ratio problem based on the global optimal solution to obtain the optimal revenue.
[0006] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] An edge computing network offloading allocation and energy management method based on an intelligent meter. The edge computing network based on the intelligent meter includes a renewable energy device, an intelligent meter, a power grid trading system, M edge servers, and N Internet of Things devices. The edge computing network offloading allocation and energy management method based on the intelligent meter is implemented on the intelligent meter and includes:
[0008] Using a deep neural network, based on the channel gains of N Internet of Things devices in the current time frame, obtain the offloading decisions of the N Internet of Things devices;
[0009] Construct an energy efficiency function according to the offloading decisions of the N Internet of Things devices, calculate the trading energy ratio and the energy consumption ratio of the N Internet of Things devices based on the energy efficiency function. If the trading energy ratio is zero, then use the Lagrangian dual function to update the energy consumption ratio of the N Internet of Things devices; otherwise, do not update;
[0010] Input the offloading decisions of the N Internet of Things devices, the energy consumption ratio of the N Internet of Things devices, and the trading energy ratio into the energy efficiency function, and calculate the energy efficiency function value of the current time frame;
[0011] Based on the energy efficiency function values of the current time frame and historical time frames, obtain the average energy efficiency function value, calculate the loss function based on the average energy efficiency function value, and train and update the deep neural network;
[0012] Using the trained and updated deep neural network, based on the channel gains of N Internet of Things devices in the time frame to be allocated, obtain the offloading decisions of the N Internet of Things devices in the time frame to be allocated, and complete the task offloading allocation;
[0013] Based on the offloading decisions of the N Internet of Things devices in the time frame to be allocated, calculate the energy consumption ratio and the trading energy ratio of the N Internet of Things devices in the time frame to be allocated, and complete the energy management.
[0014] The following also provides several optional methods, which are not additional limitations to the above overall solution, but only further supplements or optimizations. Without technical or logical contradictions, each optional method can be combined with the above overall solution alone, or multiple optional methods can be combined with each other.
[0015] Preferably, the step of using a deep neural network to obtain the offloading decisions of the N Internet of Things devices based on the channel gains of the N Internet of Things devices in the current time frame includes:
[0016] The channel gains of the N Internet of Things devices in the current time frame Input the deep neural network to obtain the offloading decision probabilities \(p = \pi\) of \(N\) Internet of Things devices output by the deep neural network θ (h), where \(p = [p_1, p_2, \ldots, p N \), represents the channel gain between the \(i\)-th Internet of Things device and the \(j\)-th edge server, \(i\in[1, 2, \ldots, N]\), \(j\in[1, 2, \ldots, M]\), \(\pi θ (\cdot)\) represents the deep neural network with parameter \(\theta\), \(p i represents the set of offloading decision probabilities of the \(i\)-th Internet of Things device, represents the probability of local computing of the \(i\)-th Internet of Things device, represents the probability of communication between the \(i\)-th Internet of Things device and the \(j\)-th edge server;
[0017] Take the element with the highest probability in the set of offloading decision probabilities of each Internet of Things device as the offloading decision of the Internet of Things device. Combine the offloading decisions of all Internet of Things devices to obtain the offloading decisions \(x = [x_1, x_2, \ldots, x N \), \(x i represents the offloading decision of the \(i\)-th Internet of Things device, \(x i = 0 means that the \(i\)-th Internet of Things device performs local computing, \(x i = j means that the \(i\)-th Internet of Things device communicates with the \(j\)-th edge server.
[0018] Preferably, constructing the energy efficiency function according to the offloading decisions of \(N\) Internet of Things devices includes:
[0019]
[0020] In the formula, \(Q(h, x, e i , e t ) represents the energy efficiency function regarding the channel gain \(h\) of \(N\) Internet of Things devices, the offloading decisions \(x\) of \(N\) Internet of Things devices, the proportion \(e i of the energy consumption of the \(i\)-th Internet of Things device and the proportion \(e t of the trading energy, \(x i represents the offloading decision of the \(i\)-th Internet of Things device, represents the local computing rate of the \(i\)-th Internet of Things device, represents the communication rate between the \(i\)-th Internet of Things device and the \(j\)-th edge server, \(j\in[1, 2, \ldots, M]\), \([\cdot] T represents the transpose operation, \(\omega\) represents the proportion of the energy trading revenue in the overall energy efficiency function, \(\alpha\) represents the revenue generated by unit energy trading, and \(E\) represents the power supply of the renewable energy device.
[0021] Preferably, calculating the proportion of trading energy and the proportion of energy consumption of N Internet of Things devices based on the energy efficiency function includes:
[0022] Solve the energy efficiency function Q(h, x, e i , e t ) with respect to the proportion of energy consumption e i of the i-th Internet of Things device Let the partial derivative be equal to 0, calculate the proportion of energy consumption e i of the i-th Internet of Things device, and at the same time solve the proportion of trading energy
[0023] Preferably, the local computing rate of the i-th Internet of Things device is calculated as follows:
[0024]
[0025] In the formula, c represents the computing energy efficiency coefficient of the Internet of Things device, T represents the length of a time frame, and Φ represents the number of cycles required for the Internet of Things device to process one bit of task;
[0026] The communication rate between the i-th Internet of Things device and the j-th edge server is calculated as follows:
[0027]
[0028] In the formula, B represents the network bandwidth, v u represents the data generated by communication, represents the channel gain between the i-th Internet of Things device and the j-th edge server, and N0 represents the noise power.
[0029] Preferably, updating the proportion of energy consumption of N Internet of Things devices using the Lagrangian dual function includes:
[0030] Construct the Lagrangian dual function as follows:
[0031]
[0032] In the formula, L(e i , e t , λ) represents the Lagrangian dual function with respect to the proportion of energy consumption e i of the i-th Internet of Things device, the proportion of trading energy e t and the Lagrange multiplier coefficient λ, is a binary parameter, represents that the i-th Internet of Things device does not perform local computing, Indicates that the i-th Internet of Things device performs local computing, is a binary parameter, indicates that the i-th Internet of Things device does not communicate with the j-th edge server, indicates that the i-th Internet of Things device communicates with the j-th edge server. E represents the power supply of the renewable energy device, c represents the computing energy efficiency coefficient of the Internet of Things device, T represents the length of a time frame, Φ represents the number of cycles required for the Internet of Things device to process one bit of task, B represents the network bandwidth, v u represents the data generated by communication, represents the channel gain between the i-th Internet of Things device and the j-th edge server, N0 represents the noise power, ω represents the proportion of the energy trading revenue in the overall energy efficiency function, and α represents the revenue generated by unit energy trading;
[0033] According to the Lagrangian dual function, solve the Lagrange multiplier coefficient λ, and calculate the proportion of the energy consumption of the i-th Internet of Things device based on the Lagrange multiplier coefficient λ Obtain the proportion of the energy consumption of N Internet of Things devices.
[0034] Preferably, the solving of the Lagrange multiplier coefficient λ according to the Lagrangian dual function includes:
[0035] (1) Initialize the Lagrange multiplier coefficient λ, the minimum Lagrange multiplier coefficient λ min and the maximum Lagrange multiplier coefficient λ max ;
[0036] (2) Calculate the partial derivatives of the Lagrangian dual function L(e i , e t , λ) with respect to the Lagrange multiplier coefficient λ and the minimum Lagrange multiplier coefficient λ min and
[0037] (3) If is less than the threshold, take the current λ as the finally calculated Lagrange multiplier coefficient and end the loop; otherwise, if then let λ max = λ and and re-execute step (2); otherwise, let λ min = λ and and re-execute step (2).
[0038] Preferably, the calculating of the loss function based on the average energy efficiency function value includes:
[0039]
[0040] Where Loss is the loss function, and Q * represents the energy efficiency function value of the current time frame, and baseline represents the average energy efficiency function value.
[0041] An edge computing network offloading allocation and energy management method based on smart meters provided by the present invention integrates smart meters into the edge computing network, uses a 0-1 offloading mode, uses distributed power for network functions, and trades electrical energy with the power grid to generate income, and studies the problem of maximizing the weighted sum of computing rate and energy trading. The present invention combines deep reinforcement learning (DRL) and mathematical optimization, uses DRL to obtain offloading decisions, and uses mathematical optimization to obtain energy allocation, which can quickly obtain the optimal strategy while obtaining higher income. Description of the Drawings
[0042] Figure 1 is a schematic structural diagram of the edge computing network based on smart meters of the present invention;
[0043] Figure 2 is a flowchart of an edge computing network offloading allocation and energy management method based on smart meters of the present invention. Detailed Embodiments
[0044] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention.
[0046] The present invention adopts a 0-1 offloading strategy, and the optimization goal is the weighted sum of the maximum computing rate and energy trading income. Different from traditional heuristic or methods that only use mathematical optimization, the present invention proposes a method that combines deep reinforcement learning and mathematical optimization. Traditional algorithms generally need to search the entire behavior space and rely on empirical rules. As the number of devices increases, it is easy to produce local optima and requires a large amount of computing resources. The method proposed by the present invention obtains the offloading strategies of all Internet of Things devices in the network through DRL, can overcome the above defects, quickly generate a solution close to the global optimum, and on this basis optimize the energy allocation ratio problem, so as to obtain the optimal income.
[0047] As Figure 1As shown in the figure, the edge computing network based on smart meters in this embodiment includes renewable energy devices, a smart meter, a grid trading system (abbreviated as the grid), M edge servers, and N Internet of Things devices. Among them, the renewable energy devices are used for energy supply, and the smart meter performs computing task offloading and energy decision-making to determine whether the energy is used for trading or task computing. In the entire system, T is the length of a time frame. During a certain period of time, the power supply of the renewable energy device is expressed as E, and the energy consumed by the i-th Internet of Things device is expressed as E i , and the energy transported to the grid for trading is expressed as E t ; Express E i as e i E, and express E t as e t E, and it should satisfy α represents the revenue generated by unit energy trading, then the total revenue of energy trading can be expressed as αe t E.
[0048] As Figure 2 shown, a method for offloading allocation and energy management of an edge computing network based on smart meters in this embodiment is implemented on the smart meter, including:
[0049] (1) In the training stage:
[0050] (1.1) Using a deep neural network, based on the channel gains of N Internet of Things devices in the current time frame, obtain the offloading decisions of the N Internet of Things devices.
[0051] Input the channel gains of N Internet of Things devices in the current time frame into the deep neural network, and obtain the offloading decision probabilities p = π θ (h) of the N Internet of Things devices output by the deep neural network, where p = [p1, p2,..., p N , represents the channel gain between the i-th Internet of Things device and the j-th edge server, i ∈ [1, 2,..., N], j ∈ [1, 2,..., M], and π θ (·) represents the deep neural network with parameters θ, and p i represents the offloading decision probability set of the i-th Internet of Things device, represents the probability of local computing of the i-th Internet of Things device, represents the probability of communication between the i-th Internet of Things device and the j-th edge server.
[0052] Take the element with the highest probability in the offloading decision probability set of each Internet of Things device as the offloading decision of the Internet of Things device. Combining the offloading decisions of all Internet of Things devices, obtain the offloading decisions x = [x1, x2,..., xN , x i represents the offloading decision of the \(i\)-th Internet of Things device, and \(x\) i = 0 indicates that the \(i\)-th Internet of Things device performs local computing, and \(x\) i = \(j\) indicates that the \(i\)-th Internet of Things device communicates with the \(j\)-th edge server.
[0053] (1.2) Construct an energy efficiency function based on the offloading decisions of \(N\) Internet of Things devices, calculate the proportion of transaction energy and the proportion of energy consumption of \(N\) Internet of Things devices based on the energy efficiency function. If the proportion of transaction energy is zero, then use the Lagrangian dual function to update the proportion of energy consumption of \(N\) Internet of Things devices; otherwise, do not update.
[0054] (1.2.1) Construct an energy efficiency function according to the offloading decision \(x\), including:
[0055]
[0056] In the formula, \(Q(h, x, e\) i , e t ) represents the energy efficiency function regarding the channel gain \(h\) of \(N\) Internet of Things devices, the offloading decision \(x\) of \(N\) Internet of Things devices, the proportion of energy consumption \(e\) of the \(i\)-th Internet of Things device i and the proportion of transaction energy \(e\) t in the current time frame, \(x\) i represents the offloading decision of the \(i\)-th Internet of Things device, represents the local computing rate of the \(i\)-th Internet of Things device, represents the communication rate of the \(i\)-th Internet of Things device communicating with the \(j\)-th edge server, \(j\in[1, 2, \ldots, M]\), and \([\cdot]\) T represents the transpose operation, \(\omega\) represents the proportion of the energy trading revenue in the overall energy efficiency function, \(\alpha\) represents the revenue generated by unit energy trading, and \(E\) represents the power supply of the renewable energy device.
[0057] Among them, the local computing rate of the \(i\)-th Internet of Things device is calculated as follows:
[0058]
[0059] In the formula, \(c\) represents the computing energy efficiency coefficient of the Internet of Things device, \(T\) represents the length of a time frame, and \(\varPhi\) represents the number of cycles required for the Internet of Things device to process one bit of task.
[0060] Among them, the communication rate of the \(i\)-th Internet of Things device communicating with the \(j\)-th edge server is calculated as follows:
[0061]
[0062] Where B represents the network bandwidth, v u represents the additional data generated by communication, and N0 represents the noise power. The communication between the IoT device and the edge server means that the IoT device transfers the computing task to the edge server, and each IoT device can only choose one of local computing or communication.
[0063] After constructing the energy efficiency function, solve the partial derivative of the energy efficiency function Q(h, x, e i , e t ) with respect to the energy consumption ratio e i of the i-th IoT device Let the partial derivative be equal to 0, calculate the energy consumption ratio e i of the i-th IoT device, and at the same time solve the trading energy ratio If the trading energy ratio e t is between 0 and 1, then execute step (1.3); otherwise, it means there is no excess energy for trading. At this time, the trading energy ratio e t = 0, and go to execute step (1.2.2), where the energy consumption ratios of N IoT devices need to be updated.
[0064] (1.2.2) Construct the Lagrangian dual function as follows:
[0065]
[0066] Where L(e i , e t , λ) represents the Lagrangian dual function with respect to the energy consumption ratio e i of the i-th IoT device, the trading energy ratio e t and the Lagrange multiplier coefficient λ, is a binary parameter, represents that the i-th IoT device does not perform local computing, represents that the i-th IoT device performs local computing, is a binary parameter, represents that the i-th IoT device does not communicate with the j-th edge server, represents that the i-th IoT device communicates with the j-th edge server, and v u represents the data generated by communication.
[0067] According to the Lagrangian dual function, solve the Lagrange multiplier coefficient λ, and calculate the energy consumption ratio of the i-th IoT device based on the Lagrange multiplier coefficient λ.
[0068] In this embodiment, the bisection method is used to solve the Lagrange multiplier coefficient λ. In other embodiments, other solution methods such as the direct solution method and the determinant solution method can also be adopted. The solution process of this embodiment is as follows:
[0069] A. Initialize the Lagrange multiplier coefficient λ, the minimum Lagrange multiplier coefficient λ min and the maximum Lagrange multiplier coefficient λ max , for example, initialize λ min = 0, λ max = 99999999, λ = 50000000.
[0070] B. Calculate the partial derivatives i and t of the Lagrangian dual function L(e min , e , λ) with respect to the Lagrange multiplier coefficient λ and the minimum Lagrange multiplier coefficient λ
[0071] C. If is less than the threshold, take the current λ as the finally calculated Lagrange multiplier coefficient and end the loop; otherwise, if , then let λ max = λ and and re - execute step B; otherwise, in addition to the above two cases, let λ min = λ and and re - execute step B.
[0072] (1.3) Input the offloading decisions of N Internet of Things devices, the energy consumption ratios and transaction energy ratios of N Internet of Things devices into the energy efficiency function, and calculate the energy efficiency function value of the current time frame.
[0073] Substitute the channel gains h of N Internet of Things devices, the offloading decisions x of N Internet of Things devices, the energy consumption ratio e i of the latest i - th Internet of Things device and the transaction energy ratio e t into the energy efficiency function, and solve to obtain the energy efficiency function value Q * of the current time frame.
[0074] (1.4) Obtain the average energy efficiency function value based on the energy efficiency function values of the current time frame and historical time frames, calculate the loss function based on the average energy efficiency function value, and train and update the deep neural network.
[0075] To reduce the computational pressure, a preset number of historical time frames are taken to calculate the average energy efficiency function value. For example, in this embodiment, the average value of the energy efficiency function values of the first 100 iterations of the current iteration is calculated as the average energy efficiency function value baseline. The average energy efficiency function value baseline of the first round is recorded as 0. If the number of rounds is less than 100, the actual number of rounds is calculated.
[0076] After obtaining the average energy efficiency function value baseline, the loss function is calculated as follows:
[0077]
[0078] In the formula, Loss is the loss function, Q * represents the energy efficiency function value of the current time frame, and baseline represents the average energy efficiency function value. When updating the deep neural network according to the loss function, it is implemented based on a conventional algorithm, such as the backpropagation algorithm.
[0079] (2) Inference application stage:
[0080] (2.1) Using the trained and updated deep neural network, based on the channel gains of N Internet of Things devices in the time frame to be allocated, the offloading decisions of N Internet of Things devices in the time frame to be allocated are obtained, and the task offloading allocation is completed.
[0081] (2.2) According to step (1.2), based on the offloading decisions of N Internet of Things devices in the time frame to be allocated, the consumption energy ratio and trading energy ratio of N Internet of Things devices in the time frame to be allocated are calculated, and the energy management is completed.
[0082] It should be noted that in this embodiment, the training stage and the inference application stage are relatively independent stages. Only one stage can be executed, or two stages can be executed jointly. This embodiment does not make any restrictions.
[0083] In another embodiment, an edge computing network offloading allocation and energy management system based on a smart meter is further provided. The edge computing network offloading allocation and energy management system based on a smart meter includes a renewable energy device, a smart meter, a grid trading system, M edge servers, and N Internet of Things devices. The smart meter performs the following operations:
[0084] Using a deep neural network, based on the channel gains of N Internet of Things devices in the current time frame, the offloading decisions of N Internet of Things devices are obtained;
[0085] An energy efficiency function is constructed according to the offloading decisions of N Internet of Things devices. Based on the energy efficiency function, the trading energy ratio and the consumption energy ratio of N Internet of Things devices are calculated. If the trading energy ratio is zero, the consumption energy ratio of N Internet of Things devices is updated using the Lagrange dual function; otherwise, it is not updated.
[0086] Input the offloading decisions of N Internet of Things (IoT) devices, the proportion of energy consumption and the proportion of traded energy of N IoT devices into the energy efficiency function, and calculate the energy efficiency function value of the current time frame.
[0087] Based on the energy efficiency function values of the current time frame and historical time frames, obtain the average energy efficiency function value, calculate the loss function based on the average energy efficiency function value, and train and update the deep neural network.
[0088] Adopt the trained and updated deep neural network, and based on the channel gains of N IoT devices in the time frame to be allocated, obtain the offloading decisions of N IoT devices in the time frame to be allocated, and complete the task offloading allocation.
[0089] Based on the offloading decisions of N IoT devices in the time frame to be allocated, calculate the proportion of energy consumption and the proportion of traded energy of N IoT devices in the time frame to be allocated, and complete the energy management.
[0090] For the specific limitations of the edge computing network offloading allocation and energy management system based on smart meters, reference can be made to the limitations of the edge computing network offloading allocation and energy management method based on smart meters in the above text, which will not be elaborated here.
[0091] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0092] The above-described embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.
Claims
1. An edge computing network offloading allocation and energy management method based on smart meters, characterized in that, The edge computing network based on smart meters includes renewable energy devices, a smart meter, a grid trading system, M edge servers, and N Internet of Things devices. The task offloading allocation and energy management method based on the smart meter is implemented on the smart meter and includes: Using a deep neural network, obtain the offloading decisions of N Internet of Things devices according to the channel gains of the N Internet of Things devices in the current time frame; Construct an energy efficiency function according to the offloading decisions of the N Internet of Things devices, calculate the trading energy ratio and the energy consumption ratio of the N Internet of Things devices based on the energy efficiency function. If the trading energy ratio is zero, use the Lagrangian dual function to update the energy consumption ratio of the N Internet of Things devices; otherwise, do not update; Input the offloading decisions of the N Internet of Things devices, the energy consumption ratio of the N Internet of Things devices, and the trading energy ratio into the energy efficiency function, and calculate the energy efficiency function value of the current time frame; Obtain the average energy efficiency function value based on the energy efficiency function values of the current time frame and historical time frames, calculate the loss function based on the average energy efficiency function value, and train and update the deep neural network; Use the trained and updated deep neural network to obtain the offloading decisions of the N Internet of Things devices in the to-be-allocated time frame according to the channel gains of the N Internet of Things devices in the to-be-allocated time frame, and complete the task offloading allocation; Based on the offloading decisions of the N Internet of Things devices in the to-be-allocated time frame, calculate the energy consumption ratio and the trading energy ratio of the N Internet of Things devices in the to-be-allocated time frame, and complete the energy management.
2. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 1, wherein, The using a deep neural network to obtain the offloading decisions of N Internet of Things devices according to the channel gains of the N Internet of Things devices in the current time frame includes: The channel gains of N Internet of Things devices in the current time frame are input into a deep neural network to obtain the offloading decision probabilities p = π θ (h) of the N Internet of Things devices output by the deep neural network, where p = [p1, p2, …, p N , represents the channel gain between the i-th Internet of Things device and the j-th edge server, i ∈ [1, 2, …, N], j ∈ [1, 2, …, M], π θ (·) represents a deep neural network with parameters θ, p i represents the set of offloading decision probabilities of the i-th Internet of Things device, represents the probability of local computing of the i-th Internet of Things device, represents the probability of communication between the i-th Internet of Things device and the j-th edge server; Select the element with the highest probability from the set of offloading decision probabilities for each Internet of Things device as the offloading decision of the Internet of Things device. By synthesizing the offloading decisions of all Internet of Things devices, the offloading decisions x = [x1, x2, …, x N of the N Internet of Things devices are obtained, where x i represents the offloading decision of the i-th Internet of Things device. x i = 0 indicates that the i-th Internet of Things device performs local computing, and x i = j indicates that the i-th Internet of Things device communicates with the j-th edge server.
3. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 1, wherein The constructing an energy efficiency function according to the offloading decisions of the N Internet of Things devices includes: where Q(h, x, e i , e t ) represents the energy efficiency function with respect to the channel gain h of N Internet of Things devices in the current time frame, the offloading decisions x of N Internet of Things devices, the proportion of energy consumption e i and the proportion of traded energy e t . x i represents the offloading decision of the i-th Internet of Things device, represents the local computing rate of the i-th Internet of Things device, represents the communication rate between the i-th Internet of Things device and the j-th edge server, j ∈ [1, 2,..., M], [·] T represents the transpose operation, ω represents the proportion of the energy trading revenue in the overall energy efficiency function, α represents the revenue generated by unit energy trading, and E represents the power supply of the renewable energy device.
4. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 3, wherein The calculating the trading energy ratio and the energy consumption ratio of the N Internet of Things devices based on the energy efficiency function includes: Solve the energy efficiency function Q(h, x, e i , e t ) with respect to the proportion of the consumed energy e i of the i-th Internet of Things device Let the partial derivative be equal to 0, and calculate the proportion of the consumed energy e i of the i-th Internet of Things device. Meanwhile, solve the proportion of the traded energy 5. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 3, wherein The local computing rate of the i-th Internet of Things device The calculation formula is as follows: In the formula, c represents the computing energy efficiency coefficient of the Internet of Things device, T represents the length of a time frame, and Φ represents the number of cycles required for the Internet of Things device to process one bit of task; The communication rate at which the i-th Internet of Things device communicates with the j-th edge server is calculated as follows: where B represents the network bandwidth, and v u represents the data generated by the communication, represents the channel gain between the i-th Internet of Things device and the j-th edge server, and N0 represents the noise power.
6. The edge computing network offloading allocation and energy management method based on the smart meter according to claim 1, characterized in that The using the Lagrangian dual function to update the energy consumption ratio of the N Internet of Things devices includes: Construct the Lagrangian dual function as follows: where L(e i ,e t ,λ) represents the Lagrangian dual function with respect to the energy consumption ratio e i of the i-th Internet of Things device, the transaction energy ratio e t and the Lagrange multiplier coefficient λ. is a binary parameter. indicates that the i-th Internet of Things device does not perform local computing. indicates that the i-th Internet of Things device performs local computing. is a binary parameter. indicates that the i-th Internet of Things device does not communicate with the j-th edge server. indicates that the i-th Internet of Things device communicates with the j-th edge server. E represents the power supply of the renewable energy device, c represents the computing energy efficiency coefficient of the Internet of Things device, T represents the length of a time frame, Φ represents the number of cycles required for the Internet of Things device to process one bit of task, B represents the network bandwidth, v n represents the data generated by communication. represents the channel gain between the i-th Internet of Things device and the j-th edge server, N0 represents the noise power, ω represents the proportion of the energy trading revenue in the overall energy efficiency function, and α represents the revenue generated by unit energy trading. According to the Lagrangian dual function, solve the Lagrange multiplier coefficient λ, and calculate the proportion of the energy consumption of the i-th Internet of Things device based on the Lagrange multiplier coefficient λ Obtain the proportion of the energy consumption of N Internet of Things devices.
7. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 6, wherein The solving the Lagrangian multiplier coefficient λ according to the Lagrangian dual function includes: (1) Initialize the Lagrange multiplier coefficient λ, the minimum Lagrange multiplier coefficient λ min and the maximum Lagrange multiplier coefficient λ max ; (2) Calculate the partial derivatives of the Lagrangian dual function \(L(e i ,e t ,\lambda)\) with respect to the Lagrange multiplier coefficient \(\lambda\) and the minimum Lagrange multiplier coefficient \(\lambda min \) and (3) If is less than the threshold value, take the current λ as the finally calculated Lagrange multiplier coefficient and end the loop; otherwise, if then let λ max = λ and and re - execute step (2); otherwise, let λ min = λ and and re - execute step (2).
8. The edge computing network offloading allocation and energy management method based on an intelligent electric meter according to claim 2, wherein The calculating the loss function based on the average energy efficiency function value includes: where Loss is the loss function, and Q * represents the energy efficiency function value of the current time frame, and baseline represents the average energy efficiency function value.