# An Active Path-Associated Cache Scheme for Mobile Scenes
## 3 The Proposed Approach
### Neighbor Selection Mechanism
#### 3.1.2 Threshold of Transition Probability  
After obtaining the transition probability by the method in Section 3.1.1, we need to select the neighbor \(AP_{j}\), with \(P_{i}(j)\geq\delta\), for caching. How to choose \(\delta\) is the research content of this section. The main factors that affect cache revenue are the cache cost (\(Cost_{Cache}\)), the request delay of the cache device hitting the content (\(Delay_{nith}\)), the request delay of the cache device not hitting the content (\(Delay_{nith}\)), and \(\delta\). According to economic principles [39], we can obtain a cost formula as follows:  
\[Cost=nums(NS)*Cost_{Cache}+P_{hit}(NS)*Delay_{hit}+(1-P_{hit}(NS))*Delay_{nith} \tag{3}\]  
where \(NS\) is all selected neighbor nodes of source AP, \(nums(NS)\) is the number of neighbor APs, \(P_{hit}(NS)=\sum_{j\in NS}P_{ij}\). In addition, \(P_{hit}(NS)\), \(Delay_{hit}\), and \(Delay_{nith}\) are calculated based on the real network environment. Below, we calculate the transition probability through the defined cost function.  
According to the process of Section 3.1.1, we can know that the transition probability will be updated, so how to determine the threshold is the key. Next, we use mathematical induction [40] to solve Formula (3). We assume that the source AP has selected the number of nums(NS) to jump. Then, the source \(AP_{i}\) to \(AP_{j}\) meets the transition probability and is added to the NS, which can be expressed as:  
\[\begin{split} newCost=&(nums(NS)+1)*Cost_{Cache}+P_{hit}(NS\cup j)*Delay_{hit}+\\ &(1-P_{hit}(NS\cup j))*Delay_{nith}\end{split} \tag{4}\]  
If and only if \(newCost\) is less than \(Cost\), the update is established. At this time, the transition probability \(P_{ij}\) satisfies the following:  
\[P_{ij}\geq\delta>\frac{\frac{Cost_{cache}^{j}}{Delay_{hit}^{j}}}{\frac{Delay_{ nith}^{j}}{Delay_{hit}^{j}}-1} \tag{5}\]  
The numerator in Equation (4) represents the cost of caching, and the denominator represents the benefits of caching. Thus, the solution set NS of (1) can be found through (4).  
The calculation of \(Delay_{hit}\) and \(Delay_{nothi}\) has been mentioned above; next, we will give the calculation method of \(Cost_{cache}\).  
Cache cost is usually related to the price of cache capacity and cache hit rate. On the one hand, the goal of our neighbor selection algorithm is to reuse the cache, which will increase the cache hit rate. Thus, when the cache utilization is higher, the cost of the cache will be higher. In addition, the higher the cache cost, the higher the cost of cache capacity. Based on the properties described above, we define the relationship of the three as follows:  
\[Cost_{cache}^{j}=\frac{Cost_{capacity}^{j}}{1-\frac{b}{\delta}} \tag{6}\]  
Here, \(Cost_{capacity}^{j}\) represents the cost of storage capacity, which is usually related to the price of the hardware. The b is the regularization item, which is adjusted according to the actual scene, and we can know that \(b<\delta\). According to Formulas (5) and (6), we can know that the choice of transition probability will affect the cost. When the selected transition probability threshold is low, most neighbor APs will cache the content, which will increase the cost. The storage cost of APs is usually more expensive than routing devices. In addition, in large-scale mobile scenarios, APs have to frequently call the cache replacement strategy to cache the latest content due to the limited cache space. The above situation causes a great waste of resources and overhead. For this reason, we propose a strategy to utilize the caching capability of the forwarding path.