# Cost-Effective Optimization for Blockchain-Enabled NOMA-Based MEC Networks

Authors: Jianbo Du; Yan Sun; Aijing Sun; Guangyue Lu; Zhixian Chang; Haotong Cao; Jie Feng
Journal: Security and Communication Networks
 (2021)

---

## Abstract

Blockchain technology has been widely used in many fields. However, the proof of work (PoW) problem in the mining process of mobile devices requires a large amount of computing resources and energy consumption, which brings huge challenges to mobile devices. Mobile edge computing (MEC) can effectively solve the above problems, allowing mobile devices to offload tasks to edge servers to relieve the pressure of limited computing resources on mobile devices. Nonorthogonal multiple access (NOMA) is good at improving spectrum efficiency, so that the system can accommodate more users. In this paper, we propose a new NOMA-based MEC-enabled blockchain framework. Under the conditions of a given task execution deadline, the decision of offloading, local computing resource allocation, user clustering and admission control, and transmit power control is jointly optimized to minimize the total cost of the system. Since the problem is hard to solve, we decouple it into subproblems for low-complexity solutions. First, we propose two heuristic algorithms to obtain the binary offloading decision and user association, and then closed-form solutions of local resource allocation and transmit power control are obtained under the required delay constraints. Simulation results show that our proposed algorithms perform good in cost reduction compared with other baseline algorithms.


---

## Body

## 1. Introduction

In recent years, smart user devices, Internet of Things (IoT) devices, and their running smart applications have been widely popularized, and blockchain technology has also been widely used in various industrial applications [1], such as IoT and healthcare. Blockchain technology uses blockchain data structures to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure the security of data transmission and access. Its essence is a decentralized database, and the core problem is to solve mining puzzles. Blockchain users or miners need to run a mining puzzle, that is, to solve the proof of work (PoW) problem, which is a computing process that requires intensive computing resources. However, mobile devices have limited resources and are usually unable to participate in the mining process. Mobile edge computing (MEC) [2] provides an effective solution to address the challenge. It offloads the computing tasks of mobile devices to the edge of the wireless network [3], thereby improving computing efficiency and reducing delay. Meanwhile, the explosively increasing IoT user equipments make the scare wireless resources further strained, which degrades the task offloading performances of MEC. In recent years, nonorthogonal multiple access (NOMA) [4, 5] has attracted lot of attention in the MEC domain for enhancing the performance of computation offloading. With NOMA, a group of users can offload their own tasks simultaneously using the same channels, and thus each user can enjoy more wireless channels [6] and/or time slots [7], and the system could be able to accommodate more users [8].On the one hand, many literature studies have proposed various methods to solve the offloading problem in the mobile blockchain networks, such as the method based on convex optimization. In [9], the authors offloaded some computationally intensive tasks to an untrusted MEC server and proposed a hash computing ordering (HCO) mechanism to enable the untrusted MEC server to provide a fairer distribution of computing resources for all mobile users. In [10], the authors proposed a blockchain-enabled IoT-edge-cloud computing architecture that benefits both from mobile cloud computing (MCC) and MEC, where MEC servers offer lower latency computing services, while MCC servers provide stronger computation power. In [11], the authors studied the calculation of moving edges for blockchain mining tasks. Based on Stackelberg theory, the pricing and consumption of computing resources are attributed to leader-follower coupling game, and an efficient offloading algorithm for mining tasks is proposed.On the other hand, several studies have investigated the NOMA-based MEC system, where energy consumption minimization for user equipment is always the first concern. In [12], the authors formulated a joint user clustering and transmit power control problem and proposed a matching-coalition approach for problem solving. In [13], the authors applied NOMA to enable massive connectivity to support energy-efficient MEC in IoT networks by joint communication and computation resource allocation optimization. In [14], the authors studied task processing delay minimization issues in a multiuser NOMA-based MEC network by optimizing tasks partition ratios and transmit power control. In [15], the authors studied the energy consumption reduction in a NOMA-based MEC system by jointly optimizing the transmit time and power.From the above works, we find that there is still a lack of research on the optimal strategy for implementing mining task offloading in mobile blockchain. Therefore, this paper considers the joint optimization of data offloading and resource allocation to improve the offloading efficiency in the blockchain network. In addition, user clustering and resource allocation [16, 17] optimization are important factors in NOMA-based MEC system, and users’ energy consumption minimization is the most general goal of the optimization. The above works only considers user clustering, resource allocation, and power control issues, in which all users offload their tasks to the MEC server, without considering the optimization of task offloading decisions. In most IoT scenarios, this is not reasonable, as the local processing power is not used and the capacity of the MEC server is limited; thus, the task processing fails when the user is not received. Moreover, when the number of IoT devices is too huge, then local and MEC server could not afford, and hence, cloud is necessary. Motivated by the above considerations, we consider the joint optimization of offloading decision, user clustering and admission control, and computation resource allocation and transmit power control in a NOMA-based mixed edge and cloud-enabled blockchain network. We intend to minimize the energy consumption in local and MEC processing, minimize the economical pay in cloud processing mode, and maximize mining profits. Most importantly, we ensure all users’ tasks are processed successfully, i.e., no user will fail in task processing. The formulated problem includes binary, integer, and continuous variables, so it is hard to solve.For this purpose, we devote to propose low-complexity algorithm for easy implementation. First of all, we use two heuristic algorithms to solve binary offload decision and user association, respectively, and then obtain the closed-form solutions of local resource allocation. In addition, the closed-form solutions of MEC transmission power control and cloud center power control are solved under the premise of satisfying the delay constraint. Simulation results show that the low-complexity algorithm proposed by us can effectively reduce the system cost compared with other simplified methods.The remainder of this paper is organized as follows. In Section2, the system model is presented and the problem is formulated. Section 3 provides the offloading decision optimization. Admission control and user clustering are presented in Section 4; the local computation resource allocation is developed in Section 5, and Section 6 presents the transmit power control. Section 7 develops the simulation results and discussion. Section 8 concludes the paper.


## 2. System Model

We consider a NOMA-based MEC and cloud-enabled blockchain network, consisting ofM access points (APs), N randomly distributed users, and a remote cloud center. Each AP is equipped with a MEC server by wired link, as shown in Figure 1. In the following, the MEC server m and AP m are used interchangeably. Denote N=1,2,…,N is the set of users and ℳ=1,2,…,M is the set of APs. We assume that the users who offload their tasks to a MEC server m via NOMA [18, 19] form a group because of each user can offload its task to a MEC server. Let G=G1,G2,…,Gm denotes the set of groups, and the maximum number of users in each group that can be served by an AP is K. So, all APs could accommodate at most MK users. In particular, we assume that each group is assigned an orthogonal subchannel with bandwidth B. The same group of users offloads their tasks to the AP over the same subchannel. Lastly, we assume that the MEC servers and the APs have complete channel status information (CSI).Figure 1
System model.Especially, there is a remote cloud center, and users can also offload tasks to the cloud center. The cloud has enough computing resources and wireless bandwidth for users, but when a user chooses to offload the task to it, it charges for the use of bandwidth and computing resources.Each user acts as a miner, running a blockchain application to record transactions performed in the network [20]. Denote Λn=Dn,λn,Tnmax as the task of miner n. Each task is characterized by the input size Dn [21], i.e., the number of bits that must be transferred from the user to the AP, and the workload λn, i.e., the processing density (in CPU cycles per bit). Tnmax is the deadline to complete the task. Then, we have Cn=Dn∗λn, where Cn is the size of processing workload (in CPU cycles). We assume that all APs and miners in the blockchain network supported by NOMA-based MEC have the computing power to provide task execution services. Mining tasks that cannot be calculated locally by the miner can be offloaded to nearby access points. Therefore, each miner can execute tasks locally or offload to the MEC server m (AP m) or cloud center for execution. We use xn, yn, and zn to denote the task of miner n is processed by miner n itself, or by MEC server m, or the cloud center, respectively [3, 22].


### 2.1. Local Processing

When the task is processed locally, denote the local processing capability of usern is fnmax, we have(1)Tnloc=Dnfnlocγn,Enloc=αDnγnfnloc2,where fnloc is the local computation resource allocation, which is constrained by fnmax, and γn depends on the nature of application, e.g., computational complexity of application. α is a coefficient.


### 2.2. MEC Processing

In the area, there areM MEC servers providing services for users. Thus, in the MEC processing model, each user could offload its task to any one of them. Suppose user n offloads its task to MEC server m, the task transmit rate is given by(2)rn,m=vn,mBlog21+pnmecgn,m∑gs<gnvs,mpsmecgs,m+N0,where pnmec is the transmit power of user n when offloading to MEC server and the binary variable vn,m is the access control, where vn,m=1 indicates user n is served by MEC m and vn,m=0 otherwise. Based on rn,m, the transmit delay and the energy consumption of user n are given by(3)Tntra=Dnrn,m,Entra=Dnrn,mpnmec.When the task is processed by the MEC server, the user will wait for the result. The task processing delay and the energy consumption of usern in the process are given by(4)Tnpro=CnFm,Enwait=CnFmpnidle,where pnidle is the power consumption of user n when waiting and Fm is the computation resource allocated by MEC server m, which is a constant in this paper. The delay and energy consumption in MEC processing model are given by(5)Tnmec=vn,mTntra+Tnpro,Enmec=vn,mEntra+Enwait.Users who have tasks offloaded to the MEC server will get extra profit. The profit for completing the mining task is given by(6)ϕn=vn,mζ−ηEnmec,where ζ ($) is mining rewards and η (in $/J) is the unit price of energy consumption.


### 2.3. Cloud Processing

When usern offloads its task to the cloud center, it will be allocated with exclusive bandwidth B1, and processing resource Fncloud. The transmit rate of user n in cloud processing mode is given by(7)rncloud=B1log21+pncloudgncloudN0.The delay in cloud processing mode can be given by(8)Tncloud=Tncloud,tra+Tncloud,pro=Dnrncloud+CnFncloud.The cloud operator will charge users for using communication and computation resources, where the prices areλ ($/bps) and ω ($/(CPU cycles per second)), respectively.Therefore, the cost paid by usern in communication and task processing are given by(9)Payntra=λrncloud,Paynpro=ωFncloud.


### 2.4. Total Delay and Total Cost

Based on the above delays in different modes, the total delay of usern is given by(10)Tn=xnTnloc+ynTnmec+znTncloud.The total cost of usern is defined as(11)Costn=μexnEnloc+ynEnmec+μpayznPayn−ynϕn,where μe (in $/J) and μpay (a dimensionless number) are the weight parameters.


### 2.5. Problem Formulation

In this paper, we intend to minimize the total system cost, i.e., the energy consumption for local and MEC processing, economic payments in cloud processing mode, and additional profits from mining tasks for miners. In particular, minimizing economic payments has a higher priority. We achieve the purpose by jointly optimizing the offloading decisionΠ=xn,yn,zn, the access control and user clustering V=vn,m, the local computation resource allocation floc=fnloc, and the transmit power control in MEC and cloud processing modes, i.e., pmec=pnmec and pcloud=pncloud, respectively. The problem is formulated as(12)P1:minΠ,v,floc,pmec,pcloud∑n∈NCostns.t.C1:Tn≤Tnmax,∀n∈N,C2:0≤fnloc≤fnmax,∀n∈N,C3:0≤pnmec≤pnmax,∀n∈N,C4:0≤pncloud≤pnmax,∀n∈N,C5:xn,yn,zn∈0,1,∀n∈N,C6:xn+yn+zn≤1,∀n∈N,C7:vn,m∈0,1,∀n∈N,∀m∈ℳ,C8:∑n∈Nvn,m≤K,∀m∈ℳ,where (C1) is the task completion deadline; (C2) is the constraint on local computation resource allocation; (C3) and (C4) are the constraints on transmit power control in MEC and cloud processing, respectively; (C5) and (C6) require that each user task can only be processed in one place, i.e., local, or a certain MEC server, or the cloud center; (C7) is the binary constraint on access control, and (C8) requires that the maximum number of users per AP service should not exceed K. Problem P1 contains binary, integer, and continuous variables, which is generally nonconvex and hard to solve. In the following sections, we will propose low-complexity algorithms to solve it.


## 2.1. Local Processing

When the task is processed locally, denote the local processing capability of usern is fnmax, we have(1)Tnloc=Dnfnlocγn,Enloc=αDnγnfnloc2,where fnloc is the local computation resource allocation, which is constrained by fnmax, and γn depends on the nature of application, e.g., computational complexity of application. α is a coefficient.


## 2.2. MEC Processing

In the area, there areM MEC servers providing services for users. Thus, in the MEC processing model, each user could offload its task to any one of them. Suppose user n offloads its task to MEC server m, the task transmit rate is given by(2)rn,m=vn,mBlog21+pnmecgn,m∑gs<gnvs,mpsmecgs,m+N0,where pnmec is the transmit power of user n when offloading to MEC server and the binary variable vn,m is the access control, where vn,m=1 indicates user n is served by MEC m and vn,m=0 otherwise. Based on rn,m, the transmit delay and the energy consumption of user n are given by(3)Tntra=Dnrn,m,Entra=Dnrn,mpnmec.When the task is processed by the MEC server, the user will wait for the result. The task processing delay and the energy consumption of usern in the process are given by(4)Tnpro=CnFm,Enwait=CnFmpnidle,where pnidle is the power consumption of user n when waiting and Fm is the computation resource allocated by MEC server m, which is a constant in this paper. The delay and energy consumption in MEC processing model are given by(5)Tnmec=vn,mTntra+Tnpro,Enmec=vn,mEntra+Enwait.Users who have tasks offloaded to the MEC server will get extra profit. The profit for completing the mining task is given by(6)ϕn=vn,mζ−ηEnmec,where ζ ($) is mining rewards and η (in $/J) is the unit price of energy consumption.


## 2.3. Cloud Processing

When usern offloads its task to the cloud center, it will be allocated with exclusive bandwidth B1, and processing resource Fncloud. The transmit rate of user n in cloud processing mode is given by(7)rncloud=B1log21+pncloudgncloudN0.The delay in cloud processing mode can be given by(8)Tncloud=Tncloud,tra+Tncloud,pro=Dnrncloud+CnFncloud.The cloud operator will charge users for using communication and computation resources, where the prices areλ ($/bps) and ω ($/(CPU cycles per second)), respectively.Therefore, the cost paid by usern in communication and task processing are given by(9)Payntra=λrncloud,Paynpro=ωFncloud.


## 2.4. Total Delay and Total Cost

Based on the above delays in different modes, the total delay of usern is given by(10)Tn=xnTnloc+ynTnmec+znTncloud.The total cost of usern is defined as(11)Costn=μexnEnloc+ynEnmec+μpayznPayn−ynϕn,where μe (in $/J) and μpay (a dimensionless number) are the weight parameters.


## 2.5. Problem Formulation

In this paper, we intend to minimize the total system cost, i.e., the energy consumption for local and MEC processing, economic payments in cloud processing mode, and additional profits from mining tasks for miners. In particular, minimizing economic payments has a higher priority. We achieve the purpose by jointly optimizing the offloading decisionΠ=xn,yn,zn, the access control and user clustering V=vn,m, the local computation resource allocation floc=fnloc, and the transmit power control in MEC and cloud processing modes, i.e., pmec=pnmec and pcloud=pncloud, respectively. The problem is formulated as(12)P1:minΠ,v,floc,pmec,pcloud∑n∈NCostns.t.C1:Tn≤Tnmax,∀n∈N,C2:0≤fnloc≤fnmax,∀n∈N,C3:0≤pnmec≤pnmax,∀n∈N,C4:0≤pncloud≤pnmax,∀n∈N,C5:xn,yn,zn∈0,1,∀n∈N,C6:xn+yn+zn≤1,∀n∈N,C7:vn,m∈0,1,∀n∈N,∀m∈ℳ,C8:∑n∈Nvn,m≤K,∀m∈ℳ,where (C1) is the task completion deadline; (C2) is the constraint on local computation resource allocation; (C3) and (C4) are the constraints on transmit power control in MEC and cloud processing, respectively; (C5) and (C6) require that each user task can only be processed in one place, i.e., local, or a certain MEC server, or the cloud center; (C7) is the binary constraint on access control, and (C8) requires that the maximum number of users per AP service should not exceed K. Problem P1 contains binary, integer, and continuous variables, which is generally nonconvex and hard to solve. In the following sections, we will propose low-complexity algorithms to solve it.


## 3. Offloading Decision Optimization

In this section, we propose a low-complexity algorithm to obtain the offloading decision-makingΠ=xn,yn,zn,n∈N, as shown in Algorithm 1.Algorithm 1: Heuristic offloading decision-making algorithm.
(1)
Initialization: set N0=∅,N1=∅,Ntemp=N, N0=0, N1=0, Nloc=∅, NMEC=∅, Ncloud=∅(2)
forn∈Ndo(3)
ifCn/fnmax≤Tnmaxthen(4)
N0=N0∪n, N0=N0+1, remove n from Ntemp(5)
else(6)
N1=N1∪n, N1=N1+1, remove n from Ntemp(7)
end if(8)
end for(9)
ifN1≤MKthen(10)
NMEC=N1, NMEC=N1, Ngap=MK−N1(11)
forn∈N0do(12)
gn=∑m∈ℳgn,m/M(13)
Gn=gnCn/Dn(14)
end for(15)
Sort theN0 users in ascending order according to Gn(16)
Remove the endNgap users from N0 to NMEC, and we set yn=1,n∈Nmec(17)
Remove the rest users inN0 to Nloc, and we set xn=1,n∈Nloc(18)
else(19)
Among the users inN1, perform Algorithm 2 for access control, where MK users are selected for MEC processing, and put the MK users into NMEC, and set yn=1,n∈Nmec(20)
Remove theN1−MK users to Ncloud, and set zn=1,n∈Ncloud(21)
end if(22)
Output: Π=xn,yn,zn,n∈N.Since the tasks processed on cloud will be charged for fees, so we encourage users as much as possible to process their tasks either locally by themselves or offload their tasks to the MEC servers. Moreover, for the noncloud processing tasks, we encourage as many users to offload their tasks to the MEC servers for energy saving. Our main idea can be briefed as the following steps:(i)
We divide all the users inN into two subsets, local feasible set N0 and local infeasible set N1.(ii)
Next, we judge whetherN1≤MK. If yes, this means the number of local infeasible users is smaller than the capacity that the MEC servers can afford. Therefore, let all the users in N1 offload their tasks to MEC processing and there’s no need to offload tasks to the cloud server. Moreover, in order to save energy for users and thus to decrease the system energy consumption while guaranteeing latency requirement, it is necessary to saturate the number of users of the MEC servers as much as possible. The MEC server with the best channel gain, i.e., gn, will reduce the data transmission delay, the user with a larger workload, i.e., Cn, means that the task is more complex and less suitable for local processing, users with smaller data transmission, i.e., Dn means lower transmission delay. Combining these three factors, we define a new parameter Gn=gnCn/Dn. The larger Gn, the less suitable the task of user n is to be processed locally. Therefore, according to the size of Gn, move MK−N1 users from local feasible set N0 out to MEC processing.(iii)
IfN1>MK, this means some tasks have to be offloaded for cloud processing, and users have to pay some fees for task processing. We should pick out MK users to MEC processing, and the rest N1−MK tasks will be offloaded to the cloud.Performing the above steps, the offloading decision can be obtained. The proposed offloading decision-making algorithm is summarized in Algorithm1.Algorithm 2: Admission control and user clustering.
(1)
Initialization:(2)
SetG1=∅,G2=∅,…,GM=∅, G1=0,G2=0,…,GM=0, Ntotal=0(3)
Gtemp=1,2,…,M(4)
V=0N1,M(5)
forn∈N1do(6)
form∈ℳdo(7)
Γn,m=gn,mFm(8)
Γ=Γn,m(9)
end for(10)
end for(11)
whileNtotal≤MKdo(12)
n∗,m∗=argmaxΓ(13)
ifGm∗<Kthen(14)
vn∗,m∗=1, Gm∗=Gm∗∪n∗, Gm∗=Gm∗+1(15)
Removen∗ from N1(16)
SetΓn∗=Γn∗,m=0,m∈ℳ(17)
Ntotal=Ntotal+1(18)
else(19)
Removem∗ from Gtemp(20)
SetΓm∗=Γn,m∗=0,n∈N1(21)
end if(22)
end while(23)
Output: user admission control and clustering V=vn,m,n∈N1,m∈ℳ; the rest users in N1 which will offload their tasks to the cloud center.


## 4. Admission Control and User Clustering

After offloading decision-making,MK users are picked out, and their tasks will be processed by the M MEC servers. Next, we will allocate the MK users to the M MEC servers.Since we intend to minimize the energy consumption of MEC processing, a new parameterΓn,m=gn,mFm is defined. The MEC server M with the best channel gain, i.e., gn,m, will reduce the data transmission delay, and the server with the most computation resource, i.e., Fm, will reduce the task processing delay. Thus, the larger the Γn,m, the user n is more would like to access MEC server m, the smaller the delay in processing its tasks, and the smaller the power consumption. Based on the above idea, our admission control and user clustering algorithm are detailed in Algorithm 2.After Algorithms1 and 2 are performed, the offloading decision, admission control and user clustering are obtained, i.e., the user set is divided into several subsets, including (i) the local processing set Nloc, where the offloading decision of tasks n is xn=1; (ii) M MEC processing subsets, and in each subset Gm, the offloading decision yn=1, and the admission control vn,m=1, and all users in each subset Gm will offload their tasks to MEC server m sharing the same bandwidth via NOMA; (iii) the cloud processing set Ncloud, where each user in this set will offload their tasks for cloud processing.For the users inNloc, we need to perform local computation resource allocation optimization floc=fnloc; for the users in each Gm and in Ncloud, we need to perform transmit power control optimization, i.e., we need to determine pmec=pnmec and pcloud=pncloud, respectively.


## 5. Local Computation Resource Allocation

For the users inNloc, we need to perform local computation resource allocation for local task processing energy consumption minimization, and we have(13)P2:minfloc∑n∈NEnlocs.t.C1:Tnloc≤Tnmax,∀n∈N,C2:0≤fnloc≤fnmax,∀n∈N.For usern, given the data input size Dn, a coefficient α and computational complexity of application γn, the energy consumption is only affected by the local computing resource allocation. In order to minimize the energy consumption while ensuring the delay requirements, let Tnloc=Tnmax, so that we only need the minimum computing resources that meet the latency requirements, and get fnloc.


## 6. Transmit Power Control

After offloading decision-making, access control and user clustering, and local computation resource allocation are obtained, problemP1 degrades into the transmit power control optimization in MEC processing and cloud processing, respectively. For the users who choose MEC processing, we need to perform transmit power control among the users in a same cluster as follows:(14)P3:minpmec∑n∈NEnmecs.t.C1:Tn≤Tnmax,∀n∈N,C3:0≤pnmec≤pnmax,∀n∈N.For cloud processing users, we have(15)P4:minpcloud∑n∈NPayns.t.C1:Tn≤Tnmax,∀n∈N,C4:0≤pncloud≤pnmax,∀n∈N.In order to enable tractable solutions, we use the following simple method to obtain a closed-form solution.For cloud processing users, it can be known that each user is allocated with the same bandwidth, so the fees is only affected byrncloud. However, under the given channel gain, the uplink transmit rate rncloud is only affected by the transmit power pncloud. The larger the pncloud, the higher the rncloud. Therefore, in order to minimize the total fees while guaranteeing the delay requirement, we take the transmit power that could satisfy Tncloud=Tnmax.For MEC processing users in each cluster, we take the following strategy: (i) For the end user, i.e., userK, we take the transmit power pKmec that could satisfy TKmec=TKmax. (ii) After pKmec is determined, the transmit rate of user K−1, i.e., rK−1,m in (3) is only affected by its transmit power pK−1mec, so we can also take the transmit power that could satisfy TK−1mec=TK−1max. (iii) When pKmec and pK−1mec are determined, pK−2mec can be obtained using the same method, and then pK−3mec…p1mec can be determined one after another following the same way.


## 7. Simulation Results

In this section, we evaluate the system performance of NOMA-based MEC-enabled blockchain network. The simulation parameters are listed in Table1.Table 1
Simulation parameters.
ParameterValueNumber of UEs (N)50Number of APs (M)4Max users number of each AP (K)8Bandwidth of each AP (B)400 HzBandwidth of cloud (B1)10 kHzChannel gain5∼14 randomlyMax transmit power of usern (pnmax)0.1 WInput data size (Dn)1∼20 kbitLocal processing coefficient (α)0.05Processing density (λu)100∼500Local processing capability of usern (fnmax)500 CPU cycles/sWaiting power consumption of usern (pnidle)10−6 WPower of noise (σ2)10−7.4Maximum tolerable latency (Tnmax)0.3 msPrice of radio resources (λ)10−4 $/bpsPrice of computing resources (ω)10−4 $/CPU cycles/sParametersμe and μpay103 $/J, 10−4Unit price of MEC energy consumption (η)0.01 $/JWe compare our proposed algorithm with the following algorithm. (i) Random computing offloading algorithm: users randomly offloaded their tasks to the local or MEC serves or cloud center. In addition, it will use our proposed algorithm for local computing resource allocation, cloud center power control, and MEC power control. (ii) Random power algorithm: the power is generated randomly, and other resource allocation schemes use our proposed algorithm.Figure2 shows how the number of users’ access affects the total cost of the system. As the number of access users in each APs increase, the energy consumption of AP processing tasks also increase, and so does the total cost of the system. The trends of the three curves in Figure 2 are consistent with our analysis. But our algorithm has the lowest cost. Since our algorithm has power optimization processing in both MEC and cloud center, the energy consumption of our algorithm is lower than that of the random power algorithm. Similarly, our algorithm also optimizes random offloading and users access, so with the increase of access point users, the cost of random offloading algorithm is higher than our algorithm.Figure 2
Total cost vs. number of users.In Figure3, we plot the effect of the weight parameter μe on the system cost. As the weight parameter μe regulates the local energy consumption and MEC energy consumption, the local and MEC costs are on the same order of magnitude as the cloud center costs. When the weight parameter μe is 0, only the cost of users in the cloud center is included in the total cost. In the three curves of Figure 3, since the offloading decision and user access in the random offloading algorithm are random, the cost of users in the cloud center is the highest, that is, the total cost is also the highest. With the increase of weight parameter μe, the proposed algorithm has the lowest cost compared with other baseline algorithms through joint optimization of various factors.Figure 3
Total cost vs. weight parameterμe.Figure4 plots how local processing capacity fnmax affects the total cost of the system. With the increase of local processing capacity fnmax, the number of users processing tasks locally increases, the local processing energy consumption increases, and the total system cost also increases. As can be seen from the figure, all three curves increases as local processing capacity increases. Since the local users of the random offloading algorithm are randomly generated, while our algorithm is the local users generated by the optimization algorithm, the total cost of the random offloading is higher than our proposed algorithm due to the two different offloading methods. In addition, another factor that determines cost is transmit power. Since the transmit power allocation of our algorithm is optimized, while the power allocation of the random power algorithm is random, the cost of our algorithm is lower than the random power algorithm.Figure 4
Total cost vs. local processing capabilityfnmax.In Figure5, we show how the unit price of MEC energy consumption η affects the system cost. It can be seen that, as the unit price of MEC energy consumption η increases, the cost of all algorithms increases. This is in line with our intuition. As the unit price increases, the additional net income from mining will decrease. According to formula (11), the total cost of the system will increase. In addition, since our proposed algorithm is optimized in all aspects, our total cost is the least compared to other algorithms.Figure 5
Total cost vs. unit price of MEC energy consumptionη.


## 8. Conclusions

In this paper, we have considered the joint optimization of offloading decision, local computation resource allocation, user clustering and admission control, and transmit power control, subjecting to the task execution deadline in a NOMA-based MEC-enabled blockchain network for minimizing the system cost. To solve the problem effectively, we propose heuristic algorithms with low complexity. In our problem solution process, the offloading decision is solved based on heuristic Algorithm1, and the user clustering and admission control are solved through Algorithm 2, and then closed-form solutions of local resource allocation and transmit power control are obtained under the required delay constraints. Simulation results show that the proposed algorithms have a good effect on cost reduction.



---

*Source: 8259817-2021-07-12.xml*