Air-ground cooperative mobile edge calculation method and device and storage medium
By building a mobile edge computing system model and Kalman filtering to predict vehicle trajectory, optimizing resource allocation between drones, vehicles and base stations, solving the problem of unreasonable resource allocation in the existing technology, and improving the communication computing efficiency and system response speed of the Internet of Vehicles.
Patent Information
- Application Number
- CN202510391130.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing UAV assisted air-to-ground collaborative vehicle network design assumes that the vehicle trajectory is known and fails to adapt to the actual traffic conditions, resulting in unreasonable resource allocation and affecting communication computing efficiency.
By building a mobile edge computing system model, the communication and computing resource allocation between the drone and the vehicle and the base station are optimized, the vehicle trajectory is predicted using Kalman filtering, and the total communication computing delay is minimized by combining the iterative algorithm of the inner and outer layer, and the drone trajectory and computing resource allocation are dynamically adjusted.
The communication and computing efficiency of the drone air-ground collaborative mobile edge computing system is improved, adapting to actual traffic conditions, reducing delay and energy consumption, and improving system response speed.
Smart Images

Figure CN120264351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things, and particularly to an air-ground collaborative mobile edge computing method, device and storage medium. Background Art
[0002] Unmanned aerial vehicles (UAVs), as outstanding products of modern technology. The flight of UAVs can be achieved with different degrees of autonomy, either remotely controlled by a human operator or autonomously by on-board sensors and computers. Due to their hovering ability, sufficient flexibility, easy deployment, higher mobility, lower operation and maintenance costs, UAVs have recently attracted great attention in both civilian and commercial applications. They are used in a wide range of ways, from intelligent vehicle networking, precision agriculture, intelligent logistics, law enforcement, disaster response and mineral exploration, to personal commercial UAV photography and UAV races. Although new technologies such as 5G have improved data transmission speed, in high-density traffic areas or remote areas, network congestion or insufficient coverage may still cause communication delays, affecting the real-time nature of information between vehicles. At the same time, a large number of vehicles being online simultaneously poses high requirements for bandwidth. If network resources are not allocated reasonably, it may affect communication quality.
[0003] With the booming rise of Internet of Things (IoT) technology and the innovation of the new generation of wireless communication standards, the automotive industry is undergoing an unprecedented wave of intelligence and networking. The rapid improvement of information transmission speed and data processing capabilities is driving the vehicular Internet of Things (V2X) towards a more intelligent and efficient new paradigm. As the core of the intelligent transportation system, V2X not only enables real-time communication between vehicles, achieving seamless information exchange between vehicles and everything (V2X), but also manifests in multiple aspects, such as enhancing driving safety, improving traffic efficiency, promoting energy conservation and emission reduction, assisting autonomous driving technology, emergency response and rescue, etc. To build a more reliable and efficient future V2X system, V2X ensures the real-time and accurate transmission of information through close cooperation with ground communication infrastructure. However, the limited computing resources of vehicles themselves, especially in traffic-intensive areas such as intersections, roundabouts, and peak commuting sections, often cannot bear such a large computing demand in the face of the need to process massive amounts of data. The resulting high energy consumption and latency problems have become bottlenecks in development. Based on this consideration, we propose to introduce drone-assisted air-ground collaborative edge computing in V2X to provide new ideas for solving these challenges. Different from the traditional cloud computing model, the multi-access edge computing (MEC) server is cleverly deployed at key locations such as the base station (BS) or roadside unit (RSU), which not only provides high-speed communication services for vehicles, but also directly processes data at the edge point, significantly alleviating the computing pressure and improving the overall system response speed and energy efficiency. With the support of mobile edge computing, the application of drones in the V2X field can achieve dynamic optimization of path planning, avoid congestion and obstacles, and ensure the fast and safe delivery of V2X information. In addition, the low latency characteristic of edge computing enables drones to adjust their flight paths in real time during transmission to cope with emergencies such as weather changes or air traffic control, thus significantly improving communication and computing efficiency.
[0004] However, existing research on drone-assisted air-ground collaborative V2X design usually assumes that the trajectories of vehicles are known. This assumption is too ideal and ignores the accidental factors in real situations. Therefore, the resource allocation by drones and the base station MEC server according to the known routes does not conform to the actual V2X system and is not applicable to actual use. Summary of the Invention
[0005] To overcome the above-mentioned defects of the prior art, the present invention provides an air-ground collaborative mobile edge computing method, device, and storage medium, which can optimize the computing resource allocation and thus improve the communication and computing efficiency of the drone air-ground collaborative mobile edge computing system.
[0006] An embodiment of the present invention provides an air-ground collaborative mobile edge computing method, including the following steps:
[0007] The total communication and computing delay of the mobile edge computing system is obtained by constructing a mobile edge computing system model; wherein, the mobile edge computing system model includes a communication model between the unmanned aerial vehicle and the vehicle, a communication model between the base station and the vehicle, and a computing model of the unmanned aerial vehicle, the base station and the vehicle.
[0008] According to the resource allocation situation of the current time slot, an optimization problem is constructed with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot.
[0009] Based on the vehicle position information of the road vehicles in the current time slot, the optimization problem is solved by a preset inner and outer layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
[0010] Further, the obtaining of the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model specifically includes:
[0011] By constructing a communication model between the unmanned aerial vehicle and the vehicle, the maximum achievable transmission rate r u,k [n] from vehicle k to the unmanned aerial vehicle in the nth time slot is obtained.
[0012] By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r m,k [n] from vehicle k to the base station in the nth time slot is obtained.
[0013] By constructing a computing model of the unmanned aerial vehicle, the base station and the vehicle, the CPU frequency f k [n] for local computing is obtained, the CPU frequency f u,k [n] at which the input task of vehicle k is assigned to the computing unmanned aerial vehicle server, and the CPU frequency f m,k [n] at which the input task of the vehicle is assigned to the base station server.
[0014] According to f k [n], the vehicle local computing delay in the nth time slot is calculated. According to r u,k [n] and f u,k [n], the local computing delay T UAV [n] of the unmanned aerial vehicle in the nth time slot is calculated. According to r m,k [n] and f m,k [n], the local computing delay T BS [n] of the base station in the nth time slot is calculated.
[0015] Let the total communication and computing delay in the nth time slot be T K [n], then there is:
[0016]
[0017] Among them, T result [n] is the time delay for the preset edge server to upload the download result back.
[0018] Furthermore, based on the resource allocation situation of the current time slot, an optimization problem is constructed with the goal of minimizing the total communication and computing time delay of the mobile edge computing system in the next time slot, specifically including:
[0019] According to the bandwidth allocation B[n] = {B k [n], B m,k [n], B}, the computing task offloading ratio allocation θ[n] = {θ k [n], θ u,k [n], θ m,k [n]}, the trajectory Q[n] = q u [n] of the unmanned aerial vehicle, and the computing resource allocation F[n] = {f[n], f u,k [n], f m,k [n]}, an optimization problem is constructed with the goal of minimizing the total communication and computing time delay T K [n + 1] of the mobile edge computing system in the (n + 1)-th time slot as follows:
[0020]
[0021] 0 ≤ θ k [n] ≤ 1 (16b)
[0022] 0 ≤ θ u,k [n] ≤ 1 (16c)
[0023] 0 ≤ θ m,k [n] ≤ 1 (16d)
[0024]
[0025] q u [1] = q0(16f)
[0026] ||q u [n + 1] - q u [n]|| 2 ≤ ε 2 (16g)
[0027] 0 ≤ f k [n] ≤ F k,max (16h)
[0028]
[0029] Among them, (16a) is the constraint of total bandwidth allocation, K is the set of road vehicles, M is the set of base stations, and B m,k [n] is the bandwidth allocated by vehicle k to the edge server of base station m in the nth time slot, and B k [n] is the bandwidth allocated by vehicle k to the edge server of the unmanned aerial vehicle in the nth time slot, and B is the total communication bandwidth; (16b)-(16e) are the constraints for dividing the task offloading ratio among vehicles, unmanned aerial vehicles, and base stations, and θ k [n] is the ratio of the computing task to be computed locally by vehicle k, and θ u,k [n] is the ratio of the computing task offloaded from vehicle k to the edge server of the unmanned aerial vehicle for computing, and θ m,k [n] is the ratio of the computing task offloaded from vehicle k to the edge server of the base station for computing; (16f) and (16g) are the constraints on the initial starting point of the unmanned aerial vehicle and the flight trajectory of the unmanned aerial vehicle, and q u [n] is the flight trajectory of the unmanned aerial vehicle, q0 is the preset initial point of the unmanned aerial vehicle, and ε is the displacement of the unmanned aerial vehicle in one time slot; (16h)-(16j) are the constraints on computing resources, and F k,max , F uav,max and F bs,max respectively represent the maximum available CPU frequencies when vehicle k, the edge server of the unmanned aerial vehicle, and the edge server of base station m perform computing.
[0030] Furthermore, based on the vehicle position information of road vehicles in the current time slot, the optimization problem is solved by a preset inner and outer layer alternating iteration algorithm to obtain the minimum total communication computing delay of the mobile edge computing system in the next time slot, specifically including:
[0031] According to the initial position w k [1] of vehicle k, the vehicle position information w k [n] of vehicle k in the nth time slot is predicted and obtained by the Kalman filtering method; where 1≤n≤N, and N is the preset time threshold;
[0032] Based on w k [n], the optimization problem is solved in real time by a preset inner layer alternating iteration algorithm to obtain the minimum total communication computing delay of the mobile edge computing system in the (n + 1)th time slot. When n = N, the solution ends.
[0033] Preferably, after the vehicle position information w k [n] of vehicle k is predicted and obtained by the Kalman filtering method, it further includes:
[0034] According to the actual observed value of the vehicle position of vehicle k, w k [n] is updated in real time.
[0035] Furthermore, based on wk [n], solve the optimization problem in real time through a preset inner-layer alternating iteration algorithm, and obtain the minimum total communication and computing delay of the mobile edge computing system in the (n + 1)-th time slot, specifically including:
[0036] Transform the optimization problem from (P1) into the following form:
[0037] (P2): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0038]
[0039] T UAV [n] ≤ η[n] (17b)
[0040] T BS [n] ≤ η[n] (17c)
[0041] (16a)-(16j).
[0042] where η[n] is a preset transformation relaxation variable;
[0043] By introducing relaxation variables, transform the optimization problem from (P2) into the following form:
[0044] (P4): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0045]
[0046] (16a)-(16j), (17a)-(17c).
[0047] where s k1 and s k2 are the first relaxation variable and the second relaxation variable respectively, h u,k [n] and h m,k [n] are the channel power gains between vehicle k and the UAV and between vehicle k and base station m respectively, P is the transmission power when vehicle k offloads tasks, and N0 is the noise power spectral density;
[0048] According to w k [n], solve (P4) based on the block coordinate descent method in the l-th inner-layer iteration, and obtain the bandwidth allocation B (l) , computing task offloading ratio allocation θ (l) , the trajectory Q (l) of the UAV and computing resource allocation F (l) corresponding to the l-th inner-layer iteration, and according to B (l) , θ (l) , Q (l) and F (l)Calculate the total communication and computing delay \(T\) corresponding to the \(l\)-th inner iteration (l) ;
[0049] When , end the inner iteration, and output the total communication and computing delay obtained in the last inner iteration as the minimum total communication and computing delay; where \(\varepsilon_0\) is a preset proportional threshold.
[0050] Preferably, solve (P4) based on the block coordinate descent method to obtain the bandwidth allocation \(B\) (l) , the calculation task offloading ratio allocation \(\theta\) (l) , the trajectory \(Q\) of the UAV (l) and the computing resource allocation \(F\) (l) , specifically including:
[0051] By given \(\theta\) (l-1) , \(Q\) (l-1) and \(F\) (l-1) , transform (P4) into a standard convex problem and solve it to obtain \(B\) (l) ;
[0052] By given \(B\) (l) , \(Q\) (l-1) and \(F\) (l-1) , transform (P4) into a standard linear programming problem and solve it to obtain \(\theta\) (l) ;
[0053] Based on \(w\) k [n], by given \(B\) (l) , \(\theta\) (l) and \(F\) (l-1) , transform (P4) into a convex optimization problem and solve it to obtain \(Q\) (l) ;
[0054] By given \(B\) (l) , \(\theta\) (l) and \(Q\) (l) , transform (P4) into a standard linear programming problem and solve it to obtain \(F\) (l) .
[0055] Another embodiment of the present invention provides an air-ground collaborative mobile edge computing device, including: a construction module, an optimization module, and a solution module;
[0056] The construction module is used to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model; where the mobile edge computing system model includes a communication model between the UAV and the vehicle, a communication model between the base station and the vehicle, and a computing model of the UAV, the base station, and the vehicle;
[0057] The optimization module is used to construct an optimization problem with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot according to the resource allocation situation of the current time slot.
[0058] The solving module is used to solve the optimization problem based on the vehicle position information of the road vehicles in the current time slot through a preset inner and outer layer alternating iteration algorithm, and obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
[0059] Furthermore, the construction module is used to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model, specifically including:
[0060] By constructing a communication model between the unmanned aerial vehicle and the vehicle, the maximum achievable transmission rate r u,k [n] from vehicle k to the unmanned aerial vehicle in the nth time slot is obtained;
[0061] By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r m,k [n] from vehicle k to the base station in the nth time slot is obtained;
[0062] By constructing a computing model of the unmanned aerial vehicle, the base station and the vehicle, the CPU frequency f k [n] for local computing is obtained, the CPU frequency f u,k [n] at which the input task of vehicle k is assigned to the computing unmanned aerial vehicle server, and the CPU frequency f m,k [n] at which the input task of the vehicle is assigned to the base station server;
[0063] According to f k [n], the local computing delay of the vehicle in the nth time slot is calculated According to r u,k [n] and f u,k [n], the local computing delay T UAV [n] of the unmanned aerial vehicle in the nth time slot is calculated. According to r m,k [n] and f m,k [n], the local computing delay T BS [n] of the base station in the nth time slot is calculated;
[0064] Let the total communication and computing delay in the nth time slot be T K [n], then there is:
[0065]
[0066] wherein, T result [n] is the delay of the preset edge server downloading the result and sending it back.
[0067] Another embodiment of the present invention provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the air-ground collaborative mobile edge computing method as described in the above-mentioned invention embodiment are implemented.
[0068] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0069] By proposing a resource allocation prediction method for a low-complexity air-ground collaborative assisted vehicle network system based on unmanned aerial vehicles (UAVs), with the goal of minimizing the communication and computing delay of vehicles in the next time slot in the future, jointly optimizing the bandwidth allocation, computing task offloading ratio allocation, UAV trajectory, and computing resource allocation in the next time slot, the resource allocation of the system can be effectively predicted, thereby improving the communication and computing efficiency of the system.
[0070] At the same time, the present invention uses the Kalman filtering method to predict the vehicle trajectory, making the vehicle trajectory used in the calculation closer to the actual environment, and further improving the accuracy of the system communication and computing. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic flowchart of an air-ground collaborative mobile edge computing method provided by an embodiment of the present invention.
[0072] Figure 2 It is a schematic scenario diagram of an air-ground collaborative vehicle network communication and computing system provided by an embodiment of the present invention.
[0073] Figure 3 It is a flowchart of an outer-layer iterative algorithm provided by an embodiment of the present invention.
[0074] Figure 4 It is a flowchart of a preset inner-layer alternating iterative algorithm provided by an embodiment of the present invention.
[0075] Figure 5 It is a schematic structural diagram of an air-ground collaborative mobile edge computing device provided by another embodiment of the present invention.
[0076] Figure 6 It is a two-dimensional trajectory diagram of a first simulation scenario experiment provided by an embodiment of the present invention.
[0077] Figure 7 It is a two-dimensional trajectory diagram of a second simulation scenario experiment provided by an embodiment of the present invention.
[0078] Figure 8 It is a schematic diagram of the ratio of vehicle 1 unloading tasks to each MEC server at each time provided by an embodiment of the present invention.
[0079] Figure 9A schematic diagram showing the variation of the system communication calculation delay with each time slot under different reference schemes provided by an embodiment of the present invention.
[0080] Figure 10 A schematic diagram showing the variation of the communication calculation delay with the time slot under different reference schemes provided by an embodiment of the present invention. Detailed implementation manners
[0081] The drawings are only for illustrative purposes and should not be construed as a limitation of this patent;
[0082] For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0083] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.
[0084] Refer to Figure 1 , which is a schematic flowchart of an air-ground collaborative mobile edge computing method provided by an embodiment of the present invention, including the following steps:
[0085] S1: Obtain the total communication calculation delay of the mobile edge computing system by constructing a mobile edge computing system model; wherein, the mobile edge computing system model includes a communication model between an unmanned aerial vehicle and a vehicle, a communication model between a base station and a vehicle, and a calculation model of the unmanned aerial vehicle, the base station, and the vehicle;
[0086] S2: According to the resource allocation situation of the current time slot, construct an optimization problem with the goal of minimizing the total communication calculation delay of the mobile edge computing system in the next time slot;
[0087] S3: Based on the vehicle position information of the road vehicles in the current time slot, solve the optimization problem through a preset inner and outer layer alternating iteration algorithm to obtain the minimum total communication calculation delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
[0088] In a preferred embodiment, refer to Figure 2 , which is a schematic diagram of the scenario of an air-ground collaborative vehicle-to-everything (V2X) communication calculation system provided by an embodiment of the present invention. In this preferred embodiment, a system scenario of multi-server assisted V2X uplink communication calculation with M ground servers on a base station and an air server carried by an unmanned aerial vehicle is constructed. In this system, the system includes M base stations and K vehicles. Let represent the set of base stations, Denote the set of road vehicles. To assist in improving the computing service quality of the vehicle network as needed, the system additionally deploys a drone with an MEC server, which together with the ground base station forms an air-ground collaborative mobile edge computing system. Among them, it is assumed that these mobile vehicles and edge servers are each equipped with a single antenna.
[0089] Each mobile vehicle will have a computing task in each time slot of a time range T. These servers simultaneously cooperate with mobile vehicle k to calculate the offloaded tasks (bits) in a partial offloading manner. By considering the Cartesian three-dimensional coordinate system, assuming that the base station is located at a fixed ground position, base station m is represented as where represents the horizontal coordinate of base station m. The trajectories of the drone and mobile vehicle k can be represented as q u [n] = (x u [n], y u [n], H) and w k [n] = (x k [n], y k [n], 0). Among them, H is the preset fixed height of the drone, in meters (m). Fixing the flight height of the drone can avoid additional power consumption of the drone in the vertical height.
[0090] Assume represents the set of time slots. Divide the flight time T of the drone into N equal-length time slots, and the value of N should make the divided time slot δ t = T / N very small to ensure that the positions of the drone and the vehicle are approximately unchanged relative to the ground and the base station within one time slot.
[0091] At the same time, given the initial point q0 of the drone, the following constraints on the drone trajectory can be obtained:
[0092]
[0093] where ε = V max δ t is the displacement of the drone in one time slot, and V max is the preset maximum speed of the drone. According to the above assumptions, the constraints on the initial position of the drone are as follows:
[0094] q u [1] = q0, (2)
[0095] For step S1, specifically, obtaining the total communication computing delay of the mobile edge computing system by constructing a mobile edge computing system model specifically includes:
[0096] By constructing a communication model between the drone and the vehicle, the maximum achievable transmission rate r from vehicle k to the drone in the nth time slot is obtained u,k [n];
[0097] By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r from vehicle k to the base station in the nth time slot is obtained m,k [n];
[0098] By constructing a computing model among the drone, the base station and the vehicle, the CPU frequency f for local computing is obtained k [n], the CPU frequency f to which the input task of vehicle k is assigned at the computing drone server u,k [n] and the CPU frequency f to which the vehicle input task is assigned at the base station server m,k [n];
[0099] According to f k [n], the local computing delay of the vehicle in the nth time slot is calculated According to r u,k [n] and f u,k [n], the local computing delay T of the drone in the nth time slot is calculated UAV [n], according to r m,k [n] and f m,k [n], the local computing delay T of the base station in the nth time slot is calculated BS [n];
[0100] Let the total communication and computing delay in the nth time slot be T K [n], then there is:
[0101]
[0102] Among them, T result [n] is the delay for the preset edge server to download and return the result
[0103] In a preferred embodiment, in order to avoid mutual interference, this preferred embodiment assumes that the drone and the base station use orthogonal frequency division multiple access (OFDMA, Orthogonal Frequency Division Multiple Access) for task offloading and result return. Therefore, the base station MEC server, the drone MEC server and vehicle k transmit on orthogonal frequency bands in each time slot. Let the bandwidth allocated to the MEC server of the drone by vehicle k in each time slot be B k [n], B m,k [n] represents the bandwidth allocated to the MEC server of base station m by vehicle k in each time slot. For B k [n] and B m,kIf [n], then there are the following total bandwidth constraints:
[0104]
[0105] where B is the total communication bandwidth.
[0106] Different from the channel from vehicle k to base station m, the channel from vehicle k to the UAV is mainly a line-of-sight link. Therefore, the channel power gain from vehicle k to the UAV is:
[0107]
[0108] where β0 is the average channel power gain at the reference distance d0 = 1m in the line-of-sight state, and d u,k [n] represents the distance between the UAV and vehicle k, and there is:
[0109]
[0110] Let P represent the transmit power when vehicle k offloads tasks, and N0 represent the noise power spectral density. Thus, the maximum achievable transmission rate r u,k [n] from vehicle k to the UAV in each time slot is given, in units of bits / second / Hertz (bps / Hz), and the formula is as follows:
[0111]
[0112] At the same time, considering the complex environment such as obstacles and blockages in the city, the channel power gain between the mobile vehicle k and the base station m in each time slot follows an independent Rayleigh fading model, and the formula is as follows:
[0113]
[0114] where β0 is the average channel power gain at the reference distance d0 = 1m in the line-of-sight state, represents the path loss exponent, and ξ m,k [n] is the Rayleigh fading coefficient that conforms to the unit mean exponential distribution, and d m,k [n] represents the distance between the base station m and vehicle k, where
[0115]
[0116] Therefore, the maximum achievable transmission rate from vehicle k to base station m in each time slot is:
[0117]
[0118] The mathematical expectation of a distributed random variable. Obviously, the inequality in (9b) is obtained from Jensen's inequality, and the transmission rate r can be obtained from (9c). m,k An upper bound of [n]. Due to the fluctuations caused by random variables in the original expression and without a suitable processing method, an approximate method is used here, that is, it is assumed that the transmission rate from vehicle k to base station m can reach this upper limit.
[0119] To make full use of the communication performance and computing resources in the system, this preferred embodiment considers a partial offloading scheduling scheme. The computing tasks can be divided into tasks of any size. Some tasks can be offloaded to the edge computing servers of drones and base stations, while the remaining tasks are computed locally. In addition, by implementing dynamic voltage and frequency scaling (DVFS), vehicle k and the edge computing server can dynamically allocate their computing resources according to the type or quantity of the arriving tasks.
[0120] Let f k [n] denote the central processing unit (CPU) frequency for local computing, and f u,k [n] denote the CPU frequency of the input tasks of vehicle k allocated to the computing drone server. f m,k [n] denote the CPU frequency of the input tasks of vehicle k allocated to the base station server m. Thus, the following constraint conditions are obtained:
[0121]
[0122] Among them, F k,max , F uav,max and F bs,max respectively represent the maximum available CPU frequencies during the computing of vehicle k, the drone edge server, and the base station m edge server.
[0123] In summary, by using the partial offloading scheme, the computing tasks offloaded by vehicle k can be arbitrarily divided to facilitate the trade-off between local computing and offloading to drones or base stations. Thus, setting θ k , θ u,k , θ m,k three offloading ratios, which are that some computing tasks are computed locally by vehicle k, the computing tasks are directly offloaded from vehicle k to the drone edge server, and directly from vehicle k to the edge server of base station m, respectively. Then, the following constraints for offloading ratio allocation can be obtained:
[0124]
[0125] The total delay of the MEC system is mainly composed of three parts, namely, the delay of local computing and offloading (uplink transmission) of vehicle k, the delay of computing and downloading results (downlink transmission) by the UAV edge server, and the delay of computing and downloading results (downlink transmission) by the base station m edge server.
[0126] In this preferred embodiment, it is assumed that the computing task of vehicle k in the nth time slot is I k [n] = {D k [n], C k , A k [n]}, where Dk[n] represents the size of the computing task of vehicle k in the nth time slot, with the unit of bits, C k represents the CPU cycles required for vehicle k to compute each task, and A k [n] represents the size of the task computing result of vehicle k in the nth time slot. Then, the delay of local computing of vehicle k in each time slot can be expressed as:
[0127]
[0128] Similarly, the formulas for the transmission delay of vehicle k to offload the computing task of each time slot to the UAV and the computing delay of the UAV are as follows:
[0129]
[0130] Similarly, the formulas for the transmission delay of vehicle k to offload the computing task to base station m and the computing delay of base station m in each time slot are as follows:
[0131]
[0132] Therefore, the total delay of the UAV in each time slot is: Similarly, the total delay of the base station in each time slot is:
[0133] Assume that the time required to complete all tasks uploaded during each time slot is T k [n], then the following formula can be obtained:
[0134]
[0135] Among them, T result [n] represents the delay of the edge server to download and backhaul the results.
[0136] For step S2, specifically, based on the resource allocation situation of the current time slot, with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot, an optimization problem is constructed, which specifically includes:
[0137] According to the bandwidth allocation of the nth time slot \(B[n]=\{B k [n],B m,k [n],B\}\), calculate the task offloading ratio allocation \(\theta[n]=\{\theta k [n],\theta u,k [n],\theta m,k [n]\}\), the trajectory of the UAV \(Q[n]=q u [n]\) and the computing resource allocation \(F[n]=\{f[n],f u,k [n],f m,k [n]\}\), aiming to minimize the total communication and computing delay \(T K [n + 1]\) of the mobile edge computing system in the \((n + 1)\)th time slot, construct the optimization problem as:
[0138]
[0139] 0\leq\theta k [n]\leq1(16b)
[0140] 0\leq\theta u,k [n]\leq1(16c)
[0141] 0\leq\theta m,k [n]\leq1(16d)
[0142]
[0143] q u [1]=q0(16f)
[0144] ||q u [n + 1]-q u [n]|| 2 \leq\varepsilon 2 (16g)
[0145] 0\leq f k [n]\leq F k,max (16h)
[0146]
[0147] Among them, (16a) is the constraint of the total bandwidth allocation, \(K\) is the set of road vehicles, \(M\) is the set of base stations, \(B m,k [n]\) is the bandwidth allocated by vehicle \(k\) to the edge server of base station \(m\) in the \(n\)th time slot, \(B k [n]\) is the bandwidth allocated by vehicle \(k\) to the edge server of the UAV in the \(n\)th time slot, \(B\) is the total communication bandwidth; (16b)-(16e) are the constraints on the task offloading ratio division of vehicles, UAVs and base stations, \(\theta k [n]\) is the proportion of the computing task calculated locally by vehicle \(k\), \(\theta u,k[n] is the proportion of the computing task unloaded from vehicle k to the UAV edge server for computing, θ m,k [n] is the proportion of the computing task unloaded from vehicle k to the base station edge server for computing; (16f) and (16g) are the initial starting point of the UAV and the constraints of the UAV flight trajectory, q u [n] is the flight trajectory of the UAV, q0 is the preset initial point of the UAV, and ε is the displacement of the UAV in one time slot; (16h)-(16j) are the constraints of computing resources, F k,max , F uav,max and F bs,max respectively represent the maximum available CPU frequencies when vehicle k, the UAV edge server, and the base station m edge server perform calculations.
[0148] For step S3, specifically, based on the vehicle position information of the road surface vehicles in the current time slot, the optimization problem is solved by a preset inner and outer layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot, which specifically includes:
[0149] According to the initial position w k [1] of vehicle k, the vehicle position information w k [n] of vehicle k in the nth time slot is predicted and obtained by the Kalman filtering method; where 1 ≤ n ≤ N, and N is the preset time threshold;
[0150] Based on w k [n], the optimization problem is solved in real time by a preset inner layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the (n + 1)th time slot. When n = N, the solution ends.
[0151] Preferably, after the vehicle position information w k [n] of vehicle k is predicted and obtained by the Kalman filtering method, it further includes:
[0152] According to the actual observation value of the vehicle position of vehicle k, w k [n] is updated in real time.
[0153] In a preferred embodiment, since in the vehicle networking system, most devices are dynamic and fast, within such a short time, the speed of the vehicle does not change much. Therefore, the relationship between displacement and speed can be approximately regarded as a linear relationship. When monitoring the movement of the vehicle, position and speed are the key parameters to describe its dynamic characteristics. Therefore, the state of the system is represented as including four degrees of freedom (x-axis coordinate x k [n], y-axis coordinate y k [n], x-axis direction speed v x [n], and y-axis direction speed v yA vector of [n], i.e.:
[0154] w k [n] = (x k [n], y k [n], v x [n], v y [n]) (25)
[0155] The Kalman tracking process is divided into two steps: prediction and update. In the prediction step, the predicted system state and error covariance prediction can be obtained by the following formulas:
[0156] w k [n + 1]|[n] = Fw k [n]|[n] + Bu[n] (26)
[0157] P[n + 1]|[n] = FP[n]|[n] + Q[n] (27)
[0158] In the above formulas, F is a state transition matrix connecting the current state and the previous state, B is the estimated value of the previous state, u is a control input matrix, and Q is the covariance value of the previous state estimate.
[0159] In the update step, the Kalman gain calculation needs to be performed using formula (28). Then, the actual observed value w k [n]|[n] updates the state according to the Kalman gain and the measurement value using formula (29). After that, the Kalman filter updates the error covariance using formula (30). Finally, these values are transferred to the prediction step. Through these steps, the state estimate is continuously updated based on the observed data to predict the future trajectory state.
[0160] K[n + 1] = P[n + 1]|[n]H T (H k P[n + 1]|[n]H T + R k ) -1 (28)
[0161] w k [n + 1]|[n + 1] = w k [n + 1]|[n] + K[n + 1](z[n] - H[n]w k [n + 1]|[n]) (29)
[0162] P[n + 1]|[n + 1] = (I - K[n]H[n])P[n + 1]|[n] (30)
[0163] Among them, K is the Kalman gain, H is the measurement matrix, R is the observation matrix, I is the identity matrix, and z is the actual measurement value at this moment.
[0164] After predicting the vehicle position information, the optimization problem can be solved through a preset outer iteration algorithm. Refer to Figure 3 , which is a flowchart of an outer iteration algorithm provided by an embodiment of the present invention. As can be seen from Figure 3 , the specific steps of the outer iteration algorithm are as follows:
[0165] (1) Initialize the starting point, obtain w k [1], and set the objective function T (0) = 0
[0166] (2) Start the loop
[0167] (3) Obtain the vehicle position information from the vehicle trajectory prediction framework
[0168] (4) Based on the obtained vehicle position information, solve the problem (P1) through a preset inner alternating iteration algorithm 1, and obtain B (i) , θ (i) , Q (i) , F (i) , substitute and calculate to obtain a feasible solution T (i)
[0169] (5) At the same time, the UAV adjusts its flight trajectory according to the vehicle position information w k [n] to maintain good communication calculation quality with each vehicle
[0170] (6) Update i = i + 1, n = n + 1
[0171] (7) When w k [n] = w k [N + 1], break out of the loop
[0172] For step S3, further, based on w k [n], the optimization problem is solved in real time through a preset inner alternating iteration algorithm to obtain the minimum total communication calculation delay of the mobile edge computing system in the (n + 1)-th time slot, which specifically includes:
[0173] Convert the optimization problem from (P1) into the following form:
[0174] (P2): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0175]
[0176] T UAV[n] ≤ η[n](17b)
[0177] T Bs [n] ≤ η[n](17c)
[0178] (16a)-(16j).
[0179] where η[n] is a preset conversion relaxation variable;
[0180] By introducing a relaxation variable, the optimization problem is transformed from (P2) into the following form:
[0181] (P4): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0182]
[0183] (16a)-(16j), (17a)-(17c).
[0184] where s k1 and s k2 are the first relaxation variable and the second relaxation variable respectively, h u,k [n] and h m,k [n] are the channel power gain between vehicle k and the UAV and the channel power gain between vehicle k and base station m respectively, P is the transmission power when vehicle k offloads tasks, and N0 is the noise power spectral density;
[0185] According to w k [n], solve (P4) based on the block coordinate descent method in the l-th inner iteration to obtain the bandwidth allocation B (l) corresponding to the l-th inner iteration, calculate the task offloading ratio allocation θ (l) , the trajectory Q (l) of the UAV and the computing resource allocation F (l) , and calculate the total communication and computing delay T (l) corresponding to the l-th inner iteration according to B (l) , θ (l) , Q (l) and F (l) ;
[0186] When , end the inner iteration, and output the total communication and computing delay obtained in the last inner iteration as the minimum total communication and computing delay; where ε0 is a preset ratio threshold.
[0187] Preferably, solving (P4) based on the block coordinate descent method to obtain the bandwidth allocation B (l) corresponding to the l-th inner iteration, the task offloading ratio allocation θ (l) , the trajectory Q(l) and computing resource allocation F (l) , specifically including:
[0188] By given θ (l-1) , Q (l-1) and F (l-1) , transform (P4) into a standard convex problem and solve it to obtain B (l) ;
[0189] By given B (l) , Q (l-1) and F (l-1) , transform (P4) into a standard linear programming problem and solve it to obtain θ (l) ;
[0190] Based on w k [n], by given B (l) , θ (l) and F (l-1) , transform (P4) into a convex optimization problem and solve it to obtain Q (l) ;
[0191] By given B (l) , θ (l) and Q (l) , transform (P4) into a standard linear programming problem and solve it to obtain F (l) .
[0192] In a preferred embodiment, since there is a serious coupling in the objective function of (P1), this preferred embodiment chooses to first transform the problem (P1) into the problem (P2) for subsequent solution. However, the problem (P2) is still difficult to solve. This is because (17b) and (17c) in P2 are non-convex. When x > 0, it is known that f(x) = log2(1 + x) is concave. Therefore, since the perspective operation is a convexity-preserving operation and maintains the convexity of the function, its perspective function is also concave.
[0193] Therefore, this preferred embodiment uses the slack variable s k1 to transform the non-convex constraint into a convex form, thereby constructing the problem (P3):
[0194] (P3): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0195]
[0196] (16a)-(16j), (17a)-(17c).
[0197] Similarly, by introducing the slack variable s k2, it can solve the non-convex constraints in (17c) to obtain problem (P4):
[0198] (P4): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1]
[0199]
[0200] (16a)-(16j), (17a)-(17c).
[0201] However, problem (P4) is still non-convex and it is difficult to obtain the optimal solution. Therefore, this preferred embodiment proposes a preset inner-layer alternating iteration algorithm based on the block coordinate descent (BCD) and successive convex approximation (SCA) methods to solve problem (P4). The solution process is as follows:
[0202] (1) Bandwidth allocation scheduling optimization: Given any UAV trajectory within the feasible region, the offloading ratio and computing resource allocation {Q, θ, F} of the computing tasks in the system, then problem (P4) can be rewritten in the following form:
[0203]
[0204] s.t. (16a), (17a)-(17c), (19a)-(19b)
[0205] It is not difficult to see that problem (P5) is a standard convex problem and can be solved by standard convex optimization tools, such as effectively solved using existing solvers (CVX).
[0206] (2) Offloading ratio allocation optimization: Given the communication bandwidth scheduling, UAV trajectory, and computing resource allocation {B, Q, F} within the feasible region, then problem (P4) can be rewritten in the following form:
[0207]
[0208] s.t. (16b)-(16e), (17a)-(17c)
[0209] It is not difficult to see that problem (P6) is a standard linear programming problem and can be effectively solved using existing solvers (e.g., CVX).
[0210] (3) UAV trajectory optimization: Given the communication scheduling, offloading ratio allocation, and computing resource allocation {B, θ, F} within the feasible region, then problem (P4) can be rewritten in the following form:
[0211]
[0212] (t k [n]) -1≤r u,k [n] (20b)
[0213] (16f),(16g),(17a),(17c)
[0214] Among them, an auxiliary variable t is introduced in (20a) k [n], which satisfies
[0215] Obviously, problem (P7) still has non-convexity. Therefore, in this preferred embodiment, the constraint (20b) is transformed into a convex constraint by using the SCA algorithm. Using the SCA algorithm, the following theorem is introduced:
[0216] Theorem: Let where a and b are positive constants. Since f(c) is a convex function with respect to c (c≥0), the first-order Taylor expansion can be applied at c0, and the following inequality can be obtained
[0217]
[0218]
[0219] where is the derivative of the function f(c) at .
[0220] Using this theorem, it can be proved that r u,k [n] in Equation (6) is a convex function with respect to ||q u [n]-w k [n]|| 2 . Therefore, the first-order Taylor expansion of r u,k [n] is performed to obtain its lower bound, and then the continuous convex approximation technique is used to approximate r u,k [n] as its lower bound:
[0221]
[0222] where
[0223] where is the given initial feasible value.
[0224] Therefore, according to the above theorem, (20b) can be re-expressed as:
[0225]
[0226] By observing Problem (P7), it can be seen that by introducing slack variables and partial first-order Taylor expansion approximation, the objective function and constraint conditions of the problem are convex with respect to Q, t, and η. Therefore, Problem (P7) can be reformulated into the following Problem (P8):
[0227]
[0228] (16f),(16g),(17a),(17c)
[0229] where Q = {q u [n]}. All the above are linear or convex constraints. Therefore, Problem (P8) is a convex optimization problem and can be directly and effectively solved by existing solvers (e.g., CVX).
[0230] (4) Computing resource allocation optimization: Given the communication bandwidth scheduling, offloading ratio allocation, and UAV trajectory {B, θ, Q} within the feasible region, Problem (P4) can be expressed in the following form:
[0231]
[0232] s.t.(16h)-(16j),(17a)-(17c)
[0233] It can be seen that the objective constraints and constraint conditions of the problem are convex with respect to F = {f k [n], f u,k [n], f m,k [n]}. Therefore, Problem (P9) is a standard linear programming problem and the optimal computing resource allocation can be effectively solved using existing solvers (e.g., CVX).
[0234] After obtaining the solutions for bandwidth allocation, computing task offloading ratio allocation, UAV trajectory, and computing resource allocation respectively through the above solution process, the inner iteration can be started to obtain the minimum total communication and computing delay.
[0235] Referring to Figure 4 , it is a flowchart of a preset inner-layer alternating iteration algorithm provided by an embodiment of the present invention. It can be seen from Figure 4 that the inner iteration process is as follows:
[0236] (1) Initialize B (0) , θ (0) , Q (0) , F (0) objective function T (0) , iteration number l = 0, preset ratio threshold ε0 = 1×10 -3 .
[0237] (2) Loop
[0238] (3) Update l = l + 1.
[0239] (4) Given θ (l-1) , Q (l-1) , F (l-1) Obtain B by solving problem (P5) (l) .
[0240] (5) Given B (l) , Q (l-1) , F (l-1) Obtain θ by solving problem (P6) (l) .
[0241] (6) Given B (l) , θ (l) , F (l-1) Obtain Q by solving problem (P8) (l) .
[0242] (7) Given B (l) , θ (l) , Q (l) Obtain F by solving problem (P9) (l) .
[0243] (8) Substitute B (l) , θ (l) , Q (l) , Q (l) into the objective function to obtain T (l) .
[0244] (9) When , jump out of the loop, then the minimum system delay is obtained, otherwise jump back to the third step.
[0245] Refer to Figure 5 , which is a schematic structural diagram of an air - ground cooperative mobile edge computing device provided by another embodiment of the present invention, including: a construction module 101, an optimization module 102, and a solution module 103;
[0246] The construction module 101 is used to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model; wherein, the mobile edge computing system model includes a communication model between an unmanned aerial vehicle and a vehicle, a communication model between a base station and a vehicle, and a computing model of the unmanned aerial vehicle, the base station, and the vehicle;
[0247] The optimization module 102 is used to construct an optimization problem with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot according to the resource allocation situation of the current time slot;
[0248] The solving module 103 is configured to solve the optimization problem based on the vehicle position information of the road surface vehicles in the current time slot through a preset inner and outer layer alternating iteration algorithm, so as to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
[0249] Further, the constructing module 101 is configured to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model, specifically including:
[0250] By constructing a communication model between the unmanned aerial vehicle and the vehicle, the maximum achievable transmission rate r u,k [n] from the vehicle k to the unmanned aerial vehicle in the nth time slot is obtained;
[0251] By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r m,k [n] from the vehicle k to the base station in the nth time slot is obtained;
[0252] By constructing a computing model of the unmanned aerial vehicle, the base station and the vehicle, the CPU frequency f k [n] for local computing is obtained, the CPU frequency f u,k of the vehicle k input task assigned to the computing unmanned aerial vehicle server and the CPU frequency f m,k of the vehicle input task assigned to the base station server are obtained;
[0253] According to f k [n], the vehicle local computing delay in the nth time slot is calculated; According to r u,k [n] and f u,k [n], the local computing delay T UAV of the unmanned aerial vehicle in the nth time slot is calculated, and according to r m,k [n] and f m,k [n], the local computing delay T BS of the base station in the nth time slot is calculated;
[0254] Let the total communication and computing delay in the nth time slot be T K [n], then there is:
[0255]
[0256] wherein, T result [n] is the delay of the preset edge server downloading the result and sending it back.
[0257] Another embodiment of the present invention further provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the air-ground collaborative mobile edge computing method as described in the above-mentioned invention embodiment are implemented.
[0258] Finally, to demonstrate the superiority of the air-ground collaborative mobile edge computing method described in the present invention, in a preferred embodiment, the present invention also conducted experimental verification by constructing two simulation scenarios.
[0259] Refer to Figure 6 , which is a two-dimensional trajectory diagram of a first simulation scenario experiment provided by an embodiment of the present invention. As Figure 6 can be seen, each vehicle performs a uniformly accelerated motion on trajectory 1, changes direction to trajectory 2 to perform a uniformly decelerated motion, then performs a uniform motion on trajectory 3, then turns to trajectory 4 to perform a uniformly decelerated motion, and finally performs a uniform motion on trajectory 5. It can be seen that the drone starts above vehicle 4 without a base station, and then flies towards the direction between the four vehicles. At 8 s from the starting point, because the vehicle is accelerating, the drone also moves relatively quickly towards the driving routes of the vehicles in two directions. Similarly, from 8 s to 16 s, the drone also moves slowly following the position of the vehicle. From 16 s to 24 s, when all vehicles pass through the intersection, the drone will change the following vehicle target and approach vehicles 1 and 2. Subsequently, from 24 s to 32 s, the drone's trajectory 4 and trajectory 2 also slowly follow the vehicle's movement. In the final period, due to the lack of infrastructure such as base stations at the right end of the crossroads, the drone flies towards the moving directions of vehicles 1 and 2, and finally follows vehicle 2 to ensure the normal communication and computing offloading of each vehicle.
[0260] Refer to Figure 7 , which is a two-dimensional trajectory diagram of a second simulation scenario experiment provided by an embodiment of the present invention. To clearly see the driving conditions of most vehicles on the roundabout, in this preferred embodiment, vehicle 1 is set to drive out of intersection 5 around the roundabout from intersection 1, vehicle 2 is set to turn right out of intersection 3 around the roundabout from intersection 2, vehicle 3 is set to turn right out of intersection 4 around the roundabout from intersection 3, and vehicle 4 is set to turn right out of intersection 5 around the roundabout from intersection 4. As Figure 7 can be seen, due to the lack of a base station near vehicle 4, the drone follows above vehicle 4 from t = 0 s to t = 16 s to maintain a good communication environment for them. When all vehicles gather at the roundabout from t = 16 s to t = 24 s, the drone flies near the intermediate base station to collaborate with the base station in the air and ground to relieve the pressure when the computing tasks are intensive. In the subsequent time, the drone first follows vehicle 3 for a period of time, and then because vehicles 2, 3, and 4 drive to intersections 4 and 5 without a base station MEC server, the drone flies above the intersections to maintain a good communication and computing distance among the three to ensure normal communication and computing for the vehicles.
[0261] This preferred embodiment also performs statistical analysis on the above two simulation scenario experiments, and the analysis is as follows:
[0262] Referring to Figure 8 , it is a schematic diagram showing the proportion of the vehicle 1 unloading tasks to each MEC server at each time provided by an embodiment of the present invention. As Figure 8 can be seen, although the computing power of the drone MEC server is much lower than that of the base station MEC server, generally it also undertakes most of the computing tasks, which shows the key role played by the drone. Due to the insufficient local computing power of the vehicle, the proportion of local processing tasks remains below 20%. The proportion of the vehicle unloading computing tasks to each base station is related to the distance between each vehicle and the base station. When the vehicle is close to the base station or the computing resources of the base station are idle, each vehicle will allocate more computing tasks to improve the average computing efficiency of the system. In addition, due to having a high-quality communication channel, the drone server exhausts its CPU frequency in order to complete the computing tasks in each time slot.
[0263] In addition, in order to evaluate the performance of the proposed prediction method, this preferred embodiment designs two benchmark schemes for comparison: 1) The non-prediction scheme, which uses the delay value of the previous time slot; 2) The simple prediction scheme, which uses the delay value obtained by extending a straight line based on the positions of the previous two time slots at the maximum speed of the vehicle.
[0264] Referring to Figure 9 , it is a schematic diagram showing the change of the system communication computing delay with each time slot under different benchmark schemes provided by an embodiment of the present invention. As Figure 9 can be seen, from the 1st time slot to the 10th time slot, the proposed algorithm has better performance than the two comparison schemes. The fluctuations are due to moving away from base station 1 while approaching base station 3 at the same time. Compared with the simple prediction scheme, the low delay from the 10th to the 15th time slots and the high delay from the 15th to the 20th time slots are caused by the sudden turning and uniform deceleration of the vehicle. Therefore, the proposed algorithm can better reflect the accuracy of the prediction of this algorithm than the other two schemes. Similarly, the high delay from the 20th to the 25th time slots is also because the position predicted by the rough prediction scheme is closer to the base station. Finally, it can be clearly seen that the proposed algorithm shows good performance in most of the subsequent time slots.
[0265] Referring to Figure 10 , it is a schematic diagram showing the change of the communication computing delay with the time slot under different benchmark schemes provided by an embodiment of the present invention. As Figure 10It can be seen that the algorithms proposed in the embodiments of the present invention are all superior to other benchmark schemes. Generally, as the time slot increases, both the proposed algorithms and other benchmark schemes show a trend of first decreasing and then increasing. In addition, as the time slot increases, the curves of average bandwidth allocation and average CPU frequency allocation are both higher than those of the proposed algorithms, which proves the importance of the joint optimization algorithm. Since only the base station and the local scheme lack an aerial MEC server, and the local computing resources of the vehicle are slightly insufficient and the transmission distance of the MEC server of the remote base station is long, the average delay of this scheme is much greater than that of other schemes, which also illustrates the importance of the air-ground cooperation proposed in the embodiments of the present invention.
[0266] Obviously, the above-mentioned embodiments of the present invention are only examples for clearly explaining the present invention, rather than limiting the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A method for collaborative mobile edge computing between air and ground, characterized in that, It includes the following steps: Obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model; wherein, the mobile edge computing system model includes a communication model between a drone and a vehicle, a communication model between a base station and a vehicle, and a computing model of the drone, the base station and the vehicle; According to the resource allocation situation of the current time slot, construct an optimization problem with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot; Based on the vehicle position information of the road vehicles in the current time slot, solve the optimization problem through a preset inner and outer layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
2. The air-ground collaborative mobile edge computing method according to claim 1, characterized in that: The obtaining the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model specifically includes: By constructing a communication model between the drone and the vehicle, the maximum achievable transmission rate r u,k [n] from vehicle k to the drone in the nth time slot is obtained; By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r m,k [n] from vehicle k to the base station in the nth time slot is obtained; By constructing a computational model of drones, base stations, and vehicles, the CPU frequency f for local computing is obtained k [n], and the vehicle k input task is assigned to the CPU frequency f u,k [n] and the vehicle input task is assigned to the CPU frequency f m,k [n]; According to f k [n], the local computing delay of the vehicle in the nth time slot is calculated According to r u,k [n] and f u,k [n], the local computing delay T UAV [n] of the UAV in the nth time slot is calculated. According to r m,k [n] and f m,k [n], the local computing delay T BS [n] of the base station in the nth time slot is calculated; Let the total communication computing delay of the nth time slot be T K [n], then we have: Among them, T result [n] is the time delay for the preset edge server to upload the download result.
3. The air-ground collaborative mobile edge computing method according to claim 2, characterized in that: The constructing an optimization problem according to the resource allocation situation of the current time slot with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot specifically includes: According to the bandwidth allocation of the nth time slot B[n] = {B k [n], B m,k [n], B}, calculate the task offloading ratio allocation θ[n] = {θ k [n], θ u,k [n], θ m,k [n]}, the trajectory of the UAV Q[n] = q u [n] and the computing resource allocation F[n] = {f[n], f u,k [n], f m,k [n]}, with the goal of minimizing the total communication and computing delay T K [n + 1] of the mobile edge computing system in the (n + 1)th time slot, the optimization problem is constructed as: 0 ≤ θ k [n] ≤ 1 (16b) 0 ≤ θ u,k [n] ≤ 1 (16c) 0 ≤ θ m,k [n] ≤ 1(16d) q u [1] = q0 (16f) ||q u [n + 1] - q u [n]|| 2 ≤ε 2 (16g) 0 ≤ f k [n] ≤ F k,max (16h) Among them, (16a) is the constraint of total bandwidth allocation, K is the set of road vehicles, M is the set of base stations, and B m,k [n] is the bandwidth allocated by vehicle k to the edge server of base station m in the n-th time slot, and B k [n] is the bandwidth allocated by vehicle k to the edge server of the unmanned aerial vehicle (UAV) in the n-th time slot, and B is the total communication bandwidth; (16b)-(16e) are the constraints for dividing the task offloading ratio among vehicles, UAVs, and base stations, and θ k [n] is the ratio of the computing task to be computed locally by vehicle k, and θ u,k [n] is the ratio of the computing task offloaded from vehicle k to the edge server of the UAV for computing, and θ m,k [n] is the ratio of the computing task offloaded from vehicle k to the edge server of the base station for computing; (16f) and (16g) are the constraints for the initial starting point of the UAV and the flight trajectory of the UAV, and q u [n] is the flight trajectory of the UAV, q0 is the preset initial point of the UAV, and ε is the displacement of the UAV in one time slot; (16h)-(16j) are the constraints of computing resources, F k,max , F uav,max and F bs,max respectively represent the maximum available CPU frequencies when vehicle k, the edge server of the UAV, and the edge server of base station m perform computing.
4. The air-ground collaborative mobile edge computing method according to claim 3, characterized in that: The solving the optimization problem through a preset inner and outer layer alternating iteration algorithm based on the vehicle position information of the road vehicles in the current time slot to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot specifically includes: According to the initial position w of vehicle k k [1], the vehicle position information w of vehicle k at the nth time slot is predicted and obtained by the Kalman filtering method k [n]; where 1 ≤ n ≤ N, and N is a preset time threshold Based on w k [n], the optimization problem is solved in real time by a preset inner-layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the (n + 1)-th time slot. When n = N, the solution is terminated.
5. The air-ground collaborative mobile edge computing method according to claim 4, characterized in that: After predicting and obtaining the vehicle position information w of vehicle k at the nth time slot through the Kalman filtering method k [n], it further includes: Update w in real time according to the actual observation of the vehicle position of vehicle k k [n].
6. The air-ground collaborative mobile edge computing method according to claim 4, characterized in that: The based on w k [n], and the optimization problem is solved in real time through a preset inner-layer alternating iteration algorithm to obtain the minimum total communication and computing delay of the mobile edge computing system in the (n + 1)-th time slot, specifically including: Transform the optimization problem from (P1) into the following form: (P2): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1] T UAV [n] ≤ η[n] (17b) T BS [n] ≤ η[n] (17c) (16a)-(16j). Wherein, η[n] is a preset transformation relaxation variable; By introducing a relaxation variable, transform the optimization problem from (P2) into the following form: (P4): min B[n],θ[n],Q[n],F[n],η[n] η[n + 1] (16a)-(16j),(17a)-(17c). where s k1 and s k2 are the first slack variable and the second slack variable respectively, h u,k [n] and h m,k [n] are the channel power gains between vehicle k and the UAV and between vehicle k and base station m respectively, P is the transmission power when vehicle k offloads tasks, and N0 is the noise power spectral density; According to w k [n], solve (P4) based on the block coordinate descent method in the l-th inner iteration to obtain the bandwidth allocation B corresponding to the l-th inner iteration (l) , calculate the computing task offloading ratio allocation θ (l) , the trajectory Q of the UAV (l) and the computing resource allocation F (l) , and according to B (l) , θ (l) , Q (l) and F (l) calculate the total communication and computing delay T corresponding to the l-th inner iteration (l) ; When is satisfied, end the inner iteration, and output the total communication and computing delay obtained in the last inner iteration as the minimum total communication and computing delay; where ε0 is a preset proportional threshold.
7. The air-ground collaborative mobile edge computing method according to claim 6, characterized in that: Solving (P4) using the block coordinate descent method to obtain the bandwidth allocation \(B\) corresponding to the \(l\)-th inner iteration (l) 、 calculating the allocation of the computing task offloading ratio \(\theta\) (l) 、 the trajectory \(Q\) of the UAV (l) and the computing resource allocation \(F\) (l) , which specifically includes: By given θ (l-1) , Q (l-1) and F (l-1) , convert (P4) into a standard convex problem and solve it to obtain B (l) ; By given B (l) , Q (l-1) and F (l-1) , convert (P4) into a standard linear programming problem and solve it to obtain θ (l) ; Based on w k [n], by given B (l) , θ (l) and F (l-1) , convert (P4) into a convex optimization problem and solve it to obtain Q (l) ; By given B (l) , θ (l) and Q (l) , convert (P4) into a standard linear programming problem and solve it to obtain F (l) .
8. An air-ground collaborative mobile edge computing device, characterized in that, It includes: A construction module, an optimization module, and a solution module; The construction module is used to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model; wherein, the mobile edge computing system model includes a communication model between a drone and a vehicle, a communication model between a base station and a vehicle, and a computing model of the drone, the base station and the vehicle; The optimization module is used to construct an optimization problem according to the resource allocation situation of the current time slot with the goal of minimizing the total communication and computing delay of the mobile edge computing system in the next time slot; The solution module is used to solve the optimization problem through a preset inner and outer layer alternating iteration algorithm based on the vehicle position information of the road vehicles in the current time slot to obtain the minimum total communication and computing delay of the mobile edge computing system in the next time slot; wherein, the vehicle position information is obtained through vehicle trajectory prediction.
9. The air-ground collaborative mobile edge computing device according to claim 8, characterized in that: The construction module is used to obtain the total communication and computing delay of the mobile edge computing system by constructing a mobile edge computing system model specifically includes: By constructing a communication model between the drone and the vehicle, the maximum achievable transmission rate r u,k [n] from vehicle k to the drone in the nth time slot is obtained; By constructing a communication model between the base station and the vehicle, the maximum achievable transmission rate r m,k [n] from vehicle k to the base station in the nth time slot is obtained; By constructing the computing models of drones, base stations and vehicles, the CPU frequency f k [n] for local computing is obtained. The input tasks of vehicle k are assigned to the CPU frequency f u,k [n] at the computing drone server, and the input tasks of the vehicle are assigned to the CPU frequency f m,k [n] at the base station server; According to f k [n], the local computing delay of the vehicle in the nth time slot is calculated According to r u,k [n] and f u,k [n], the local computing delay T of the UAV in the nth time slot is calculated UAV [n], according to r m,k [n] and f m,k [n], the local computing delay T of the base station in the nth time slot is calculated BS [n]; Let the total communication and computing delay of the nth time slot be T K [n], then we have: Among them, T result [n] is the delay for the preset edge server to return the download result.
10. A readable storage medium, characterized in that, The program or instruction is stored on the readable storage medium, and when the program or instruction is executed by the processor, the steps of the air-ground collaborative mobile edge computing method as described in any one of claims 1 to 7 are implemented.