Optimal Pricing for MDS-Coded Caching in Wireless D 2 D Networks

In this paper, we investigate the caching of files in mobile devices in a wireless D2D network using maximum distance separable (MDS) codes. ,e coded symbols of each file are stored in the mobile devices. To regulate the D2D communications and reduce the transmission cost among mobile devices, a price mechanism is used for D2D communications so that they are allowed to choose whether to transmit the requested coded symbol to the other device or not.,emobile device can cooperate with others in terms of the battery level and the reward that is given from the other device. If the mobile device fails to retrieve enough coded symbols, the BS will respond with the missing coded symbols. We derived the optimal payment after taking the battery level of devices into consideration, and the problemwas formulated as an optimization problem, subject to a range of payment. Numerical results demonstrate that using the MDS-coded scheme can significantly reduce the cost of transmitting a file, and there exist an optimal number of coded symbols cached in the mobile device, which consumes minimal cost of transmitting a requested file.


Introduction
Mobile data traffic has increased dramatically in recent years [1].In order to address this enormous growth of traffic, one of the most promising methods is wireless caching, that is, storing the files in the user devices [2] or other helper stations [3].Devices and helper stations can store files during the off-peak hours and transmit the contents to the requesters during peak hours.In particular, helper stations, like small cells, can provide a better quality of experience for users, although the necessity of high-speed optical fiber backhaul makes this scheme significantly expensive.It is noteworthy that device-to-device (D2D) wireless communication is expected to play an indispensable role in the near future [4].With the introduction of D2D communication, a device can communicate directly with other mobile devices in its vicinity.When a device sends a request for a file that cannot be satisfied by its local storage, any of its neighbors with that content precached in their local storage can respond to the request if they can establish a link.If, as is possible, the requested data cannot be retrieved by D2D communication, then the BS will assist in providing the data.
is is expected to improve the spectral efficiency, increase the network throughput, and reduce the power consumption for the whole system [5].Unlike other network systems where the content is only stored in the infrastructure, the key property of D2D-caching networks is that the virtual cache capacity increases linearly with the number of devices in the wireless networks.
is means that the aggregate cache capacity grows with the increase of the number of devices in the system.
However, in a practical scenario, the mobile devices may not always respond to other devices' requests even if they have stored the requested file.
is is because the mobile device has to consider its own interest [6].Although the power consumption of D2D communications is lower than that of cellular communication, we cannot expect mobile devices to use most of their energy on D2D communications.
e battery level of mobile devices is an important factor related to be considered with D2D communications among devices: the limited battery capacity of the mobile device, necessitating frequent charging, has become the biggest complaint for users of smartphones.Hence, reducing the energy consumption of D2D communication is crucial.
Coded caching is one of the effective methods for energy-saving in wireless caching networks since it can significantly reduce the amount of data that is necessary to transmit over the channel [7,8].A promising coded scheme was maximum distance separable (MDS) code, which was first investigated in [9] where the authors expressed the wireless distributed caching optimization problem as a convex optimization.en, the MDS-coded scheme was investigated for small cells, and the authors proposed a careful caching placement to minimize the backhaul in the system [10].In [8], the download delay of wireless content delivery was studied with the use of the MDS-coded scheme, and it was shown that this scheme can reduce the delay greatly.However, in those works, the battery condition of the mobile devices was not considered; adding this consideration is key in this paper.
ere is lack of a proper mechanism to regulate the caching devices whether to establish D2D links with other devices or not.For most of the existing studies about caching in D2D networks, it is assumed that if a mobile device sends a request for a file, other devices in the neighborhood will establish D2D links and deliver the content.In reality, this can hardly be possible.Each device in a wireless network will have a different battery level, and the previous works assume that even when a device is in a low battery condition, it is still likely that this device will help to deliver the requested file to others. is is obviously unreasonable because the power available to that device could easily be used up, which would be a failure of D2D communication.Under this circumstance, the battery level is clearly an important factor that needs to be considered when proposing a proper mechanism for the mobile device establishing D2D links.In [11], the authors took the battery levels of devices into consideration and proposed a price strategy to motivate the load sharing between mobile devices.Results showed that this strategy increased the average battery levels and reduced the communication outages.Chen et al. [12] investigated the relationship between the energy cost and the offloading ratio with the consideration of battery levels and proposed a usercentric protocol to control the transmission cost for D2D communications.Chen et al. [13] proposed an incentive mechanism to maximize the utility of D2D communications and minimize the cost of the BS; the authors formulated the conflict between mobile devices and BS as a Stackelberg game.Different from these works, we study the coded caching with a new consideration of battery levels in D2D communications.
e main contribution of this paper is summarized as follows: (i) We focus on the caching of files in wireless D2D networks with the MDS-coded scheme and using a price mechanism to regulate the D2D communications with the consideration of battery levels.(ii) We propose a file transmission protocol in the wireless D2D networks.en, we derive the cost of transmitting a requested file in the MDS-coded scheme and optimize the payment to the cachehelper device.(iii) We investigate the performance of the MDS-coded scheme by measuring the effect of some key parameters.en, we compare our approach with the uncoded scheme and no-caching scheme, and the results show that the MDS-coded scheme is better at power-saving.
e remainder of this paper is organized as follows: in Section 2, the MDS-coded scheme and the price model are introduced.e problem of minimizing the cost of transmitting a requested file was formulated with constraints in Section 3. Section 4 gives the numerical simulations to prove the advantages of the MDS-coded scheme with a price mechanism.Finally, conclusions are drawn in Section 5.

System Model
2.1.Network Model.As shown in Figure 1, we consider one cell in cellular networks where the BS serves a number of M mobile devices denoted by the set M � 1, 2, . . ., M { }.We assume that the location of mobile devices follows a homogeneous Poisson point process (PPP) with density λ. e mobile devices caching the coded symbols form a PPP with density ρλ, which are referred to as storage nodes.e devices not caching any file form another PPP with density (1 − ρ)λ, which are referred to as regular nodes.Each node can send a request for the file, and each storage node can communicate and share contents with all its neighbors via D2D links.
e device sending requests for contents is referred to as the source device i ∈ M. When the source device sends a request for a file, the source device i can associate with other storage nodes in the range of D2D communications.We denote the set of storage devices with distance r from the source device i as its helping set H i ⊂ M. In the helping set, the storage nodes that are willing to help transmit the coded symbols to the source device i are referred to as the cachehelper devices.
e channel coefficient from the source device i to the cache-helper device j ∈ H i and to the BS is denoted as h ij and h i , respectively, and the corresponding distances are denoted as r ij and r i .e channel coefficient follows the zero mean complex Gaussian distribution with unit variance.en, the channel power gain g i , i ∈ I, I � ij, i   is expressed as follows: where n i is an exponential random variable with unit mean modeling the power envelope of the Rayleigh fading, and we denote as the power attenuation at the distance r k , where α is the path loss exponent and r 0 is the constant path loss at the 2 Mobile Information Systems reference distance.Normally, D2D communications are of short range, so we can assume that For simplicity, a time-slotted system is considered in the system model, where coded symbols are transmitted in each time slot.For convenience, the number of coded symbols transmitted by a cache-helper device is normalized to unity in each time slot.When a mobile device initiates its data transmission, the coded symbols from the set 1, 2, . . ., 2 D i are sent, where D i is the transmission rate in bits/sec/Hz.us, for a given transmission rate per coded symbol, the required energy for transmission with data rate D i is where σ 2 is the noise power at the receiver of the mobile device.When the cache-helper device needs to transmit more coded symbols, the transmission rate is larger, which consumes more energy.

Cache Model. e BS has access to a library of N les
It is assumed that all contents have equal size B, and these contents are requested by mobile devices with the same probability.In the system, we adopt a deterministic allocation strategy, where contents are cached in the distributed storage nodes.Each content is partitioned into b fragments, and these fragments are used to create a coded symbols using the (a, b) MDS coding, like the Reed-Solomon (RS) codes [15].e rate of the MDS erasure correcting code is denoted as R b/a, and we compare the performance of di erent rates of the MDS coding in the paper.To simply the analysis, it is assumed that each mobile device caches coded symbols for each of the contents in Z, and the coded symbols cached in each storage nodes are di erent.Overall, the total number of coded symbols cached at each storage device is n cs * N, where n cs a/m is the number of coded symbols for one content cached in the storage nodes.It is noted that a fragment is an uncoded part of a le and a coded symbol is a coded part of a le.
With the MDS coding, the response to a request from the mobile device can be via multiple D2D communications, as long as there are storage devices that are in the coverage of the source device willing to accept the payment and help to transmit the coded symbols.In practice, when the source device i has collected any subset of b coded packets, the source device i can recover the requested le with the MDS code (a, b).In order to make the system more e cient, we allow multiple D2D links to coexist in the cell if these D2D links are far apart in the space.Hence, the interference in this case can be neglected.A similar model is adopted in [16].We also assume that when there are multiple D2D links from cache-helper devices in the coverage of the source device, the coded symbols of the requested le will be downloaded serially from the cache-helper devices to the source device.
In the o -peak time, the BS will cache the coded symbols of les in the storage nodes.Since the content allocation is executed by the BS, the BS has the information of coded symbols in the mobile devices.In addition, cache placement happens over a much larger timescale than scheduling and transmission.We assume that the static state of the content caching and the changes of cache updating over time are not considered for simplicity (similar assumptions have been made in previous literature, e.g., [3]).

Price Model
. Each device's battery level is di erent from the others, and normally, the battery condition cannot be shared between mobile devices.Moreover, the mobile device has di erent valuations of the remaining energy in its battery when its battery is in di erent states.For example, the energy in a device is more valuable when the battery is insu cient.We assume that transmitting a coded symbol of the content consumes the same energy for all mobile devices.We de ne ξ j as the cost for the storage node j ∈ H i transmitting a coded symbol to the source device i via D2D communications.e cost ξ j is related to the battery level of the storage node, and the cost for each storage node is the function of the battery level B j , that is, where B j ∈ [0, B max ] is the battery level and f : [0, B max ] → [0, ξ max ] is a monotonically decreasing function of B j .For simplicity, it is assumed that the maximum battery storage B max is the same for each mobile device.If a storage node j ∈ H i responds to the le request from the source device i, it will receive a price π i for transmitting the requested content.
Due to advanced payment technologies, the reward can be in various forms, like currency or credit in a multimedia application.For the cache-helper device j ∈ H i , the bene t of being a cache-helper device is , where E D2D j is the energy consumed by the D2D communications for Mobile Information Systems a cache-helper device.Furthermore, the cache-helper device has a reservation utility ε > 0, which means that the storage node will accept the request from the source device.
erefore, the utility of the cache-helper device j ∈ H i for the source device i can be de ned as For the source device i, if there is a storage node accepting the price π i , then the cost of the source device i is π i .If not, the source device's request will be handled by the BS directly at the cost of ξ BS E BS , where ξ BS is the cost of the BS transmitting the coded symbols to the source device.Hence, the cost of a source device i is In order to ensure mutual bene t for both the source device and the cache-helper device in the collaboration, the price π i should satisfy the following inequality: where inequality (a) ensures the bene t that the cachehelper device deserves and inequality (b) makes sure that the D2D communication is more power-saving than the BS communication.

Transmission Protocol.
With a given request from the source device, we can specify the content transmission protocol via D2D communications and BS communications.If a source device sends a request for a le, the protocol for obtaining the le is given as shown in Figure 2.
Response from the D2D communications is as follows: (1) e source device will check if there are any storage nodes deployed in its neighbors.(2) e source device submits the payment to the storage nodes.e storage nodes (if any) accept the payment and send the number of n cs coded symbols of the requested le to the source device.(3) When there is more than one storage node willing to respond to the source device's request, the source device can download the coded symbols serially from multiple nodes.
Response from the BS communications is as follows: (1) If the source node has collected fewer than the b coded symbols from cache-helper devices, the le cannot be reconstructed.Hence, the source node will turn to the BS to nish the transmission of the requested le.(2) If the source device cannot nd any storage nodes that can help to transmit the requested le in its coverage of the D2D communications, the BS will respond to the source device's request directly.

Problem Formulation and Solutions
In this paper, in order to make the whole system more power-saving, our goal is to nd the optimal payment for transmitting the coded symbols for contents in di erent (a, b) MDS-coded schemes.In this section, we rst study the probability of storage nodes available when a request arrives from the source device.en, we analyze the expected amount of data transmitted by D2D communications and by BS communications in the system.We formulate the price mechanism with the MDS-coded scheme in wireless D2D networks as an optimization problem.
Here, we study the probability that there are several storage nodes available when a request arrives.For later use, we denote J k as the event that there are k storage nodes available in the coverage of the source device at the time of a request sent by a source device.We de ne C and C as the events that the request is from a regular node and from a storage node.As we mentioned above, coded symbols of the contents in Z are cached in the storage nodes.erefore, the request for these contents can be responded via D2D communications.
Proposition 1: e probability that there are k mobile devices caching the coded symbols available in the coverage of the source device when the source device requests for a le from Z is  Mobile Information Systems Proof: e probability q i is calculated by e number of storage nodes and regular nodes is m and M − m, respectively.e probability of a request coming from storage nodes and regular nodes is expressed as follows: When a regular device sends a request for a file, the probability that having k ≥ 0 storage nodes that have cached coded symbols of the content within the distance r is Similarly, when a storage node sends a request, the probability of having k storage nodes in the radius r is Using ( 11)-( 13), we get (9).en, we consider the amount of data that is downloaded from the BS and cachehelper devices, respectively.For simplicity, we denote A i as the event that the probability of the storage node j ∈ H i accepts the payment π i and helps the source device i to transmit the requested file.Pr(A i ) is the probability that the storage node j ∈ H i accepts the payment π i and helps the source device i to transmit the requested file, which is expressed as Obviously, the storage node will help the source device to transmit the requested coded symbols only when the storage node can obtain benefit via the transmission for coded symbols.Provided that there are k > 0 storage nodes in the radius r of the source device i and each storage node can transmit the number of n cs coded symbols, the amount of the coded symbols that are downloaded from the number of k storage nodes is denoted as Similarly, when a request comes from the source device i, the amount of the coded symbols that are downloaded from the BS is We formulate the optimization problem that minimizes the expected total cost of the source device i for receiving the requested file over the payment π i as follows: e total cost includes the cost in D2D communications and BS communications.
e constraint is the range of payment and has been explained in (8).
Next, we study the probability of the storage node j ∈ H i willing to help the source device i to transmit the coded symbols.For simplicity, it is assumed that the relation between the content cost of a cache-helper device and its battery level B k in ( 5) follows a linear function, and a similar assumption is adopted in [11]: It is also assumed that the battery levels follow a uniform distribution.is means that the content cost ξ j is uniformly distributed as erefore, the probability of the cache-helper device j ∈ H i helping the source device i transmit the requested file is where e transmission rate D i is expressed as where s cs is the size of the coded symbol.With the result of ( 17) and ( 20), the objective function ( 23) can be expressed as Mobile Information Systems min is problem is nonconvex as the first part of ( 23) is concave, but we can solve the problem by 1D search due to the fact that there is only one variable with a limited range.

Numerical Results
In this section, we evaluate the price of transmitting coded symbols and the cost of responding to a source device's request when using the MDS-coded scheme.
e general simulation parameters are listed in Table 1, and the specific setup for different MDS-coded cases will be elaborated in the later section.
In Figure 3, we show the optimal price π i for different numbers of coded symbols cached in the storage nodes when λ varies.We note that, for a given ξ BS and the (a, b) MDScoded scheme, the optimal price increases with the increase in the number of coded symbols. is is due to the fact that when more coded symbols of each file are cached in the device, it needs more energy to transmit the requested coded symbols to the source device.As shown in Figure 3, the optimal price of coded symbols is better when the value of λ is larger.is is reasonable because when there are more storage nodes, the probability that the source device receives help from storage devices is higher, which leads to a lower payment.We can also note that curves become steady when the number of symbols cached in the storage nodes is more than around 11. is is because when n cs is large enough, the payment that a source device needs to pay to the cachehelper device will be sufficient if the source device wants to keep a good probability of receiving help from storage nodes.However, when the price becomes larger, the total cost of responding to the source device's request will be high, which is not optimal.Moreover, there is a limitation in the payment for transmitting coded symbols by D2D communications according to the expression in (8).
Figure 4 shows the optimal payment for different numbers of coded symbols cached in the storage nodes when ξ BS varies.It is observed that when ξ BS is higher, the price of coded symbols is higher.is is because the higher payment of coded symbols is expected to reach the optimal balance between the cost of transmitting coded symbols by D2D links and BS communications in this situation.Moreover, a larger ξ BS gives a higher bound to the price.In Figure 5, we change different MDS-coded schemes in which the source device receives a different number of coded symbols to be enough to recover the requested file.It is shown that the payment of coded symbols is higher when the source device is required to receive more coded symbols to reconstruct the file.e reason is that it is more difficult to obtain the help from the cache-helper device to transmit more coded symbols to the source device.us, the price is higher.
Figure 6 depicts the total cost of responding to the source device's request for a file when the price of coded symbols changes.It is noted that all curves decrease at the beginning and then start to increase until the end. is indicates that the number of coded symbols cached in the storage nodes has an effect on the cost of transmitting the requested file to the source device.When the number of coded symbols cached in the storage nodes is small, the source device is less likely to receive enough coded symbols by D2D communications.When n cs is large, the probability of storage nodes willing to help to transmit the coded symbols is decreasing.us, the BS will respond to the devices' requests in a larger proportion in both cases, which results in a higher cost.It is also observed that the optimal number of coded symbols cached in the storage nodes is larger with the decrease of λ for curves.is is because when there are fewer storage nodes in the system, each storage node is expected to cache more coded symbols to help the source device get the requested file.
In Figure 7, we show the influence ξ BS has on the cost of transmitting a requested file.It is observed that when the number of coded symbols cached in the storage nodes is less than 10, the curves are quite close, but for more symbols cached, the gap between different curves widens.
is is because the price of coded symbols diverges, as can be seen from Figure 4. Hence, the cost of transmitting the coded file by D2D communications (n cs : 10 → 15) varies notably, and the gap between curves is clear.In Figure 8, it shows when using different MDS coded schemes (the number of coded symbols that are required to recover the file is different), there will be different transmission costs.We can see that when b is larger, the cost of transmitting a file is higher, with the reason being explained above.
For a better comparison, we show the cost of responding to a source device's request in different schemes.In the optimal scheme, the information about the mobile devices' battery condition is shared to all; hence, the source device can select the storage nodes that have a high battery level as the cache-helper device.In the uncoded scheme, the file is cached in the mobile devices as a whole.In the no-caching scheme, there is no caching in the system, and the mobile devices' requests are responded by the BS.We set λ � 0.03, b � 20, and ξ BS � 3 in the MDS-coded scheme and the optimal scheme.As shown in Figure 9, the curve of the optimal scheme is close to the MDS-coded scheme.
e uncoded scheme is above the MDS-coded scheme, which means that the cost of transmitting a file consumes more energy cost. is indicates 6 Mobile Information Systems that the MDS-coded scheme is better than the uncoded scheme and the no-caching scheme with the price mechanism.At the beginning, the battery level of mobile devices is uniformly generated between the range [0, B max ].In order to show the mobility of devices, the positions of mobile devices are regenerated within the area for each time slot.It is assumed that 10 requests are randomly generated by mobile devices in every time slot.In the setup, it is likely that there is more than one device that sends the request in a cluster at the same time slot.In order to avoid this situation, we regenerated the mobile devices' requests to avoid the interference caused by the D2D communication in a cluster.During a time slot of the system, if the battery level of the mobile device is 0, then the device is regarded as "dead" and it cannot provide any operation.In Figure 10, we can see that the curve of the MDS-coded scheme decreases faster than that of other schemes, which indicates that using the MDScoded scheme can generate more D2D communications in the system.As for the optimal scheme, this curve is the same as the curve of the MDS-coded scheme. is is because    e optimal price of transmitting coded symbols, λ 0.03, and ξ BS 3.   Mobile Information Systems transmitting coded symbols consumes the same amount of energy for each storage node.

Conclusion
In this paper, we studied the problem of optimal payment for transmitting coded symbols from the cache-helper device to the source device with the MDS-coded scheme in wireless D2D networks.We derived the optimal payment after taking the battery level of devices into consideration, and the problem was formulated as a nonconvex problem.We then deeply investigated the performance of the optimal price and total cost in MDS-coded schemes by measuring the e ect of the key parameters, such as the density of mobile devices and the number of coded symbols that are su cient to recover the requested le.With the optimal price of the MDS-coded scheme, it was shown that there existed an optimal number of coded symbols cached in the mobile devices, which can reduce the total cost of transmitting the requested le to the device.We also compared our scheme with other caching strategies, and numerical results showed that the MDScoded scheme with a price mechanism could reduce the total cost of responding to a device's request for a le.Mobile Information Systems
Figure 6: e cost of responding to a source device's request, ξ BS 3, and b 20.

Figure 9 :
Figure 9: e cost of responding to a source device's request in di erent schemes.

Figure 8 :
Figure 8: e cost of responding to a source device's request, λ 0.03, and ξ BS 3.

Figure 7 :Figure 10 :
Figure 7: e cost of responding to a source device's request, λ 0.03, and b 20.