Energy-saving and secure enhanced task offloading method in D2D integrated MEC network

By deploying multiple models in the D2D integrated MEC network and utilizing optimization problems and heuristic algorithms, the energy efficiency, delay optimization and security balance problems when multiple IoT devices are simultaneously unloaded, and the system energy efficiency and security are improved.

CN120034841AActive Publication Date: 2025-05-23SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510481198.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-05-23
Estimated Expiration
2045-04-17

AI Technical Summary

Technical Problem

Existing task offloading methods are difficult to balance energy efficiency, latency optimization, and security when multiple IoT devices are simultaneously unloading tasks, especially ignoring security issues.

Method used

By deploying system models, communication models, computational offload models and security models in D2D integrated MEC networks, system decision-making is optimized using hybrid integer nonlinear planning problems, combined with preset heuristic algorithms to achieve energy efficiency, delay optimization and security improvement.

Benefits of technology

Energy efficiency and delay optimization when multiple IoT devices are simultaneously unloaded, while significantly improving the security of task unloading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034841A_ABST
    Figure CN120034841A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of edge computing, and particularly relates to an energy-saving and safe enhanced task offloading method in a D2D integrated MEC network, a wireless base station is deployed in the center, an MEC server is arranged in the wireless base station, and H edge devices and K mobile users are arranged in the range of the base station; deploying a communication model: establishing connection between the mobile user and the edge equipment and a wireless base station BS through a cellular link; based on the communication model, when the task is unloaded, the mobile user uploads the task to the edge device through the D2D link, or processes the task locally; determining an unloading decision based on the weighted value of the unloading energy consumption and the security risk; modeling the problem into an optimization problem, converting the optimization problem into an integer linear programming problem which is easy to solve, and solving the problem to obtain an optimal unloading decision; processing through a preset heuristic algorithm based on the strategy to meet engineering requirements; the task unloading strategy provided by the invention effectively improves the energy efficiency and safety of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of edge computing technology, and in particular to an energy-saving and security-enhanced task offloading method in a D2D integrated MEC network. Background Art

[0002] With the rapid development of the Internet of Things, people's demand for low latency and efficient computing has increased significantly. Mobile edge computing (MEC) has become a key technology to improve the performance of IoT systems. In cellular networks, computing offloading through D2D communication between edge devices can effectively reduce task latency and improve energy efficiency.

[0003] The tremendous development of the Internet of Things (IoT) has made it one of the leading technologies in recent years. It has profoundly affected many industries, including automotive, health, energy, and consumer electronics. It has also made a significant contribution to global economic growth. However, IoT devices often face the challenges of limited battery capacity and insufficient computing power. With the increase in data volume and the rapid growth of different types of devices, tasks that require a lot of computing resources are becoming more and more complex. These tasks include augmented reality (AR), real-time video processing, etc., making it more important to meet computing latency and improve energy efficiency.

[0004] To address these challenges, researchers have proposed computation offloading, which is to migrate complex tasks to more capable network nodes. This approach has led to the development of computing methods such as cloud computing, mobile edge computing (MEC), and fog computing. These technologies effectively overcome the limitations of IoT devices and meet the needs of low-latency, energy-saving data processing by distributing computing resources across layers, from the cloud to the edge of the network. Although cloud servers provide huge computing power, data transmission to the cloud often introduces significant latency, which makes it unsuitable for real-time or large-scale online tasks. MEC deploys cloud resources closer to users or devices (such as BS and edge servers) to effectively reduce transmission delays. However, the computing resources and bandwidth of MEC servers are limited. When multiple IoT devices perform task offloading at the same time, network congestion and queuing delays become inevitable. Most existing research focuses on energy efficiency and latency optimization, while ignoring security issues.

[0005] Therefore, how to improve the existing task offloading process so that when multiple IoT devices perform task offloading at the same time, the security of task offloading can be improved on the basis of achieving energy efficiency and delay optimization is a technical problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of the present invention is to provide an energy-saving and security-enhanced task offloading method in a D2D integrated MEC network, so as to improve the existing task offloading process so that when multiple IoT devices perform task offloading at the same time, the security of task offloading is improved on the basis of achieving energy efficiency and delay optimization.

[0007] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows: The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network comprises the following steps: S1: Deployment system model: Deploy wireless base stations BS in the center, set up MEC servers in the wireless base stations BS, and deploy H edge devices in the coverage area of ​​the MEC servers V 1 ,··· V h ,···, V H , each edge device has a preset security level and computing power, and there are K mobile users within the coverage area of ​​BS U 1 ,··· U k ,···, U K , each mobile user generates an indivisible computationally intensive task M k ; S2: Deployment communication model: Mobile users and edge devices establish a connection with the wireless base station BS through a cellular link. The wireless base station BS obtains the channel state information CSI and the real-time distance between the mobile user and the edge device through feedback. d kh ; S3: Create a computation offloading model: Based on the communication model, mobile users upload tasks to edge devices or process them locally through D2D links. When uploading tasks to edge devices, the task completion time includes the task transmission time and the time spent on V h The time it takes to execute a task on the network, and the energy consumption required is the transmission energy consumption when the user uploads the task and the energy consumption of the task on the network. V h When the task is processed locally by the user, the time and energy consumption are based on the user himself; S4: Create a security model: When offloading tasks, each mobile user transmits the task to the edge device through the D2D link, and assigns a specified security level to each edge device. S h The wireless base station BS adjusts the security level of the edge device at each preset time interval according to the behavior and security events of the edge device. Sh , for each offloading decision from a mobile user to an edge device, define the corresponding non-negative security risk value To indicate the risk value of the task when it is processed by the device, the offloading decision is determined based on the safety risk value; S5: Create a system cost model: normalize the energy consumption of each mobile user, normalize the risk of each decision, take the weighted sum of the normalized energy consumption and the normalized risk as the decision cost of the mobile user, and create a mixed integer nonlinear programming problem to find the offloading decision and corresponding transmission power of each user; S6: Optimize the system decision model: According to the constraints, convert the mixed integer nonlinear programming problem into a linear programming problem to obtain a dynamic decision strategy based on the weighted risk-energy cost matrix, and process the dynamic decision strategy through a preset heuristic algorithm to meet engineering requirements.

[0008] Preferably, in step S1, each mobile user generates an indivisible computationally intensive task M k The formula is: M k ={ N k , C k , D k , G k}; in, N k The size of the task input data, in bits. C k The total number of CPU cycles required to complete the task, D k is the maximum tolerable delay, s As a unit, G k For the task M k level of security requirements.

[0009] Preferably, step S1 also includes constructing a dynamic optimization problem based on the system's computing resources, task requirements, and security level during iterations at multiple preset time intervals. The specific process is as follows: S11: Define a mobile user U k To edge devices V h The binary unloading decision α kh , αkh ∈{0,1}, when α kh =1, mobile users offload computing tasks to edge devices through D2D communication V h To process, when α kh =0, mobile user U k Do not offload tasks to edge devices V h , but instead offload the task to another edge device or process it locally; S12: The user itself is represented as ( H +1) virtual device, α k(H+1) Indicates that mobile users perform tasks locally. Each task must be assigned a location for execution. U k Establishing constraints , define the unloading decision matrix : ; S13: Based on the task processing quality, each edge device is required to accept at most one task from a mobile user at the same time, and the corresponding constraints are established as follows: .

[0010] Preferably, the specific process of deploying the communication model in step S2 is as follows: S21: Based on the data transmission time setting, the position of the mobile user remains unchanged during the data transmission process. α kh =1, defines mobile users U k To edge devices V h The unloading power is p kh , establish mobile user U k To edge devices V h Minimum upload power The calculation formula is: ; in, p 0 is the reference power, d 0 is the reference distance, n is the path loss index, which is adjusted according to different channel conditions. d khFor mobile users U k To edge devices V h Transmission distance; S22: Based on unloading power p kh Cannot exceed the user's maximum upload power p k max , and D2D is a short-range communication with a maximum transmission distance d max , establish unloading power p kh Constraints: ; in, p k max = p 0· ( d max / d 0 ) n , p 0 is the reference power, d 0 is the reference distance, d max is the maximum transmission distance, n is the path loss exponent, α kh For mobile users U k To edge devices V h The binary unloading decision For mobile users U k To edge devices V h The minimum upload power, p k max The maximum upload power of the user; S23: Create a mobile user U k To edge devices V h Upload data transfer rate R kh The formula is: ; in, R kh For mobile users U k To edge devicesV h Upload data transfer rate, B kh Is a mobile user U k Offloading tasks to edge devices V h The channel bandwidth, For mobile users U k To edge devices V h The channel gain is obtained through channel measurement and set remain unchanged during uninstallation, N 0 represents the noise power spectral density.

[0011] Preferably, the specific process of creating the calculation offloading model in step S3 is as follows: S31: When α kh =1, according to the communication model, establish the calculation of mobile users U k Transmitting task data to edge devices V h Upload time The formula is: ; in, N k The size of the input data for the task, R kh For mobile users U k To edge devices V h Upload data transfer rate; S32: Building Computing on Edge Devices V h The time when the task data is executed The formula is: ; in, Representing edge devices V h CPU frequency, C k The total number of CPU cycles required to complete the task; S33: Establish the total energy consumption formula of the computing task offloading process: ; in, E kh is the total energy consumption of the task offloading process, is the data transmission energy consumption, For mobile users U k Standby power consumption, For mobile users U k Standby power; S34: When α k(H+1) =1, mobile user U k Use your own CPU to process tasks, that is, local processing, and establish its task processing time T k(H+1) The formula is: ; S35: Establish the energy consumption formula for local processing: ; in, Represents mobile users U k CPU frequency, C k Indicates the total number of CPU cycles required to complete the task. represents the energy consumption per CPU cycle in joules, which is a superlinear function of the CPU frequency. .

[0012] Preferably, the specific process of creating a security model in step S4 is as follows: S41: Define each mobile user U k To edge devices V h Non-negative safety risk value of the offloading decision , establish a non-negative safety risk value The calculation formula is: ; in, J The maximum value of the upper limit of the task safety requirement and the upper limit of the equipment safety level is taken to ensure the consistency of the two metrics and the rationality of the risk calculation. G k For the task M k The security requirement level S h The security level of the edge device; S42: Establish a risk matrix: ; in, Indicates local executionM k The safety risk at this time, that is, the (H+1) column in the risk matrix corresponds to local processing and the value is 0; S43: Combined with the uninstall decision matrix, the total risk formula generated by all users is established: .

[0013] Preferably, the specific process in step S5 is as follows: S51: Establishing a time interval for each mobile user U k The actual energy consumption formula after decision making is: ; in, , Indicates that the task is performed by a mobile user U k Energy consumption when executing locally, It is the baseline energy consumption for each user based on the characteristics of the task and the inherent value of the user's own resources, reflecting the energy consumption gap between D2D offloading and local execution; S52: For each mobile user U k The actual energy consumption generated after the decision is normalized, and the specific formula is: ; S53: The maximum value of e , for each mobile user U k The actual risk generated after the decision is normalized, and the specific formula is: ; S54: Establish the total normalized environmental energy consumption formula: ; S55: Establish the overall normalized environmental risk formula: ; S56: Establish a formal expression for the model optimization problem: in, C 11 Indicates that when the task is offloaded to the specified edge device, the latency requirement is met. C 12 and C 13 Unload power to mobile users separately p kh and upload data transfer ratesR kh The variables are constrained. C 14 Sure α kh is a binary variable, C 15 Ensure that each task is executed locally or on an edge device, C 16 Ensure that the edge device accepts tasks from at most one user. is the total system cost after making a decision in a preset time interval, where is the weight coefficient, , α kh , p kh and R kh are variables, the others are constants.

[0014] Preferably, the specific process of the optimization system decision model in step S6 is as follows: S61: According to the constraints C 12 ,when α kh =1, establish an upload data transmission rate that meets the latency requirements R kh Conditional formula: ; Establish the minimum transmission rate that meets the latency requirements The formula is: ; Minimum transmission rate Perform the inverse solution, the specific formula is: ; The minimum transmission power that will meet the delay requirement It is expressed as: ; Establish mobile user offload power p kh Constraints: ; Based on meeting both the offloading demand and the delay demand, the mobile user offloading power p kh Not less than and , get the actual minimum transmission power for: ; S62: C 12 and C 13 Replace it with the following constraints: ; S63: When When the mobile user U k The resulting normalized energy consumption and normalized risk value are expressed as: ; ; in, and is a constant, Replace with ,get: ; S64: Algorithm The value of is minimized to obtain the minimum system cost, so that mobile users can unload power p kh is the independent variable, As the dependent variable, establish the function : ; function Is the user unloading power p kh A monotonically increasing function, in order to minimize energy consumption, the algorithm sets the transmission power to the user unloading power p kh The minimum achievable value is , that is, the unloading power used in each unloading process is fixed, and the only remaining system variable is the decision variable; S65: Divide the unloading decision into three cases and calculate the corresponding cost for each case , which is the weighted sum of energy consumption and risk, and finally based on the cost To solve.

[0015] Preferably, the three situations in step S65 are as follows: The first one: , mobile users U k Option to offload tasks to edge devices V h , mobile users U k Offloading tasks to edge devices V h The cost It is expressed as: ; Second type: ,The task can only be offloaded to another edge device or processed locally, is set to a positive number greater than a preset threshold, indicating an unacceptable cost, to ensure that the algorithm does not consider the process; The third type: The task is executed locally on the mobile user. Since the local energy consumption is normalized to 1 and the risk is 0, the cost of this decision only includes energy consumption, which depends on the weight coefficient ,Right now ; matrix It is used to represent the cost of all decision generation, which is expressed as follows: ; Remodel the original problem: ; in, C 21 Sure α kh is a binary variable, C 22 Ensure that each task is executed locally or on an edge device, C 23 Ensure that edge devices only accept tasks from one user at most.

[0016] Preferably, step S6 also includes the following specific process: S66: When the task data involves K mobile users and H edge devices, the cost matrix As the input of the algorithm, initialize the offloading decision matrix A of size K×(H+1) K×(H+1) , set all elements to zero, and use the input cost matrix , initialize the difference matrix of size K×(H+1) , whose elements represents the cost reduction of each D2D offloading decision for local processing, that is, ; S67: Select the largest element from the difference matrix , when the largest element is in the last column, it corresponds to making a local processing decision, which will unload the decision matrix The decision variable at the corresponding position is assigned , assign all elements of this row of the difference matrix to a very small value to ensure that the corresponding user will not be selected again, and update the difference matrix ; When the maximum element is not in the last column, it corresponds to making a D2D offloading decision, and the offloading decision matrix The decision variable at the corresponding position is assigned , assign a specified value to all elements in the row and column of the corresponding element in the difference matrix to ensure that the corresponding user and edge device will not be selected again, and update the difference matrix , and repeat until all decisions are made.

[0017] The beneficial effects of the present invention include: The energy-saving and security-enhanced task offloading method in the D2D integrated MEC network provided by the present invention deploys a wireless base station in the center, and an MEC server is set up in the wireless base station. H edge devices and K mobile users are deployed within the base station range; a communication model is deployed: both the mobile user and the edge device establish a connection with the wireless base station BS through a cellular link; based on the communication model, when the task is offloaded, the mobile user can upload the task to the edge device through the D2D link, or process the task locally; the offloading decision is determined based on the decision cost, that is, the weighted value of the offloading energy consumption and the security risk; the problem is modeled as an optimization problem converted into an integer linear programming (ILP) problem that is easier to solve, and the optimal offloading decision can be obtained by solving the problem; based on the strategy, a low-complexity heuristic algorithm is designed to meet engineering needs; a large number of experiments have proved that the proposed strategy has many advantages over the benchmark strategy and improves the system energy efficiency and security.

[0018] Firstly, a risk assessment standard based on the security level of edge devices in D2D integrated MEC networks was set up, and the energy consumption and security requirements of users were considered at the same time. The offloading problem in D2D integrated MEC networks was studied from both theoretical and engineering perspectives. By creating a dynamic security model based on the security level of edge devices and selecting edge computing servers with different security levels to meet the security requirements in offloading decisions, efficient risk management and resource allocation were achieved, the complexity of traditional security protocols was avoided, and the security of the offloading process was improved. Based on this security model, the offloading decision and transmission power were jointly optimized.

[0019] Secondly, two strategies are proposed. One is based on the theoretical optimal solution of solving the integer linear programming problem (ILP), and the other is a heuristic algorithm with low computational complexity suitable for practical engineering applications. It can improve the security of tasks when they are processed on edge devices while achieving low task energy consumption and low latency.

[0020] Finally, although the original problem has been simplified to an integer linear programming problem, with the increase in the number of users K and the number of edge devices H, it may not meet the engineering requirements in large-scale scenarios with high real-time requirements. Therefore, by designing a heuristic algorithm with lower complexity, the problem of possibly not meeting engineering requirements is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 The figure shows the cost of the two strategies of the present invention and other benchmark strategies at different task scales.

[0022] Figure 2 It is a diagram comparing the energy consumption of the two strategies of the present invention and other benchmark strategies at different task scales.

[0023] Figure 3 It is a risk comparison diagram of the two strategies of the present invention and other benchmark strategies at different task scales.

[0024] Figure 4 FIG. 4 is a cost diagram comparing the 2D-WREC of the present invention and AES-BS at different scales.

[0025] Figure 5 The energy consumption and risk diagrams at 50 meters for the two strategies of the present invention and other benchmark strategies are shown.

[0026] Figure 6 The energy consumption and risk diagrams at 350 meters for the two strategies of the present invention and other benchmark strategies are shown.

[0027] Figure 7 The figure is a diagram showing the risk ratio in the total cost of the optimal strategy of the present invention under different energy consumption weights and safety risks. DETAILED DESCRIPTION

[0028] The following is combined with Figure 1 to Figure 7 The present invention is further described in detail: Example 1 The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network comprises the following steps: S1: Deployment system model: Deploy wireless base stations BS in the center, set up MEC servers in the wireless base stations BS, and deploy H edge devices in the coverage area of ​​the MEC servers V 1 ,··· V h ,···, V H , each edge device has a preset security level and computing power, and there are K mobile users within the coverage area of ​​BS U 1 ,··· U k ,···, U K , each mobile user generates an indivisible computationally intensive task M k ; S2: Deployment communication model: Mobile users and edge devices establish a connection with the wireless base station BS through a cellular link. The wireless base station BS obtains the channel state information CSI and the real-time distance between the mobile user and the edge device through feedback. d kh ; S3: Create a computation offloading model: Based on the communication model, mobile users upload tasks to edge devices or process them locally through D2D links. When uploading tasks to edge devices, the task completion time includes the task transmission time and the time spent on V h The time it takes to execute a task on the network, and the energy consumption required is the transmission energy consumption when the user uploads the task and the energy consumption of the task on the network. V h When the task is processed locally by the user, the time and energy consumption are based on the user himself; S4: Create a security model: When offloading tasks, each mobile user transmits the task to the edge device through the D2D link, and assigns a specified security level to each edge device. S h The wireless base station BS adjusts the security level of the edge device at each preset time interval according to the behavior and security events of the edge device. S h , for each offloading decision from a mobile user to an edge device, define the corresponding non-negative security risk value To indicate the risk value of the task when it is processed by the device, the offloading decision is determined based on the safety risk value; S5: Create a system cost model: normalize the energy consumption of each mobile user, normalize the risk of each decision, take the weighted sum of the normalized energy consumption and the normalized risk as the decision cost of the mobile user, and create a mixed integer nonlinear programming problem to find the offloading decision and corresponding transmission power of each user; S6: Optimize the system decision model: According to the constraints, convert the mixed integer nonlinear programming problem into a linear programming problem to obtain a dynamic decision strategy based on the weighted risk-energy cost matrix, and process the dynamic decision strategy through a preset heuristic algorithm to meet engineering requirements.

[0029] The energy-saving and security-enhanced task offloading process in the D2D integrated MEC network provided by the present invention is different from the prior art that mainly relies on encryption schemes or transmission protocols to enhance security. The security requirements in the offloading decision are realized by selecting edge computing servers with different security levels. In order to achieve efficient risk management and resource allocation, a security model based on the security level of edge devices is proposed. The model avoids the complexity of traditional security protocols and improves the security of the offloading process. Based on the security model, whether to offload, target device selection and transmission power are jointly optimized. A risk assessment criterion based on security level is proposed, which achieves the joint optimization of energy consumption and security. To solve the problem, it is first modeled as a mixed-integer nonlinear programming (MINLP) problem; by optimizing the constraints, it is converted into an integer linear programming (ILP) problem to obtain the theoretical optimal solution. Considering the needs of practical engineering applications, a heuristic algorithm with low computational complexity suitable for practical engineering applications is designed. The above task offloading strategy can be widely used in MEC-assisted D2D Internet of Things scenarios to improve system energy efficiency and security. The effectiveness of the proposed strategy was verified through a large number of simulation experiments, and a reference for weight setting under different security levels was given. Simulation experiments were carried out under different scenario scales to verify the effectiveness and versatility of the strategy.

[0030] Example 2 Based on Example 1, in step S1, each mobile user generates an indivisible computationally intensive task M k The formula is: M k ={ N k , C k , D k , G k}; in, N k The size of the task input data, in bits. C k The total number of CPU cycles required to complete the task, D k is the maximum tolerable delay, s As a unit, G k For the task M k level of security requirements.

[0031] A wireless base station BS is deployed in the center, and an MEC server is installed in the wireless base station BS. H edge devices are deployed in the coverage area of ​​the MEC server. V 1 ,··· V h ,···, V H , each edge device has a preset security level and computing power, and each edge device has K mobile users within its coverage area U 1 ,··· U k ,···, U K , each mobile user generates an indivisible computationally intensive task M k .

[0032] For example, highly sensitive tasks involving financial data and identity information in the industrial Internet of Things have a higher security level. In contrast, ordinary monitoring data or sensor data have lower security requirements. The system to which the present invention relates is a continuous dynamic environment that discretizes the timeline into multiple preset time intervals. The generation and decision of tasks occur within a very short preset time interval. The system needs to decide whether to process the task locally on the user or to offload the task to a nearby edge device through a D2D link for processing. The working environment of the system is continuous, covering multiple preset time intervals, with new tasks generated and old tasks completed. The state of each user and edge device also changes with the advancement of the preset time interval. The decision to offload the task is independent within each preset time interval, but is made continuously between different time intervals. Therefore, during the iteration process of multiple preset time intervals, factors such as the system's computing resources, task requirements, and security level will change at any time, and the system will continuously make decisions based on the current state, constituting a complex dynamic optimization problem.

[0033] In this embodiment, step S1 also includes constructing a dynamic optimization problem based on the computing resources, task requirements and security level of the system during the iteration process at multiple preset time intervals. The specific process is as follows: S11: Define a mobile user U k To edge devices V h The binary unloading decision α kh , α kh ∈{0,1}, when α kh =1, mobile users offload computing tasks to edge devices through D2D communication Vh To process, when α kh =0, mobile user U k Do not offload tasks to edge devices V h , but instead offload the task to another edge device or process it locally; S12: The user itself is represented as ( H +1) virtual device, α k(H+1) Indicates that mobile users perform tasks locally. Each task must be assigned a location for execution. U k Establishing constraints , define the uninstallation decision matrix A K×(H+1) : ; S13: Based on the task processing quality, each edge device is required to accept at most one task from a mobile user at the same time, and the corresponding constraints are established as follows: .

[0034] Since the user itself is represented as the (H+1)th virtual device, the offloading decision matrix A K×(H+1) The (H+1)th column of does not correspond to a certain edge device, but represents each user’s local computing resources. In other words, each element in the (H+1)th column α k(H+1) Represents mobile users U k Whether to choose to execute locally. Since local execution is executed independently for each user, it is not equal is allowed.

[0035] Example 3 Based on Example 1 or Example 2, the specific process of deploying the communication model in step S2 is as follows: S21: Based on the data transmission time setting, the position of the mobile user remains unchanged during the data transmission process. α kh =1, defines mobile users U k To edge devices V h The unloading power is p kh , establish mobile user U k To edge devices V h Minimum upload power The calculation formula is: ; in, p 0 is the reference power, d 0 is the reference distance, n is the path loss index, which is adjusted according to different channel conditions. d kh For mobile users U k To edge devices V h Transmission distance; S22: Based on unloading power p kh Cannot exceed the user's maximum upload power p k max , and D2D is a short-range communication with a maximum transmission distance d max , establish unloading power p kh Constraints: ; in, p k max = p 0· ( d max / d 0 ) n , p 0 is the reference power, d 0 is the reference distance, d max is the maximum transmission distance, n is the path loss exponent, α kh For mobile users U k To edge devices V h The binary unloading decision For mobile users U k To edge devices V h The minimum upload power, p k max The maximum upload power of the user; S23: Create a mobile user U kTo edge devices V h Upload data transfer rate R kh The formula is: ; in, R kh For mobile users U k To edge devices V h Upload data transfer rate, B kh Is a mobile user U k Offloading tasks to edge devices V h The channel bandwidth, For mobile users U k To edge devices V h The channel gain is obtained through channel measurement and set remain unchanged during uninstallation, N 0 represents the noise power spectral density.

[0036] Example 4 A computation offloading model is established based on Example 1 or Example 2 or Example 3. In this study, since the amount of data in the result obtained after the task calculation is much smaller than that before the calculation, the time and energy consumption of the data during downlink transmission are ignored.

[0037] The specific process of creating the calculation offloading model in step S3 is as follows: S31: When α kh =1, according to the communication model, establish the calculation of mobile users U k Transmitting task data to edge devices V h Upload time The formula is: ; in, N k The size of the input data for the task, R kh For mobile users U k To edge devices V h Upload data transfer rate; S32: Building Computing on Edge Devices Vh The time when the task data is executed The formula is: ; in, Representing edge devices V h CPU frequency, C k The total number of CPU cycles required to complete the task; S33: Establish the total energy consumption formula of the computing task offloading process: ; in, E kh is the total energy consumption of the task offloading process, is the energy consumption for data transmission, For mobile users U k Standby power consumption, For mobile users U k Standby power; S34: When α k(H+1) =1, mobile user U k Use your own CPU to process tasks, that is, local processing, and establish its task processing time T k(H+1) The formula is: ; S35: Establish the energy consumption formula for local processing: ; in, Represents mobile users U k CPU frequency, C k Indicates the total number of CPU cycles required to complete the task. represents the energy consumption per CPU cycle in joules, which is a superlinear function of the CPU frequency. .

[0038] It should be noted that when a network failure occurs or the number of edge computing servers is insufficient, all tasks processed locally should still meet the delay tolerance requirements. Therefore, we assume that Always true.

[0039] In this embodiment, when the task is unloaded, the mobile user U kTask data can be transmitted to edge devices via D2D links. However, edge devices may face various attacks that affect their ability to perform tasks and even bring security risks. Therefore, a security scheme based on device security level is used to improve the security of tasks when they are processed by edge devices.

[0040] Each edge device has a corresponding security level according to its own security characteristics S h ,in . Processing tasks on devices with high security levels will have higher security. In addition, BS adjusts the security level of the device at each preset time interval based on factors such as the device's behavior and security events. Although the security level of the device remains unchanged at each decision, the security level will change at different preset time intervals, ensuring the accuracy and timeliness of security assessments, so the system is dynamic.

[0041] The specific process of creating a security model in step S4 is as follows: S41: Define each mobile user U k To edge devices V h Non-negative safety risk value of the offloading decision , establish a non-negative safety risk value The calculation formula is: ; in, J The maximum value of the upper limit of the task safety requirement and the upper limit of the equipment safety level is taken to ensure the consistency of the two metrics and the rationality of the risk calculation. G k For the task M k The security requirement level S h The security level of the edge device; S42: Establish a risk matrix: ; in, Indicates local execution M k The safety risk at this time, that is, the (H+1) column in the risk matrix corresponds to local processing and the value is 0; S43: Combined with the uninstall decision matrix, the total risk formula generated by all users is established: .

[0042] Example 5 Based on Example 1 or Example 2 or Example 3 or Example 4, the specific process in step S5 is as follows: S51: Establishing a time interval for each mobile user U k The actual energy consumption formula after decision making is: ; in, , Indicates that the task is performed by a mobile user U k Energy consumption when executing locally, It is the baseline energy consumption for each user based on the characteristics of the task and the inherent value of the user's own resources, reflecting the energy consumption gap between D2D offloading and local execution; S52: For each mobile user U k The actual energy consumption generated after the decision is normalized, and the specific formula is: ; S53: The maximum value of e , for each mobile user U k The actual risk generated after the decision is normalized, and the specific formula is: ; S54: Establish the total normalized environmental energy consumption formula: ; S55: Establish the overall normalized environmental risk formula: ; S56: Establish a formal expression for the model optimization problem: in, C 11 Indicates that when the task is offloaded to the specified edge device, the latency requirement is met. C 12 and C 13 Unload power to mobile users separately p kh and upload data transfer rates R kh The variables are constrained. C 14 Sure α kh is a binary variable, C 15Ensure that each task is executed locally or on an edge device, C 16 Ensure that the edge device accepts tasks from at most one user. is the total system cost after making a decision in a preset time interval, where is the weight coefficient, , α kh , p kh and R kh is a variable, and the others are constants. The problem is modeled as a mixed integer nonlinear programming MINLP problem. Therefore, the model can not only handle the specific situation within each preset time interval, but also adapt to the changes of the system at different preset time intervals through iterative updates, thus reflecting the dynamic characteristics of the model. The goal is to minimize the total system cost brought by the offloading decision, including the energy consumption and risk caused by the decision, under the constraint of meeting the delay requirements.

[0043] In this embodiment, the specific process of optimizing the system decision model in step S6 is as follows: S61: According to the constraints C 12 ,when α kh =1, establish an upload data transmission rate that meets the latency requirements R kh Conditional formula: ; Establish a minimum transmission rate that meets latency requirements The formula is: ; Minimum transmission rate Perform the inverse solution, the specific formula is: ; The minimum transmission power that will meet the delay requirement It is expressed as: ; Establish mobile user offload power p kh Constraints: ; Based on meeting both the offloading demand and the delay demand, the mobile user offloading power p kh Not less than and , get the actual minimum transmission power for: ; S62: C 12 and C 13 Replace it with the following constraints: ; S63: When When the mobile user U k The resulting normalized energy consumption and normalized risk value are expressed as: ; ; in, and is a constant, Replace with ,get: ; S64: Algorithm The value of is minimized to obtain the minimum system cost, so that mobile users can unload power p kh is the independent variable, As the dependent variable, establish the function : ; function Is the user unloading power p kh A monotonically increasing function, in order to minimize energy consumption, the algorithm sets the transmission power to the user unloading power p kh The minimum achievable value is , that is, the unloading power used in each unloading process is fixed, and the only remaining system variable is the decision variable; S65: Divide the unloading decision into three cases and calculate the corresponding cost for each case , which is the weighted sum of energy consumption and risk, and finally based on the cost To solve.

[0044] The three situations in step S65 are as follows: The first one: , mobile users U k Option to offload tasks to edge devices V h , mobile users U k Offloading tasks to edge devices V h The cost It is expressed as: ; Second type: ,The task can only be offloaded to another edge device or processed locally, is set to a positive number greater than a preset threshold, indicating an unacceptable cost, to ensure that the algorithm does not consider the process; The third type: The task is executed locally on the mobile user. Since the local energy consumption is normalized to 1 and the risk is 0, the cost of this decision only includes energy consumption, which depends on the weight coefficient ,Right now ; matrix It is used to represent the cost of all decision generation, which is expressed as follows: ; Remodel the original problem: .

[0045] in, C 21 Sure α kh is a binary variable, C 22 Ensure that each task is executed locally or on an edge device, C 23 Ensure that edge devices only accept tasks from one user at most.

[0046] In this problem, only is a binary decision variable, and all other parameters are constants. The theoretical optimal solution to the ILP problem can be obtained by using the branch and bound method, thereby obtaining the unloading decision matrix. Specifically, once the unloading decision matrix is ​​determined, each decision variable can be determined Value: If =1, it means that the mobile user will transmit at the minimum power Offload tasks to edge devices; if , which means that the mobile user performs tasks locally. This strategy can minimize the offloading cost of the system while reducing energy consumption and risk. It is called a dynamic decision strategy based on the weighted risk-energy cost matrix.

[0047] Example 6 Based on Example 1 or Example 2 or Example 3 or Example 4 or Example 5, although the original problem has been simplified to an ILP problem, with the increase in the number of users K and the number of edge devices H, it may not meet the engineering requirements in large-scale scenarios with high real-time requirements. Therefore, a heuristic algorithm with lower complexity is designed to solve the problem more efficiently.

[0048] Step S6 also includes the following specific process: S66: When the task data involves K mobile users and H edge devices, the cost matrix As the input of the algorithm, initialize the offloading decision matrix A of size K×(H+1) K×(H+1) , set all elements to zero, and use the input cost matrix , initialize the difference matrix of size K×(H+1) , whose elements represents the cost reduction of each D2D offloading decision for local processing, that is, ; S67: Select the largest element from the difference matrix , when the largest element is in the last column, it corresponds to making a local processing decision, which will unload the decision matrix The decision variable at the corresponding position is assigned , assign all elements of this row of the difference matrix to a very small value to ensure that the corresponding user will not be selected again, and update the difference matrix ; When the maximum element is not in the last column, it corresponds to making a D2D offloading decision, and the offloading decision matrix The decision variable at the corresponding position is assigned , assign a specified value to all elements in the row and column of the corresponding element in the difference matrix to ensure that the corresponding user and edge device will not be selected again, and update the difference matrix , and repeat until all decisions are made.

[0049] Get the uninstall decision matrix A K×(H+1) Then, the decision variables are determined In other words, the algorithm makes an approximately optimal unloading decision for the current preset time interval to minimize the cost of unloading. This heuristic algorithm is named the dynamic decision strategy based on the difference matrix.

[0050] SMSS-DM complexity analysis: Step 1, initialization and Complexity The second step is to use the matrix Selecting the maximum element requires checking all elements, so the time complexity is In the first case, the time complexity of accessing and updating all (H+1) elements in a row is O ( H +1). In the second case, the time complexity of accessing and updating all elements in rows and columns is O ( H +1). Iterate K times to complete all the decisions. The main complexity of the iteration depends on the matrix Select the largest element, that is, Therefore, the overall time complexity is .

[0051] Extensive simulations are performed to evaluate the strategy by comparing it with several baseline strategies. The ILP problem is simulated on Gurobi, a Python-based simulator. An Intel(R) Core(TM) i7-10870H CPU 5.0 GHz and 16 GB RAM capacity processor is used. Assume that in the 5G scenario, a base station is deployed in the cell center with a coverage radius of 100m. K users and 40 edge devices are randomly distributed in the cell environment. The CPU frequency of each user is varied from GHz is randomly allocated, and the CPU frequency of each device is GHz is randomly allocated to simulate its heterogeneous computing capabilities. The data volume of each task is set to {1, 2, 3, 4, 5}Mb, and each Mb of data processing requires 200 M CPU cycles. The randomly generated tolerable delay is The security requirements of the tasks and the security level of the edge devices start from {0, 1, 2, ..., 5}. The larger the range, the higher the granularity. The security level of the edge device follows a normal distribution with a mean of 4 and a variance of 2. The rest of the simulation parameter settings are shown in Table 1. In the simulation, the 3GPP path loss model is used, and the path loss between any user and the edge device is calculated by the following formula: ; in, d kh for U k arrive V h distance, 3.5 is the 5G communication frequency (GHz), and the channel gain can be calculate.

[0052] Table 1 Simulation parameters The proposed scheme is compared with four benchmark strategies to evaluate different metrics and analyze according to system requirements. The specific benchmark strategies are as follows: 1. Local processing: All users' tasks are processed locally, and there is no need to offload tasks.

[0053] 2. Distance-based offloading strategy: Users prioritize offloading tasks to the physically closest edge device. This strategy assumes that the device closest to the device provides the smallest transmission delay and energy consumption, but does not consider the security of the device.

[0054] 3. Unloading strategy without safety measures: The unloading decision is based only on the energy consumption of the current environment, which is equivalent to setting the energy consumption weight factor in 2D-WREC to 1 without considering safety.

[0055] 4. Polling algorithm: By polling the cost matrix, each user selects the available device with the minimum cost value to process the task as a reference for comparison with the SMSS-DM algorithm.

[0056] When the number of edge devices is fixed at 40 and the weight is set to 0.5 (no preference), the number of users K is increased from 10 to 50, and the six schemes are simulated for comparison. 50 rounds of simulation are performed by replacing the random number seed (from 1 to 50), and the final result is obtained by taking the average value. Figure 1 , the 2D-WREC of the present invention always shows a lower cost than other strategies. When the number of users is 50, the cost of 2D-WREC is 39.93%, 30.26%, 12.67% and 12.16% lower than that of local processing, distance-based, no security measures and polling algorithms, respectively. The SMSS-DM algorithm shows good performance under different K values ​​and is better than the polling algorithm. Although local processing can be risk-free, its cost is always at a high level due to excessive energy consumption.

[0057] It is not comprehensive to compare the cost of different strategies, as it can only reflect the overall situation of energy consumption and risk. Figure 2 The comparison of the normalized energy consumption of the system under different strategies is shown. The extreme case of 2D-WREC with no safety measures corresponding to the weight of 1, that is, only considering how to obtain the minimum energy consumption of the system, can be used as the upper bound of energy consumption optimization. The strategy always maintains a low energy consumption level, which verifies the effectiveness of this method in optimizing energy consumption. The distance-based energy consumption is lower because a shorter unloading distance usually corresponds to lower energy consumption. The energy consumption of the heuristic algorithm SMSS-DM is slightly higher than that of the polling algorithm. This is because under the current weight, the heuristic algorithm SMSS-DM algorithm performs better in optimizing risks.

[0058] The risk generated by the offloading decision is a key indicator for evaluating the effectiveness of the offloading strategy. In order to observe the optimization of the risk in the offloading cost separately, Figure 3 The comparison of several strategies in terms of system risk is illustrated. Local processing has no data transmission and the risk is zero. The distance-based offloading strategy has an advantage in terms of energy consumption, but because the safety of the offloading decision is not considered, the risk value generated is higher. Compared with the 2D-WREC without weight preference, the offloading strategy without safety measures generates almost twice the risk. When the energy consumption weight of 2D-WREC is further reduced, the difference between the two in terms of risk will be more obvious, which is verified in the subsequent simulation results, further proving the effectiveness of the offloading strategy of the present invention in terms of security. The heuristic algorithm SMSS-DM algorithm has a lower risk because it is only a fit to 2D-WREC, and the goal is to minimize the cost of offloading decisions, and the risk is only a part of the offloading cost. When the heuristic algorithm SMSS-DM performs better than 2D-WREC in terms of risk. It will perform worse than 2D-WREC in terms of energy consumption.

[0059] The experimental results show that the performance of the heuristic algorithm SMSS-DM algorithm is better than the polling algorithm. The heuristic algorithm SMSS-DM algorithm can save a lot of time compared to directly solving the ILP problem. As the task scale K and H increase, the percentage of computing time (speedup ratio) changes. Although the acceleration effect of the heuristic algorithm SMSS-DM algorithm fluctuates at the scale of K = H = 50, it shows obvious time optimization effect at all scales. When the problem scale is large, that is, K=H=1000, the computing time can be saved by about 85%. This result shows that the heuristic algorithm SMSS-DM algorithm brings higher efficiency and is particularly suitable for large-scale computing tasks.

[0060] like Figure 4 As shown in the figure, when the number of edge devices is small, the offloading cost of AES-BS is smaller. This is because the higher CPU frequency of the BS provides a faster processing speed, which brings less standby time and standby energy consumption. At the same time, random AES encryption can also reduce the risk of offloading decisions. However, as the number of users increases, the computing resources of the base station become tight, and many tasks have to be processed locally by the user, and the system cost increases rapidly. With the increase in edge devices, D2D offloading gradually shows obvious advantages. It can provide more computing resources to support task offloading. At the same time, unlike MEC, which has only one fixed offloading path, D2D offloading provides multiple optional paths, which is equivalent to effectively splitting the CPU resources of the base station into multiple edge device resources, improving the flexibility and resource utilization of the system.

[0061] In terms of security, although AES encryption effectively improves the security of MEC offloading, it also brings additional energy consumption. On the contrary, the 2D-WREC strategy can make full use of edge device resources, and the improvement of security is achieved by selecting edge devices with higher security levels for offloading, which will not increase the additional encryption energy consumption.

[0062] 2D-WREC controls the focus on energy consumption and risk indicators by adjusting the energy consumption weight. The changes in system energy consumption and risk are observed under three weights of 0.25, 0.5, and 0.75. Figure 5 As shown in the figure, when the energy consumption weight increases, the system energy consumption gradually decreases and the risk increases, which verifies the effectiveness of the weight setting. No matter how the weight is adjusted, the 2D-WREC algorithm can always get the minimum cost value under the same environment, which is the weighted sum of energy consumption and risk.

[0063] Set the system radius to 200 m and adjust the maximum D2D transmission distance to 350 m. Figure 6 Similar results were shown, further demonstrating that the strategy of the present invention has good generalization ability.

[0064] Although the impact of weight changes on energy consumption and risk has been intuitively demonstrated, it is still a challenge to determine an appropriate weight to balance energy consumption and risk in practical applications. To this end, the present invention simulates scenarios under different risk levels by adjusting the average value of the edge device security level. The role of the system in reducing security risks is reflected by observing the proportion of normalized risk in the total offloading cost of the system, see Figure 7 . In a high security risk environment, that is, the security level of edge devices is generally low, if the energy consumption weight is set to 1, so that the unloading risk is not taken into account, the risk value can be as high as 4% of the unloading cost. If the energy consumption weight is reduced so that the system pays more attention to reducing the unloading risk, the unloading risk can be as low as 21% of the REC of the unloading cost. In contrast, in a low-risk environment, even if the energy consumption weight is high, the proportion of the risk value in the unloading cost remains at a very low level.

[0065] In summary, the energy-saving and security-enhanced task offloading method in the D2D integrated MEC network provided by the present invention deploys a wireless base station in the center, an MEC server is installed in the wireless base station, H edge devices are deployed, and each edge device has K mobile users within its coverage area; a communication model is deployed: a connection is established between the mobile user and the edge device through a cellular link and the wireless base station BS; based on the communication model, the mobile user uploads the task to the edge device through the D2D link; when the task is offloaded, each mobile user transmits the task to the edge device through the D2D link, and the offloading decision is determined based on the security risk value; constraints of the optimization problem are created, and the optimization problem is converted into an ILP problem that is easier to solve, an upload rate and a minimum transmission rate that meet the delay requirements are created, and a dynamic decision strategy based on a weighted risk-energy cost matrix is ​​obtained; the optimal offloading strategy is obtained, and the energy efficiency and security of the system are improved.

[0066] By giving a security assessment method in D2D integrated MEC network, the offloading problem in D2D integrated MEC network is studied from both theoretical and engineering perspectives based on the energy consumption and security requirements of users. Two strategies are proposed, one is based on the theoretical optimal solution of solving integer linear programming problems, and the other is a heuristic algorithm with low computational complexity suitable for practical engineering applications. While achieving low task energy consumption and low latency, it improves the security of tasks when processed by edge devices. By creating a dynamic security model based on the security level of edge devices, the security requirements in offloading decisions are met by selecting edge computing servers with different security levels, efficient risk management and resource allocation are achieved, the complexity of traditional security protocols is avoided, and the security of the offloading process is improved. Based on this security model, whether to offload, target server offloading and transmission power are jointly optimized. In order to simplify the complex constraints in the original problem, it is transformed into an ILP problem that is easier to solve based on the characteristics of the problem, which effectively reduces the computational complexity of the system. Although the original problem has been simplified to an ILP problem, with the increase in the number of users K and the number of edge devices H, it may not meet engineering requirements in large-scale scenarios with high real-time requirements. Therefore, by designing a heuristic algorithm with lower complexity, a more efficient solution to problems that may not meet engineering requirements is achieved.

Claims

1. Energy-saving and security-enhanced task offloading method in D2D integrated MEC network, characterized in that: The following steps are involved: S1: Deployment system model: Deploy wireless base stations BS in the center, set up MEC servers in the wireless base stations BS, and deploy H edge devices in the coverage area of ​​the MEC servers V 1,··· V h ,···, V H , each edge device has a preset security level and computing power, and there are K mobile users within the coverage area of ​​BS U 1,··· U k ,···, U K , each mobile user generates an indivisible computationally intensive task M k ; S2: Deployment communication model: Mobile users and edge devices establish a connection with the wireless base station BS through a cellular link. The wireless base station BS obtains the channel state information CSI and the real-time distance between the mobile user and the edge device through feedback. d kh ; S3: Create a computation offloading model: Based on the communication model, mobile users upload tasks to edge devices or process them locally through D2D links; when tasks are uploaded to edge devices V h The task completion time includes the task transmission time and V h The time it takes to execute a task on the network, and the energy consumption required is the transmission energy consumption when the user uploads the task and the energy consumption of the task on the network. V h The user's standby energy consumption during execution; When the task is processed locally by the user, the time and energy consumption are based on the user himself; S4: Create a security model: When offloading tasks, each mobile user transmits the task to the edge device through the D2D link, and assigns a specified security level to each edge device. S h The wireless base station BS adjusts the security level of the edge device at each preset time interval according to the behavior and security events of the edge device. S h , for each offloading decision from a mobile user to an edge device, define the corresponding non-negative security risk value To indicate the risk value of the task when it is processed by the device, the offloading decision is determined based on the safety risk value; S5: Create a system cost model: normalize the energy consumption of each mobile user, normalize the risk of each decision, take the weighted sum of the normalized energy consumption and the normalized risk as the decision cost of the mobile user, and create a mixed integer nonlinear programming problem to find the offloading decision and corresponding transmission power of each user; S6: Optimize the system decision model: According to the constraints, convert the mixed integer nonlinear programming problem into a linear programming problem to obtain a dynamic decision strategy based on the weighted risk-energy cost matrix, and process the dynamic decision strategy through a preset heuristic algorithm to meet engineering requirements.

2. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 1, characterized in that: In step S1, each mobile user generates an indivisible computationally intensive task M k The formula is: M k ={ N k , C k , D k , G k}; in, N k The size of the task input data, in bits. C k The total number of CPU cycles required to complete the task, D k is the maximum tolerable delay, s As a unit, G k For the task M k level of security requirements.

3. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 2, characterized in that: Step S1 also includes constructing a dynamic optimization problem based on the system's computing resources, task requirements, and security level during the iteration process at multiple preset time intervals. The specific process is as follows: S11: Define a mobile user U k To edge devices V h The binary unloading decision α kh , α kh ∈{0,1}, when α kh =1, mobile users offload computing tasks to edge devices through D2D communication V h To process, when α kh =0, mobile user U k Do not offload tasks to edge devices V h , but instead offload the task to another edge device or process it locally; S12: The user itself is represented as ( H +1) virtual device, α k(H+1) Indicates that mobile users perform tasks locally. Each task must be assigned a location for execution. U k Establishing constraints , define the uninstallation decision matrix A K×(H+1) : ; S13: Based on the task processing quality, each edge device is required to accept at most one task from a mobile user at the same time, and the corresponding constraints are established as follows: 。 4. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 3, characterized in that: The specific process of deploying the communication model in step S2 is as follows: S21: Based on the data transmission time setting, the position of the mobile user remains unchanged during the data transmission process. α kh =1, defines mobile users U k To edge devices V h The unloading power is p kh , establish mobile user U k To edge devices V h Minimum upload power The calculation formula is: ; in, p 0 is the reference power, d 0 is the reference distance, n is the path loss index, which is adjusted according to different channel conditions. d kh For mobile users U k To edge devices V h Transmission distance; S22: Based on unloading power p kh Cannot exceed the user's maximum upload power p k max , and D2D is a short-range communication with a maximum transmission distance d max , establish unloading power p kh Constraints: ; in, p k max = p 0· ( d max / d 0) n , p 0 is the reference power, d 0 is the reference distance, d max is the maximum transmission distance, n is the path loss exponent, α kh For mobile users U k To edge devices V h The binary unloading decision For mobile users U k To edge devices V h The minimum upload power, p k max The maximum upload power of the user; S23: Create a mobile user U k To edge devices V h Upload data transfer rate R kh The formula is: ; in, R kh For mobile users U k To edge devices V h Upload data transfer rate, B kh Is a mobile user U k Offloading tasks to edge devices V h The channel bandwidth, For mobile users U k To edge devices V h The channel gain is obtained through channel measurement and set remain unchanged during uninstallation, N 0 represents the noise power spectral density.

5. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 4, characterized in that: The specific process of creating the calculation offloading model in step S3 is as follows: S31: When α kh =1, according to the communication model, establish the calculation of mobile users U k Transmitting task data to edge devices V h Upload time The formula is: ; in, N k The size of the input data for the task, R kh For mobile users U k To edge devices V h Upload data transfer rate; S32: Building Computing on Edge Devices V h The time when the task data is executed The formula is: ; in, Representing edge devices V h CPU frequency, C k The total number of CPU cycles required to complete the task; S33: Establish the total energy consumption formula of the computing task offloading process: ; in, E kh is the total energy consumption of the task offloading process, is the energy consumption for data transmission, For mobile users U k Standby power consumption, For mobile users U k Standby power; S34: When α k(H+1) =1, mobile user U k Use your own CPU to process tasks, that is, local processing, and establish its task processing time T k(H+1) The formula is: ; S35: Establish the energy consumption formula for local processing: ; in, Represents mobile users U k CPU frequency, C k Indicates the total number of CPU cycles required to complete the task. represents the energy consumption per CPU cycle in joules, which is a superlinear function of the CPU frequency. .

6. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 5, characterized in that: The specific process of creating a security model in step S4 is as follows: S41: Define each mobile user U k To edge devices V h Non-negative safety risk value of the offloading decision , establish a non-negative safety risk value The calculation formula is: ; in, J The maximum value of the upper limit of the task safety requirement and the upper limit of the equipment safety level is taken to ensure the consistency of the two metrics and the rationality of the risk calculation. G k For the task M k The security requirement level S h The security level of the edge device; S42: Establish a risk matrix: ; in, Indicates local execution M k The safety risk at this time, that is, the (H+1) column in the risk matrix corresponds to local processing and the value is 0; S43: Combined with the uninstall decision matrix, the total risk formula generated by all users is established: 。 7. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 6, characterized in that: The specific process in step S5 is as follows: S51: Establishing a time interval for each mobile user U k The actual energy consumption formula after decision making is: ; in, , Indicates that the task is performed by a mobile user U k Energy consumption when executing locally, It is the baseline energy consumption for each user based on the characteristics of the task and the inherent value of the user's own resources, reflecting the energy consumption gap between D2D offloading and local execution; S52: For each mobile user U k The actual energy consumption generated after the decision is normalized, and the specific formula is: ; S53: The maximum value of e , for each mobile user U k The actual risk generated after the decision is normalized, and the specific formula is: ; S54: Establish the total normalized environmental energy consumption formula: ; S55: Establish the overall normalized environmental risk formula: ; S56: Establish a formal expression for the model optimization problem: in, C 11 Indicates that when the task is offloaded to the specified edge device, the latency requirement is met. C 12 and C 13 Unload power to mobile users separately p kh and upload data transfer rates R kh The variables are constrained. C 14 Sure α kh is a binary variable, C 15 Ensure that each task is executed locally or on an edge device, C 16 Ensure that the edge device accepts tasks from at most one user. is the total system cost after making a decision in a preset time interval, where is the weight coefficient, , α kh , p kh and R kh are variables, the others are constants.

8. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 7, characterized in that: The specific process of the optimization system decision model in step S6 is as follows: S61: According to the constraints C 12 ,when α kh =1, establish an upload data transmission rate that meets the latency requirements R kh Conditional formula: ; Establish a minimum transmission rate that meets latency requirements The formula is: ; Minimum transmission rate Perform the inverse solution, the specific formula is: ; The minimum transmission power that will meet the delay requirement It is expressed as: ; Establish mobile user offload power p kh Constraints: ; Based on meeting both the offloading demand and the delay demand, the mobile user offloading power p kh Not less than and , get the actual minimum transmission power for: ; S62: C 12 and C 13 Replace it with the following constraints: ; S63: When When the mobile user U k The resulting normalized energy consumption and normalized risk value are expressed as: ; ; in, and is a constant, Replace with ,get: ; S64: Algorithm The value of is minimized to obtain the minimum system cost, so that mobile users can unload power p kh is the independent variable, As the dependent variable, establish the function : ; function Is the user unloading power p kh A monotonically increasing function, in order to minimize energy consumption, the algorithm sets the transmission power to the user unloading power p kh The minimum achievable value is , that is, the unloading power used in each unloading process is fixed, and the only remaining system variable is the decision variable; S65: Divide the unloading decision into three cases and calculate the corresponding cost for each case , which is the weighted sum of energy consumption and risk, and finally based on the cost To solve.

9. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 8, characterized in that: The three situations in step S65 are as follows: The first one: , mobile users U k Option to offload tasks to edge devices V h , mobile users U k Offloading tasks to edge devices V h The cost It is expressed as: ; Second type: ,The task can only be offloaded to another edge device or processed locally, is set to a positive number greater than a preset threshold, indicating an unacceptable cost, to ensure that the algorithm does not consider the process; The third type: The task is executed locally on the mobile user. Since the local energy consumption is normalized to 1 and the risk is 0, the cost of this decision only includes energy consumption, which depends on the weight coefficient ,Right now ; matrix It is used to represent the cost of all decision generation, which is expressed as follows: ; Remodel the original problem: ; in, C 21 Sure α kh is a binary variable, C 22 Ensure that each task is executed locally or on an edge device, C 23 Ensure that edge devices only accept tasks from one user at most.

10. The energy-saving and security-enhanced task offloading method in a D2D integrated MEC network according to claim 9, characterized in that: Step S6 also includes the following specific process: S66: When the task data involves K mobile users and H edge devices, the cost matrix As the input of the algorithm, initialize the offloading decision matrix A of size K×(H+1) K×(H+1) , set all elements to zero, and use the input cost matrix , initialize the difference matrix of size K×(H+1) , whose elements represents the cost reduction of each D2D offloading decision for local processing, that is, ; S67: Select the largest element from the difference matrix , when the largest element is in the last column, it corresponds to making a local processing decision, which will unload the decision matrix The decision variable at the corresponding position is assigned , assign all elements of this row of the difference matrix to a very small value to ensure that the corresponding user will not be selected again, and update the difference matrix ; When the maximum element is not in the last column, it corresponds to making a D2D offloading decision, and the offloading decision matrix The decision variable at the corresponding position is assigned , assign a specified value to all elements in the row and column of the corresponding element in the difference matrix, ensure that the corresponding user and edge device will not be selected again, and update the difference matrix , and repeat until all decisions are made.

Citation Information

Patent Citations

  • D2D-based multi-access edge computing task unloading method in Internet of Vehicles environment

    CN111132077A

  • METHOD OF MULTI-ACCESS EDGE COMPUTING TASK OFFLOADING BASED ON D2D IN INTERNET OF VEHICLES (IoV) ENVIRONMENT

    US20210266834A1