# Request Expectation Index Based Cache Replacement Algorithm for Streaming Content Delivery over ICN
## 3 Request Expectation Index Based Cache Replacement Algorithm
### Request Expectation Index \(Rxi(i,j)\)
#### 3.1.2. Chunk-Level Internal Request Probability \(P_{f_{i}}(j)\)  
For the streaming request, the user does not always request all the chunks of the file. The request probability of different chunks within a streaming file may not be equal. For instance, it is unlikely that all the viewers watch the whole video from the first chunk until the end. Thus, within a video, there is a significant request probability gap between the first chunk and the last chunk. Therefore, to accurately express this request probability difference among chunks within the same file, the chunk-level internal request probability \(P_{f_{i}}(j)\) is introduced. \(P_{f_{i}}(j)\) denotes the request probability of chunk \(C_{i,j}\) among the other chunks of file \(f_{i}\), and \(\sum_{j=1}^{M_{i}}P_{f_{i}}(j)=1\). For a particular type of streaming file, the request duration follows a certain distribution [41], e.g., a Pareto distribution (with mean between 54% and 61% of the total video length) fits well for short videos which last less than 5 min, and the Wellbull distribution (with mean between 18% and 40% of the total video length) fits well for long videos. Therefore, we assume that the request duration of \(f_{i}\) follows distribution \(Q(x)\). \(P_{f_{i}}(j)\) denotes the inherent access frequency among chunks within a particular type of streaming file. According to the statistical characteristics of the request duration distribution \(Q(x)\), \(P_{f_{i}}(j)\) is given by Equation (4). In Equation (4), \(\Delta T_{i}\) represents the average request interval of a user requesting two consecutive chunks for file \(f_{i}\). For instance, assume \(\Delta T_{i}\) is 1 s; accordingly, the chunk \(C_{i,2}\) will be requested at time 1 s, \(C_{i,3}\) will be requested at time 2 s and \(C_{i,j}\) at time \((j-1)\) s, etc. Additionally, the request duration \(((j-1)\Delta T_{i},j\Delta T_{i})\) refers that the user start to request the file from time 0 and quit between time \((j-1)\Delta T_{i}\) and \(j\Delta T_{i}\). In addition, \(\int_{(j-1)\Delta T_{i}}^{j\Delta T_{i}}q(x)dx\) denotes the probability that the user request duration falls within \(((j-1)\Delta T_{i},j\Delta T_{i})\). According to the assumptions, \(\int_{(j-1)\Delta T_{i}}^{j\Delta T_{i}}q(x)dx\) indicates the probability that the chunk \(C_{i,j}\) is requested just before the user drops out of the session. Furthermore, a user request duration longer than time \(j\Delta T_{i}\) indicates that chunk \(C_{i,j}\) is definitely requested. Therefore, according to the \(Q(x)\) distribution, the numerator of Equation (4) represents the number of possible requests for chunk \(C_{i,j}\). Meanwhile, for the denominator, the request duration \((0,\Delta T_{i})\) refers that the user quit requesting before time \(\Delta T_{i}\). Thus, if the request duration is in \((0,\Delta T_{i})\), there is only one request for chunk \(C_{i,1}\), and if it is in \((\Delta T_{i},2\Delta T_{i})\), there are two requests for chunk \(C_{i,1}\) and \(C_{i,2}\) and so  
Figure 3: Monitor the request ratio \(REQ_{f}(i)\). REQ: Request ratio; RXI: Request expectation index; IRXI: Internal request expectation index. on. Thus, the denominator indicates the possible total number of requests for file \(f_{i}\) based on the \(Q(x)\) distribution. Since the denominator does not vary by sequence number \(j\), we stipulate that it equals the constant \(\frac{1}{G_{i}}\). Please note that \(P_{f_{i}}(j)\) can be precalculated once the type of file \(f_{i}\) is known and \(Q(x)\) for the file is determined.