Task unloading and resource allocation method based on random dynamic network environment
By establishing a task offloading and resource allocation system for computing networks in a random dynamic network environment, using multi-stage random planning and genetic algorithm optimization strategies, the access point switching problem caused by users' random movement is solved, and the continuity and energy consumption reduction of computing offloading are achieved.
Patent Information
- Application Number
- CN202310342552.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-07-25
AI Technical Summary
In the random dynamic network environment, the prior art is difficult to effectively deal with the uncertainty of access point switching and computing offload caused by random movement of users, affecting the continuity of task offloading and resource allocation strategies, and cannot effectively utilize the computing resources of dense heterogeneous networks, resulting in increased computing overhead and excessive energy consumption.
Establish a dynamic task offloading and resource allocation system based on computing network collaboration, model the task offloading and resource allocation problems into sample average approximation problems through multi-stage random planning, and use genetic algorithms and enumeration methods to obtain the optimal strategy, and optimize resource allocation and task offload decisions.
In a random dynamic network environment, the service continuity of task offloading is ensured, the calculation delay requirements are met, and the system energy consumption is effectively reduced.
Smart Images

Figure CN120378954A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile communications, and particularly relates to a task offloading and resource allocation method based on a random dynamic network environment. Background Art
[0002] The large-scale commercialization of the fifth-generation mobile communication system (5G) promotes the rapid transformation of the economic society towards digitalization, networking, and intelligence, and drives the rapid development of emerging industries mainly characterized by big data and intelligence, and mainly featuring computing-intensive and latency-sensitive, such as augmented / virtual reality, telemedicine, smart cities, smart factories, and intelligent transportation. In recent years, driven by the vision of ultra-large capacity, ultra-low latency, ultra-high bandwidth, and ultra-low energy consumption data processing, mobile edge computing (MEC) has been proposed and widely studied and applied. At the network edge enabled by MEC, mobile devices (such as smartphones, wearable devices, intelligent vehicles, etc.) only need to offload local application services to the MEC server at the network edge, and can enjoy a high-performance computing service experience at the network edge side. While making up for the insufficient computing power of mobile devices, it reduces the high data transmission latency, network congestion, and high energy consumption of users caused by the long-distance transmission of a large amount of data.
[0003] A core problem that mobile edge computing needs to solve is to achieve efficient task computing offloading for diverse service requirements. To this end, researchers at home and abroad have conducted a large number of studies, which are mainly reflected in the following aspects:
[0004] (1) MEC computing offloading based on energy consumption.
[0005] (2) MEC computing offloading based on latency.
[0006] (3) The trade-off problem between MEC energy consumption and latency.
[0007] Existing research has made important breakthroughs in aspects such as energy consumption, latency, and task processing efficiency, but it still fails to fully consider the impact of uncertain factors (such as random movement of users and random latency of the system) caused by the random dynamic characteristics of the future random dynamic network environment. On the one hand, in a random dynamic network environment, due to the randomness of user service requests and the time-varying nature of network resource occupancy / release, edge cloud servers with limited resources (such as computing resources and storage resources) usually cannot quickly respond to a large number of sudden computing requests. Therefore, the random waiting time of tasks at the MEC server side (including task queuing time, decompression time, security analysis time, etc.) is usually not negligible. Especially for latency-sensitive applications, the random cloud queuing time also poses higher requirements for task offloading and resource allocation strategies. On the other hand, limited by the wireless coverage range of edge servers, the random movement of users will lead to random switching of access points, resulting in randomness in the connection time between users and access points, which in turn affects the customization of task offloading and resource allocation strategies. Considering different cell load conditions and quality of service requirements, users may interrupt ongoing edge services, which will make it difficult to ensure service continuity. An important issue with user mobility is service migration, but the random movement of users often leads to multiple migrations of tasks and reallocation of resources, which makes it extremely difficult to achieve real-time task migration computing between servers, and even causes greater computing overhead and further increases the risk of computing offloading interruption. Compared with the traditional central cloud deployment scenario, distributed edge cloud nodes disperse the computing resources in the MEC-enabled dense heterogeneous network. How to effectively utilize the decentralized computing power is an important issue. At the same time, dense and heterogeneous network access also brings new opportunities and challenges to mobile communication and computing. To meet the requirements of ultra-reliable, low-latency, and energy-efficient computation offloading (ULECO) in future dense heterogeneous networks, it is also essential to explore a computation offloading method based on "computing + network" to improve the quality of user experience. Summary of the Invention
[0008] To solve the above technical problems, the present invention proposes a task offloading and resource allocation method based on a random dynamic network environment, including:
[0009] S1: In a random dynamic network environment, considering the impact of uncertain task queuing latency and network connection time factors, establish a dynamic task offloading and resource allocation system based on computing-network collaboration. The system includes N mobile users, a single micro base station, and a single macro base station. Among them, both the micro base station and the macro base station are equipped with MEC servers to provide computing offloading services for N mobile users;
[0010] S2: Based on the above system, while meeting the user's latency requirements, jointly optimize the task offloading decision and computing network resource allocation to minimize the total system energy consumption, and model the task offloading and resource allocation problem as a multi-stage stochastic programming problem;
[0011] S3: Considering the problem of high computational complexity of multi-stage stochastic programming, use the stochastic simulation method to independently and identically distribute samples from the stochastic scenario space, and transform the multi-stage stochastic programming problem into a sample average approximation problem;
[0012] S4: Decouple the sample average approximation problem into two sub-problems: resource allocation and task offloading;
[0013] S5: Obtain the optimal strategy for resource allocation by using the genetic algorithm and obtain the optimal strategy for task offloading by using the enumeration method.
[0014] Advantages of the present invention:
[0015] The present invention studies the task offloading and resource allocation strategies in a stochastic dynamic network environment, comprehensively considers the influence of uncertain factors faced by users during offloading, and ensures the continuity of services when users perform task offloading, and proposes a task offloading and resource allocation method in a stochastic dynamic network environment. Compared with traditional algorithms, this method can meet the user's requirements for computing latency in a stochastic dynamic network environment and effectively reduce the system energy consumption. Description of the Drawings
[0016] Figure 1 It is a flowchart of a task offloading and resource allocation method based on a stochastic dynamic network environment of the present invention;
[0017] Figure 2 It is a schematic diagram of a dynamic task offloading and resource allocation system based on computing network collaboration of the present invention;
[0018] Figure 3 It is an effect diagram of the influence of changing task volume on the system energy consumption of different algorithms of the present invention;
[0019] Figure 4 It is an effect diagram of the influence of changing latency constraints on the system energy consumption of different algorithms of the present invention. Detailed Embodiments
[0020] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0021] A task offloading and resource allocation method based on a random dynamic network environment, as Figure 1 shown, includes:
[0022] S1: In a random dynamic network environment, considering the influence of uncertain task queuing delay and network connection time factors, establish a dynamic task offloading and resource allocation system based on computing-network collaboration. The system includes N mobile users, a single femtocell base station, and a single macro base station. Among them, both the femtocell base station and the macro base station are equipped with MEC servers to provide computing offloading services for N mobile users;
[0023] S2: Based on the above system, while meeting the user's delay requirements, jointly optimize the task offloading decision and computing-network resource allocation to minimize the total system energy consumption, and model the task offloading and resource allocation problem as a multi-stage stochastic programming problem;
[0024] S3: Considering the problem of high computational complexity of multi-stage stochastic programming, use the stochastic simulation method to independently and identically distributed sample from the stochastic scenario space, and transform the multi-stage stochastic programming problem into a sample average approximation problem;
[0025] S4: Since the solved sample average approximation problem is a Mixed Integer Nonlinear Programming (MINLP) problem, decouple the sample average approximation problem into two sub-problems: resource allocation and task offloading;
[0026] S5: Obtain the optimal strategy for resource allocation by using the genetic algorithm and obtain the optimal strategy for task offloading by using the enumeration method.
[0027] In this embodiment, as Figure 2 shown, it is a dynamic task offloading and resource allocation system based on computing-network collaboration: considering the MEC network scenario of multiple mobile users (Mus), a single femtocell base station (FBS), and a single macro base station (MBS). Both the femtocell base station and the macro base station are equipped with MEC servers, which can provide computing offloading services for MUs. Define the set of MUs The computational task offloaded by MU i is represented as where D i is the amount of task size decided by MUi to offload, and L i represents the number of CPU cycles required for MUi to calculate a unit bit of task volume, Denote the maximum tolerable delay of MU\(_i\). The present invention assumes that the task offloading model of MUs is the full offloading model. In this model, the computing task is not divisible and should be offloaded as a whole. Define \(\pi\) i \(\in \{0, 1\}\) to represent the offloading decision of MU\(_i\). \(\pi\) i \( = 0\) means offloading the task to the FBS, \(\pi\) i \( = 1\) means offloading the task to the MBS.
[0028] First, the task needs to be offloaded to the corresponding MEC server. If the task is offloaded to the MBS, that is, when \(\pi\) i \( = 1\), the amount of offloaded task needs to be sent to the MBS through the uplink wireless link. According to Shannon's theory, the task upload rate when MU\(_i\) offloads the task to the MBS can be obtained as follows:
[0029]
[0030] where \(p\) i is the transmission power when MU\(_i\) offloads the task, \(B_0\) is the transmission bandwidth during task upload, \(h\) i,M represents the channel gain between MU\(_i\) and the MBS, and \(N_0\) is the noise power.
[0031] Furthermore, the task upload delay and communication energy consumption can be calculated respectively as follows:
[0032]
[0033] If it is selected to offload the task to the FBS, that is, when \(\pi\) i \( = 0\), similarly, the task upload rate when MU\(_i\) offloads the task to the FBS can be obtained as follows:
[0034]
[0035] where \(h\) i,F represents the channel gain between MU\(_i\) and the FBS.
[0036] In an actual MEC system, considering the mobility of users, a user may leave the coverage area of the current FBS during the task transmission process. In this case, the user cannot upload the task completely to the FBS. Since the present invention considers the full offloading model where the computing task is not divisible, when MUs move outside the coverage area of the FBS, to ensure the continuity of services during task offloading for users, the remaining amount of unuploaded task will first be uploaded to the MBS. Then, the FBS needs to forward the already uploaded amount of task to the MBS through the wired fiber optic network. After the task is completely uploaded to the MBS, the MBS processes the computing task and returns the computing result. After the above process, the total time consumption during the task transmission process is:
[0037]
[0038] Among them, represents the random connection time between MUi and FBS, represents the upload time of the remaining tasks, represents the forwarding time of the uploaded tasks, and c is the data transmission rate of the optical fiber link.
[0039] Correspondingly, the communication energy consumption for task uploading can be expressed as:
[0040]
[0041] After the task is uploaded to the MEC server and waits in line, the MEC server allocates computing resources for the user to process the task. Define f i,k , k∈{M,F} represents the frequency at which the CPU works when the task volume is processed by FBS / MBS. Then the corresponding computing delay is:
[0042]
[0043] The corresponding energy consumption is:
[0044]
[0045] Among them, λ k represents the equivalent energy coefficient related to the chip architecture.
[0046] Embodiment 1
[0047] This embodiment mainly provides the establishment process of a task offloading and resource allocation model in a random dynamic network environment;
[0048] In a random and dynamic network environment, due to the randomness of user service requests and the time-varying nature of network resource occupancy / release, edge cloud servers with limited resources (such as computing resources and storage resources) usually cannot quickly respond to a large number of sudden computing requests. Therefore, the random waiting time of tasks on the MEC server side (including task queuing time, decompression time, security analysis time, etc.) is usually not negligible. Especially for delay-sensitive applications, the random cloud queuing time also poses higher requirements for the formulation of task offloading and resource allocation strategies. On the other hand, limited by the wireless coverage of edge servers, the random movement of users will lead to random switching of access points, resulting in randomness in the connection time between users and access points. For this reason, this embodiment first describes the random connection time and queuing waiting time, and then, under the constraint of user computing delay, models this problem as a task offloading and resource allocation problem based on multi-stage stochastic programming. Considering the high computational complexity of the multi-stage stochastic programming problem, a stochastic simulation method is used to transform the original expected value model into a sample average approximation problem. Specifically, it includes:
[0049] (1). Uncertain scenario description
[0050] Due to the uncertainty of the connection time between MUi and FBS caused by the random movement of MUi, in order to describe this uncertain connection time, the present invention models it as a set of random variables. Define to represent the set of all possible connection times between MUi and FBS, which is called a scenario, where represents the size of the scenario space, represents a scenario in one realization.
[0051] Since each edge node faces a large number of user accesses, edge nodes with limited computing resources cannot process a large number of computing requests simultaneously. Therefore, the queuing waiting time of tasks on the MEC server is not negligible for time-sensitive applications. Similarly, the queuing waiting time of users on the MEC server can also be modeled in the same way. Define to represent the set of all queuing waiting times of MUi, represents the size of the scenario space, represents a realization in the scenario.
[0052] In summary, the combined scenario formed by all the uncertain parameters of MUi can be defined as Take a sample from the combined scenario represents a realization of the combined scenario Ω i . Further considering the multi-user scenario, the combined scenario formed by multiple users can be defined as Ω, which can be written in the form of a Cartesian product Ω = Ω1 × Ω2 × … × Ω N .
[0053] (2) Modeling of Task Offloading and Resource Allocation Problem Based on Multi-Stage Stochastic Programming
[0054] When users perform task offloading, they have two options: 1) offload tasks to the MBS; 2) offload tasks to the FBS. Whichever way of offloading is chosen, corresponding costs (energy consumption and delay costs) will be incurred, and this cost cannot be obtained in advance. However, we can reasonably evaluate this cost based on past statistical data and then formulate more reasonable strategies. Therefore, while considering the influence of uncertain factors in the stochastic dynamic network environment, the present invention uses the multi-stage stochastic programming theory to formulate multi-stage strategies in sequence. The decision in the current stage should be given after reasonably evaluating all possible influencing factors in the future. At the same time, the decisions in subsequent stages will compensate for the previous decisions in a posteriori manner. The specific multi-stage description is as follows:
[0055] The first stage: Considering the influence of multi-dimensional uncertain factors comprehensively, estimate the expected values of delay and energy consumption for offloading tasks to the MBS / FBS, and the mobile user makes an offloading decision π i , and decide which MEC server to offload to.
[0056] The second stage: Considering all possible future situations before the random event occurs and given the user's offloading decision, allocate the corresponding transmission power p i to upload the task to the corresponding MEC server.
[0057] The third stage: After the task is uploaded, given the queuing waiting time of the task in the MEC server, according to the user's delay constraint, take the third-stage recourse action (f i,k ) to compensate for the inaccurate prediction in the previous stage.
[0058] Based on the above analysis, the following expected value model of multi-stage stochastic programming can be obtained:
[0059]
[0060] The constraint conditions are:
[0061]
[0062] f min ≤f i,k ≤f max (9c)
[0063] π i ∈{0,1} (9d)
[0064]
[0065] Among them, π = {π1, π2, …, π i , …, π N} represents the set of all users' offloading decisions, N represents the number of users, and π i represents the offloading decision of user i. p = {p1, p2, …, p i , … p N} represents the set of the transmission powers of users when uploading tasks, and p i represents the transmission power of user i. The constraint 9b is the limit of the transmission power, and represent the maximum and minimum values of the transmission power of MU i. f = {f 1,k , f 2,k , …, f i,k , …, f N,k} represents the set of all users' computing resource allocations, and f i,k represents the computing resource allocation of user i. The constraint 9c is the limit of the CPU computing frequency of the MEC server, and f min and f max represent the maximum and minimum values of the CPU computing frequency of the MEC server. The constraint formula 9e represents the users' requirements for latency, represents the expectations under all users' combined scenarios, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, represents the computing energy consumption of the task, represents the upload latency of user i's task, and T i w represents the queuing waiting latency of user i's task, represents the computing latency of user i's task, represents the maximum tolerable latency of user i. M represents the macro base station, and F represents the micro base station.
[0066] (III). Convert the expected value model of the optimization problem 9 into a sample average problem.
[0067] The present invention studies the task offloading and resource allocation problems in a stochastic dynamic network environment and models this problem as a multi-stage stochastic programming problem. This model considers the multi-dimensional uncertain factors faced by mobile users when offloading and allows decision-makers to formulate strategies sequentially in stages, thereby reducing the impact brought by the uncertain network environment. However, the solution of the multi-stage stochastic programming problem often faces the problem that the number of combined scenarios increases exponentially with the increase in the number of users, which will bring a high computational complexity. For example, when the scenario space size of each user is 1000 and considering the case of N users, the number of combined scenarios will be 1000 N, in the face of such a large number of combined scenarios, it is extremely difficult and unacceptable to solve this multi-stage stochastic programming problem.
[0068] To solve the "curse of dimensionality" problem faced by the multi-stage stochastic programming problem, a stochastic simulation method can be used to randomly extract S independent and identically distributed random sample scenarios from the combined scenario space where s = 1, 2, …, S represents the s-th realization in the random scenario, that is, the set of all uncertain parameters corresponding to the S-th sample of MUi. Further considering the multi-user scenario Ω′ = Ω′1×Ω′2×…×Ω′ The number of combined scenarios is S N , and through the above stochastic simulation method, the expected value model of problem (9) can be transformed into the following sample mean model: N The constraint conditions are: (9b)-(9e)
[0069]
[0070]
[0071] where π = {π1, π2, …, π i , …, π N} represents the set of all user offloading decisions, N represents the number of users, π i represents the offloading decision of user i, p = {p1, p2, …, p i , … p N} represents the set of the transmission powers of users when uploading tasks, p i represents the transmission power of user i, f = {f 1,k , f 2,k , …, f i,k , …, f N,k} represents the set of all user computing resource allocations, f i,k represents the computing resource allocation of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, represents the queuing waiting delay of user i's task under the s-th sample, represents the computing delay of user i's task, represents the maximum tolerable delay of user i, M represents the macro base station, and F represents the micro base station.
[0072] Example 2
[0073] Example 2 mainly provides the solution idea for the above optimization problem.
[0074] To solve the task offloading and resource allocation problems of users in a random dynamic network environment, the present invention adopts a task offloading and resource allocation algorithm SS-MSSP (Stochastic Simulation-Based Multi-stage Stochastic Programming Algorithm) in a random dynamic network environment. First, in the above sample mean model, π i is a {0,1} decision variable, and the optimization objective function is a non-linear function of the optimization variable p i . Therefore, the optimization problem (10) is a mixed integer non-linear programming (MINLP) problem. Secondly, it is observed that the first-stage offloading decision variable and the resource allocation optimization variables in subsequent stages are completely decoupled. Therefore, to solve this MINLP problem, the present invention decouples the optimization problem (10) into two sub-problems of resource allocation and offloading decision; then, the optimal strategy of resource allocation can be obtained by using the genetic algorithm; finally, the optimal task offloading decision is obtained by analyzing the energy consumption budget under different offloading decisions. Since each mobile user is independent of each other, for the convenience of analysis, the optimal strategy is solved for only one user next. Specifically, it includes:
[0075] (I). Resource Allocation
[0076] Assume that the offloading decision variable π i =0, that is, MUi chooses to upload the task to the FBS. Then, the optimization problem (10) can be written as the following resource allocation sub-problem:
[0077]
[0078] The constraint conditions are: (9b)-(9d)
[0079] In the optimization problem (11), the optimization objective function is a non-convex function of p i . Therefore, the optimization problem (11) is a non-convex problem. The genetic algorithm is a heuristic search algorithm that does not depend on the convexity and concavity of the objective function and is especially suitable for solving relatively complex combinatorial optimization problems. For this reason, the present invention uses the genetic algorithm to solve the global optimal solution of the problem (11), which mainly includes the following steps:
[0080] 1) Encoding
[0081] The genetic algorithm needs to encode the feasible solutions of the problem and represent the solutions of the problem in the form of chromosomes. In the present invention, the feasible transmission power is binary encoded, and each binary string represents a chromosome.
[0082] 2) Initialize the population size
[0083] The genetic algorithm needs to give some initial search points as the initial population. In the present invention, Q individuals are generated from the feasible region of the transmission power by a random method. The set of these Q individuals is called the initial population, denoted as p i,1 ,p i,2 ,...,p i,Q .
[0084] 3) Fitness function
[0085] The genetic algorithm evaluates the quality of an individual (feasible solution) by the magnitude of the fitness function value. The larger the fitness function value, the better the quality of the solution. The design of the fitness function should be determined in combination with the problem to be solved. In the problem solved by the present invention, the magnitude of the individual fitness depends on the magnitude of the optimal value of the objective function. An individual with a smaller optimal value of the objective function will have a larger fitness. Therefore, it is necessary to sort the optimal values of the objective functions corresponding to the population individuals from small to large, and define the fitness function according to this order. The larger the fitness function value corresponding to an individual with a higher fitness, the greater the probability of being used as a parent to be inherited to the next generation. The specific operation is as follows: For each chromosome p i,m ,m = 1,2,…,Q, first solve the optimal value of the objective function of the following problem:
[0086]
[0087] The constraint conditions are: (9b),(9e)
[0088] Among them, f i,k represents the computing resource allocation of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the micro base station, p i,m represents the m-th chromosome, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, and Tiw,s represents the task queuing waiting delay of user i under the s-th sample.
[0089] In the optimization problem (12), the objective function is an affine function of f i,k , and the constraint condition formula is an affine function of f i,kThe convex constraint makes the above optimization problem a convex optimization problem. By applying convex optimization theory, the closed-form expression of the optimal CPU frequency allocation strategy can be easily obtained as follows:
[0090]
[0091] where, represents the optimal CPU frequency allocation policy value for user i at the uncertain time of the s-th sample, represents the set of uncertain times of the s-th sample, D i represents the amount of tasks that user i decides to offload, L i represents the number of CPU cycles required for user i to calculate a unit bit of task volume, represents the maximum tolerable delay of user i, represents the task upload delay of user i, p i,m represents the m-th chromosome, T i w represents the task queuing waiting delay of user i, respectively represent the maximum and minimum computing resource allocations of user i.
[0092] Substituting the optimal CPU frequency allocation values in all scenarios into problem (12), the optimal value of the objective function corresponding to each chromosome can be obtained. Then, these values are sorted from smallest to largest, and the following fitness function is defined in this order:
[0093] fitness(p i,m ) = a(1 - a) m-1 , m = 1, 2,..., M (14)
[0094] where, fitness(p i,m ) represents the fitness function of the m-th chromosome, p i,m represents the m-th chromosome, Q represents the number of chromosomes in the initial population, a represents the probability that a chromosome individual in the population is selected, a ∈ (0, 1). It can be seen that the smaller m is, the larger the fitness function value is, and the greater the probability of being selected as a parent and passed on to the next generation, thus enabling the individuals in the population to evolve towards a direction with better objective function values.
[0095] 4) Genetic operators
[0096] Genetic operators include selection, crossover, and mutation. The genetic algorithm generates a population sequence through the selection mechanism, and uses crossover and mutation as search mechanisms. The present invention adopts the roulette wheel selection method to select parents. In this selection mode, an individual with a larger fitness value will have a greater chance of being selected as a parent and passed on to the next generation, so that the new generation of population has a larger fitness. Crossover operation refers to exchanging some genes of two different individuals in the population according to the crossover probability Pc, thereby generating two new individuals. Crossover operation is the main method for generating new individuals. Mutation operation refers to replacing some coding values in the individual coding string of an individual in the population with other corresponding values according to the mutation probability Pm, thereby generating a mutant individual. Mutation operation is an auxiliary method for generating new individuals. Crossover and mutation operations in the genetic algorithm are the driving forces for generating new individuals and can maintain the diversity of the population. The main purpose of crossover and mutation operations in the present invention is to perturb the feasible solutions of the objective function and avoid falling into local optima.
[0097] 5) Termination
[0098] By performing selection, crossover, and mutation operations on the individuals in the initial population, a new population can be generated and used as the parent to be passed on to the next generation. After repeating step (4) a given number of times, the genetic algorithm terminates. After the genetic algorithm terminates, the individual with the highest fitness in the last generation of the population is selected as the optimal solution to the problem.
[0099] Assume the offloading decision variable π i = 1, that is, MUi chooses to upload the task to the MBS, then the optimization problem (10) can be written as the following resource allocation sub-problem:
[0100]
[0101] The constraint conditions are: (9b)-(9d)
[0102] where f i,k represents the computing resource allocation of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, p i,m represents the m-th chromosome, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, and Tiw,s represents the task queuing delay of user i under the s-th sample.
[0103] The above problem can also be solved using the genetic algorithm. To avoid repetition, it will not be elaborated one by one. Similarly, through the above method, the closed-form expression of the CPU frequency allocation strategy in this case can be obtained as:
[0104]
[0105] Among them, represents the policy value of the optimal CPU frequency allocation for user i at the uncertain time of the s-th sample, represents the set of uncertain times of the s-th sample, D i represents the amount of tasks that user i decides to offload, L i represents the number of CPU cycles required for user i to calculate a unit of bit task volume, represents the maximum tolerable delay of user i, represents the delay of user i's task uploaded to the macro base station, p i,m represents the m-th chromosome, represents the waiting delay of user i's task at the macro base station, respectively represent the maximum and minimum computing resource allocations of user i.
[0106] (II) Offloading decision
[0107] The user obtains the offloading decision by estimating the energy consumption budget and delay of local computing and edge computing. Under the condition of obtaining the optimal allocation strategies of local computing resources, transmission power, and edge computing resources, the optimization problem (10) can be written as the following task offloading decision sub-problem:
[0108]
[0109] The constraint condition is: (9d)
[0110] Among them, π i represents the offloading decision of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, and respectively represent the optimal transmission power and computing resource allocation of user i, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, and Tiw,s represents the task queuing waiting delay of user i under the s-th sample.
[0111] In the optimization problem (17), the only variable is the offloading decision π i ∈ {0, 1}. Therefore, the optimization problem (17) is a 0-1 integer programming problem. The present invention uses the enumeration method to substitute 0 and 1 into the problem (17) respectively, and then compares the magnitudes of the objective function values. The π with the smaller objective function value iThis is the optimal solution to the problem, and the closed-form expression of the optimal offloading decision is as follows:
[0112]
[0113]
[0114]
[0115] Among them, represents the optimal offloading strategy of user i's task, and E i,M represents the total energy consumption of uploading the task to the macro base station, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, and E i,F represents the total energy consumption of uploading the task to the micro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, respectively represent the optimal transmission power and computing resource allocation of user i.
[0116] Embodiment 3
[0117] Embodiment 3 verifies the effectiveness of the present invention through simulation experiments
[0118] The present invention uses MATLAB R2019a to perform simulation analysis on the model established by the present invention and the algorithms used. In the model established by the present invention, in order to better observe the reliability of the algorithms used by the present invention and the improvement of performance, the present invention mainly sets the following algorithms for comparison of simulation performance:
[0119] (1) Algorithm for offloading tasks only to the MBS (Only MBS): Since the connection time between MUs and FBS is uncertain, for a given task volume, within the connection time between the user and the FBS, MUs may not be able to complete task offloading. To solve the impact of this uncertain connection time on computing offloading, a more cautious approach is to directly offload the task to the MBS. Similarly, considering the uncertain queuing waiting time during task offloading, the user optimizes the transmission power and computing resource allocation in this mode. Compared with this algorithm, the impact of offloading decisions on computing offloading performance in a random dynamic network environment can be compared.
[0120] (2) Maximum Waiting Time based Static Offloading algorithm (MWT-SO): In a static network based on the maximum waiting time, the user also considers the uncertain connection time to optimize the offloading decision and resource allocation. Compared with this algorithm, the impact of the waiting time in a random dynamic network environment on the computing offloading performance can be compared.
[0121] The present invention considers the MEC network scenario of multiple MUs, a single FBS, and a single MBS. The FBS is located at the center of a hexagonal cellular network with a coverage radius of 200 m. The MUs are evenly distributed within the coverage range of the FBS. At the same time, the user maintains a connection with the nearest MBS. The channel gain for task uploading is set to where d i,f and d i,m respectively represent the transmission distances between MUi and the FBS and the MBS; the transmission bandwidth for uploading tasks to the FBS is 10 MHz, and the transmission bandwidth for uploading tasks to the MBS is 15 MHz; the wired fiber transmission rate between the FBS and the MBS is 1000 Mbps; the noise power is -50 dBm; the transmission power magnitude is between 10 and 30 dBm; the computing density L i of the task is 500 cycles / bit; the equivalent energy coefficient of the CPU of the MEC server is 10-19 W·s2 / cycle2; the operating frequency is 500 - 5000 MHz; in the genetic algorithm, the population size M is 200, the crossover probability Pc is 0.6, the mutation probability Pm is 0.01, and the number of iterations is 100 times; unless otherwise specified, the queuing waiting time of the MEC server under the MBS follows an exponential distribution with a mean of 3, the queuing waiting time of the MEC server under the FBS follows an exponential distribution with a mean of 2, the maximum queuing waiting time is set to 5 s, and the connection time between the MUs and the FBS follows an exponential distribution with a mean of 2; the number of combined scenario samples S is set to 100.
[0122] As Figure 3 shown is the impact of the varying task volume on the energy consumption of different algorithm systems. In the experiment, there is one user, the size of the offloaded task is 2 - 20 Mbit, and the delay constraint is 10 s. From Figure 3It can be seen that the SS-MSSP algorithm has the lowest system energy consumption. This is because the algorithm comprehensively considers the uncertain connection time between the user and the FBS during task offloading and the impact of the task queuing waiting time in the MEC server. By applying the multi-stage stochastic programming theory, it formulates multi-stage strategies for users in sequence, thereby minimizing the impact of uncertain factors on task offloading to the greatest extent. This is also the advantage of the SS_MSSP algorithm. Compared with the Only MBS algorithm, the SS-MSSP algorithm allows users to have more choices during task offloading. In order to avoid the additional overhead caused by random connection time, the Only MBS algorithm selects a more cautious offloading method, which limits other choices of users during task offloading and cannot better utilize the advantages of MEC, resulting in greater energy consumption. The MWT-SO algorithm is a static offloading algorithm based on the maximum queuing waiting time of the MEC server. Compared with the SS-MSSP algorithm, due to not considering the uncertainty of the queuing waiting time, when considering the user's maximum queuing waiting time, in order to meet the user's delay requirements, it will bring higher energy consumption.
[0123] As Figure 4 shown in the figure is the impact of the changing delay constraint on the system energy consumption of different algorithms. In the experiment, there is one user, and the delay constraint is 10 - 30 s. As can be seen from Figure 4 it, as the maximum tolerable delay continues to increase, the system energy consumption of all algorithms also decreases. Compared with other algorithms, the SS-MSSP algorithm has the lowest system energy consumption. In order to avoid the impact of uncertain connection time, the Only MBS algorithm selects a more cautious offloading method, resulting in greater energy consumption. The MWT-SO algorithm considers the static queuing waiting time of the MEC server. Compared with the SS-MSSP algorithm, due to not considering the uncertainty of the queuing waiting time, when considering the user's maximum queuing waiting time and when the user has relatively high requirements for delay, it will meet the user's delay requirements with higher energy consumption. However, as the user's maximum tolerable delay continues to increase, the restriction of the queuing waiting time on task offloading and resource allocation will become smaller and smaller, and the system energy consumption is basically consistent with the SS-MSSP algorithm.
[0124] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A task offloading and resource allocation method in a random dynamic network environment, characterized in that Including: S1: In a random dynamic network environment, considering the impacts of uncertain task queuing delay and network connection time factors, a dynamic task offloading and resource allocation system based on computing-network collaboration is established. The system includes N mobile users, a single micro base station, and a single macro base station. Both the micro base station and the macro base station are equipped with MEC servers to provide computing offloading services for N mobile users; S2: Based on the above system, while meeting the users' delay requirements, jointly optimize the task offloading decision and computing-network resource allocation to minimize the total system energy consumption, and model the task offloading and resource allocation problem as a multi-stage stochastic programming problem; S3: Considering the problem of high computational complexity of multi-stage stochastic programming, use the stochastic simulation method to independently and identically distribute samples from the stochastic scenario space, and transform the multi-stage stochastic programming problem into a sample average approximation problem; S4: Decouple the sample average approximation problem into two sub-problems: resource allocation and task offloading; S5: Obtain the optimal strategy for resource allocation by using the genetic algorithm and obtain the optimal strategy for task offloading by using the enumeration method.
2. The task offloading and resource allocation method based on a random dynamic network environment according to claim 1, characterized in that Modeling the task offloading and resource allocation problem as a multi-stage stochastic programming problem includes: C2:f min ≤f i,k ≤f max C3:π i ∈{0,1} where, π = {π1, π2, …, π i , …, π N} represents the set of all users' offloading decisions, N represents the number of users, π i represents the offloading decision of user i, p = {p1, p2, …, p i , … p N} represents the set of users' transmission powers when uploading tasks, p i represents the transmission power of user i, the constraint C1 is the limit of transmission power, and represent the maximum and minimum values of the transmission power of MUi, f = {f 1,k , f 2,k , …, f i,k , …, f N,k} represents the set of all users' computing resource allocations, f i,k represents the computing resource allocation of user i, the constraint C2 is the limit of the CPU computing frequency of the MEC server, f min and f max represent the maximum and minimum values of the CPU computing frequency of the MEC server, the constraint formula C4 represents the users' requirements for delay, represents the expectations under all users' combined scenarios, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, represents the computing energy consumption of the task, represents the upload delay of user i's task, T i w represents the queuing waiting delay of user i's task, represents the computing delay of user i's task, represents the maximum tolerable delay of user i, M represents the macro base station, and F represents the micro base station.
3. A task offloading and resource allocation method based on a random dynamic network environment according to claim 1, characterized in that Transforming the multi-stage stochastic programming problem into a sample average approximation problem includes: C2:f min ≤f i,k ≤f max C3:π i ∈{0,1} where, π = {π1, π2, …, π i , …, π N} represents the set of all users' offloading decisions, N represents the number of users, π i represents the offloading decision of user i, p = {p1, p2, …, p i , …, p N} represents the set of users' transmission powers when uploading tasks, p i represents the transmission power of user i, f = {f 1,k , f 2,k , …, f i,k , …, f N,k} represents the set of all users' computing resource allocations, f i,k represents the computing resource allocation of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, Tiw,s represents the queuing waiting delay of user i's task under the s-th sample, the constraint condition C1 is the limit of the transmission power, and represent the maximum and minimum values of the transmission power of MUi, the constraint condition C2 is the limit of the CPU computing frequency of the MEC server, f min and f max represent the maximum and minimum values of the CPU computing frequency of the MEC server, the constraint condition formula C4 represents the users' requirements for delay, represents the task upload delay of user i, T i w represents the queuing waiting delay of user i's task, represents the task computing delay of user i, represents the maximum tolerable delay of user i, M represents the macro base station, F represents the micro base station.
4. A task offloading and resource allocation method based on a random dynamic network environment according to claim 1, characterized in that Decoupling the sample average approximation problem into a resource allocation sub-problem: Assume the offloading decision variable π i = 0, that is, MUi chooses to upload the task to the femtocell base station FBS, and the resource allocation problem is as follows: C2:f min ≤f i,k ≤f max C3:π i ∈{0,1} Assume the offloading decision variable π i = 1, that is, MUi chooses to upload the task to the macro base station MBS, and the resource allocation problem is as follows: C2:f min ≤f i,k ≤f max C3:π i ∈{0,1} Among them, f i,k represents the computing resource allocation of user i, p i represents the transmission power of user i, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the micro base station, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, represents the task queuing waiting delay of user i under the s-th sample. The constraint condition C1 is the limit of transmission power, and represent the maximum and minimum values of the transmission power of MUi. The constraint condition C2 is the limit of the CPU computing frequency of the MEC server, f min and f max represent the maximum and minimum values of the CPU computing frequency of the MEC server, π i represents the offloading decision of user i, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the computing energy consumption of the task.
5. A task offloading and resource allocation method based on a random dynamic network environment according to claim 1, characterized in that Decoupling the sample average approximation problem into a task offloading decision sub-problem: s.t.C1:π i ∈{0,1} where, π i represents the offloading decision of user i, S represents the number of scenarios of independently and identically distributed random samples extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, and respectively represent the optimal transmit power and computing resource allocation of user i, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, represents the task queuing waiting delay of user i under the s-th sample.
6. The task offloading and resource allocation method based on a random dynamic network environment according to claim 1, characterized in that Obtaining the optimal strategy for resource allocation by using the genetic algorithm includes: Feasible solution encoding: Through the genetic algorithm, the feasible transmission power of the resource allocation problem needs to be binary encoded, and each binary string represents a chromosome; Initial population size: Use a random method to generate Q individuals from the feasible region of the transmission power. The set of these M individuals is called the initial population, denoted as p i,1 , p i,2 ,..., p i,m ,..., p i,Q ; Define the fitness function: For each chromosome p i,m , m = 1, 2, …, M, solve the optimal value of the objective function of the convex constraint problem with respect to f i,k . Using convex optimization theory, obtain the optimal CPU frequency allocation strategy under all scenarios, substitute the strategy values of the optimal CPU frequency allocation under all scenarios into the convex constraint problem with respect to f i,k . Obtain the optimal value of the objective function corresponding to each chromosome, then sort the optimal values of the objective function from smallest to largest, and define the fitness function according to this order to obtain the fitness function; Determining genetic operators: Genetic operators include selection, crossover, and mutation. The roulette wheel selection method is used to select the parents, new individuals are generated through crossover operations, and new individuals are assisted in generation through mutation operations; Optimal strategy: Perform selection, crossover, and mutation operations on the individuals in the initial population to generate a new population, and inherit it as the parent to the next generation. Repeat the iterative process to generate populations until the set number of iterations of the genetic algorithm, 100 times, is reached, terminate the algorithm, and select the individual with the highest fitness from the last generation of the population as the optimal solution to the problem, and obtain the optimal strategy for CPU frequency allocation.
7. A task offloading and resource allocation method based on a random dynamic network environment according to claim 6, characterized in that The convex constraint problem regarding f i,k includes: C2:f min ≤f i,k ≤f max C3:π i ∈{0,1} Among them, f i,k represents the computing resource allocation of user i, S represents the number of scenarios of independently and identically distributed random samples extracted, represents the transmission energy consumption of user i's task uploaded to the micro base station, p i,m represents the m-th chromosome, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, represents the random connection time between user i and the micro base station under the s-th sample, represents the task queuing waiting delay of user i under the s-th sample. The constraint condition C1 is the limit of transmission power, and represent the maximum and minimum values of the transmission power of MUi. The constraint condition C2 is the limit of the CPU computing frequency of the MEC server, f min and f max represent the maximum and minimum values of the CPU computing frequency of the MEC server. The constraint condition C4 represents the user's requirement for delay, represents the task upload delay of user i, T i w represents the task queuing waiting delay of user i, represents the task computing delay of user i, represents the maximum tolerable delay of user i. M represents the macro base station, and F represents the micro base station.
8. A task offloading and resource allocation method based on a random dynamic network environment according to claim 6, characterized in that The calculation formula for the strategy value of the optimal CPU frequency allocation under each scenario includes: Among them, represents the policy value of the optimal CPU frequency allocation for user i at the uncertain time of the s-th sample, represents the set of uncertain times of the s-th sample, D i represents the amount of tasks that user i decides to offload, L i represents the number of CPU cycles required for user i to calculate a unit bit of task volume, represents the maximum tolerable delay of user i, represents the delay of user i uploading tasks to the micro base station, p i,m represents the m-th chromosome, T i w represents the queuing waiting delay of user i's tasks, respectively represent the maximum and minimum computing resource allocations of user i.
9. A task offloading and resource allocation method based on a random dynamic network environment according to claim 6, characterized in that Defining the fitness function according to the order of sorting the optimal values of the chromosome objective functions in the population from smallest to largest includes: fitness(p i,m ) = a(1 - a) m-1 , m = 1, 2, ..., Q Among them, fitness(p i,m ) represents the fitness function of the m-th chromosome, p i,m represents the m-th chromosome, a represents the probability that an individual chromosome in the population is selected, and Q represents the number of chromosomes in the initial population.
10. A task offloading and resource allocation method based on a random dynamic network environment according to claim 1, wherein Obtaining the optimal strategy for task offloading by using the enumeration method includes: Among them, represents the optimal task offloading strategy of user i, E i,M represents the total energy consumption of uploading tasks to the macro base station, S represents the number of independent and identically distributed random sample scenarios extracted, represents the transmission energy consumption of user i's task uploaded to the macro base station, represents the computing energy consumption of the task, represents the set of uncertain times of the s-th sample, E i,F represents the total energy consumption of uploading tasks to the micro base station, represents the transmission energy consumption of user i's task uploaded to the micro base station, respectively represent the optimal transmit power and computing resource allocation of user i.