Resource Allocation Method in Heterogeneous Cloud-Radio Access Network Based on Improved Genetic Algorithm

By adopting improved genetic algorithms in heterogeneous cloud and fog collaborative networks, the offload decision and resource allocation of terminal devices are optimized, and the complexity of resource allocation in heterogeneous networks is solved, and efficient cloud and fog collaborative computing is achieved.

CN114567933BActive Publication Date: 2025-06-27NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210107186.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-28
Publication Date
2025-06-27
Estimated Expiration
2042-01-28

AI Technical Summary

Technical Problem

In heterogeneous cloud-fog collaborative networks, the prior art is difficult to effectively solve the resource allocation problem, especially in the case of multiple wireless access points, resulting in high computing complexity and large computing delay.

Method used

By collecting the number of computing tasks, calculation amount and maximum delay parameters of the terminal equipment at the fog end, an improved genetic algorithm is used to optimize the offload decision, computing resource allocation and transmission power of the terminal equipment to form a cloud-fog collaborative computing resource allocation scheme in the heterogeneous network.

Benefits of technology

The collaborative resource allocation of fog computing and cloud computing in heterogeneous networks is realized, reducing the amount of computing, reducing system costs, and improving data transmission rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114567933B_ABST
    Figure CN114567933B_ABST
Patent Text Reader

Abstract

The present invention discloses a resource allocation method in a heterogeneous cloud and fog collaborative network based on an improved genetic algorithm, including: collecting the number of computing tasks to be completed by terminal devices; based on the constructed heterogeneous network computing migration problem model, obtaining the optimal computing resources allocated to the terminal devices for completing the computing tasks, the optimal uplink transmission power required for the terminal devices to migrate the computing tasks, and the task offloading strategy of the optimal terminal devices. The present invention collects three parameters, namely, the number of computing tasks to be completed by terminal devices, the amount of computing required to complete the computing tasks, and the maximum delay acceptable for completing the tasks, at the fog end, and realizes the joint optimization of the offloading decision, allocated computing resources, and transmission power of the terminal devices through the improved genetic algorithm, obtaining a resource allocation scheme based on cloud and fog collaborative computing in a heterogeneous network, solving the resource allocation problem of coexistence and collaboration of fog computing and cloud computing in a heterogeneous network, and reducing the amount of computation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a resource allocation method in a heterogeneous cloud and fog collaborative network based on an improved genetic algorithm, and belongs to the technical field of resource allocation. Background Art

[0002] The concept of the Internet of Things is based on the concept of the Internet, extending its user side to any object-to-object connection for information exchange and communication. The Internet of Things is a key factor in realizing an intelligent society. To avoid the consumption of huge computing resources by Internet of Things devices, these devices can migrate their computing tasks to the cloud, which can relieve the computing pressure on the devices. However, cloud computing may incur inevitable latency and transmission energy consumption. Therefore, as an extension of cloud computing, the emergence of fog computing has attracted extensive attention.

[0003] Fog computing is not a powerful server but consists of various less powerful and more dispersed functional computers. It is a semi-virtualized service computing architecture model between cloud computing and personal computing, emphasizing quantity and making every computing node play a role regardless of its weak individual computing ability. Compared with cloud computing, the architecture adopted by fog computing is more distributed and closer to the network edge. Fog computing centralizes data, data processing, and application programs in devices at the network edge, rather than storing almost all of them in the cloud as in cloud computing. The storage and processing of data rely more on local devices rather than servers. Fog computing is a new generation of distributed computing, conforming to the "decentralized" feature of the Internet.

[0004] Fog computing and cloud computing are highly complementary, and the collaborative utilization of their resources is very important and necessary. Only by synergistically using cloud computing and fog computing can the system cost be effectively reduced. In addition, with the wide deployment of wireless local area networks, devices usually need to connect to multiple different wireless access points (WAPs) in the network. In a heterogeneous network, a device not only needs to decide whether to offload a task but also needs to select a suitable wireless access point to obtain a higher data transmission rate. Therefore, as the considered scenarios become more comprehensive, the resource optimization problem becomes more complex. In a heterogeneous environment, when the number of wireless access points in the system is large, the computational complexity of obtaining the optimal offloading strategy is very high, resulting in a large computational latency. Therefore, reducing the computational amount becomes the key point for the practical application of cloud and fog collaborative computing in a heterogeneous environment. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide a resource allocation method in a heterogeneous cloud-fog collaborative network based on an improved genetic algorithm. The present invention collects three parameters at the fog end: the number of computing tasks that the terminal device needs to complete, the amount of computing required to complete the computing tasks, and the maximum latency that the terminal device can accept for completing the tasks. Through the improved genetic algorithm, the joint optimization of the offloading decision, the computing resources allocated, and the transmission power of the terminal device is realized, and a resource allocation scheme based on cloud-fog collaborative computing in a heterogeneous network is obtained, which solves the resource allocation problem of coexistence and collaboration of fog computing and cloud computing in a heterogeneous network and reduces the amount of computation. The present invention collects three parameters at the fog end: the number of computing tasks that the terminal device needs to complete, the amount of computing required to complete the computing tasks, and the maximum latency that the terminal device can accept for completing the tasks. Through the improved genetic algorithm, the joint optimization of the offloading decision, the computing resources allocated, and the transmission power of the terminal device is realized, and a resource allocation scheme based on cloud-fog collaborative computing in a heterogeneous network is obtained, which solves the resource allocation problem of coexistence and collaboration of fog computing and cloud computing in a heterogeneous network and reduces the amount of computation.

[0006] To achieve the above object, the present invention provides a resource allocation method in a heterogeneous cloud-fog collaborative network based on an improved genetic algorithm, including: collecting the number of computing tasks that the terminal device needs to complete;

[0007] Based on the constructed heterogeneous network computing migration problem model, obtaining the optimal computing resources f allocated to the terminal device for completing the computing tasks, the optimal uplink transmission power P required for the terminal device to migrate the computing tasks, and the optimal task offloading strategy a of the terminal device n 。

[0008] Preferably, the heterogeneous network computing migration problem model is:

[0009]

[0010] s.t.C1:

[0011] C2:

[0012] C3:

[0013] C4:

[0014] C5:

[0015] C6:

[0016] In the minimum objective function, the base stations BSs include one macro base station MBS and M small base stations SBSs. M = {1, 2,..., M, M + 1} represents the set of base stations, M1 = {1, 2,..., M} represents the set of SBSs, M + 1 represents the MBS, m ∈ [-M - 1, M + 1], and S = {-M - 1, -M,... -1, 0, 1,..., M, M + 1} represents the offloading decision;

[0017] n ∈ N, where N = {1, 2,…, N} represents the set of terminal devices. The task offloading strategy of the terminal device is expressed as A = {a n = i | i ∈ S, n ∈ N}, a n = 0 indicates that the terminal device n chooses to locally process the computing task; a n = m, m ∈ M1 indicates that the terminal device n chooses to offload the computing task to the fog end through the m-th SBSs; a n = -m, m ∈ M1 indicates that the terminal device n chooses to offload the computing task to the cloud through the m-th SBSs; a n = M + 1 indicates that the terminal device n chooses to offload the computing task to the fog end through the MBS; a n = -M - 1 indicates that the terminal device n chooses to offload the computing task to the cloud through the MBS; I(x) is an indicator function that equals 1 when a n = m is true and equals 0 otherwise;

[0018] f represents the computing resources allocated to the terminal device to complete the computing task, and p represents the uplink transmission power required for the terminal device to migrate the computing task;

[0019]

[0020] In C1, represents the computing power of the terminal device n;

[0021] In C2, represents the total transmission power of the terminal device n, is the maximum value of the uplink transmission power;

[0022] In C3, represents the computing resources obtained by the terminal device n after relaying the computing task to the MBS through the SBSs and then migrating it to the cloud;

[0023] In C4, represents the computing resources obtained by the terminal device n after relaying the computing task to the MBS through the SBSs and then migrating it to the fog end, and F represents the maximum computing power of the fog end;

[0024] In C6, each terminal device contains a computing task Dn represents the size of the computing task, C n represents the minimum computing resources required to complete all computing tasks of the terminal device represents the maximum latency that the terminal device can accept to complete all computing tasks

[0025] represents the maximum latency that the terminal device n can accept to migrate the computing task to the fog end for processing represents the maximum latency that the terminal device n can accept to complete the computing task locally represents the maximum latency that the terminal device n can accept to migrate the computing task to the cloud for processing represents the maximum latency that the terminal device n can accept to complete the computing task

[0026] Preferably

[0027]

[0028]

[0029]

[0030]

[0031]

[0032]

[0033] In the formula represents the maintenance power of the terminal device n in the idle state represents the energy consumption of cloud computing, β n represents the impact factor of energy consumption, α n represents the impact factor of monetary cost represents the monetary cost of cloud computing

[0034] represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud. τ represents the transmission time delay of unit data from the MBS to the cloud represents the energy consumption generated when the terminal device n directly migrates the computing task to the cloud through the MBS

[0035] represents the unit cost of the computing resources in the cloud. ρ represents the unit price of the transmission rate of the m-th base station

[0036] It represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud. It represents the energy consumed when scanning for available base stations. It represents the uplink transmission rate of the terminal device n. It represents the total transmission power of the terminal device n;

[0037] It represents the computing resources obtained when the terminal device n directly migrates the computing task to the fog end through the MBS. It represents the total power when the terminal device n transmits the computing task to the MBS. It represents the uplink transmission rate when the terminal device n directly migrates the computing task to the fog end through the MBS;

[0038] n m is the number of orthogonal sub-channels allocated by the m-th base station to the terminal device n. The spectrum is divided into K = {1, 2,..., K} sub-channels, and each sub-channel can be allocated to at most one terminal device for use; ω m It represents the channel bandwidth of the m-th base station;

[0039] It represents the power when the terminal device n transmits the computing task to the m-th base station through the sub-channel k. It represents the channel gain between the terminal device n and the m-th base station. N0 represents the noise power. It represents the interference from other base stations on the same sub-channel to the terminal device n using the m-th base station. n' represents other devices outside the terminal device n, and m' represents other base stations outside the m-th base station. It represents the power when the device n' transmits the task to the m'-th base station on the sub-channel k. It represents the channel gain between the terminal device n' and the m'-th base station;

[0040]

[0041] In the formula, P n 0 It represents the energy consumption when the terminal device n locally completes the computing task W n The energy consumption, and ξ represents the coefficient of the energy consumed per central processing unit cycle of each terminal device.

[0042]

[0043]

[0044]

[0045]

[0046]

[0047] In the formula, represents the total cost of fog computing; represents the energy consumption of fog computing;

[0048] is the monetary cost of offloading the computing task to the fog, represents the unit cost of the computing resources at the fog;

[0049] represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the fog, t b represents the backhaul transmission delay of a single computing task;

[0050] represents the energy consumption generated when the terminal device n directly migrates the computing task to the fog through the MBS, represents the computing resources obtained when the terminal device n directly migrates the computing task to the fog through the MBS, represents the total power when the terminal device n transmits the computing task to the MBS, represents the uplink transmission rate when the terminal device n directly migrates the computing task to the fog through the MBS.

[0051] Preferably,

[0052]

[0053]

[0054] In the formula, represents the delay generated by the cloud in completing the computing task, represents the delay generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud, represents the delay generated when the terminal device n directly migrates the computing task to the cloud through the MBS;

[0055]

[0056] In the formula, is the delay for the terminal device n to complete the local computing task;

[0057]

[0058]

[0059]

[0060] In the formula, represents the time delay for the fog end to complete the computing task, represents the time delay generated when the terminal device n relays the computing task to the MBS through the mth SBSs and then migrates it to the fog end, represents the time delay generated when the terminal device n directly migrates the computing task to the fog end through the MBS.

[0061] Preferably, based on the improved genetic algorithm, the optimal a in the minimum objective function is obtained n , p, and f, including:

[0062] The chromosome OS(n) represents a n , the chromosome RA(n) represents p, and the chromosome FA(n) represents f;

[0063] The first step is to initialize the population g(t), and set the maximum number of iterations T, the population size s, the adaptive crossover probability Pc, the adaptive mutation probability Pm, the standard deviation threshold φ, and the parameter V;

[0064] The second step is to calculate the fitness function value of each individual in the population g(t), and select excellent individuals to inherit to the next generation population according to the fitness function value of each individual;

[0065] The third step is to apply the crossover operator to the population g(t), and exchange part of the chromosomes between the selected paired individuals based on the adaptive crossover probability Pc to generate new individuals;

[0066] The fourth step is to apply the mutation operator to the population g(t), and change part of the gene values of the selected individuals based on the adaptive mutation probability Pm to obtain new individuals, and obtain the next generation population g(t + 1);

[0067] The fifth step is to calculate the individual fitness standard deviation σ of the current population g(t + 1 according to the fitness standard deviation formula, and determine the current number of iterations and the standard deviation to decide whether to perform Gaussian perturbation and increase the mutation probability operation;

[0068] The sixth step is that if the current evolution generation t reaches the maximum number of iterations T, then output the optimal chromosome, so as to obtain a n , p, and f, obtain the optimal solution of the heterogeneous network computing migration problem model, end the operation, otherwise go to the second step, and assign the population g(t + 1) to the population g(t).

[0069] Preferably, the fitness function is:

[0070]

[0071]

[0072] where ε ob represents the objective function of the heterogeneous network computing migration problem model, γ represents the penalty factor of the preset penalty degree, penaly(n,g) is the penalty function, and P n represents the cost for device n to complete the task.

[0073] Preferably, in the third step, excellent individuals are selected to be inherited to the next generation population, including:

[0074] Select excellent individuals from the surviving chromosomes to generate new offspring. The selection probability p of each chromosome n is:

[0075]

[0076] F n = 1 / Fit n (g),

[0077] F m = 1 / Fit m (g),

[0078] where F n is the reciprocal of the fitness function value of the nth chromosome, s is the population size, and m ∈ [1, s].

[0079] Preferably, the third step includes:

[0080] Taking the gene as the minimum crossover unit, randomly obtain the gene crossover position points of the selected chromosome pairs;

[0081] Perform crossover operations at the gene crossover position points according to the following formula:

[0082]

[0083]

[0084]

[0085]

[0086]

[0087]

[0088] where the sequence σ n , n ∈ {1, 2,..., N} represents the gene crossover position points on the chromosome and follows the Bernoulli distribution;

[0089] represents the chromosome OS(n) of the current parental chromosome a, The chromosome RA(n) representing the current parental chromosome a, The chromosome FA(n) representing the current parental chromosome a;

[0090] The chromosome OS(n) representing the current parental chromosome b, The chromosome RA(n) representing the current parental chromosome b, The chromosome FA(n) representing the current parental chromosome b;

[0091] The chromosome OS(n) of the newly generated offspring chromosome a after crossover, The chromosome RA(n) of the newly generated offspring chromosome a after crossover, The chromosome FA(n) of the newly generated offspring chromosome a after crossover;

[0092] The chromosome OS(n) of the newly generated offspring chromosome b after crossover, The chromosome RA(n) of the newly generated offspring chromosome b after crossover, The chromosome FA(n) of the newly generated offspring chromosome b after crossover.

[0093] Preferably, the fourth step includes:

[0094] The OS part adopts integer mutation;

[0095] The RA and FA parts adopt non-uniform mutation, randomly perturbing the gene values of the selected individuals to obtain the selected individuals with new gene values;

[0096] Non-uniform mutation includes:

[0097] Randomly generate a binary mutation mask sequence θ n , n ∈ {1, 2,..., N}, to determine the gene points of the selected individuals that need to mutate;

[0098] If the gene point of OS(n) mutates, the gene value of this gene point will become its opposite number;

[0099] If the gene point of RA(n) or FA(n) mutates, update the gene value of this gene point based on the mutation formula;

[0100] The mutation formula is:

[0101]

[0102] x g(n) represents the gene value of the gene point where mutation occurs, Δ(t,y) represents a random number that conforms to a non-uniform distribution within the range [0,y], and y represents or The value range of y is represents the mutation point x g the maximum value of the value range of represents the mutation point x g (n); random(0,1) represents randomly generating 0 or 1;

[0103] Δ(t,y) is defined as follows:

[0104]

[0105] In the formula, r is a random number that conforms to a uniform probability distribution within the range [0,1]; b is a set system parameter that determines the dependence of the random perturbation on the evolutionary generation t.

[0106] Preferably, in the fifth step, according to the fitness standard deviation formula, calculate the individual fitness standard deviation σ of the current population, and determine the current iteration number and the standard deviation to decide whether to perform Gaussian perturbation and increase the mutation probability operation, including:

[0107] Associate both the adaptive crossover probability Pc and the adaptive mutation probability Pm with the fitness function value of the current population:

[0108]

[0109]

[0110]

[0111] In the formula, P max represents the maximum value of the crossover probability or the mutation probability, and P min represents the minimum value of the crossover or mutation probability;

[0112] f i (g) represents the fitness function value of chromosome i, and f average (g) represents the average fitness function value of the chromosomes in the current population, and f min (g) represents the minimum value among the fitness function values of the chromosomes in the current population;

[0113] Calculate the individual fitness standard deviation σ of the current population according to the fitness standard deviation formula. The fitness standard deviation formula is:

[0114]

[0115] In the formula, s is the number of population individuals;

[0116] Continue with the effective search. If σ ≤ φ, increment the value of count by 1. If σ > φ, then count = 0;

[0117] Before the current iteration reaches [T / 2] times, if count = V, it is determined that the local optimal solution is reached. Perform Gaussian perturbation on the current population and increase the mutation probability Pm so that the current mutation probability Pm becomes 2Pm, forcing the search to jump out of the local optimal solution. [T / 2] is rounded down.

[0118] The beneficial effects achieved by the present invention:

[0119] The present invention proposes a resource allocation method based on an improved genetic algorithm. This method aims at the three-layer architecture scenario model composed of cloud computing, fog computing, and the Internet of Things, and establishes a heterogeneous network computing migration problem model based on cloud-fog collaborative computing. By collecting three parameters at the fog end: the number of computing tasks required to be completed by the terminal device, the amount of computing required to complete the computing task, and the maximum delay that the task can accept, the offloading decision of the terminal device is realized through the improved genetic algorithm (IGA), and the joint optimization of the allocated computing resources and transmission power is achieved, obtaining a resource allocation scheme based on cloud-fog collaborative computing in the heterogeneous network, solving the resource allocation problem of coexistence and collaboration of fog computing and cloud computing in the heterogeneous network, and reducing the amount of computation while maintaining performance;

[0120] The present invention improves the simple hierarchical computing model in the general system and adds a heterogeneous scenario. In a heterogeneous network, the terminal device not only needs to decide whether to offload the task but also needs to select a suitable wireless access point to obtain a higher data transmission rate. Although the considered scenario is more complex and the resource optimization problem is also more complex, it is more in line with the application scenarios in reality;

[0121] The present invention uses the genetic algorithm to solve the system resource allocation problem. Aiming at the problem that the traditional genetic algorithm cannot solve complex constraint functions, a penalty function is introduced to reflect the deviation degree of the solution from the constraint conditions, thereby eliminating infeasible solutions;

[0122] The present invention proposes a method for adaptively improving the parameters of the genetic algorithm to improve the convergence performance of the genetic algorithm, and proposes a mutation probability perturbation method based on the standard deviation of the population fitness, enabling the algorithm to jump out of the local optimal situation and continue the search. BRIEF DESCRIPTION OF THE DRAWINGS

[0123] Figure 1 It is a diagram of the heterogeneous network model of the present invention;

[0124] Figure 2 It is a schematic flowchart of the genetic algorithm in the present invention;

[0125] Figure 3 It is the structural diagram of the chromosome in the present invention;

[0126] Figure 4 It is the structural diagram of the crossover process in the present invention;

[0127] Figure 5 It is the structural diagram of the mutation process in the present invention. Specific embodiments

[0128] The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and cannot be used to limit the protection scope of the present invention.

[0129] Figure 1 It is a three - layer heterogeneous network model diagram established for the present invention by cloud computing, fog computing and the Internet of Things. Internet of Things devices migrate computing tasks to the fog end or the cloud end through the heterogeneous network, specifically including:

[0130] First, according to the characteristics of the Internet of Things, a three - layer architecture composed of cloud computing, fog computing and the Internet of Things is considered. Internet of Things devices migrate computing tasks to the fog or the cloud through the heterogeneous network. Under this structure, a heterogeneous network computing migration problem model based on cloud - fog collaborative computing is established. In the heterogeneous network, terminal devices not only need to decide whether to offload tasks, but also need to select appropriate wireless access points to obtain a higher data transmission rate.

[0131] Second, a genetic algorithm is used to solve the cloud - fog collaborative resource allocation problem in a heterogeneous environment. A penalty function is introduced to reflect the deviation degree of the solution from the constraint conditions to eliminate infeasible solutions for the problem that the traditional genetic algorithm cannot solve complex constraint functions.

[0132] Third, aiming at the disadvantages of improving the convergence speed of the genetic algorithm and the premature convergence of the genetic algorithm, improvements are made to the defect that the genetic algorithm falls into local optimum.

[0133] Suppose there are a total of N terminal devices in the system, denoted as the terminal device set N = {1, 2, …, N}. Each terminal device n in the system contains a computing task D n denotes the size of the computing task (unit: KB), and C n denotes the computing resources required for terminal device n to complete the computing task, denotes the maximum delay that terminal device n can accept to complete the computing task.

[0134] In the present invention, the base stations (BSs) in the heterogeneous network include one macro base station MBS and M small base stations SBSs, and the macro base station MBS serves as the fog node. Among them, the service areas of the SBSs are covered by the service area of the macro base station. Let M = {1, 2,..., M, M + 1} represent the set of base stations, M1 = {1, 2,..., M} represent the set of SBSs, and M + 1 represent the MBS.

[0135] Each task can be chosen to be processed locally or offloaded to the fog node / cloud for completion. The SBSs are communicatively connected to the MBS to relay the computing tasks of the SBSs to the MBS. The terminal device can either directly offload the computing task to the MBS or offload the computing task to the SBSs and then relay it to the MBS through the SBSs. The MBS and the SBSs operate on different frequency bands.

[0136] In addition, the spectrum is divided into K sub-channels, denoted as K = {1, 2,..., K}. Each sub-channel can be allocated to at most one terminal device for use, and the channel bandwidth of the m-th base station is ω m .

[0137] Denote the offloading decision as S = {-M - 1, -M,... -1, 0, 1,..., M, M + 1}, and the task offloading strategy of the terminal device as A = {a n = i|i ∈ S, n ∈ N}; a n = 0 indicates that the terminal device n chooses to process the computing task locally, a n = m, m ∈ M1 indicates that the terminal device n chooses to offload the computing task to the fog node through the m-th SBSs, a n = -m, m ∈ M1 indicates that the terminal device n chooses to offload the computing task to the cloud through the m-th SBSs, a n = M + 1 indicates that the terminal device n chooses to offload the computing task to the fog node through the MBS, a n = -M - 1 indicates that the terminal device n chooses to offload the computing task to the cloud through the MBS.

[0138] Calculate the system cost of local computing and offloading the computing task to the fog node / cloud:

[0139] For local computing, since there is no computing migration problem, the latency n and energy consumption P of the terminal device n to complete the computing task W n 0 are only generated when the terminal device computes its own task:

[0140]

[0141]

[0142] Among them, represents the computing power of the terminal device n, C n represents the minimum computing resources required to complete all computing tasks of the end-user, and ξ represents the coefficient of the energy consumed per central processing unit cycle of each terminal device.

[0143] For fog computing and cloud computing, in addition to considering the delay and energy consumption when completing computing tasks, it is also necessary to consider the delay and energy consumption generated when the terminal device migrates the computing task. When the terminal device n offloads its own computing task to the fog end or the cloud end, the computing task needs to be transmitted to the fog end or the cloud end through the m-th base station, where m ∈ M, M = {1, 2,..., M, M + 1}.

[0144] The uplink transmission rate of the terminal device n is

[0145]

[0146] Among them, ω m represents the channel bandwidth of the m-th base station; N0 refers to the noise power, represents the channel gain between the terminal device n and the m-th base station, represents the power for the terminal device n to transmit the computing task to the m-th base station through the sub-channel k, represents the interference from other base stations on the same sub-channel to the terminal device n using the m-th base station, n' represents other devices outside the terminal device n, and m' represents other base stations outside the m-th base station, represents the power for the device n' to transmit the task to the m'-th base station on the sub-channel k, represents the channel gain between the terminal device n' and the m'-th base station; I(x) is an indicator function that is equal to 1 when x is true and equal to 0 otherwise; n m is the number of orthogonal sub-channels allocated by the m-th base station to the terminal device n. In addition, since the amount of data of the calculation result is small, the time for receiving the calculation task result is ignored.

[0147] On this basis, the delay and energy consumption of fog-end computing are given:

[0148]

[0149]

[0150] Among them: represents the delay generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the fog end, represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the fog end, represents the energy consumed when scanning for available base stations represents the maintenance power of the terminal device n in the idle state. represents the total transmission power of the terminal device n represents the computing resources obtained by the terminal device n relaying the computing task to the MBS through the m-th SBSs and then migrating it to the fog end, t b represents the backhaul transmission delay of a single computing task. represents the delay generated when the terminal device n directly migrates the computing task to the fog end through the MBS represents the energy consumption generated when the terminal device n directly migrates the computing task to the fog end through the MBS; represents the computing resources obtained by the terminal device n directly migrating the computing task to the fog end through the MBS represents the uplink transmission rate when the terminal device n directly migrates the computing task to the fog end through the MBS; represents the total power when the terminal device n transmits the computing task to the MBS;

[0151] Calculate the monetary cost of offloading the computing task to the fog end:

[0152]

[0153] Among them, represents the unit cost of fog computing resources; ρ represents the unit price of the transmission rate of the m-th base station.

[0154] According to Equations 3, 4, and 5, the total cost of fog end computing is:

[0155]

[0156] Among them, β n is the impact factor of energy consumption, and α n is the impact factor of monetary cost.

[0157] For cloud computing, the terminal device needs to offload its computing task to the cloud. Assume that the cloud always has sufficient computing resources, so it can well meet the computing requirements of the cloud processing terminal device. At this time, the delay and energy consumption of cloud computing are as follows:

[0158]

[0159]

[0160] Among them, represents the delay generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud It represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m - th SBSs and then migrates it to the cloud. Here, τ represents the transmission time delay of unit data from the MBS to the cloud. It represents the computing resources obtained when the terminal device n relays the computing task to the MBS through the m - th SBSs and then migrates it to the cloud. It represents the time delay generated when the terminal device n directly migrates the computing task to the cloud through the MBS. It represents the energy consumption generated when the terminal device n directly migrates the computing task to the cloud through the MBS.

[0161] Similarly, the monetary cost of cloud computing needs to be considered in offloading computing as shown in Equation (9).

[0162]

[0163] In the formula, represents the unit cost of cloud computing resources, and ρ represents the unit price of the transmission rate of the m - th base station.

[0164] Similarly, the total cost of cloud computing is:

[0165]

[0166] The heterogeneous network computing migration problem model is:

[0167]

[0168] s.t.C1:

[0169] C2:

[0170] C3:

[0171] C4:

[0172] C5:

[0173] C6:

[0174] Among them, f represents the computing resources allocated to the terminal device to complete the computing task, and p represents the transmission power of the uplink required for the terminal device to migrate the computing task.

[0175] Based on the improved genetic algorithm, the optimal a n , p, and f in the minimum objective function are obtained, including:

[0176] Each chromosome contains three parts: OS(n), RA(n), and FA(n), each of which consists of N alleles corresponding to N users respectively;

[0177] The fitness value of the chromosome is calculated according to the fitness function, and the minimum objective function in Equation (11) is used as the fitness function;

[0178] Chromosome OS(n) represents a n , RA(n) represents p, and FA(n) represents f;

[0179] In the first step, initialize the population g(t), and set the maximum number of iterations T, population size s, adaptive crossover probability Pc, adaptive mutation probability Pm, standard deviation threshold φ, and parameter V;

[0180] In the second step, calculate the fitness function value of each individual in the population g(t), and select excellent individuals to inherit to the next generation population according to the fitness function value of each individual;

[0181] In the third step, apply the crossover operator to the population g(t), and exchange part of the chromosomes between the selected paired individuals based on the adaptive crossover probability Pc to generate new individuals;

[0182] In the fourth step, apply the mutation operator to the population g(t), and change part of the gene values of the selected individuals based on the adaptive mutation probability Pm to obtain new individuals; After the population g(t) undergoes selection, crossover, and mutation operations, the next generation population g(t + 1) is obtained. Calculate its fitness value and sort according to the fitness value to prepare for the next genetic operation.

[0183] In the fifth step, calculate the individual fitness standard deviation σ of the current population g(t + 1) according to the fitness standard deviation formula, and determine the current iteration number and standard deviation to decide whether to perform Gaussian perturbation and increase the mutation probability operation;

[0184] In the sixth step: If the current generation number t reaches the maximum number of iterations T, output the optimal solution; otherwise, go back to the second step.

[0185] Figure 2 As shown in the schematic diagram of the basic genetic algorithm process, the genetic algorithm (GA) uses the viewpoints of biological genetics, combines the ideas of survival of the fittest and random information exchange, and realizes the evolution of the population through mechanisms such as selection, crossover, and mutation. During the optimization process, the genetic algorithm randomly generates multiple starting points in the solution space and starts searching simultaneously. The fitness function guides the search direction, and a new generation of the population is generated by applying a series of genetic operations such as selection, crossover, and mutation to the current population, which can quickly find the global optimal solution in the complex search space.

[0186] Such as Figure 3As shown, a chromosome consists of multiple alleles, and each gene corresponds to a variable. In the present invention, the chromosome is divided into three parts: OS(n), RA(n), and FA(n), each part consisting of N alleles and corresponding to N terminal devices respectively. These three parts are used to represent the variables a n , p, and f in Equation (11).

[0187] The first part represents the task offloading strategy of the terminal device. For example, when the value of a n is 0, it means that terminal device n selects to compute the task locally; when the value is m, m ∈ M1, it means that terminal device n selects to offload the computing task to the fog node through the m-th SBSs; when the value is -m, m ∈ M1, it means that terminal device n selects to offload the computing task to the cloud through the m-th SBSs; when the value is M + 1, it means that terminal device n selects to offload the computing task to the fog node through the MBS; when the value is -M - 1, it means that terminal device n selects to offload the computing task to the cloud through the MBS.

[0188] The allele values of the second part represent the uplink transmission power of each terminal device;

[0189] The allele values of the third part represent the computing resources allocated to the terminal device to complete the computing task.

[0190] Similar to the law of survival of the fittest in genetics, the genetic algorithm selects some chromosomes and eliminates others in each iteration. The criterion for determining whether a chromosome is selected or eliminated is the fitness value of each chromosome. The fitness value of a chromosome is calculated according to the fitness function. In the present invention, the minimum objective function in Equation (11) is used as the fitness function. Since this optimization problem is a minimum optimization problem, for the chromosomes of the present invention, the smaller the fitness value, the better, indicating that the set of solutions is closer to the optimal solution.

[0191] To generate new solutions and expand the solution space, the genetic algorithm performs selection, crossover, and mutation operations in each iteration. Crossover means exchanging some genes between two chromosomes to form two new chromosomes, and mutation means changing some genes of a chromosome. The present invention introduces a penalty function in the prior art to punish infeasible solutions to meet the constraint conditions in Equation (11). Using the constraint function in the optimization problem as the penalty function to amplify the fitness value of the infeasible solution can ensure that the infeasible solution will definitely be eliminated in the iteration process.

[0192] Based on the improved genetic algorithm, obtaining the optimal a n , p, and f in the minimum objective function, including:

[0193] Chromosome OS(n) represents a n , chromosome RA(n) represents p, and chromosome FA(n) represents f;

[0194] In the first step, initialize the population g(t), and set the maximum number of iterations T, population size s, adaptive crossover probability Pc, adaptive mutation probability Pm, standard deviation threshold φ, and parameter V.

[0195] In the second step, perform fitness evaluation. Calculate the fitness function values of each individual in the population g(t) based on the fitness function, and select excellent individuals according to the fitness function values of each individual to inherit to the next-generation population.

[0196] After initialization, the fitness value of each chromosome in the current population is obtained according to the fitness function. The purpose is to select better chromosomes to reproduce the next generation as parents. Judging the quality of a chromosome depends on its own fitness value. Since Equation (11) is a minimum optimization problem, for a chromosome, the lower its fitness value, the better. To satisfy the constraint conditions of Equation (11), the idea of the penalty function in the prior art is adopted to solve the constrained optimization problem, and the penalty function penal(yn,g) is introduced to measure the constraint and represent the inequality constraint in Equation (11). Its basic idea is to penalize infeasible solutions, for example, to satisfy Constraint C4, the term should be included in the penalty function penal(y(n,g)), and other constraint conditions are involved in the penalty function in the same way. The fitness function of chromosome g is as follows: to provide a search direction pointing to the feasible region. This term, and other constraint conditions participate in the penalty function in the same way.

[0197] In the third step, based on the adaptive crossover probability Pc, exchange part of the chromosomes between the selected paired individuals to generate new individuals.

[0198] In the fourth step, apply the mutation operator to the population g(t), and change part of the gene values of the selected individuals based on the adaptive mutation probability Pm to obtain new individuals. After the population g(t) undergoes selection, crossover, and mutation operations, the next-generation population g(t + 1) is obtained. Calculate its fitness value and prepare for the next genetic operation.

[0199] In the fifth step, calculate the individual fitness standard deviation σ of the current population g(t + 1) according to the fitness standard deviation formula, and judge the current iteration number and standard deviation to decide whether to perform Gaussian perturbation and increase the mutation probability operation.

[0200] In the sixth step, if the current generation number t reaches the maximum number of iterations T, output the optimal chromosome, thereby obtaining a n , p, and f, and obtain the optimal solution of the heterogeneous network computing migration problem model, end the operation, otherwise go to the second step.

[0201] The fitness function is:

[0202]

[0203]

[0204] In the formula, ε ob represents the objective function of the heterogeneous network computing migration problem model, γ represents the penalty factor of the preset penalty degree, penaly(n,g) is the penalty function, and P n represents the total cost for device n to complete the computing task. That is to say, for an infeasible solution that does not satisfy one or more constraint conditions, its fitness function value will be very large. The genetic algorithm searches in both the feasible domain and the infeasible domain by making individuals with better adaptability reproduce offspring, so as to more easily obtain the global sub-optimal solution.

[0205] Introduce the penalty function penaly(n,g) in the prior art to measure the constraints and represent the inequality constraints in Formula XI. The penalty function is as follows: For example, in order to satisfy the constraint C4, the penalty function penaly(n,g) should include this term, and other constraint conditions participate in the penalty function in the same way.

[0206] Step 3: Select excellent individuals to inherit to the next generation population, including:

[0207] Use the classic roulette method to select excellent individuals from the surviving chromosomes to produce new offspring. The selection probability p of each chromosome n is:

[0208]

[0209] F n = 1 / Fit n (g),

[0210] F m = 1 / Fit m (g),

[0211] In the formula, F n is the reciprocal of the fitness function value of the nth chromosome, s represents the population size, and m ∈ [1, s].

[0212] Step 3 includes:

[0213] Taking the gene as the minimum crossover unit, randomly obtain the gene crossover position points of the selected chromosome pairs;

[0214] Perform crossover operations at the gene crossover position points according to the following formula:

[0215]

[0216]

[0217] In the formula, the sequence σn , where \(n\in\{1,2,\cdots,N\}\) represents the gene crossover position points on the chromosome and follows the Bernoulli distribution;

[0218] represents the chromosome \(OS(n)\) of the current parental chromosome \(a\), represents the chromosome \(RA(n)\) of the current parental chromosome \(a\), represents the chromosome \(FA(n)\) of the current parental chromosome \(a\);

[0219] represents the chromosome \(OS(n)\) of the current parental chromosome \(b\), represents the chromosome \(RA(n)\) of the current parental chromosome \(b\), represents the chromosome \(FA(n)\) of the current parental chromosome \(b\);

[0220] represents the chromosome \(OS(n)\) of the newly generated offspring chromosome \(a\) after crossover, represents the chromosome \(RA(n)\) of the newly generated offspring chromosome \(a\) after crossover, represents the chromosome \(FA(n)\) of the newly generated offspring chromosome \(a\) after crossover;

[0221] represents the chromosome \(OS(n)\) of the newly generated offspring chromosome \(b\) after crossover, represents the chromosome \(RA(n)\) of the newly generated offspring chromosome \(b\) after crossover, represents the chromosome \(FA(n)\) of the newly generated offspring chromosome \(b\) after crossover.

[0222] For example, when \(\sigma_3 = 1\), as Figure 4 shown, the crossover of the parents will occur between \(OS(3)\), \(RA(3)\) and \(FA(3)\). If \(\sigma_3 = 0\), then the crossover between the parents will not occur at the above gene positions.

[0223] The fourth step includes:

[0224] The \(OS\) part uses integer mutation;

[0225] The \(RA\) and \(FA\) parts use non-uniform mutation to randomly perturb the gene values of the selected individuals to obtain the selected individuals with new gene values;

[0226] The non-uniform mutation includes:

[0227] Randomly generate a binary mutation mask sequence \(\theta\) n, for \(n\in\{1,2,\cdots,N\}\), determine the gene points of the selected individuals that need to mutate; if the element of the mutation mask is 1, the gene at the corresponding position of the mask will mutate. If the element of the mutation mask is 0, the gene will not mutate.

[0228] If the gene point of \(OS(n)\) mutates, the gene value at this gene point will become its opposite number;

[0229] If the gene point of \(RA(n)\) or \(FA(n)\) mutates, the gene value at this gene point will be replaced according to Mutation Formula XVI in the offspring;

[0230] The mutation formula is:

[0231]

[0232] x g (n) represents the gene value of the mutated gene point, \(\Delta(t,y)\) represents a random number that conforms to a non-uniform distribution within the range \([0,y]\), and y represents or The mutation point x g (n) ranges from represents the maximum value of the value range of the mutation point x g (n), represents the minimum value of the value range of the mutation point x g (n); random(0,1) represents randomly generating 0 or 1;

[0233] \(\Delta(t,y)\) is defined as follows:

[0234]

[0235] In the formula, r is a random number that conforms to a uniform probability distribution within the range \([0,1]\); T is the maximum number of evolutionary generations, t is the current evolutionary generation, and b is a set system parameter that determines the dependence of the random perturbation on the evolutionary generation t. In the early stage of evolution, t is small, and the variable range of \(\Delta(t,y)\) is large. Non-uniform mutation can perform random search in a large area near the original optimal individual; in the later stage of evolution, the value of t gradually approaches the value of T, and the variable range of \(\Delta(t,y)\) shrinks as t increases, and finally focuses on performing a small search in the area near the original optimal individual. Therefore, as the genetic algorithm runs, non-uniform mutation makes the optimal solution search process more concentrated in a certain most promising key area. Compared with traditional mutation operations, non-uniform mutation can reach the global optimal solution more accurately and quickly.

[0236] For example, when \(\theta2 = 1\), the mutations of the parents will occur on \(OS(2)\), \(RA(2)\) and \(FA(2)\), as Figure 5As shown. If θ2 = 0, then the parent will not mutate genes on OS(2), RA(2) and FA(2).

[0237] The present invention proposes a method for adaptively improving the parameters of a genetic algorithm, which can coordinate the contradiction between the diversity of the population and the convergence of the algorithm, so as to achieve a good algorithm solving effect.

[0238] The main control parameters of the GA algorithm are: the population size s, the crossover probability Pc, and the mutation probability Pm. s has a certain impact on the search results of the algorithm. The larger s is, the better the optimal solution of the global search is. However, as the population size increases, the calculation time and workload of the algorithm will inevitably increase greatly, resulting in inefficient algorithm search. Pc and Pm can adjust the algorithm search without affecting the search efficiency of the algorithm. However, for the standard GA algorithm, Pc and Pm are both fixed values based on experience and do not change. For different function optimization problems, this fixed value approach obviously cannot make the performance of the algorithm reach the best.

[0239] The crossover probability Pc controls the frequency of use of the crossover operation. A larger crossover probability can enhance the ability of the genetic algorithm to open up new search areas, but the possibility of destroying high-performance patterns increases; if the crossover probability is too low, the genetic algorithm search may fall into a sluggish state. Mutation is an auxiliary search operation in the genetic algorithm, and its main purpose is to maintain the diversity of the population. Generally, low-frequency mutation can prevent the possible loss of important genes in the population, and high-frequency mutation will make the genetic algorithm tend to pure random search. Adaptation is proposed to address the insufficient parameter configuration ability in the genetic algorithm. By dynamically adapting the crossover probability and the mutation probability, the contradiction between the diversity of the population and the convergence of the algorithm can be coordinated, so as to achieve a good algorithm solving effect.

[0240] The fifth step includes: dynamically and adaptively improving the adaptive crossover probability Pc and the adaptive mutation probability Pm:

[0241] Within the respective value ranges of Pc and the adaptive mutation probability Pm, the adaptive crossover probability Pc and the adaptive mutation probability Pm are both associated with the fitness function value of the current population g(t):

[0242]

[0243]

[0244]

[0245] In the formula, P max represents the maximum value of the crossover probability or the mutation probability, and P min represents the minimum value of the crossover or mutation probability;

[0246] f i (g) represents the fitness function value of chromosome i, f average (g) represents the average fitness function value of the chromosomes in the current population, f min (g) represents the minimum value among the fitness function values of the chromosomes in the current population;

[0247] Regarding the situation where the algorithm may fall into a local optimum, an operation of Gaussian perturbation based on the standard deviation of the population fitness and increasing the mutation probability is proposed. The reason why the GA algorithm falls into a local optimum is that, essentially, as the number of iterations increases, the difference between population individuals gradually shrinks, and a focusing phenomenon occurs. Here, the concept of the standard deviation of the individual fitness function values of the population is introduced. According to the fitness standard deviation formula, calculate the standard deviation σ of the individual fitness of the current population g(t). The fitness standard deviation formula is:

[0248]

[0249] In the formula, s is the number of population individuals;

[0250] The fitness standard deviation σ is used to describe the aggregation state of the current population. The larger σ is, the greater the difference between population individuals; the smaller σ is, the more serious the population focusing degree. If σ = 0, then the algorithm is very likely to fall into a local optimum at this time. In order to enable the algorithm to jump out of the local optimum solution and continue effective search, if σ ≤ φ, the value of count is increased by 1; if σ > φ, then count = 0;

[0251] Before the current number of iterations reaches [T / 2] times, if count = V, it is determined that the local optimum solution is reached. Perform Gaussian perturbation on the current population and increase the mutation probability Pm to make the current mutation probability Pm become 2Pm, forcing the search to jump out of the local optimum solution. [T / 2] is the floor value.

[0252] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0253] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the function specified in one or more of the procedures Figure 1 one or more of the procedures and / or blocks Figure 1 specified in one or more of the blocks or blocks.

[0254] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the function specified in one or more of the procedures Figure 1 one or more of the procedures and / or blocks Figure 1 specified in one or more of the blocks or blocks.

[0255] The foregoing is only a preferred embodiment of the present invention, and it should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A resource allocation method in a heterogeneous cloud and fog collaborative network based on an improved genetic algorithm, characterized in that Including: Collecting the number of computing tasks required to be completed by the terminal device; Based on the constructed heterogeneous network computing migration problem model, obtain the optimal computing resource f allocated to the terminal device for completing the computing task, the optimal uplink transmission power P required for the terminal device to migrate the computing task, and the optimal task offloading strategy a of the terminal device n ; Among them, the heterogeneous network computing migration problem model is: In the minimum objective function, the base stations BSs include one macro base station MBS and M small base stations SBSs. Denote the set of base stations. Denote the set of SBSs, M + 1 represents MBS, m ∈ [-M - 1, M + 1], S = {-M - 1, -M,... -1, 0, 1,..., M, M + 1} represents the offloading decision. Let \(N = \{1, 2, \ldots, N\}\) denote the set of terminal devices, and the task offloading strategy of the terminal device is expressed as a n \(a = 0\) indicates that the terminal device \(n\) chooses to locally process the computing task; indicates that the terminal device \(n\) chooses to offload the computing task to the fog node through the \(m\)-th SBSs; indicates that the terminal device \(n\) chooses to offload the computing task to the cloud through the \(m\)-th SBSs; \(a\) n \(a = M + 1\) indicates that the terminal device \(n\) chooses to offload the computing task to the fog node through the MBS; \(a\) n \(a = -M - 1\) indicates that the terminal device \(n\) chooses to offload the computing task to the cloud through the MBS; \(I(x)\) is an indicator function that equals 1 when \(a\) n \(a = m\) is true and 0 otherwise; f represents the computing resources allocated to the terminal device to complete the computing tasks, and p represents the transmission power of the uplink required for the terminal device to migrate the computing tasks; Indicates the power for the terminal device n to complete the computing task: Indicates the power of the terminal device n to complete the computing task in the cloud, Indicates the power of the terminal device n to complete the computing task locally, Indicates the power of the terminal device n to complete the computing task at the fog node; In C1, represents the computing power of the terminal device n; In C2, represents the total transmission power of the terminal device n, which is the maximum value of the transmission power for the uplink. In C3, represents the computing resources obtained when the terminal device n relays the computing task to the MBS through the SBSs and then migrates it to the cloud. In C4, represents the computing resources obtained by the terminal device n relaying the computing task to the MBS through SBSs and then migrating it to the fog end, and F represents the maximum computing power of the fog end; In C6, each terminal device contains a computing task D n represents the size of the computing task, C n represents the minimum computing resources required to complete all computing tasks of the terminal device, represents the maximum latency that the terminal device can accept to complete all computing tasks; represents the maximum latency that the terminal device n can accept for migrating the computing task to the fog end for processing, represents the maximum latency that the terminal device n can accept for completing the computing task locally, represents the maximum latency that the terminal device n can accept for migrating the computing task to the cloud end for processing, represents the maximum latency that the terminal device n can accept for completing the computing task; Based on the improved genetic algorithm, obtain the optimal a, p, and f in the minimum objective function, including: n , p, and f, including: Chromosome OS(n) represents a n , chromosome RA(n) represents p, and chromosome FA(n) represents f; In the first step, initialize the population g(t), and set the maximum number of iterations T, the population size s, the adaptive crossover probability Pc, the adaptive mutation probability Pm, the standard deviation threshold φ, and the parameter V; In the second step, calculate the fitness function value of each individual in the population g(t), and select excellent individuals to inherit to the next generation population according to the fitness function value of each individual; In the third step, apply the crossover operator to the population g(t), and exchange part of the chromosomes between the selected paired individuals based on the adaptive crossover probability Pc to generate new individuals; In the fourth step, apply the mutation operator to the population g(t), and change part of the gene values of the selected individuals based on the adaptive mutation probability Pm to obtain new individuals, and obtain the next generation population g(t + 1); In the fifth step, calculate the individual fitness standard deviation σ of the current population g(t + 1) according to the fitness standard deviation formula, and determine the current iteration number and the standard deviation to decide whether to perform Gaussian perturbation and increase the mutation probability operation; Step 6: If the current evolutionary generation t reaches the maximum iteration number T, output the optimal chromosome, thereby obtaining a n , p, and f, obtain the optimal solution of the heterogeneous network computing migration problem model, and end the operation; otherwise, go to Step 2 and assign the population g(t + 1) to the population g(t).

2. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 1, characterized in that In the formula, represents the power of the terminal device n to complete the computing task in the cloud, represents the energy consumption of cloud computing, β n represents the impact factor of energy consumption, α n represents the impact factor of monetary cost, represents the monetary cost of cloud computing; It represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud. τ represents the transmission time delay of unit data from the MBS to the cloud. It represents the energy consumption generated when the terminal device n directly migrates the computing task to the cloud through the MBS; represents the unit cost of computing resources in the cloud, and ρ represents the unit price of the transmission rate of the m-th base station; It represents the energy consumption generated when the terminal device n relays the computing task to the MBS through the mth SBSs and then migrates it to the cloud. It represents the energy consumed when scanning for available base stations. It represents the uplink transmission rate of the terminal device n. It represents the total transmission power of the terminal device n; Denotes the computing resources obtained by directly migrating the computing task of terminal device n to the fog end through the MBS. Denotes the total power when terminal device n transmits the computing task to the MBS. Denotes the uplink transmission rate when terminal device n directly migrates the computing task to the fog end through the MBS. n m is the number of orthogonal sub-channels allocated by the m-th base station to the terminal device n. The spectrum is divided into sub-channels, and each sub-channel can be allocated to at most one terminal device for use; ω m represents the channel bandwidth of the m-th base station; Denote the power for the terminal device n to transmit the computing task to the m-th base station via the sub-channel k. Denote the channel gain between the terminal device n and the m-th base station, and N0 denotes the noise power. Denote the interference from other base stations on the same sub-channel to the terminal device n using the m-th base station. Here, n’ represents other devices outside device n, and m’ represents other base stations outside base station m. Denote the power for device n to transmit the task to the m-th base station on the sub-channel k. Denote the channel gain between the terminal device n’ and the m’-th base station. In the formula, represents the power consumed by the terminal device n to complete the computing task locally, and ξ represents the coefficient of the energy consumed by the central processing unit cycle of each terminal device; wherein, represents the power of the terminal device n to complete the computing task at the fog end; represents the energy consumption of fog end computing; is the monetary cost for offloading computing tasks to the fog node, represents the unit cost of the computing resources of the fog node; Denote the energy consumption generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the fog end, t b Denote the backhaul transmission delay of a single computing task; It represents the energy consumption generated when the terminal device n directly migrates the computing task to the fog node through the MBS. It represents the computing resources obtained when the terminal device n directly migrates the computing task to the fog node through the MBS. It represents the total power when the terminal device n transmits the computing task to the MBS. It represents the uplink transmission rate when the terminal device n directly migrates the computing task to the fog node through the MBS.

3. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 2, characterized in that wherein, represents the latency generated by the cloud to complete the computing task, represents the latency generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the cloud, represents the latency generated when the terminal device n directly migrates the computing task to the cloud through the MBS; Wherein, is the latency for the terminal device n to complete the local computing task; Wherein, represents the time delay for the fog edge computing to complete the computing task, represents the time delay generated when the terminal device n relays the computing task to the MBS through the m-th SBSs and then migrates it to the fog edge, represents the time delay generated when the terminal device n directly migrates the computing task to the fog edge through the MBS.

4. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 3, wherein The fitness function is: where ε ob represents the objective function of the heterogeneous network computing migration problem model, γ represents the penalty factor of the preset penalty degree, and penal y(n,g) is the penalty function, represents the power for the terminal device n to complete the computing task.

5. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 4, characterized in that, In the third step, selecting excellent individuals to inherit to the next generation population includes: Select excellent individuals from the surviving chromosomes to produce new offspring, and the selection probability p of each chromosome r is as follows: F n = 1 / Fit n (g), F m = 1 / Fit m (g), where F n is the reciprocal of the fitness function value of the n-th chromosome, s is the population size, and m ∈ [1, s].

6. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 5, wherein The third step includes: Taking the gene as the smallest crossover unit, randomly obtaining the gene crossover position points of the selected chromosome pairs; Perform crossover operations at the gene crossover position points according to the following formula: where the sequence σ n , n ∈ {1, 2,..., N} represents the gene crossover position points on the chromosome and follows the Bernoulli distribution; Chromosome OS(n) representing the current parental chromosome a, Chromosome RA(n) representing the current parental chromosome a, Chromosome FA(n) representing the current parental chromosome a; Denote the chromosome OS(n) of the current parental chromosome b, Denote the chromosome RA(n) of the current parental chromosome b, Denote the chromosome FA(n) of the current parental chromosome b; Denote the chromosome OS(n) of the newly generated offspring chromosome a after crossover, Denote the chromosome RA(n) of the newly generated offspring chromosome a after crossover, Denote the chromosome FA(n) of the newly generated offspring chromosome a after crossover; Denote the chromosome OS(n) of the newly generated offspring chromosome b after crossover, Denote the chromosome RA(n) of the newly generated offspring chromosome b after crossover, Denote the chromosome FA(n) of the newly generated offspring chromosome b after crossover.

7. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 6, wherein, The fourth step includes: The OS part adopts integer mutation; The RA and FA parts adopt non-uniform mutation, randomly perturb the gene values of the selected individuals, and obtain the selected individuals with new gene values; Non-uniform mutation includes: Randomly generate a binary mutation mask sequence θ n , n ∈ {1, 2,..., N}, determine the gene points of the selected individuals that need to undergo mutation; If the gene point of OS(n) mutates, the gene value of this gene point will become its opposite number; If the gene point of RA(n) or FA(n) mutates, update the gene value of this gene point based on the mutation formula; The mutation formula is: x g (n) represents the gene value of the gene point where mutation occurs, Δ(t, y) represents a random number that conforms to a non-uniform distribution within the range [0, y], and y represents or The value range of y is represents the mutation point x g the maximum value of the value range of (n), represents the mutation point x g the minimum value of the value range of (n); random(0, 1) represents randomly generating 0 or 1; In the formula, r is a random number that conforms to the uniform probability distribution within the range of [0, 1]; b is a set system parameter that determines the dependence of the random perturbation on the evolutionary generation t.

8. The resource allocation method in the heterogeneous cloud and fog collaborative network based on the improved genetic algorithm according to claim 7, wherein The fifth step includes: Associating the adaptive crossover probability Pc and the adaptive mutation probability Pm with the fitness function value of the current population respectively; where P max represents the maximum value of the crossover probability or mutation probability, and P min represents the minimum value of the crossover or mutation probability; f i (g) represents the fitness function value of chromosome i, f average (g) represents the average fitness function value of the chromosomes in the current population, f min (g) represents the minimum value among the fitness function values of the chromosomes in the current population; Calculate the individual fitness standard deviation σ of the current population according to the fitness standard deviation formula, and the fitness standard deviation formula is: In the formula, s is the number of population individuals; Continue effective search. If σ ≤ φ, the value of count is increased by 1. If σ > φ, then count = 0; Before the current iteration number reaches [T / 2] times, if count = V, it is determined that it has fallen into a local optimal solution, perform Gaussian perturbation on the current population and increase the mutation probability Pm to make the current mutation probability Pm become 2Pm, forcing the search to jump out of the local optimal solution, and [T / 2] is rounded down.

Citation Information

Patent Citations

  • Resource distribution method based on mixed optimization in heterogeneous converging scene

    CN105530707A

  • Cloud computing system for industrial intelligent service

    CN107172166A