CN112181655A - Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation - Google Patents

Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation Download PDF

Info

Publication number
CN112181655A
CN112181655A CN202011057306.2A CN202011057306A CN112181655A CN 112181655 A CN112181655 A CN 112181655A CN 202011057306 A CN202011057306 A CN 202011057306A CN 112181655 A CN112181655 A CN 112181655A
Authority
CN
China
Prior art keywords
task
individuals
processor
population
computation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011057306.2A
Other languages
Chinese (zh)
Inventor
冯维
曹荻秋
姚英彪
刘兆霆
夏晓威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202011057306.2A priority Critical patent/CN112181655A/en
Publication of CN112181655A publication Critical patent/CN112181655A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Molecular Biology (AREA)
  • Genetics & Genomics (AREA)
  • Physiology (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a hybrid genetic algorithm-based calculation unloading method in mobile edge calculation, which comprises the following steps: s1, establishing a system model to obtain the calculation time delay of a subtask set in each processor and the transmission time delay between the processors, and determining each task layer value in the subtask set according to the constraint relation of the subtask set; s2, initializing a population according to the determined task layer value and a random strategy to obtain initial population individuals of the subtask set, carrying out symbol coding to obtain a task scheduling sequence, and optimizing the individuals in the initial population; s3, constructing a fitness evaluation function, and selecting individuals in the optimized initial population; s4, constructing a cross mechanism, and crossing the individuals in the new population by using a tabu table search algorithm-based cross operation; s5, carrying out mutation operation on individuals in the new population by using the mutation operation based on the simulated annealing algorithm; s6, judging whether the iteration step length is reached, if not, repeating the steps S3-S5; and if so, outputting the global optimal solution.

Description

Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation
Technical Field
The invention relates to the technical field of moving edges, in particular to a hybrid genetic algorithm-based calculation unloading method in moving edge calculation.
Background
With the development of the internet of things (IoT), mobile User Equipment (UE) such as smart phones and notebook computers has raised a new wave. The traditional application is difficult to meet the increasing demands of users based on the internet of things, such as service quality. Recently, many novel applications have emerged and are soon favored by users, such as real-time online gaming, virtual reality, and the like.
Although the processing power of today's mobile devices is getting more and more powerful, mobile devices often have limited battery capacity and cannot handle huge applications in a short time, becoming a bottleneck for the future development of mobile applications. Strict latency constraints have been an obstacle to running complex applications on mobile devices. Mobile Cloud Computing (MCC) has been seen in the past as a promising approach to reduce the burden of computing tasks, as rich computing resources can significantly reduce application processing latency. Although the data processing speed is fast, the network bandwidth is limited. As data continues to increase, data transmission speed becomes a bottleneck in improving cloud computing capabilities. To address this key challenge, users may offload tasks to a Mobile Edge Computing (MEC) server to improve performance. Therefore, under the circumstance of cloud server, edge server and user local three-party collaborative computing unloading, the decision making of unloading becomes the next hot point problem.
Disclosure of Invention
The invention aims to provide a computing unloading method based on a hybrid genetic algorithm in mobile edge computing, which aims to minimize the time delay for completing the aggregation of subtasks with priority constraint at a user side under the cooperative computing scene of a cloud server, an edge server and a user local three party and unloads the subtask set with priority dependency at the user side to different servers. And solved using a hybrid genetic algorithm. Compared with the traditional genetic algorithm, the method can obtain better optimization effect.
In order to achieve the purpose, the invention adopts the following technical scheme:
a hybrid genetic algorithm-based computation offloading method in mobile edge computation comprises the following steps:
s1, establishing a system model to obtain the calculation time delay of a subtask set in each processor and the transmission time delay between the processors, and determining each task layer value in the subtask set according to the constraint relation of the subtask set; the system model consists of a user, a mobile cloud server and a plurality of edge servers, and the mobile cloud server carries out a centralized decision scheduling scheme; one server can only process one task at the same time, and when the task set of the user terminal is too much, the BS to which the user belongs can communicate with other BSs in the resource pool to carry out collaborative calculation unloading so as to meet the user requirement;
s2, initializing a population according to the determined task layer value and a random strategy to obtain initial population individuals of the subtask set, performing symbol coding according to the mapping relation between tasks in the initial population individuals and a processor to obtain a task scheduling sequence, and optimizing the individuals in the initial population;
s3, constructing a fitness evaluation function, and selecting individuals in the optimized initial population according to the fitness evaluation function to obtain a new population;
s4, constructing a cross mechanism, and crossing the individuals in the new population by using a tabu table search algorithm-based cross operation;
s5, carrying out mutation operation on individuals in the new population by using the mutation operation based on the simulated annealing algorithm;
s6, judging whether the iteration step length is reached, if not, repeating the steps S3-S5; and if so, outputting the global optimal solution.
Further, in the step S1, determining task layer values in the subtask set according to the constraint relationship of the subtask set specifically includes:
the constraint relationship of the subtask set is expressed by using a directed acyclic graph model, and is represented as:
G=<V,E>
where V denotes a subtask set, and V ═ ViI is more than or equal to 1 and less than or equal to N }; e is a directed edge set among the subtasks, and represents a priority constraint relation among the subtasks; v. ofiRepresents each subtask, vi={di,gi};diIndicating a cpu cycle required for completing the task; giRepresenting a task input data size;
the task layer values in the subtask set are expressed as:
Figure BDA0002711194220000021
wherein pre (v)i) Representing each subtask viThe set of relay nodes.
Further, the step S1 obtains the computation time delay of the subtask set in each processor, specifically:
the computation delay of the ith subtask on the local server can be expressed as:
Figure BDA0002711194220000031
the computation delay of the ith subtask on the MEC server can be expressed as:
Figure BDA0002711194220000032
the computation delay of the ith subtask on the MCC server can be expressed as:
Figure BDA0002711194220000033
wherein d isiRepresenting the size of the task; f. ofL、fE、fCRespectively representing the computing power of a user local server, an MEC server and an MCC server, namely the number of CPU cycles per second;
the computation delay of the ith subtask on the server is expressed as:
Figure BDA0002711194220000034
wherein α, β, γ represent variables 0 to 1 and α + β + γ is 1.
Further, the obtaining of the transmission delay between the processors in step S1 specifically includes:
the upload rate of the user to the affiliated BS to offload tasks is expressed as:
Figure BDA0002711194220000035
wherein, P0Representing a fixed transmit power of the user terminal; h is0Representing the channel gain between the user and the BS; sigma2Represents the power of additive white gaussian noise; w represents the channel bandwidth;
the downlink transmission rate of the BS to the ue is represented as:
Figure BDA0002711194220000036
wherein, PERepresents the fixed transmit power of the BS;
the transmission delay between the processors is expressed as:
Figure BDA0002711194220000037
wherein, cjiIndicating the propagation delay between processors, i.e. the preceding task vjTo the successor task viThe transmission delay of (2).
Further, the symbol encoding in step S2 specifically includes:
A1. initializing gene values, each representing the processor serial number to which the task is assigned:
ui=pi+i×M (9)
wherein p isiIndicating the processor sequence number initially allocated by the task i; i represents a task number; m represents the total number of processors;
A2. randomly exchanging gene values, and randomly selecting two gene values to exchange for the gene values assigned to the same processor task
Figure BDA0002711194220000041
Secondary swap, where k is the total number of tasks assigned to the processor.
A3. Sorting the tasks from small to large according to the layer values of the tasks; the tasks with the same layer value are sorted from big to small according to the individual gene value; obtaining a subtask set integral scheduling column;
A4. from the individual gene values, the processor to which each task is assigned is determined:
b=mod(ui/M) (10)
wherein b represents a task viThe assigned processor sequence number;
A5. and B, obtaining a scheduling sequence on each processor according to the scheduling sequence of the subtask set obtained in the step A3 and the mapping relation between the subtasks and the processors obtained in the step A2.
Further, in the step S2, optimizing the individuals in the initial population specifically includes:
B1. calculating the time delay of each processor to obtain the processor p with longest time delaylAnd shortest delay processor ps
B2. At processor plSearching, judging whether a certain task has no priority restriction relation with other tasks on the processor, if so, distributing the task to the processor psThe above step (1); if not, then at plRandomly selects a task to forward to ps
B3. Comparing the total time delay of the individuals before and after modification, and if the time delay is shortened, reserving the distribution scheme; otherwise, maintaining the original distribution scheme;
B4. repeating steps B2-B3 until the optimized individuals are output;
further, in step S3, a fitness evaluation function is constructed, and is expressed as:
Figure BDA0002711194220000042
wherein, TtotalThe total latency of the set of subtasks is expressed as:
Ttotal=max{si+ti} (12)
wherein, tiRepresenting the execution delay of the task i; siRepresenting a task viIs expressed as:
Figure BDA0002711194220000051
wherein the content of the first and second substances,
Figure BDA0002711194220000052
representing a start execution time under resource constraints;
Figure BDA0002711194220000053
representing a start execution time under a dependency constraint;
the start execution time under the resource constraint is expressed as:
Figure BDA0002711194220000054
the constraint-dependent start execution time is expressed as:
Figure BDA0002711194220000055
wherein, the task k is a task viThe predecessor tasks in the sequence are scheduled at the assigned processor.
Further, in the step S3, the selecting operation is performed on the individuals in the optimized initial population according to the fitness evaluation function, specifically:
C1. calculating the cumulative probability of each individual in the population:
Figure BDA0002711194220000056
wherein, P (U)j) Representing an individual UjProbability of being selected, expressed as:
Figure BDA0002711194220000057
wherein SN represents the total number of individuals in the population;
C2. generating a random number r within [0,1 ];
C3. if r is less than or equal to q (1), the individual U1Selecting the selected plants;
C4. if q (k-1) is more than or equal to r and less than or equal to q (k), and k is more than or equal to 2 and less than or equal to SN, then the individual UkSelecting the selected plants;
C5. and repeating the steps C2-C4 until a new population is generated.
Further, the step S4 is specifically:
s41, initializing, setting the maximum fitness function value of the individuals in the current population as the craving level, setting the element length, the crossing rate and the threshold value of a tabu table, and setting the tabu table to be empty;
s42, selecting two adjacent individuals from the population according to the crossing rate, and carrying out random numbering and crossing to obtain two filial generation individuals;
s43, comparing whether the fitness values of the two filial generation individuals are larger than the craving level, if so, enabling the filial generation to enter the next generation, updating the craving level to be the fitness value of the current individual, and executing the step S45; if not, go to step S44;
s44, searching whether a certain element exists in the taboo table, enabling the difference value between the fitness value and the element value to be smaller than a threshold value, if not, enabling the filial generation to enter the next generation, and executing the step S45; if yes, discarding the filial generation after crossing, and making the parent generation enter the next generation, and executing the step S46;
s45, updating elements in the tabu table, and abandoning the elements which are originally entered into the table when the elements in the table exceed the table length;
s46, returning to the step S42 until the crossing of the individuals in the population is completed.
Further, the step S5 is specifically:
s51, initializing and setting an initial temperature T0End temperature TfA temperature reduction value delta T and an internal circulation frequency L; selecting individual U from the populationjThe fitness value is set as an initial solution, and the initial optimal solution is Ubest=UjInitial iteration temperature of Tk=T0
S52, aiming at the individual UjPerforming mutation operation, wherein the mutated individual is U'jAnd calculating the total delay increment delta f, which is expressed as:
Δf=Ttotal(U'j)-Ttotal(Uj) (18)
s53, judging U'jWhether the total delay of (1) is less than UbestIf so, then Ubest=U'j
S54, judging whether the total time delay increment delta f is smaller than 0, if so, Uj=U'j(ii) a If not, then judging
Figure BDA0002711194220000061
If greater than τ, if so, Uj=U'j(ii) a If not, Uj=Uj
S55, circularly executing steps S52-S54, judging whether the number of internal circulation times is reached, if so, executing step S56; if not, go to step S52;
s56, calculating iteration temperature Tk=TkΔ T, when Tk<TfTime output UbestOtherwise, step S52 is executed.
Compared with the prior art, the method and the system have the advantages that under the scene that the cloud server, the edge server and the user local have computing capacity, the subtask set with the priority dependency relationship at the user side is unloaded to different servers by using a hybrid genetic algorithm, so that the total completion time delay of the subtask set is minimized. Compared with the traditional genetic algorithm, the method has better optimization effect.
Drawings
FIG. 1 is a flowchart of a hybrid genetic algorithm-based computation offloading method in moving edge computation according to an embodiment;
FIG. 2 is a schematic diagram of a system model according to a first embodiment;
FIG. 3 is a diagram of a DAG model for a set of subtasks according to the first embodiment;
fig. 4 is a schematic diagram illustrating the convergence result of the algorithm provided in the first embodiment of the present invention and a conventional genetic algorithm.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
The invention aims to provide a calculation unloading method based on a hybrid genetic algorithm in mobile edge calculation aiming at the defects of the prior art.
Example one
The embodiment provides a cooperative computing offloading method based on a hybrid genetic algorithm in mobile edge computing, as shown in fig. 1, including the steps of:
s11, establishing a system model to obtain the calculation time delay of the subtask set in each processor and the transmission time delay among the processors, and determining each task layer value in the subtask set according to the constraint relation of the subtask set;
s12, initializing a population according to the determined task layer value and a random strategy to obtain initial population individuals of the subtask set, performing symbol coding according to the mapping relation between tasks in the initial population individuals and a processor to obtain a task scheduling sequence, and optimizing the individuals in the initial population;
s13, constructing a fitness evaluation function, and selecting individuals in the optimized initial population according to the fitness evaluation function to obtain a new population;
s14, constructing a cross mechanism, and crossing individuals in the new population by using a tabu table search algorithm-based cross operation;
s15, carrying out mutation operation on individuals in the new population by using the mutation operation based on the simulated annealing algorithm;
s16, judging whether the iteration step length is reached, if not, repeating the steps S13-S15; and if so, outputting the global optimal solution.
The embodiment is suitable for a mobile edge computing scene, and a system model diagram is shown in fig. 2, and is composed of a user, a mobile cloud server and a plurality of edge servers, and the mobile cloud server performs a centralized decision scheduling scheme. The BS and MEC server are close together and therefore the transmission delay is negligible. One server can only process one task at the same time, and when the task set of the user terminal is too much, the BS to which the user belongs can communicate with other BSs in the resource pool to carry out cooperative computing unloading so as to meet the user requirement.
In step S11, a system model is established to obtain the computation delay of the subtask set in each processor and the transmission delay between processors, and determine each task level in the subtask set according to the constraint relationship of the subtask set.
The priority constraint relationship between user terminal task sets is represented using a Directed Acyclic Graph (DAG) model, i.e., G ═<V,E>. Where V is the subtask set, and V ═ ViI is more than or equal to 1 and less than or equal to N }. E is a set of directed edges between subtasks, representing a preferential constraint relationship between subtasks, EijE denotes at subtask viCan execute the task v after the executionj. Each subtask vi={di,giIn which d isiCpu cycle, g, required to complete a taskiThe data size is input for the task.
Subtasks without constraint of successors are called ingress nodes, and subtasks without successors become egress nodes. If a plurality of entry nodes exist at the same time, adding a new entry node as a relay node of the plurality of entry nodes, wherein the calculation time delay of the new entry node is 0, and the communication time delay with other time nodes is 0. And similarly, if a plurality of exit nodes exist, adding a new exit node.
For the known DAG model, subtask viIs pre (v)i) Set of successor nodes is suc (v)i) The layer value to which each task in the subset belongs may be determined by:
Figure BDA0002711194220000081
P={pii is more than or equal to 1 and less than or equal to M is a processor set in the model, wherein p1For the user's local processor, p2MEC server, p, under the base station where the user is locatedMThe MCCs are servers, and the rest are other MEC servers in the same resource pool with the BS to which the user belongs.
The processing delay of the ith subtask on the local server can be expressed as:
Figure BDA0002711194220000082
the processing delay of the ith sub-task on the edge server can be expressed as:
Figure BDA0002711194220000091
the processing delay of the ith sub-task on the edge server can be expressed as:
Figure BDA0002711194220000092
wherein d isiFor the task size, fL,fE,fCRespectively, the computing power of the user local server, the MEC server and the MCC server, namely the number of CPU cycles per second can be provided.
The processing delay of the ith sub-task on the server can be expressed as:
Figure BDA0002711194220000093
wherein α, β, γ are variables from 0 to 1 and α + β + γ is 1.
In the task transmission process, if the successor node and the successor node are distributed on the same processor, the transmission delay is 0. Considering the quasi-static channel model, the uploading rate of the user to the BS to unload tasks is:
Figure BDA0002711194220000094
wherein P is0Represents the fixed transmit power, h, of the user terminal0Representing the channel gain, σ, between the user and the BS2Represents the power of additive white gaussian noise and w represents the channel bandwidth.
The downlink transmission rate of the BS to the user side is as follows:
Figure BDA0002711194220000095
wherein P isERepresenting the fixed transmit power of the BS.
Then the successor task vjTo the successor task viThe transmission delay is:
Figure BDA0002711194220000096
the above formula includes ten cases, the arrow points to the generationThe table unloads the platform direction. For example: c. Ci,α→βThe former task j is processed at the local server, and the latter task i is processed at the MEC server of the BS. The following formula lists the specific calculation formulas for ten cases:
Figure BDA0002711194220000101
wherein, piEIs the transmission rate, pi, between BSs in a resource poolCThe BS to MCC server transmission rate. y isi,α,yj,βAll are variables from 0 to 1, for example: current relay task vjWhen offloaded to MEC server of BS to which user belongsj,β=1。
In step S12, performing a random policy initialization population processing on the determined task layer values to obtain initial population individuals of the subtask set, performing symbol encoding according to a mapping relationship between tasks in the initial population individuals and the processors to obtain a task scheduling sequence, and optimizing the individuals in the initial population.
And performing processor pre-allocation on the tasks with the same hierarchy value according to the subtasks and the hierarchy values obtained in the step S11. If the total number of the tasks of a certain layer is n, making a be mod (n/M), randomly selecting a tasks from the total tasks to distribute different processors, and then distributing the remaining (n-a) tasks to M processors under the scene to obtain an initial distribution scheme of the subtask set. And carrying out symbol coding according to the mapping relation between the tasks and the processors in the initial allocation scheme to obtain an individual initial gene value sequence.
The specific coding scheme is as follows:
A1. initializing gene values, each representing the processor serial number to which the task is assigned:
ui=pi+i×M (26)
wherein p isiAnd the processor serial number initially allocated to the task i, i is the task number, and M is the total number of the processors.
A2. Randomly swapping gene values, randomly selecting two of the gene values assigned to the same processor taskAnd carrying out exchange. To carry out
Figure BDA0002711194220000111
Secondary swap, where k is the total number of tasks assigned to the processor.
After an individual gene value sequence is obtained, a scheduling scheme based on task layer values and gene values is adopted, and the method specifically comprises the following steps:
A3. firstly, sorting the tasks from small to large according to the layer values of the tasks; the tasks with the same layer value are sorted from big to small according to the individual gene value; and obtaining the overall scheduling column of the subtask set.
A4. From the individual gene values, the processor to which each task is assigned is determined:
b=mod(ui/M) (27)
b is task viAssigned processor sequence number.
A5. And finally obtaining the scheduling sequences on the processors according to the scheduling sequences of the subtask set obtained in the step A1 and the mapping relation between the subtasks and the processors obtained in the step A2.
In order to improve the quality of the initial population, each individual obtained by the initial allocation strategy is optimized, and the specific optimization steps are as follows:
B1. calculating the time delay of each processor to obtain the processor p with longest time delaylAnd shortest delay processor ps
B2. At processor plAnd (4) searching whether a certain task has no priority restriction relation with other tasks on the processor. If so, the task is assigned to the processor psAbove, otherwise at plRandomly selects a task to forward to ps
B3. And comparing the total time delay of the individuals before and after modification, if the time delay is shortened, reserving the distribution scheme, and otherwise, maintaining the original distribution scheme.
B4. Repeating the steps B2-B310 times, and outputting the optimized individuals.
The total latency of the set of subtasks can be calculated by:
Ttotal=max{si+ti} (28)
wherein t isiFor the execution delay of task i, siFor task viIs determined by the following equation:
Figure BDA0002711194220000112
Figure BDA0002711194220000113
for start execution time under resource constraints:
Figure BDA0002711194220000121
wherein task k is task viThe predecessor tasks in the sequence are scheduled at the assigned processor.
Figure BDA0002711194220000122
For start execution time under dependent constraints:
Figure BDA0002711194220000123
in step S13, a fitness evaluation function is constructed, and an individual in the optimized initial population is selected according to the fitness evaluation function to obtain a new population
The fitness evaluation function is specifically as follows:
Figure BDA0002711194220000124
namely, the reciprocal of the total time delay of the individual is used as an evaluation standard, and the shorter the completion time delay is, the larger the evaluation function value is, which indicates that the fitness of the individual is higher.
In the selection operation, according to the obtained fitness function value, the individual in the population is selected by roulette decision, and the specific steps are as follows:
C1. calculating the cumulative probability of each individual in the population:
Figure BDA0002711194220000125
wherein P (U)j) Is an individual UjThe probability of being selected is determined by:
Figure BDA0002711194220000126
SN is the total number of individuals in the population;
C2. generating a random number r within [0,1 ];
C3. if r is less than or equal to q (1), the individual U1Selecting the selected plants;
C4. if q (k-1) is more than or equal to r and less than or equal to q (k), and k is more than or equal to 2 and less than or equal to SN, then the individual UkSelecting the selected plants;
C5. and repeating the steps C2-C5 until a new population is generated.
In step S14, a crossover mechanism is constructed to crossover individuals in the new population using a tabu search algorithm based crossover operation.
And constructing a cross mechanism, and crossing the individuals in the population by using a tabu table search algorithm (TS) based cross operation.
The specific steps of the cross operation based on the tabu table search algorithm (TS) are as follows:
s141, initializing, setting the maximum fitness function value of the individuals in the current population as the craving level, setting parameters such as the length, the crossing rate and the threshold of elements of a tabu table, and setting the tabu table to be empty;
s142, selecting two adjacent individuals from the population according to the crossing rate, and carrying out random numbering and crossing to obtain two filial generation individuals;
s143, comparing the fitness value and the craving level of the two filial generation individuals, if the fitness value is larger than the craving level, enabling the filial generation to enter the next generation, updating the craving level to be the fitness value of the current individual, and turning to the step S145;
and S144, if the value is not greater than the eager level, searching whether a certain element exists in the tabu table or not so that the difference value between the fitness value and the element value is smaller than a threshold value. If not, the descendant enters the next generation, and the process goes to step S145; if yes, abandoning the filial generation after crossing, and turning to the step S146 when the parent generation enters the next generation;
s145, updating elements in the tabu table, and abandoning the elements which are originally entered into the table when the elements in the table exceed the table length;
and S146, returning to the step S142 until the individual crossing in the population is completed.
The specific step of random number crossing in step S142 is:
s1421, for individual U performing cross operation1,U2Randomly selecting an initial node and a termination node in an individual gene sequence;
s1422, adding U1The values of the 'genes in the selected gene segments are randomly numbered, and the number values are 1-l';
s1423. similarly, U2The gene values in (1) are randomly numbered;
s1424, the positions of the gene values with the same number in the two gene value segments are exchanged, and the original gene value segment is replaced, so that a new individual is obtained.
In step S15, mutation operations are performed on individuals in the new population using mutation operations based on the simulated annealing algorithm.
Mutation operations are performed on individuals in the population using mutation operations based on simulated annealing algorithms (SA).
The mutation operation based on the SA algorithm is specifically:
s151, initializing and setting initial temperature T0Termination temperature TfTemperature reduction value delta T and internal circulation times L. Selecting individual U from the populationjThe fitness value is set as an initial solution, and the initial optimal solution is Ubest=UjInitial iteration temperature of Tk=T0
S152, aiming at the individual UjPerforming mutation operation, wherein the mutated individual is U'jAnd calculating the total delay increment:
Δf=Ttotal(U'j)-Ttotal(Uj) (35)
s153. if U'jIs less than UbestTotal time delay of Ubest=U'j
S154, if delta f is less than 0, Uj=U'j(ii) a If Δ f > 0, then the determination is made
Figure BDA0002711194220000141
Where τ is U (0,1), and if greater, Uj=U'jOtherwise Uj=Uj
S155, judging whether the number of internal circulation times is reached, if so, executing the step S156, otherwise, executing the step S152;
s156, calculating iteration temperature Tk=TkΔ T, when Tk<TfTime output UbestOtherwise, step S152 is performed.
The mutation operation in step S152 specifically includes the following steps:
in an individual UjRandomly selecting two gene values in the gene value sequence of (1) for exchange to obtain a new gene value sequence which is the individual U'jThe sequence of gene values of (a).
In step S16, it is determined whether an iteration step has been reached, and if not, the genetic operation is repeated, i.e., steps S13 to S15; and if so, outputting the global optimal solution.
As shown in FIG. 3, a simple DAG model diagram is shown. The subtask set in the diagram has 10 subtasks, and the priority constraint relationship between the subtasks is represented by a connecting line with a one-way arrow.
As shown in fig. 4, a comparison graph of the algorithm convergence results of the hybrid genetic algorithm used in the present embodiment and the conventional genetic algorithm is compared. The number of iterations was set to 100 and the simulation results were averaged over 20 experiments in order to avoid randomness of the data. Compared with the traditional genetic algorithm, the hybrid genetic algorithm adopted by the invention can obtain better global optimal solution.
Compared with the prior art, in the embodiment, under the scene that the cloud server, the edge server and the user local have computing power, a hybrid genetic algorithm is used for unloading the subtask set with the priority dependency at the user side to different servers, so that the total completion time delay of the subtask set is minimized. Compared with the traditional genetic algorithm, the method has better optimization effect.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A hybrid genetic algorithm-based computation offloading method in mobile edge computation is characterized by comprising the following steps:
s1, establishing a system model to obtain the calculation time delay of a subtask set in each processor and the transmission time delay between the processors, and determining each task layer value in the subtask set according to the constraint relation of the subtask set; the system model consists of a user, a mobile cloud server and a plurality of edge servers, and the mobile cloud server carries out a centralized decision scheduling scheme; one server can only process one task at the same time, and when the task set of the user terminal is too much, the BS to which the user belongs can communicate with other BSs in the resource pool to carry out collaborative calculation unloading so as to meet the user requirement;
s2, initializing a population according to the determined task layer value and a random strategy to obtain initial population individuals of the subtask set, performing symbol coding according to the mapping relation between tasks in the initial population individuals and a processor to obtain a task scheduling sequence, and optimizing the individuals in the initial population;
s3, constructing a fitness evaluation function, and selecting individuals in the optimized initial population according to the fitness evaluation function to obtain a new population;
s4, constructing a cross mechanism, and crossing the individuals in the new population by using a tabu table search algorithm-based cross operation;
s5, carrying out mutation operation on individuals in the new population by using the mutation operation based on the simulated annealing algorithm;
s6, judging whether the iteration step length is reached, if not, repeating the steps S3-S5; and if so, outputting the global optimal solution.
2. The method for computation offloading based on hybrid genetic algorithm in mobile edge computation according to claim 1, wherein in step S1, the task layer values in the subtask set are determined according to the constraint relationship of the subtask set, and specifically:
the constraint relationship of the subtask set is expressed by using a directed acyclic graph model, and is represented as:
G=<V,E>
where V denotes a subtask set, and V ═ ViI is more than or equal to 1 and less than or equal to N }; e is a directed edge set among the subtasks, and represents a priority constraint relation among the subtasks; v. ofiRepresents each subtask, vi={di,gi};diIndicating a cpu cycle required for completing the task; giRepresenting a task input data size;
the task layer values in the subtask set are expressed as:
Figure FDA0002711194210000021
wherein pre (v)i) Representing each subtask viThe set of relay nodes.
3. The method for computation offloading based on hybrid genetic algorithm in moving edge computation according to claim 2, wherein the step S1 obtains computation latencies of the subtask set in each processor, specifically:
the computation delay of the ith subtask on the local server can be expressed as:
Figure FDA0002711194210000022
the computation delay of the ith subtask on the MEC server can be expressed as:
Figure FDA0002711194210000023
the computation delay of the ith subtask on the MCC server can be expressed as:
Figure FDA0002711194210000024
wherein d isiRepresenting the size of the task; f. ofL、fE、fCRespectively representing the computing power of a user local server, an MEC server and an MCC server, namely the number of CPU cycles per second;
the computation delay of the ith subtask on the server is expressed as:
Figure FDA0002711194210000025
wherein α, β, γ represent variables 0 to 1 and α + β + γ is 1.
4. The method for computation offloading based on hybrid genetic algorithm in moving edge computation according to claim 3, wherein the step S1 obtains transmission delays between processors, specifically:
the upload rate of the user to the affiliated BS to offload tasks is expressed as:
Figure FDA0002711194210000026
wherein, P0Representing a fixed transmit power of the user terminal; h is0Representing the channel gain between the user and the BS; sigma2Represents the power of additive white gaussian noise; w represents the channel bandwidth;
the downlink transmission rate of the BS to the ue is represented as:
Figure FDA0002711194210000031
wherein, PERepresents the fixed transmit power of the BS;
the transmission delay between the processors is expressed as:
Figure FDA0002711194210000032
wherein, cjiIndicating the propagation delay between processors, i.e. the preceding task vjTo the successor task viThe transmission delay of (2).
5. The method for offloading computation based on hybrid genetic algorithm in moving edge computation according to claim 1, wherein the symbolic coding in step S2 specifically comprises:
A1. initializing gene values, each representing the processor serial number to which the task is assigned:
ui=pi+i×M (9)
wherein p isiIndicating the processor sequence number initially allocated by the task i; i represents a task number; m represents the total number of processors;
A2. randomly exchanging gene values, and randomly selecting two gene values to exchange for the gene values assigned to the same processor task
Figure FDA0002711194210000033
A secondary exchange in whichk is the total number of tasks assigned to the processor.
A3. Sorting the tasks from small to large according to the layer values of the tasks; the tasks with the same layer value are sorted from big to small according to the individual gene value; obtaining a subtask set integral scheduling column;
A4. from the individual gene values, the processor to which each task is assigned is determined:
b=mod(ui/M) (10)
wherein b represents a task viThe assigned processor sequence number;
A5. and B, obtaining a scheduling sequence on each processor according to the scheduling sequence of the subtask set obtained in the step A3 and the mapping relation between the subtasks and the processors obtained in the step A2.
6. The method for computing offloading based on hybrid genetic algorithm in mobile edge computing according to claim 5, wherein the step S2 is to optimize the individuals in the initial population, specifically:
B1. calculating the time delay of each processor to obtain the processor p with longest time delaylAnd shortest delay processor ps
B2. At processor plSearching, judging whether a certain task has no priority restriction relation with other tasks on the processor, if so, distributing the task to the processor psThe above step (1); if not, then at plRandomly selects a task to forward to ps
B3. Comparing the total time delay of the individuals before and after modification, and if the time delay is shortened, reserving the distribution scheme; otherwise, maintaining the original distribution scheme;
B4. repeating steps B2-B3 until the optimized individuals are output;
7. the method for offloading computation based on hybrid genetic algorithm in mobile edge computation of claim 1, wherein the fitness evaluation function is constructed in step S3 and is expressed as:
Figure FDA0002711194210000041
wherein, TtotalThe total latency of the set of subtasks is expressed as:
Ttotal=max{si+ti} (12)
wherein, tiRepresenting the execution delay of the task i; siRepresenting a task viIs expressed as:
Figure FDA0002711194210000042
wherein the content of the first and second substances,
Figure FDA0002711194210000043
representing a start execution time under resource constraints;
Figure FDA0002711194210000044
representing a start execution time under a dependency constraint;
the start execution time under the resource constraint is expressed as:
Figure FDA0002711194210000045
the constraint-dependent start execution time is expressed as:
Figure FDA0002711194210000046
wherein, the task k is a task viThe predecessor tasks in the sequence are scheduled at the assigned processor.
8. The method for computing offloading based on hybrid genetic algorithm in mobile edge computing according to claim 7, wherein in step S3, the selecting operation is performed on the individuals in the optimized initial population according to the fitness evaluation function, specifically:
C1. calculating the cumulative probability of each individual in the population:
Figure FDA0002711194210000047
wherein, P (U)j) Representing an individual UjProbability of being selected, expressed as:
Figure FDA0002711194210000051
wherein SN represents the total number of individuals in the population;
C2. generating a random number r within [0,1 ];
C3. if r is less than or equal to q (1), the individual U1Selecting the selected plants;
C4. if q (k-1) is more than or equal to r and less than or equal to q (k), and k is more than or equal to 2 and less than or equal to SN, then the individual UkSelecting the selected plants;
C5. and repeating the steps C2-C4 until a new population is generated.
9. The method for offloading computation based on hybrid genetic algorithm in moving edge computation according to claim 1, wherein the step S4 specifically comprises:
s41, initializing, setting the maximum fitness function value of the individuals in the current population as the craving level, setting the element length, the crossing rate and the threshold value of a tabu table, and setting the tabu table to be empty;
s42, selecting two adjacent individuals from the population according to the crossing rate, and carrying out random numbering and crossing to obtain two filial generation individuals;
s43, comparing whether the fitness values of the two filial generation individuals are larger than the craving level, if so, enabling the filial generation to enter the next generation, updating the craving level to be the fitness value of the current individual, and executing the step S45; if not, go to step S44;
s44, searching whether a certain element exists in the taboo table, enabling the difference value between the fitness value and the element value to be smaller than a threshold value, if not, enabling the filial generation to enter the next generation, and executing the step S45; if yes, discarding the filial generation after crossing, and making the parent generation enter the next generation, and executing the step S46;
s45, updating elements in the tabu table, and abandoning the elements which are originally entered into the table when the elements in the table exceed the table length;
s46, returning to the step S42 until the crossing of the individuals in the population is completed.
10. The method for offloading computation based on hybrid genetic algorithm in moving edge computation according to claim 1, wherein the step S5 specifically comprises:
s51, initializing and setting an initial temperature T0End temperature TfA temperature reduction value delta T and an internal circulation frequency L; selecting individual U from the populationjThe fitness value is set as an initial solution, and the initial optimal solution is Ubest=UjInitial iteration temperature of Tk=T0
S52, aiming at the individual UjPerforming mutation operation, wherein the mutated individual is U'jAnd calculating the total delay increment delta f, which is expressed as:
Δf=Ttotal(U'j)-Ttotal(Uj) (18)
s53, judging U'jWhether the total delay of (1) is less than UbestIf so, then Ubest=U'j
S54, judging whether the total time delay increment delta f is smaller than 0, if so, Uj=U'j(ii) a If not, then judging
Figure FDA0002711194210000061
If greater than τ, if so, Uj=U'j(ii) a If not, Uj=Uj
S55, circularly executing steps S52-S54, judging whether the number of internal circulation times is reached, if so, executing step S56; if not, go to step S52;
s56, calculating iteration temperature Tk=TkΔ T, when Tk<TfTime output UbestOtherwise, step S52 is executed.
CN202011057306.2A 2020-09-30 2020-09-30 Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation Pending CN112181655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011057306.2A CN112181655A (en) 2020-09-30 2020-09-30 Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011057306.2A CN112181655A (en) 2020-09-30 2020-09-30 Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation

Publications (1)

Publication Number Publication Date
CN112181655A true CN112181655A (en) 2021-01-05

Family

ID=73946114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011057306.2A Pending CN112181655A (en) 2020-09-30 2020-09-30 Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation

Country Status (1)

Country Link
CN (1) CN112181655A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112949200A (en) * 2021-03-15 2021-06-11 成都优乐控智能科技有限责任公司 Edge calculation task segmentation method
CN112988345A (en) * 2021-02-09 2021-06-18 江南大学 Dependency task unloading method and device based on mobile edge calculation
CN114143814A (en) * 2021-12-13 2022-03-04 华北电力大学(保定) Multitask unloading method and system based on heterogeneous edge cloud architecture
CN114356564A (en) * 2021-12-29 2022-04-15 四川大学 System for integrating service resources
CN115866626A (en) * 2023-02-23 2023-03-28 安徽思高智能科技有限公司 NSGA-II and simulated annealing based service deployment method under edge environment
CN116155728A (en) * 2023-04-23 2023-05-23 华东交通大学 Computing unloading and resource optimizing method in ultra-dense network
CN116260730A (en) * 2023-05-15 2023-06-13 武汉大学 Geographic information service evolution particle swarm optimization method in multi-edge computing node

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method
CN109358953A (en) * 2018-09-20 2019-02-19 中南大学 A kind of multitask application discharging method in thin cloud
CN109561148A (en) * 2018-11-30 2019-04-02 湘潭大学 Distributed task dispatching method in edge calculations network based on directed acyclic graph
CN110851277A (en) * 2019-11-08 2020-02-28 中国石油大学(华东) Task scheduling strategy based on edge cloud cooperation in augmented reality scene
CN111104211A (en) * 2019-12-05 2020-05-05 山东师范大学 Task dependency based computation offload method, system, device and medium
CN111399933A (en) * 2020-02-11 2020-07-10 福建师范大学 DNN task unloading method and terminal in edge-cloud hybrid computing environment
CN111585816A (en) * 2020-05-11 2020-08-25 重庆邮电大学 Task unloading decision method based on adaptive genetic algorithm

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016165392A1 (en) * 2015-04-17 2016-10-20 华南理工大学 Genetic algorithm-based cloud computing resource scheduling method
CN109358953A (en) * 2018-09-20 2019-02-19 中南大学 A kind of multitask application discharging method in thin cloud
CN109561148A (en) * 2018-11-30 2019-04-02 湘潭大学 Distributed task dispatching method in edge calculations network based on directed acyclic graph
CN110851277A (en) * 2019-11-08 2020-02-28 中国石油大学(华东) Task scheduling strategy based on edge cloud cooperation in augmented reality scene
CN111104211A (en) * 2019-12-05 2020-05-05 山东师范大学 Task dependency based computation offload method, system, device and medium
CN111399933A (en) * 2020-02-11 2020-07-10 福建师范大学 DNN task unloading method and terminal in edge-cloud hybrid computing environment
CN111585816A (en) * 2020-05-11 2020-08-25 重庆邮电大学 Task unloading decision method based on adaptive genetic algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
凌雪延等: "多核服务器边缘计算系统中任务卸载调度和功率分配的研究", 《南京邮电大学学报(自然科学版)》, 30 April 2020 (2020-04-30) *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988345A (en) * 2021-02-09 2021-06-18 江南大学 Dependency task unloading method and device based on mobile edge calculation
CN112988345B (en) * 2021-02-09 2024-04-02 江南大学 Dependency task unloading method and device based on mobile edge calculation
CN112949200A (en) * 2021-03-15 2021-06-11 成都优乐控智能科技有限责任公司 Edge calculation task segmentation method
CN112949200B (en) * 2021-03-15 2022-10-25 成都优乐控智能科技有限责任公司 Edge calculation task segmentation method
CN114143814A (en) * 2021-12-13 2022-03-04 华北电力大学(保定) Multitask unloading method and system based on heterogeneous edge cloud architecture
CN114143814B (en) * 2021-12-13 2024-01-23 华北电力大学(保定) Multi-task unloading method and system based on heterogeneous edge cloud architecture
CN114356564A (en) * 2021-12-29 2022-04-15 四川大学 System for integrating service resources
CN115866626A (en) * 2023-02-23 2023-03-28 安徽思高智能科技有限公司 NSGA-II and simulated annealing based service deployment method under edge environment
CN115866626B (en) * 2023-02-23 2023-05-12 安徽思高智能科技有限公司 Service deployment method based on NSGA-II and simulated annealing in edge environment
CN116155728A (en) * 2023-04-23 2023-05-23 华东交通大学 Computing unloading and resource optimizing method in ultra-dense network
CN116260730A (en) * 2023-05-15 2023-06-13 武汉大学 Geographic information service evolution particle swarm optimization method in multi-edge computing node
CN116260730B (en) * 2023-05-15 2023-07-21 武汉大学 Geographic information service evolution particle swarm optimization method in multi-edge computing node

Similar Documents

Publication Publication Date Title
CN112181655A (en) Hybrid genetic algorithm-based calculation unloading method in mobile edge calculation
CN113242568B (en) Task unloading and resource allocation method in uncertain network environment
CN108920280B (en) Mobile edge computing task unloading method under single-user scene
CN109561148B (en) Distributed task scheduling method based on directed acyclic graph in edge computing network
CN112512056B (en) Multi-objective optimization calculation unloading method in mobile edge calculation network
CN112380008B (en) Multi-user fine-grained task unloading scheduling method for mobile edge computing application
CN113220356B (en) User computing task unloading method in mobile edge computing
CN113867843B (en) Mobile edge computing task unloading method based on deep reinforcement learning
CN110096362B (en) Multitask unloading method based on edge server cooperation
CN112882815A (en) Multi-user edge calculation optimization scheduling method based on deep reinforcement learning
CN111813506A (en) Resource sensing calculation migration method, device and medium based on particle swarm algorithm
CN112272102B (en) Method and device for unloading and scheduling edge network service
CN113821318A (en) Internet of things cross-domain subtask combined collaborative computing method and system
CN113590279A (en) Task scheduling and resource allocation method for multi-core edge computing server
CN113672295A (en) Collaborative computing unloading method based on genetic algorithm in mobile cloud environment
CN112083967A (en) Unloading method of cloud edge computing task, computer equipment and storage medium
CN115473896A (en) Electric power internet of things unloading strategy and resource configuration optimization method based on DQN algorithm
CN113747507B (en) 5G ultra-dense network-oriented computing resource management method and device
Gao et al. Com-DDPG: A multiagent reinforcement learning-based offloading strategy for mobile edge computing
CN112596910B (en) Cloud computing resource scheduling method in multi-user MEC system
Cheng et al. Task offloading for automatic speech recognition in edge-cloud computing based mobile networks
CN116828534B (en) Intensive network large-scale terminal access and resource allocation method based on reinforcement learning
CN117202264A (en) 5G network slice oriented computing and unloading method in MEC environment
CN116455903A (en) Method for optimizing dependency task unloading in Internet of vehicles by deep reinforcement learning
CN114615705B (en) Single-user resource allocation strategy method based on 5G network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination