# Content Management Based on Content Popularity Ranking in Information-Centric Networks
## 3 Content Management Based on Content Popularity Ranking
### Updating the Labels of the Tags  
The tags assigned to content are updated over time by altering the labels of the tags, excluding the _content type_ tag, which is never changed for a particular content. For example, suppose content \(i\) has the labels _medium_ and _fresh_ for the tags _expected lifetime_ and _life duration_, respectively. In that case, these labels can change to _long_ or _short_, and _current_ or _stale_, respectively, over time. We have introduced several new variables in order to explain the updating procedure of these labels of the tags. After caching content at the local storage, it is entitled to be stored for a duration of time without being considered for removal. This is because it is new content, and its popularity may increase in the future. This time duration variable is expressed by \(t_{new}\). After this time, the labels _long_ and _fresh_ change to _medium_ and _current_, respectively. After this time the duration expires, another time duration variable starts, which is expressed by \(t_{life}\). Several labels are updated after this time is over. These time variables indicate the duration after when the popularity of content should be recalculated. Values of these time durations are set by the administrators of the servers depending on the traffic load and the storage capacity of those servers. Afterward, another download counter variable is calculated that holds the average value of the summation of all the downloads of all the content at a node. This variable is called the _average download counter_, \(C_{avg}\), and each node \(n\) with total \(m\) content can calculate this variable using (8). \[C_{n_{avg}}\ =\ \frac{1}{m}\sum\limits_{i=1}^{m}(C_{n_{i}}\ ) \tag{8}\]  
In this equation, \(C_{n_{i}}\) is the download counter, which is the number of times that content \(i\) is downloaded from node \(n\). The download counters of all the available content at a node \(n\) are averaged after summing them up, and that is the value of the average download counter, \(C_{n_{avg}}\), at the node \(n\). Several of the labels assigned to content \(i\) of node \(n\) are updated after comparing the \(C_{n_{i}}\) value of content \(i\) with the \(C_{n_{avg}}\) value of node \(n\) over the time \(t_{life}\). If \(C_{n_{i}}\) gets higher than \(C_{n_{avg}}\) during the time \(t_{life}\), existing labels _medium_, _short_, and _stale_ change to the labels _long_, _medium_, and _current_, respectively. On the other hand, if \(C_{n_{i}}\) becomes less than \(C_{n_{avg}}\) within the time \(t_{life}\), existing labels _medium_ and _current_ change to labels _short_ and _stale_, respectively. There is no change in any other labels under these two conditions. Additionally, if \(C_{n_{i}}\) stays at 0 over the time \(t_{life}\), which means that the content was not requested at all, the existing label _short_ changes to the label _zero_. The label _zero_ from the tag _expected lifetime_ indicates the loss of interest in that content from the clients over the time \(t_{life}\). Therefore, it can be removed from the storage conveniently, and new content can be cached. The overall procedure for updating the labels of the tags is given in Algorithm 2 and Algorithm 3. Time passed since content \(i\) was cached or \(t_{new}\) and \(t_{life}\) times expired, and a change of the existing labels of the content \(i\) at a node \(n\) is expressed by \(t_{n_{i}}\) in the algorithms. The time variable \(t_{n_{i}}\) is reset after \(t_{new}\) and \(t_{life}\) times are over, and the updating procedure restarts from the beginning. ```
INPUT existing content \(i\), node \(n\), number of total content \(m\)
1.