A method and apparatus for drone-assisted computation offloading
By constructing a drone-assisted computation offloading method, and utilizing the Stackelberg game spectrum trading model and D2D relay technology, the problem of terminals being unable to communicate outside the drone's coverage area was solved, reducing the latency of computation tasks and improving resource utilization efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2026-03-27
AI Technical Summary
Terminals outside the drone's coverage area cannot communicate directly with the drone, leading to problems such as difficulty in offloading computing tasks or excessively long local computing latency.
A drone-assisted computation offloading method is constructed, which adopts a Stackelberg game spectrum trading model with drones as leaders and operators as followers. Through D2D relay technology and spectrum leasing, idle users within the drone's coverage area are used as relay objects to offload computation tasks to drones for processing.
This technology enables users outside the drone's coverage area to request data via D2D relay, using idle users as relay objects. This reduces the overall latency of computing tasks and improves resource utilization and task processing efficiency.
Smart Images

Figure CN120075898B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a method and device for computing offloading assisted by unmanned aerial vehicle. BACKGROUND
[0002] With the explosive growth of the number of Internet of Things devices, due to the limitation of computing resources and battery capacity of terminal devices, it is difficult for them to efficiently complete computing-intensive or time-sensitive tasks by themselves. Mobile edge computing (MEC) as a network edge technology that extends the computing resources of cloud servers to the network edge closer to the terminal side provides an ideal solution for computing offloading. Specifically, MEC "sinks" services originally located in cloud data centers to the edge of the mobile network, deploying computing, storage, network and communication resources through the mobile network edge, which not only reduces network operations, but also reduces service delivery latency and improves user experience. In addition, after deploying servers at the network edge, MEC reduces the transmission bandwidth requirements of the core network, thereby reducing operating costs. Computing offloading is a key technical concept in edge computing, which refers to the process of user terminals (such as mobile devices) offloading computing tasks to edge networks (such as MEC networks) for execution. This technology mainly solves the deficiencies of devices in terms of resource storage, computing performance, and energy efficiency, and provides the required computing power for resource-constrained devices running computing-intensive applications by reasonably utilizing the computing resources of edge networks, thereby speeding up computing and saving energy.
[0003] Unmanned aerial vehicles (UAVs) have great potential in MEC scenarios where network infrastructure is imperfect due to their inherent mobility, flexibility, and low deployment cost. However, due to the limited coverage and battery capacity of UAVs, in disaster areas where basic communication infrastructure has been destroyed, terminals located at the communication edge or in blind areas cannot directly communicate with UAVs, resulting in problems such as difficulty in offloading computing tasks or excessive local computing latency. SUMMARY
[0004] The purpose of the present application is to overcome the deficiencies in the prior art and provide a method and device for computing offloading assisted by unmanned aerial vehicle, which solves the problem that terminals at the communication edge or in blind areas cannot directly communicate with unmanned aerial vehicles, resulting in difficulty in offloading computing tasks or excessive local computing latency.
[0005] To solve the above technical problems, the present application is realized by adopting the following technical solutions:
[0006] In a first aspect, the present invention provides a drone-assisted computational offloading method, comprising: S1: constructing an offloading platform corresponding to the drone-assisted computational offloading method; S2: constructing a spectrum trading model based on Stackelberg game, with the drone as the leader and the operator as the follower, according to the offloading platform constructed in step S1; S3: performing drone optimization problem analysis and operator optimization problem analysis respectively according to the spectrum trading model constructed in step S2; S4: generating a comprehensive optimization problem based on the analysis results of the drone optimization problem and the operator optimization problem in step S3, finding the game equilibrium point, and obtaining the optimal computational offloading method for requesting users outside the drone's communication coverage area. Requesting users outside the drone's communication coverage area use D2D relay technology to utilize idle users within the drone's coverage area as relay objects to offload computational tasks to the drone for processing.
[0007] The aforementioned drone-assisted computation offloading method, in step S1, includes the following offloading platform: drone, requesting user, idle user, and operator; the requesting user is a user with computational tasks, including requesting users within the drone's communication coverage area and requesting users outside the drone's communication coverage area; the idle user is a user without computational tasks, located within the drone's communication range but outside the requesting user's D2D communication range; the operator possesses authorized spectrum resources and its own users.
[0008] The aforementioned drone-assisted computational offloading method, in step S2, constructing a spectrum trading model based on a Stackelberg game includes: constructing a drone utility function and an operator utility function; obtaining the game equilibrium point based on the drone utility function and the operator utility function; the construction of the drone utility function includes: L1: existence A requesting user, using a collection It indicates that, among them, there are The requesting user is within the drone's communication coverage area. Each requesting user is located outside the drone's communication coverage area. These users, centered on themselves, detect a total of [number missing] instances within the D2D communication range. One idle user is within the drone's communication coverage area; L2: Each requesting user The computational task is represented as ,in, , To calculate the amount of data for the task, The number of CPU cycles required per bit for the computation task. the maximum tolerable delay of a computing task; L3: the data volume of a computing task of a requesting user includes a local data volume and an offloaded data volume, the computing task of the requesting user is executed in parallel to process the local data volume locally and to process the offloaded data volume by offloading to a UAV, wherein the offloading ratio of a single computing task is represented as , , the offloading decision of a single computing task is represented as , ; the requesting user located within the communication coverage of the UAV , the offloading decision is , when , it indicates that the requesting user within the coverage of the UAV does not execute the offloading task, when , it indicates that the requesting user within the coverage of the UAV executes the offloading task; the requesting user located outside the communication coverage of the UAV , , the offloading decision is , , when , it indicates that the requesting user does not offload, when , it indicates that the requesting user within the D2D communication range provides relay service for the requesting user , ; L4: the computing task completion delay of the requesting user is determined by the local computing delay and the offloaded computing delay , and the calculation formula is: , the calculation formula of the local computing delay is: , wherein is the number of cycles per second executed by the local CPU; L5: for the requesting user , the computing task transmission delay is divided into two stages, the first stage is the transmission delay of the D2D user to the communication, and the second stage is the transmission delay of the relay object uploading the offloaded data volume to the UAV; for the requesting user , the computing task transmission delay is the transmission delay of uploading the offloaded data volume to the UAV; for the requesting user , the computing task transmission delay is calculated by the formula: , wherein is the transmission rate of the requesting user transmitting the offloaded data volume to the UAV; the UAV computing delay is calculated by the formula , wherein, the computing resource allocated to the requesting user by the UAV; the computing latency unloaded by the UAV; The computing formula of the total latency of the computing task processed by the requesting user using the UAV-assisted computing offloading method is: ; The computing formula of the total latency of the computing task processed by the requesting user using the UAV-assisted computing offloading method is: ; L6: The UAV utility function considering the obtained system performance gain and the payment cost of spectrum leasing The computing formula of the UAV utility function is: , wherein, is a preset weight coefficient representing the system latency performance gain, is the total latency of the computing task processed locally, is the unit price of spectrum leasing, is the number of spectrums leased by the UAV; represents the payment cost of the UAV; the utility function of the operator The computing formula of the utility function of the operator is: , wherein, is a preset weight coefficient of the obtained leasing income, is a preset weight coefficient of the reduced user service quality caused by the leased spectrum; is the maximum user service quality, represents the operator user service quality when all spectrums are used for the operator's own users by the operator not leasing spectrum; is a function for calculating the operator user service quality according to the number of spectrums leased by the UAV ; the function for calculating the operator user service quality The computing formula of the function for calculating the operator user service quality is: , wherein, is the number of spectrums owned by the operator, is the number of the operator's own users, is a logarithm operation with base e; the game equilibrium point is .
[0009] The aforementioned UAV-assisted computing offloading method, the UAV optimization problem in step S3 is: , wherein, is the offloading strategy, is the computing resource allocation strategy, is the spectrum resource allocation strategy; constraint condition C1 is that the offloading proportion of the computing task ranges from 0 to 1; constraint condition C2 is that each idle user provides relay for only one requesting user, wherein, is a judgment function, when the judgment condition When true, the discriminant function equals 1, when the discriminant condition is false, the discriminant function equals 0; constraint condition C3 is: the number of spectrum resources rented by the UAV is used for spectrum resource allocation for offloading data volume, wherein, is a set of spectrum resources used for communication between the th user in the set of users and the UAV; constraint condition C4 is: the total amount of computing resources allocated by the UAV to the requesting users does not exceed the total computing resources of the UAV ; constraint condition C5 is: the computing task completion delay of each requesting user does not exceed the maximum tolerated delay of the computing task ; the operator optimization problem in step S3 is: , wherein, is a preset minimum user service quality of the operator; constraint condition C6 is: the value of the operator utility function is non-negative; constraint condition C7 is: the value of the function of the operator user service quality is not less than the preset minimum user service quality of the operator.
[0010] The UAV-assisted computing offloading method described above, the analysis of the operator optimization problem in step S3 includes: deriving, by means of the convex optimization theory, an analytical solution of the optimal number of spectrum resources rented by the operator when a given optimal spectrum rental price is given; Y1: when the given spectrum rental price of the UAV is given, the expression of the utility function of the operator is: ; Y2: taking the first-order derivative and the second-order derivative of the utility function of the operator with respect to the given spectrum rental price , respectively, to obtain the following function expressions: , ; Y3: according to the second-order derivative function expression being always less than 0, it is concluded that the first-order derivative function is monotonically decreasing within the domain, and the original function is a strictly convex function; calculating the number of spectrum resources rented by the UAV according to constraint condition C7, it is concluded that there exists an optimal number of spectrum resources within the domain of the function, which makes the value of the utility function of the operator maximum; Y4: setting the first-order derivative function , the calculation formula of the optimal number of spectrum resources is: ; Y5: setting the optimal number of spectrum resources within the domain of the function, the maximum value and the minimum value of the spectrum rental price are obtained as: , Y6: Based on the maximum and minimum unit prices of spectrum leasing for drones, and combined with constraint C7, the optimal number of spectrum units is obtained. Regarding the unit price of spectrum leasing Analytical solution:
[0011] .
[0012] The aforementioned UAV-assisted computational unloading method, in step S3, includes the following steps for analyzing the UAV optimization problem: W1: Based on the fact that the optimization objective of the UAV optimization problem under a given spectrum quantity is a multivariable non-convex optimization problem, the UAV optimization problem is decomposed into two sub-problems: unloading strategy and resource allocation strategy, which are solved separately; W2: The two sub-problems in step W1 are analyzed separately to obtain the corresponding solution algorithms; W3: Based on the mutual constraint properties of the two sub-problems in step W1, an alternating iteration algorithm is used to iterate the solution algorithms corresponding to the two sub-problems alternately until the change in the solution of the solution algorithm meets the preset change range, and the optimal unloading strategy and the optimal resource allocation strategy under a given spectrum quantity are output; wherein, the alternating iteration includes: J1: Applying the corresponding solution algorithm to the first sub-problem to obtain a preliminary solution; J2: Based on the preliminary solution, applying the corresponding solution algorithm to the second sub-problem to obtain an updated solution; J3: Alternating between steps J1 and J2 until the change in the solutions of the two sub-problems meets the preset change range, where the change in the solution refers to the difference between the solutions of steps J1 and J2.
[0013] The aforementioned drone-assisted computational unloading method, step W1 includes: calculating the spectrum leasing unit price. Substitute the optimal number of spectra in step Y6 The analytical solution is obtained to determine the optimal number of spectrum units. Based on the spectrum rental unit price and the optimal number of spectrum units, the payment cost of the drone is determined. The optimization objective of the drone optimization problem, maximizing drone utility, is transformed into optimizing the unloading strategy. Computing resource allocation strategy and spectrum resource allocation strategy This reduces the total latency of the computation task. Minimize the problem: The optimization objective of the P3 problem is a multivariable nonconvex optimization problem. The P3 problem can be decomposed into unloading strategies. and resource allocation strategy Solve the two subproblems separately.
[0014] The aforementioned drone-assisted computational unloading method, step W2 includes: parsing the unloading strategy respectively. Sub-problems and resource allocation strategies Sub-problems yield corresponding solution algorithms; resource allocation strategies are analyzed. The corresponding solution algorithms for the subproblems include: when the unloading strategy , the local computing latency is determined according to the calculation formula of the local computing latency ; for each requesting user, the computing task completion latency is calculated according to the calculation formula of the computing task completion latency is divided into the following two cases: if , then , which indicates that the computing task completion latency is determined by the local computing latency , and the optimization of the resource allocation strategy will not reduce the computing task completion latency ; if , then , which indicates that the computing task completion latency is determined by the offloading computing latency , and the optimization of the resource allocation strategy will reduce the computing task completion latency ; since the local processing latency is constant and does not need to be optimized, the resource allocation strategy sub-problem is converted into , according to the optimization problem P4 being a nonlinear optimization problem and containing multiple variables and constraint conditions, a genetic algorithm is used to solve the optimization problem P4; the solution algorithm of the offloading strategy sub-problem includes: the offloading strategy includes the offloading ratio and the offloading decision ; in the determination of the resource allocation strategy , the offloading ratio and the offloading decision of each requesting user are jointly optimized to reduce the total latency of the computing task processed by the requesting users using the unmanned aerial vehicle assisted computing offloading method ; the offloading ratio is continuous in value, and the offloading decision is discrete in value, so that the solution of the offloading strategy sub-problem is a mixed integer nonlinear optimization problem: , according to the optimization problem P5 being a joint optimization of continuous variables and discrete variables and containing multiple constraint conditions, an improved particle swarm algorithm is used to solve the optimization problem P5; the improved particle swarm algorithm includes: a probability updating mechanism is used to select an idle user as a relay object for the offloading decision ; a dynamically updated inertia weight is used; the updating formula of the inertia weight is: , wherein is a preset minimum value of the inertia weight, and is a preset maximum value of the inertia weight. is the current iteration number, is the preset maximum iteration number.
[0015] The foregoing unmanned aerial vehicle assisted computing offloading method, step S4 comprises: S41: obtaining a comprehensive optimization problem of the comprehensive unmanned aerial vehicle optimization problem and the operator optimization problem according to the analysis results of the unmanned aerial vehicle optimization problem and the operator optimization problem: ; S42: according to the comprehensive optimization problem P6, using a binary search algorithm, a game equilibrium point is obtained, and an optimal computing offloading method of computing offloading of users within and outside the communication coverage of the unmanned aerial vehicle is obtained; step S42 comprises: S421: according to the comprehensive optimization problem P6, comparing the unmanned aerial vehicle utility calculated by the two endpoints and the midpoint of the spectrum leasing unit price interval, iteratively narrowing the spectrum leasing unit price interval through interval segmentation, until the difference between the endpoints of the spectrum leasing unit price interval meets the preset search interval precision, and the optimal spectrum leasing unit price interval is obtained as the search interval of the binary search method; wherein the initial spectrum leasing unit price interval is the minimum value of the spectrum leasing unit price to the maximum value of the spectrum leasing unit price ; calculating the unmanned aerial vehicle utility according to the spectrum leasing unit price comprises: using an alternating iteration algorithm to alternately iterate the genetic algorithm and the particle swarm algorithm until the change amount of the total time delay of the unmanned aerial vehicle assisted computing offloading method processing the computing task meets the preset change amount range, and outputting the optimal offloading strategy and the optimal resource allocation strategy under the determined spectrum quantity; S422: according to the optimal spectrum leasing unit price interval obtained in step S421, through the binary search algorithm, comparing the unmanned aerial vehicle utility calculated by the midpoint and the midpoint perturbation value of the optimal spectrum leasing unit price interval, iteratively adjusting the optimal spectrum leasing unit price interval through interval segmentation until the difference between the unmanned aerial vehicle utility calculated by the midpoint and the midpoint perturbation value meets the preset difference precision, and outputting the midpoint of the interval meeting the preset difference precision as the optimal spectrum leasing unit price ; wherein the midpoint perturbation value is the sum of the midpoint and the preset perturbation ; S423: substituting the optimal spectrum leasing unit price into the optimal spectrum quantity analytical solution to calculate the optimal spectrum quantity , obtaining the game equilibrium point of the solution , and outputting the optimal offloading strategy and the optimal resource allocation strategy under the optimal spectrum quantity ; S424: obtaining the optimal computing offloading method of computing offloading of users within and outside the communication coverage of the unmanned aerial vehicle The request user outside the UAV communication coverage range uses the idle user in the UAV coverage range as a relay object through the D2D relay technology to unload the computing task to the UAV for processing.
[0016] In a second aspect, the application provides a UAV-assisted computing offloading device, comprising: an offloading platform module, a transaction model module, an analysis module and a comprehensive solution module; the offloading platform module is used to construct an offloading platform corresponding to a UAV-assisted computing offloading method; the transaction model module is used to construct a spectrum transaction model based on Stackelberg game with the UAV as the leader and the operator as the follower according to the offloading platform constructed by the offloading platform module; the analysis module is used to respectively analyze the UAV optimization problem and the operator optimization problem according to the spectrum transaction model constructed by the transaction model module; and the comprehensive solution module is used to generate a comprehensive optimization problem according to the analysis results of the UAV optimization problem and the operator optimization problem of the analysis module, to solve the game equilibrium point, to obtain the optimal computing offloading method for the computing offloading of the request users inside and outside the UAV communication coverage range, and to use the D2D relay technology to unload the computing task to the UAV for processing by using the idle user in the UAV coverage range as a relay object.
[0017] Compared with the prior art, the application has the following beneficial effects:
[0018] The application uses the D2D relay technology to unload the computing task to the UAV for processing by using the idle user in the UAV coverage range as a relay object, constructs a spectrum transaction model based on Stackelberg game according to the mutual restriction of the UAV and the operator, solves the optimal computing offloading method for the computing offloading of the request users inside and outside the UAV communication coverage range, and transmits part of the computing task to the UAV for processing according to the optimal computing offloading method, so as to realize more efficient resource utilization and task processing efficiency, and solve the problem that the terminal located at the communication edge or in the blind area cannot directly communicate with the UAV, resulting in difficulty in offloading the computing task or too long local computing delay.
[0019] (1) The application constructs an offloading platform of the UAV-assisted computing offloading method. The offloading platform is composed of multiple ground users, UAVs carrying MEC servers and operators, the ground users include request users outside the UAV coverage range, request users inside the UAV coverage range and idle users. The UAV rents the spectrum of the operator to communicate with the ground users. The request user outside the UAV coverage range selects the idle user in the D2D communication range and in the UAV coverage range as a relay object to unload the data volume to the UAV, and each relay object and request user in the UAV request range transmits part of the task data to the UAV for processing in a partial offloading manner by using the rented spectrum.
[0020] (2) The application establishes a UAV and operator spectrum transaction model based on Stackelberg game. Since the UAV needs spectrum for communication with ground users, in order to encourage the operator to rent spectrum for the transmission of offloaded task data, the application constructs a Stackelberg game spectrum transaction model of the UAV and the operator, wherein the UAV is the leader and the operator is the follower. The utility function of the UAV is defined by the system performance gain obtained by reducing the delay compared with local computing of all tasks and the payment cost of spectrum rental, and the utility function of the operator is composed of the income obtained by renting spectrum and the reduced service quality of its own system users due to spectrum rental.
[0021] (3) The application proposes an offloading and resource allocation strategy based on a heuristic algorithm. Under the condition of spectrum quantity and computing resource limitation, a system delay minimization problem is established, since the problem is a non-convex optimization problem, it is decomposed into two sub-problems of offloading and relay selection strategy and resource allocation, particle swarm algorithm and genetic algorithm are used for solving respectively, and the optimal offloading strategy, computing resource allocation strategy and spectrum resource allocation strategy are solved by alternating iteration.
[0022] (4) The application designs a method for solving the game equilibrium point. According to the analytical results of the UAV optimization problem and the operator optimization problem, a comprehensive optimization problem is generated, and the analytical solution of the optimal spectrum rental quantity of the operator under the given UAV spectrum rental unit price is derived by convex optimization theory, and at the same time, the optimal spectrum rental unit price is dynamically iterated and solved by using the dichotomy search algorithm, so as to maximize the utility of the UAV. The computing offloading method of the application can improve the utility of the UAV and the operator, and reduce the total delay of computing tasks. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 is a flowchart of the UAV-assisted computing offloading method of the embodiment 1 of the application;
[0024] Figure 2 is a schematic diagram of the offloading platform corresponding to the UAV-assisted computing offloading method of the embodiment 1 of the application;
[0025] Figure 3 is a convergence situation diagram of the UAV-assisted computing offloading method of the embodiment 1 of the application applied to different computing task data quantities;
[0026] Figure 4 is a total delay performance comparison diagram of computing tasks under different algorithms of the embodiment 1 of the application;
[0027] Figure 5This is a schematic diagram showing the comparison results of the UAV utility under different algorithms in Embodiment 1 of the present invention. Detailed Implementation
[0028] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, and not limitations thereof. Unless otherwise specified, the embodiments and technical features in the embodiments can be combined with each other. The term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0029] Example 1:
[0030] This embodiment describes a drone-assisted computational unloading method, such as... Figure 1 As shown, it includes:
[0031] S1: Construct an unloading platform corresponding to the drone-assisted computational unloading method;
[0032] S2: Based on the offloading platform built in step S1, construct a spectrum trading model based on Stackelberg game theory, with drones as leaders and operators as followers.
[0033] S3: Based on the spectrum trading model constructed in step S2, analyze the drone optimization problem and the operator optimization problem respectively;
[0034] S4: Based on the analysis results of the UAV optimization problem and the operator optimization problem in step S3, a comprehensive optimization problem is generated, the game equilibrium point is found, and the optimal computational offloading method for requesting users within and outside the UAV communication coverage area is obtained. Requesting users outside the UAV communication coverage area use D2D relay technology to use idle users within the UAV coverage area as relay objects to offload computational tasks to the UAV for processing.
[0035] The following is a description of the relevant terminology used in the embodiments of this application:
[0036] Unmanned aerial vehicles (UAVs): Unmanned aerial vehicles are unmanned aircraft controlled by radio remote control equipment and their own program control devices, or operated autonomously by an onboard computer, either completely or intermittently.
[0037] D2D communication: D2D stands for Device-to-Device, also known as terminal pass-through. D2D communication technology refers to a communication method in which two peer user nodes communicate directly. In a distributed network composed of D2D communication users, each user node can send and receive signals and has automatic routing (message forwarding) capabilities. D2D communication technology can establish direct connections between terminal users within communication range, reducing dependence on base stations, reducing latency, and is suitable for application scenarios such as mobile edge computing and vehicle-to-everything (V2X) communication.
[0038] This invention utilizes D2D relay technology to transmit tasks to drones for processing from users outside the drone's coverage area. Idle users within the drone's coverage area act as relays, achieving more efficient resource utilization and task processing. Simultaneously, considering that drones lack licensed spectrum resources and need to lease spectrum from operators to communicate with ground users, a Stackelberg game-based transaction method between drones and operators is established to help requesting users offload computation, reducing task completion time. Furthermore, to address the problem of maximizing the reduction of total latency for all requesting users within limited spectrum and computational resources, heuristic algorithms—genetic algorithm and particle swarm optimization—are employed to solve for the optimal computation offloading and resource allocation strategies, respectively.
[0039] In step S1, such as Figure 2 The schematic diagram of the offloading platform corresponding to this embodiment is shown. The offloading platform includes: drone, requesting user, idle user, and operator; requesting user is a user with computing task, including requesting user within the drone's communication coverage area and requesting user outside the drone's communication coverage area; idle user is a user without computing task, located within the drone's communication range and outside the requesting user's D2D communication range outside the drone's communication coverage area; operator has authorized spectrum resource qualifications and its own users.
[0040] Step S2, constructing the spectrum trading model based on the Stackelberg game, includes: constructing the drone utility function and the operator utility function; obtaining the game equilibrium point based on the drone utility function and the operator utility function; the construction of the drone utility function includes:
[0041] L1: Existence A requesting user, using a collection It indicates that, among them, there are The requesting user is located within the UAV communication coverage area. Each requesting user is located outside the drone's communication coverage area. These users, centered on themselves, detect a total of [number missing] instances within the D2D communication range. a free user in the D2D communication range of the request user
[0042] L2: each request user There is a latency-sensitive computing task to be processed, which is specifically represented as wherein, , is the data volume of the computing task, is the CPU cycle required by the computing task per bit; is the maximum tolerable latency of the computing task;
[0043] L3: the data volume of the computing task of the request user includes the local data volume and the offloading data volume, and the computing task of the request user is executed in parallel to process the local data volume locally and offload to the UAV to process the offloading data volume; for convenience of processing, it is assumed that the UAV starts computing only after the offloading data volume of a single computing task is completely transmitted, and the computing result is sent immediately after the single task is computed, without waiting for all tasks to be completed. Assuming a quasi-static scenario, the positions of each user and the UAV are relatively fixed and unchanged within the execution period of the computing task. The computing task is uploaded to the UAV for processing in a partial offloading manner, and the offloading ratio of a single computing task is represented as , The offloading decision of a single computing task is represented as , The request user located in the coverage range of the UAV can directly offload the task to the UAV, and the offloading decision is When , it indicates that the request user located in the coverage range of the UAV does not perform the offloading task, and when , it indicates that the request user located in the coverage range of the UAV performs the offloading task; the request user , located outside the coverage range of the UAV selects a free user in the D2D communication range of the request user as a relay object, and cooperatively completes data transmission in a half-duplex DF (decode-and-forward) mode, and the offloading decision is , When , it indicates that the request user does not perform offloading, and when , it indicates that the free user in the D2D communication range of the request user provides relay service for the request user , If there are cross idle users in the D2D communication range of the request user, the idle user only serves one of the request users, that is, each idle user provides relay for one request user:
[0044] (1)
[0045] wherein, is a decision function, when the decision condition is true, the decision function is equal to 1, when the decision condition is false, the decision function is equal to 0. The channel gain between the request user and the idle user is , wherein, is a reference channel gain, is a path loss index, is the location distance of the request user and the idle user . Each D2D user transmits task data using different channel resources, that is, there is no channel interference between users. Since the UAV has no licensed spectrum resources, it must lease spectrum resources from the operator to realize communication with the ground user and assist the ground user in computing offloading to reduce the computing time delay of the computing task. Assuming that the influence of mutual interference on the propagation delay is not considered, the idle user and the request user as the relay object use the FDMA technology to offload the task to the UAV;
[0046] L4: The computing task is uploaded to the UAV for processing in a partial offloading manner, so the computing task completion time delay of the request user is determined by the local computing time delay and the offloaded computing time delay , and the calculation formula is: ; for the local data volume of the computing task, the time delay is the local computing time delay, and for the offloaded data volume of the computing task, the offloaded computing time delay is composed of two parts: the computing task transmission time delay and the UAV computing time delay . For the request user , the time delay of the local processing part depends on the computing capability of itself, so the calculation formula of the local computing time is:
[0047] (2)
[0048] wherein, is the number of cycles per second executed by the local CPU;
[0049] L5: For requesting users The computation task transmission latency is divided into two stages: the first stage is the transmission latency of D2D user communication, and the second stage is the transmission latency of relay object uploading and unloading data to UAV; for requesting users The calculation task transmission latency is the transmission latency of uploading and unloading data to the drone; when idle users To request user When providing relay transmission services, the transmission rate in the first phase It can be represented as: , in, Assign UAVs to idle users spectrum resources, To request user The transmission power, To request user To idle users Channel gain, The power is Gaussian white noise. Second phase idle users. and requesting users The transmission rate under FDMA technology can be expressed as: in, , For set The Middle Spectrum resources for communication between individual users and UAVs (Unmanned Aerial Vehicles). For set The Middle Transmit power of each user For set The Middle Channel gain from user to UAV This represents the power of Gaussian white noise. Indicates an idle user Transmission rate with UAVs under FDMA technology. Due to the "weakest link" principle, in a two-hop D2D relay link, the transmission rate is determined by the weaker stage. (Requesting user...) The transmission rate to the drone is expressed as: Therefore, for the requesting user Calculate the transmission latency of the task And drone computing latency The calculation formula is: (5) In equation (6), where, To request user The transmission rate of the unloaded data to the drone; allocating computing resources to the requesting users of the computing latency The formula is: Since the requesting users process tasks in a parallel manner, the computing task completion latency of each task from the start of execution to the return of the result The formula is: ; The total latency of the requesting users using the UAV-assisted computing offloading method to process computing tasks The formula is: ; Considering that the UAV itself has no spectrum resources, in order to assist the ground users to complete part of the computing offloading of the computing tasks, the UAV needs to lease spectrum from the operator. Considering the interests of both the UAV-assisted MEC system and the operator, the spectrum transaction is studied. Game theory is introduced, and the spectrum transaction between the UAV and the operator is constructed as a Stackelberg game model, in which the UAV is the leader and the operator is the follower;
[0050] L6: To help the requesting users to perform computing offloading, minimize the total latency of the system, and reduce the payment cost of leasing spectrum by the UAV as much as possible. Considering the system performance gain obtained and the payment cost of spectrum leasing, the utility function of the leader is defined as:
[0051] , (7)
[0052] In the formula, is a preset weight coefficient representing the system latency performance gain, is the total latency of processing all computing tasks locally, is the unit price of spectrum leasing, is the number of spectrum leased by the UAV; the first term of the utility function is the system latency gain reduced compared to processing all computing tasks locally, and the second term is the payment cost of the UAV. The larger the number of leased spectrum is, the greater the system latency reduction means, but the cost will also increase accordingly. In order to encourage the operator to participate in the spectrum transaction, it is assumed that the operator has sufficient spectrum, and the number of spectrum is , and the operator has own users, and can lease part of the spectrum resources to obtain additional compensation on the premise of guaranteeing the service demand of the own users. It is assumed that the operator allocates the remaining spectrum resources (excluding the spectrum leased to the UAV) to all own users in an average manner, and the user service quality (Qos) is a function of the number of spectrum leased by the UAV The formula is: The utility function of the operator is defined by comprehensively considering the benefits and costs obtained by the operator The calculation formula is:
[0053] ,
[0054] In the formula, is a preset weight coefficient of the rental income, is a preset weight coefficient of the reduction of user service quality caused by spectrum leasing; is the maximum user service quality, is the operator user service quality when all the spectrum is used for the operator's own users, is the number of spectrums rented by the UAV according to the number of spectrums, The function for calculating the operator user service quality; in the Stackelberg game framework, the leader and the follower interact in two different stages. In the first stage, the leader UAV makes a decision first and gives the spectrum rental price The spectrum rental price will affect the number of spectrums rented by the operator; in the second stage, the follower operator decides the number of spectrums to rent based on the spectrum rental price set by the leader UAV according to the utility maximization target of the operator, and the number of spectrums will in turn affect the spectrum rental price set by the leader UAV. The two parties game based on the spectrum rental price and the number of spectrums , and the game equilibrium point is .
[0055] The optimization problem of the leader UAV and the follower operator in step S3:
[0056] The UAV optimization problem: for the UAV-assisted MEC system, when the spectrum rental price is lower, the payment cost of the UAV is smaller, but the lower spectrum rental price will affect the number of spectrums rented by the follower, and the number of spectrums rented by the UAV is insufficient, so it is difficult to reduce the total time delay of the calculation task processed by the UAV-assisted calculation offloading method, and therefore the spectrum rental price of the UAV-assisted MEC system will be affected by the number of spectrums provided by the operator in the process of game. To maximize the utility of the UAV, the spectrum resource allocation strategy is that the number of rented spectrums is all used for spectrum bandwidth allocation, and the offloading strategy and the calculation resource allocation strategy And spectrum leasing unit price The total time delay of the UAV-assisted computing offloading method for processing computing tasks will affect the utility of the UAV, and therefore the optimization problem of the UAV is:
[0057] , (9)
[0058] In the formula, is the offloading strategy, is the computing resource allocation strategy, is the spectrum resource allocation strategy; constraint condition C1 is that the offloading proportion of the computing task is in the range of 0-1; constraint condition C2 is that each idle user can only provide a relay for one requesting user; constraint condition C3 is that the number of spectrums rented by the UAV is used for the spectrum resource allocation of the offloaded data amount, wherein, is the spectrum resource used for the communication between the th user in the set and the UAV; constraint condition C4 is that the total computing resources allocated by the UAV to the requesting users do not exceed the total computing resources of the UAV ; constraint condition C5 is that the computing task completion time delay of each requesting user does not exceed the maximum tolerable time delay of the computing task ;
[0059] The optimization problem of the operator is:
[0060] The variable to be optimized by the operator is the number of spectrums rented , and the optimization problem of the operator is:
[0061] , (10)
[0062] In the formula, is the preset minimum user service quality of the operator; constraint condition C6 is that the value of the utility function of the operator is non-negative, indicating that the number of spectrums rented by the operator should ensure that it can obtain effective income, otherwise the operator will not provide spectrum leasing services; constraint condition C7 is that the value of the function of the user service quality of the operator is not less than the preset minimum user service quality of the operator, indicating that after the operator rents part of the spectrums, the remaining number of spectrums should meet the minimum user service quality of the original own customers. Based on the above leader optimization problem and operator optimization problem, the solution target of the optimization problem is to solve the Stackelberg game equilibrium point of the leader and the follower, and the Stackelberg game equilibrium analysis is as follows: assuming is the optimal spectrum leasing unit price, and These are the unit prices for drones in the optimal spectrum leasing. The optimal offloading strategy, optimal computing resource allocation strategy, and optimal spectrum resource allocation strategy are as follows: If this is the optimal number of spectrum slots for the operator, then the point... This is the equilibrium point of the constructed Stackelberg game. Therefore, the solution to the game equilibrium point should satisfy the following conditions:
[0063]
[0064]
[0065] Formula (11) indicates that, given the operator's optimal strategy, This allows the leader's utility to be maximized. Formula (12) indicates that, given the leader's optimal strategy, It can maximize the utility of followers.
[0066] To find the equilibrium point in the game, we analyze the operator optimization problem and the drone optimization problem separately:
[0067] For the operator's optimization problem, an analytical solution for the optimal number of spectrum leased by the operator is derived using convex optimization theory.
[0068] For the optimization problem of UAVs, given a certain amount of spectrum, the optimization objective is a multivariable non-convex optimization problem. Therefore, the problem is decomposed into two subproblems: unloading strategy and resource allocation strategy, which are solved separately. An alternating iterative algorithm is then used to solve for the optimal unloading strategy and the optimal resource allocation strategy for the corresponding amount of spectrum.
[0069] Step S3, the analysis of operator optimization issues, includes:
[0070] Y1: When the drone has a given spectrum rental unit price At that time, the utility function expression of the operator is:
[0071] (13)
[0072] Y2: Given the spectrum rental unit price The utility functions of the operators respectively Finding the first and second derivatives, we obtain the following function expression:
[0073] (14)
[0074] (15);
[0075] Y3: According to the second derivative function formula (15) is less than 0, indicating that the first derivative function formula (14) Monotone decreasing in the domain, and the original function formula (13) Is a strictly convex function; according to the constraint condition C7, the number of spectrum rented by the unmanned aerial vehicle is calculated , which indicates that there is an optimal spectrum number In the domain Of definition Make the operator utility function take the maximum value;
[0076] Y4: Let the first derivative function , the calculation formula of the optimal spectrum number Is:
[0077] , (16)
[0078] Because in the domain of the variable , the higher the spectrum rental price given by the unmanned aerial vehicle, the more spectrum the operator is willing to rent, but the operator is limited in the number of spectrum that can be rented in order to ensure the user service quality of its own users. At the same time, according to the constraint conditions C6, C7 and the properties of convex function, the value of the first derivative function at Must be greater than 0;
[0079] Y5: Let the optimal spectrum number In the domain of , the maximum and minimum values of the spectrum rental price are obtained as:
[0080] , (17)
[0081] , (18)
[0082] Y6: According to the maximum and minimum values of the spectrum rental price of the unmanned aerial vehicle, combined with the constraint condition C7, the optimal spectrum number The analytical solution of the spectrum rental price :
[0083] , (19)
[0084] The analysis of the unmanned aerial vehicle optimization problem in step S3 includes:
[0085] W1: Since the optimization objective of the UAV optimization problem under a fixed spectrum quantity is a multivariable non-convex optimization problem, the UAV optimization problem is decomposed into two sub-problems: unloading strategy and resource allocation strategy, which are solved separately. W2: The two sub-problems in step W1 are analyzed separately to obtain the corresponding solution algorithms. W3: Based on the mutual constraint property of the two sub-problems in step W1, an alternating iterative algorithm is used to iterate the solution algorithms corresponding to the two sub-problems alternately until the change in the solution of the solution algorithm meets the preset change range. The optimal unloading strategy and the optimal resource allocation strategy under a fixed spectrum quantity are then output.
[0086] The alternating iteration includes: J1: applying the corresponding solution algorithm to the first subproblem to obtain a preliminary solution; J2: based on the preliminary solution, applying the corresponding solution algorithm to the second subproblem to obtain an updated solution; J3: alternating between steps J1 and J2 until the change in the solutions of the two subproblems meets the preset change range, wherein the change in the solution refers to the difference between the solutions of steps J1 and J2.
[0087] Step W1 includes:
[0088] The unit price of spectrum leasing Substitute the optimal number of spectra in step Y6 The analytical solution is obtained to determine the optimal number of spectrum units. Based on the spectrum rental unit price and the optimal number of spectrum units, the payment cost of the drone is determined. The optimization objective of the drone optimization problem, maximizing drone utility, is transformed into optimizing the unloading strategy. Computing resource allocation strategy and spectrum resource allocation strategy This reduces the total latency of the computation task. Minimize the problem:
[0089] (20)
[0090] The optimization objective of the P3 problem is a multivariable nonconvex optimization problem. The P3 problem can be decomposed into unloading strategies. and resource allocation Solve the two subproblems separately.
[0091] Step W2 includes:
[0092] Analyze the uninstallation strategy separately Sub-problems and resource allocation strategies Sub-problems yield corresponding solution algorithms; resource allocation strategies are analyzed. The corresponding solution algorithms for the subproblems include:
[0093] When uninstallation policy When determining the unloading ratio, the local calculation latency is used. The calculation formula determines the local computation delay. For each requesting user, the calculation formula for the task completion delay is applied: Calculate the task completion delay There are two possible scenarios: If ,but This indicates the delay in completing the computation task. Latency calculated locally The decision was made to optimize the resource allocation strategy. It will not reduce the latency of computing task completion. ;like ,but This indicates the delay in completing the computation task. Delay calculated by unloading The decision was made to optimize the resource allocation strategy. It will reduce the latency of computing tasks. Due to local processing latency Since it is a constant and requires no optimization, considering the above factors, the resource allocation strategy will be... The solution to the subproblem is transformed into:
[0094] (twenty one)
[0095] Analysis of optimization problem P4 reveals that it is a nonlinear optimization problem with multiple variables and constraints, making it difficult to find the global optimal solution analytically. Therefore, a genetic algorithm, a global optimization algorithm, is used to solve this problem.
[0096] In the initialization phase of the genetic algorithm, an initial population is randomly generated. The spectrum resources and computational resources are encoded and converted into chromosomes for each individual in the population. The chromosome length of each individual in the population is... , respectively represent The number of spectrums and computing resources for each user. The total latency of the computing task for each individual in the population is calculated according to the objective function of formula (21) as the fitness value, and variables that do not meet the constraints are transformed into corresponding penalties and introduced into the fitness calculation. During the crossover phase, tournament selection is used to select individuals with better fitness from the population as parents for crossover operations. The selected parents are grouped into pairs, and the feasibility of crossover operations between the two parents is determined using dynamic crossover probability. Crossover operations on corresponding genes are performed by generating crossover masks to enrich the diversity of the population while avoiding complete gene coverage. Indicates the intersection mask, if This indicates the exchange of parental genes at this location. This indicates that parental genes are not exchanged at this location. During the mutation phase, the population is traversed, and the selected mutation point is... Add random disturbance and carry out boundary control to ensure the validity of the solution. At the same time, the system delay corresponding to each individual is calculated, and the lower the individual system delay, the higher the fitness of the individual in the natural environment. The elite reservation strategy is adopted to add individuals with high fitness to the new population.
[0097] The specific algorithm is shown in Algorithm 1:
[0098]
[0099] Analysis of offloading strategy The corresponding solution algorithm of the sub-problem includes:
[0100] In the resource allocation strategy , the offloading ratio of each request user is optimized jointly , and the offloading decision is reduced ; the total delay of the request user using the unmanned aerial vehicle assisted computing offloading method to process the computing task ; the offloading ratio is continuous, the offloading decision is a discrete integer variable, and the solution of the offloading strategy sub-problem is a mixed integer nonlinear optimization problem:
[0101] , (22)
[0102] According to the optimization problem P5 for jointly optimizing continuous variables and discrete variables and containing multiple constraint conditions, an improved particle swarm algorithm is used to solve the optimization problem P5; the improved particle swarm algorithm includes: the offloading decision is selected as the relay object by using a probability updating mechanism; and a dynamically updated inertia weight is used.
[0103] The updating formula of the inertia weight is: , wherein is a preset minimum value of the inertia weight, is a preset maximum value of the inertia weight, is the current iteration number, is a preset maximum iteration number.
[0104] Due to the characteristics of few parameters and fast convergence of the particle swarm optimization algorithm, the above complex optimization problem can be well solved. However, the basic particle swarm algorithm is a continuous search algorithm, and the inertia weight and learning factor remain unchanged during the iteration process, so the search ability is poor and it is difficult to be directly used to solve the problem. Therefore, the improved particle swarm algorithm is used to solve P5. In the algorithm, each particle represents a solution, and for the offloading ratio , the position and velocity are updated by using the traditional particle swarm updating rule:
[0105] (twenty three)
[0106] (twenty four)
[0107] in, and They represent the first The particle in the first The particle's update velocity and position in the next iteration. and They represent the process. After the nth iteration The historical best position of each particle and the global historical best position. These are inertial weights, dynamically adjusted with the number of iterations to help the algorithm converge better. These are self-learning factors and group learning factors. Random numbers add randomness to the iteration.
[0108] For uninstallation decisions It is a discrete variable, and is updated using a probabilistic update mechanism based on roulette wheel selection. The selection probability is used to adjust the position for each requesting user. The following update formula is used to adjust the selection probability of the unloaded object:
[0109] (25)
[0110] in, It is a request to the user In the In the next iteration, a relay object is selected. The probability, and They are the best choices in the history of particles. The probability and the global optimal particle corresponding to The probability of each possible relay object is normalized after each update. Given an updated probability distribution, a roulette wheel selection is used to determine the relay object. First, a... random numbers Calculate the cumulative probability Then find the one that makes the cumulative probability greater than or equal to The smallest and use it as a request from the user The relay object. The particle fitness is calculated by combining system delay and penalty terms for not meeting constraints.
[0111]
[0112] Step S4 includes:
[0113] With the unit price of spectrum leasing The increase in the amount of spectrum leased As the number of drones increases, so does the cost of operating them, but the total latency of computing tasks also increases. This will decrease further, as operators have a limited amount of leaseable spectrum. When the value increases to a certain threshold, the leader's utility value is maximized, thus reaching a game equilibrium.
[0114] S41: Based on the analytical results of the UAV optimization problem and the operator optimization problem, the comprehensive optimization problem combining the UAV optimization problem and the operator optimization problem is obtained:
[0115] (26)
[0116] S42: Based on the non-convex comprehensive optimization problem P6, a binary search algorithm is used to find the game equilibrium point and obtain the optimal calculation and unloading method for requesting users within and outside the UAV communication coverage area.
[0117] Step S42 includes: S421: Based on the comprehensive optimization problem P6, using a binary search algorithm, compare the UAV utility calculated at the two endpoints and the midpoint of the spectrum rental unit price interval, perform interval segmentation iteratively to narrow down the spectrum rental unit price interval, until the difference between the endpoints of the spectrum rental unit price interval meets the preset search interval precision, thus obtaining the optimal spectrum rental unit price interval. The search interval for the binary search method; where the initial spectrum rental unit price interval is the minimum spectrum rental unit price. Maximum unit price for spectrum leasing Narrowing the spectrum rental unit price range reduces the search range of the subsequent binary search algorithm, allowing for faster finding of optimal accuracy and accelerating computational convergence. Calculating UAV utility based on spectrum rental unit price includes: using an alternating iterative algorithm to alternate between the genetic algorithm and the particle swarm optimization algorithm until the change in the total latency of the UAV-assisted computational offloading method meets a preset range, outputting the optimal offloading strategy and optimal resource allocation strategy for a given amount of spectrum; S422: Based on the optimal spectrum rental unit price range obtained in step S421, a binary search algorithm is used to compare the midpoint of the optimal spectrum rental unit price range. Midpoint perturbation value The calculated drone utility values are used to iteratively adjust the optimal spectrum rental price range by dividing the range into intervals. This process continues until the difference between the drone utility values calculated at the midpoint of the interval and the midpoint perturbation value meets a preset difference precision. The midpoint of the interval that meets the preset difference precision is then output as the optimal spectrum rental price. Among them, the midpoint disturbance value is the midpoint of the interval and a preset disturbance ; in this embodiment, the preset disturbance is the midpoint of the interval is one quarter of the difference between the left and right endpoints of the interval in which the midpoint disturbance value is located; the addition of the midpoint disturbance value set expands the search range of the solution, avoiding too fast convergence of the calculation, thereby avoiding premature convergence of the algorithm to a local optimal solution or falling into some undesirable search path. This method is particularly useful in optimization problems, especially in cases where the objective function is non-monotonic or has multiple local optimal solutions; S423: substituting the optimal spectrum rental unit price into the optimal spectrum quantity analytical solution to calculate the optimal spectrum quantity , obtaining the game equilibrium point of the solution , outputting the optimal offloading strategy and the optimal resource allocation strategy under the optimal spectrum quantity ; S424: obtaining the optimal calculation offloading method for offloading by the requesting users within and outside the communication coverage of the UAV The requesting users outside the communication coverage of the UAV offload the calculation tasks to the UAV for processing by using the idle users within the communication coverage of the UAV as relay objects through the D2D relay technology.
[0118] Based on the binary search algorithm, the optimal is dynamically iterated and solved, including: in the initial stage of the algorithm, the search interval of the binary search method needs to be determined first, as shown in Algorithm 3, the interval division strategy of the binary search algorithm is used to narrow the optimal unit price interval, and the queue is used to store the intervals to be processed, in each iteration, the queue is processed in FIFO (First In First Out) order, and the left and right endpoints and the middle endpoint of the first interval are selected to compare the leader UAV utility values. When the interval size reaches a certain accuracy, the refinement interval is ended, and the interval in which the optimal unit price is returned. In order to ensure that the search interval is always maintained within the search interval during the iteration process of the algorithm, the optimal solution under any accuracy can be solved by the binary method . In each iteration, the utility values of the leader corresponding to the midpoint and the disturbance value of the current interval are calculated, respectively and , by comparing the utility values, when , the right boundary is contracted ; when , the left boundary is contracted When the difference in utility value is within the end condition precision, output the optimal spectrum rental price , and the corresponding optimal spectrum rental quantity , the optimal offloading decision and resource allocation .
[0119] To verify the performance of the optimization algorithm proposed in the present application, MATLAB is used for simulation. It is assumed that the flight height of the UAV is 100 m, 5 request users and 10 idle users are randomly distributed in the area with a radius of 100 m centered on the UAV, 3 request users are randomly distributed around the periphery of the area, the maximum communication distance of D2D communication is 30 m, the channel gain is calculated by the path loss model, and the path loss exponent is 3. The computing capacity of each request user is randomly generated in the interval , and the computing capacity of the UAV is . Other related parameters are shown in Table 1.
[0120] Table 1 Simulation parameters
[0121]
[0122] When the task data volume of the request users is different, the system convergence of the algorithm of the present application at the respective optimal spectrum rental price is shown in Figure 3 . As can be seen from Figure 3 , the algorithm gradually converges with the increase of the number of iterations. In addition, the total time delay also decreases with the decrease of the task data volume. In order to verify the performance of the algorithm proposed in the present application, it is compared with the following three algorithms:
[0123] (1) Random offloading algorithm: the offloading ratio of the request user and the relay object are randomly generated in a given range, and the average result of 1000 times is executed, and it is worth noting that other variables are optimized.
[0124] (2) Fixed price algorithm: the spectrum price is fixed at 1.4 $ / MHz, and other variables are optimized.
[0125] (3) Direct offloading algorithm: this algorithm only considers the computing offloading of users within the coverage range of the UAV, and does not consider users outside the coverage range. It is assumed that the request users outside the coverage range of the UAV execute the computing task locally, and the tasks of the request users within the coverage range are optimized for offloading, and the spectrum transaction is not considered, and it is assumed that the spectrum price is fixed at 1.4 $ / MHz.
[0126] From the comparison of the performance of the above four algorithms in Figures 4 to 5 , it can be seen that the system time delay and the UAV utility of all algorithms increase with the increase of the task data volume. Figure 4A schematic diagram of total time delay performance comparison of different algorithms in processing computing tasks is given. Figure 4 It can be seen that, under different task data amounts, the algorithm of the application can always minimize the total time delay of computing tasks. It can also be seen that the total time delay of the random offloading algorithm is the largest, because the random offloading algorithm cannot effectively utilize computing resources, and the total time delay increases greatly with the increase of the computing task data amount. Compared with the fixed price algorithm, because the algorithm of the application solves the optimal spectrum leasing unit price through game, the number of spectrums rented by the operator to the UAV increases, thereby reducing the total time delay, and as the task data amount increases, more spectrum resources are needed by the system, and the total time delay reduced by the algorithm of the application is more obvious. Compared with the direct offloading algorithm, the algorithm of the application fully considers the computing offloading of the request users outside the UAV coverage range, while the computing tasks of these request users in the direct offloading algorithm can only be processed locally, so the algorithm of the application can reduce the total time delay to a lower level. Figure 5 A schematic diagram of UAV utility comparison results under different algorithms is given. Figure 5 It can be seen that the algorithm of the application has the highest utility, and the random offloading algorithm has the lowest utility. This is because in the random offloading algorithm, the gain brought by the reduction of system time delay is less. Compared with the fixed price algorithm, the algorithm of the application can change the spectrum leasing unit price, thereby improving the utility value. Compared with the direct offloading algorithm, the algorithm of the application can increase the performance gain of the system by reducing the time delay of the request users outside the UAV coverage range, and can also improve the utility by game based on the spectrum leasing unit price and the number of spectrums.
[0127] Embodiment two:
[0128] An unmanned aerial vehicle (UAV) assisted computing offloading device, comprising an offloading platform module, a transaction model module, an analysis module and a comprehensive solution module; the offloading platform module is configured to construct an offloading platform corresponding to a UAV assisted computing offloading method; the transaction model module is configured to construct a spectrum transaction model based on Stackelberg game with the UAV as the leader and the operator as the follower according to the offloading platform constructed by the offloading platform module; the analysis module is configured to respectively analyze a UAV optimization problem and an operator optimization problem according to the spectrum transaction model constructed by the transaction model module; and the comprehensive solution module is configured to generate a comprehensive optimization problem according to the UAV optimization problem analysis result and the operator optimization problem analysis result of the analysis module, solve a game equilibrium point, and obtain an optimal computing offloading method for computing offloading of request users within and outside the communication coverage range of the UAV, so that the request users outside the communication coverage range of the UAV offload computing tasks to the UAV for processing by using idle users within the communication coverage range of the UAV as relay objects through D2D relay technology.
[0129] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, a system or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code. The specification and drawings are, accordingly, to be regarded as illustrative merely. Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks Figure 1 one or more functions specified in the flow or flows and / or blocks The foregoing is considered as illustrative only of the principles of the application. Further, since numerous modifications and changes will readily occur to those skilled in the art, it is not desired to limit the application to the exact construction and operation described. Accordingly, all such variations are intended to fall within the scope of the application.
Claims
1. A drone-assisted computational unloading method, characterized in that, include: S1: Construct an unloading platform corresponding to the drone-assisted computational unloading method; S2: Based on the offloading platform built in step S1, construct a spectrum trading model based on Stackelberg game theory, with drones as leaders and operators as followers. S3: Based on the spectrum trading model constructed in step S2, analyze the drone optimization problem and the operator optimization problem respectively; S4: Based on the analysis results of the UAV optimization problem and the operator optimization problem in step S3, generate a comprehensive optimization problem, find the game equilibrium point, and obtain the optimal computational offloading method for requesting users within and outside the UAV communication coverage area. Requesting users outside the UAV communication coverage area use D2D relay technology to use idle users within the UAV coverage area as relay objects to offload computational tasks to the UAV for processing. The UAV optimization problem mentioned in step S3 is: , In the formula, For uninstallation strategy, For computing resource allocation strategies, Spectrum resource allocation strategy; Constraint C1 is: the percentage of unloading the computational task. The value ranges from 0 to 1; Constraint C2 is: each idle user provides relay service for only one requesting user, where, Let be the discriminant function, when the discriminant condition is met. When true, the discriminant function equals 1; when the discriminant condition is true, the discriminant function equals 1. When the result is false, the discriminant function equals 0; Constraint C3 is: the amount of spectrum leased for drones. All spectrum resources allocated for offloading data volume, of which, For set The Middle Spectrum resources for communication between individual users and drones; Constraint C4 is: the total computing resources allocated to the requesting user by the drone. No more than the total computing resources of the drone ; Constraint C5 is: the completion delay of the computation task for each requesting user. Not exceeding the maximum tolerable latency of the computing task ; The operator optimization problem mentioned in step S3 is: , In the formula, The preset minimum quality of service for users of the operator; Constraint C6 is: The operator utility function takes a non-negative value; Constraint C7 is: The value of the operator's user service quality function is not less than the preset minimum user service quality of the operator; Step S4 includes: S41: Based on the analytical results of the UAV optimization problem and the operator optimization problem, the comprehensive optimization problem combining the UAV optimization problem and the operator optimization problem is obtained: , S42: Based on the comprehensive optimization problem P6, a binary search algorithm is used to find the game equilibrium point and obtain the optimal calculation and unloading method for requesting users within and outside the drone's communication coverage area.
2. The unmanned aerial vehicle-assisted calculation unloading method according to claim 1, characterized in that, The unloading platforms corresponding to the drone-assisted computational unloading method in step S1 include: drone, requesting user, idle user, and operator; The requesting user is a user with a computing task, and the requesting user includes the requesting user within the drone's communication coverage area and the requesting user outside the drone's communication coverage area. The idle user is a user without computing tasks, and the idle user is located within the communication range of the UAV and outside the D2D communication range of the requesting user outside the coverage range of the UAV communication. The operator possesses authorized spectrum resources and its own users.
3. The unmanned aerial vehicle-assisted calculation unloading method according to claim 1 or 2, characterized in that, Step S2, which involves constructing a spectrum trading model based on Stackelberg game theory, includes: Construct the utility function for the drone and the utility function for the operator; Based on the utility functions of the drone and the operator, the game equilibrium point is obtained; The construction of the UAV utility function includes: L1: Existence A requesting user, using a collection It indicates that, among them, there are The requesting user is within the drone's communication coverage area. Each requesting user is located outside the drone's communication coverage area. These users, centered on themselves, detect a total of [number missing] instances within the D2D communication range. One idle user is located within the drone's communication coverage area; L2: Each requesting user The computational task is represented as ,in, , To calculate the amount of data for the task, The number of CPU cycles required per bit for the computation task. To calculate the maximum tolerable latency for the task; L3: The requested user computation task includes both local data and offloaded data. The requested user computation task is executed in parallel locally for local data processing and offloaded to the drone for offloaded data processing. The offloading ratio of a single computing task is expressed as: , The offloading decision for a single computational task is represented as , ; Requesting users located within the drone's communication coverage area The uninstallation decision is ,when At that time, it indicates the requesting user within the drone's coverage area. Do not perform the uninstallation task when At that time, it indicates the requesting user within the drone's coverage area. Execute the uninstallation task; Requesting users located outside the drone's communication coverage area , The uninstallation decision is , ,when When, it indicates a request to the user Without uninstallation, when When, it indicates a request to the user Idle users within the D2D communication range To request user Provide relay services, ; L4: Requesting user Computation task completion delay Latency calculated locally and unloading calculation latency The combination is determined, and the calculation formula is: , Local computation latency The calculation formula is: , In the formula, The number of cycles executed per second by the local CPU; L5: For requesting users The computation task transmission latency is divided into two stages: the first stage is the transmission latency of D2D user communication, and the second stage is the transmission latency of relay object uploading and unloading data to UAV. For the requesting user The calculation task transmission latency is the transmission latency of uploading and unloading data to the drone; For the requesting user Calculate the transmission latency of the task The calculation formula is: , In the formula, To request user The transmission rate of the unloaded data to the drone; Drone computation latency The calculation formula is: , In the formula, Assign drones to requesting users Computing resources; Unloading computation latency The calculation formula is: ; The total latency for the user requesting a drone-assisted computational offloading method to handle computational tasks. The calculation formula is: ; L6: Taking into account both the system performance gains and the cost of spectrum leasing, the UAV utility function... The calculation formula is: , In the formula, These are preset weighting coefficients representing the system delay performance gain. To calculate the total latency of all local processing of the task, This refers to the unit price for spectrum leasing. The amount of spectrum for drone leasing; This indicates the payment cost for the drone; The operator's utility function The calculation formula is: , In the formula, These are the preset weighting coefficients for obtaining rental income. It is a preset weighting coefficient for the reduction in user service quality caused by leased spectrum; To maximize user service quality, When operators do not lease out spectrum, all spectrum is used to represent the quality of service for their own users. To determine the amount of spectrum leased for drones A function for calculating the quality of service for operators' users; The operator's user service quality function The calculation formula is: , In the formula, The amount of spectrum owned by the operator. For the operator's own user base, Logarithmic operations to the base e; The game equilibrium point is: .
4. The unmanned aerial vehicle-assisted calculation unloading method according to claim 3, characterized in that, The operator optimization problem analysis described in step S3 includes: An analytical solution for the optimal number of spectrum units to lease by an operator is derived using convex optimization theory, given the optimal unit price for spectrum leasing. Y1: When the drone has a given spectrum rental unit price At that time, the utility function expression of the operator is: ; Y2: Given the spectrum rental unit price The utility functions of the operators respectively Finding the first and second derivatives, we obtain the following function expression: , ; Y3: Based on the fact that the expression for the second derivative is always less than 0, this indicates that the first derivative... It is monotonically decreasing within its domain, and the original function... It is a strictly convex function; The number of spectrum units for drone leasing is calculated based on constraint C7. This indicates that in domain Memory has the optimal number of spectrums This maximizes the value of the operator's utility function; Y4: Let the first derivative function To obtain the optimal number of spectrums The calculation formula is: ; Y5: Set the optimal number of spectrums exist Within the domain of definition, the maximum and minimum values of the spectrum rental unit price are obtained by solving: , ; Y6: Based on the maximum and minimum unit prices of spectrum leasing for drones, and in conjunction with constraint C7, determine the optimal number of spectrum units. Regarding the unit price of spectrum leasing Analytical solution: 。 5. The unmanned aerial vehicle-assisted calculation unloading method according to claim 4, characterized in that, The analysis of the UAV optimization problem in step S3 includes: W1: Since the optimization objective of the UAV optimization problem under a fixed spectrum quantity is a multivariable non-convex optimization problem, the UAV optimization problem is decomposed into two sub-problems: unloading strategy and resource allocation strategy, which are solved separately. W2: Analyze the two subproblems of step W1 respectively to obtain the corresponding solution algorithms; W3: Based on the mutual constraint properties of the two subproblems in step W1, the alternating iterative algorithm is used to iterate the solution algorithms corresponding to the two subproblems alternately until the change in the solution of the solution algorithm meets the preset change range, and the optimal unloading strategy and the optimal resource allocation strategy under a certain number of spectrums are output. The alternating iteration includes: J1: Apply the corresponding solution algorithm to the first subproblem to obtain a preliminary solution; J2: Based on the preliminary solution, apply the corresponding solution algorithm to the second subproblem to obtain an updated solution; J3: Alternately perform steps J1 and J2 until the change in the solution of the two subproblems meets the preset change range, where the change in solution refers to the difference between the solutions of steps J1 and J2.
6. The unmanned aerial vehicle-assisted calculation unloading method according to claim 5, characterized in that, Step W1 includes: spectrum leasing unit price Substitute the optimal number of spectra in step Y6 The analytical solution is obtained to determine the optimal number of spectrum units. Based on the spectrum rental unit price and the optimal number of spectrum units, the payment cost of the drone is determined. The optimization objective of the drone optimization problem, maximizing drone utility, is transformed into optimizing the unloading strategy. Computing resource allocation strategy and spectrum resource allocation strategy This reduces the total latency of the computation task. Minimize the problem: , The optimization objective of the P3 problem is a multivariable nonconvex optimization problem. The P3 problem can be decomposed into unloading strategies. and resource allocation strategy Solve the two subproblems separately.
7. The unmanned aerial vehicle-assisted calculation unloading method according to claim 6, characterized in that, Step W2 includes: Step W2 includes: parsing the uninstallation policy respectively. Sub-problems and resource allocation strategies The subproblems yield corresponding solution algorithms; Analysis of resource allocation strategies The corresponding solution algorithms for the subproblems include: When uninstallation policy When determining the unloading ratio, the local calculation latency is used. The calculation formula determines the local computation delay. For each requesting user, the calculation formula for the task completion delay is applied: Calculate the task completion delay There are two main scenarios: like ,but This indicates the delay in completing the computation task. Latency calculated locally Decision to optimize resource allocation strategy It will not reduce the latency of computing task completion. ; like ,but This indicates the delay in completing the computation task. Delay calculated by unloading Decision to optimize resource allocation strategy It will reduce the latency of computing tasks. ; Due to local processing latency If it is a constant and requires no optimization, then the resource allocation strategy will be... The solution to the subproblem is transformed into: , Since optimization problem P4 is a nonlinear optimization problem and contains multiple variables and constraints, a genetic algorithm is used to solve optimization problem P4. Analysis of uninstallation strategy The corresponding solution algorithms for the subproblems include: Uninstallation strategy Including uninstallation ratio and uninstallation decision ; In resource allocation strategy When determined, the uninstallation ratio of each requesting user is jointly optimized. and uninstallation decision reduce The total latency for the user requesting a drone-assisted computational offloading method to handle computational tasks. ; Uninstall ratio The values are continuous, and the unloading decision... If the values are discrete, then the unloading strategy... Solving the subproblem is a mixed-integer nonlinear optimization problem: , Since optimization problem P5 involves the joint optimization of continuous and discrete variables and includes multiple constraints, an improved particle swarm optimization algorithm is used to solve optimization problem P5. The improved particle swarm optimization algorithm includes: Unloading decision An idle user is selected as the relay object using a probability update mechanism. Use dynamically updated inertia weights; The update formula for the inertia weight is: , In the formula, This is the preset minimum inertia weight, and this is the preset maximum inertia weight. It is the current iteration number. This is the preset maximum number of iterations.
8. The unmanned aerial vehicle-assisted calculation unloading method according to claim 7, characterized in that, Step S42 includes: S421: Based on the comprehensive optimization problem P6, compare the UAV utility calculated at the two endpoints and the midpoint of the spectrum rental unit price interval, and perform interval segmentation iteratively to narrow down the spectrum rental unit price interval until the difference between the endpoints of the spectrum rental unit price interval meets the preset search interval precision, thus obtaining the optimal spectrum rental unit price interval. As the search interval for the binary search method; The initial spectrum lease unit price range is the minimum spectrum lease unit price. Maximum unit price for spectrum leasing ; The utility of drones, calculated based on the unit price of spectrum leasing, includes: The alternating iterative algorithm is used to alternately iterate the genetic algorithm and the particle swarm algorithm until the change in the total time delay of the UAV-assisted computation offloading method for the computation task meets the preset change range. The optimal offloading strategy and the optimal resource allocation strategy under a given number of spectrums are then output. S422: Based on the optimal spectrum rental unit price range obtained in step S421, use a binary search algorithm to compare the midpoints of the optimal spectrum rental unit price range. Midpoint perturbation value The calculated drone utility values are used to iteratively adjust the optimal spectrum rental price range by dividing the range into intervals. This process continues until the difference between the drone utility values calculated at the midpoint of the interval and the midpoint perturbation value meets a preset difference precision. The midpoint of the interval that meets the preset difference precision is then output as the optimal spectrum rental price. ; Among them, the midpoint disturbance value It is the midpoint of the interval With preset disturbance The sum of; S423: Optimal spectrum leasing unit price Substituting the optimal number of spectra into the analytical solution, the optimal number of spectra is calculated. The game equilibrium point is obtained. Output the optimal number of spectrums Optimal Unloading Strategy and optimal resource allocation strategy ; S424: Obtain the optimal computational unloading method for requesting users within and outside the drone's communication coverage area. Users requesting data outside the drone's communication coverage area can use D2D relay technology to offload computing tasks to the drone for processing by using idle users within the drone's coverage area as relay objects.
9. A drone-assisted computational unloading device, characterized in that, The computational unloading is performed using the UAV-assisted computational unloading method according to any one of claims 1 to 8, comprising: an unloading platform module, a transaction model module, an analysis module, and a comprehensive solution module; The unloading platform module is used to construct an unloading platform corresponding to the UAV-assisted computational unloading method. The transaction model module is used to construct a spectrum transaction model based on Stackelberg game theory, with drones as leaders and operators as followers, based on the offloading platform constructed by the offloading platform module. The analysis module is used to analyze the drone optimization problem and the operator optimization problem respectively based on the spectrum trading model constructed by the trading model module. The comprehensive solution module is used to generate a comprehensive optimization problem based on the analysis results of the UAV optimization problem and the operator optimization problem in the analysis module, find the game equilibrium point, and obtain the optimal computational offloading method for requesting users within and outside the UAV communication coverage area. Requesting users outside the UAV communication coverage area use D2D relay technology to use idle users within the UAV coverage area as relay objects to offload the computational task to the UAV for processing.