Introduction

In the era of rapid technology development, various Internet applications accompany with extreme loading are rife with existing networks, no matter in wired or wireless network. Information-Centric Network (ICN) [1,2,3,4] provides a novel data delivery method for the next generation network. In traditional Internet services, Transmission Control Protocol/Internet Protocol (TCP/IP) is used to establish communication connections. Before accessing Internet applications, users need to request application servers but are limited by the connection status, such as transmission rate, network bandwidth and the number of access connection. More and more Internet applications also result in a great quantity of network traffic. Therefore, Content Centric Network (CCN) [5,6,7,8,9] is proposed to tackle the problem of overwhelming network demands. In CCNs, IP addresses are ignored and different of named content is used [10]. The name of data represents its information content. Data can be temporally stored on routers for decreasing the distance and shrinking the traffic between user and server.

Cache scheme [11, 12] is available in CCNs. Data chunks can be stored on a router to shorten waiting time and network traffic [13]. The cache capability is prerequisite to CCN routers. When the cache capacity of a CCN router is occupied with data, a data replacement scheme can switch the data in routers but also consumes network performance [14]. What kind of content, which part of files, where to cache are investigated widely and thoroughly. Caching redundancy and network traffic redundancy [15] should be minimized for the best resource utilization of limited cache capacity. As a result, an intelligent approach is needed to decide how and where to store and cache specific data content in the dominated routers. The achievements of this work are listed as follows. (i) The cache problem based on content popularity and user location is designed and formulated. (ii) An intelligent cache scheme is proposed to distinctively cache popular content and normal content based on the location where user sends data request. (iii) The proposed cache scheme yields higher cache hit rate with less cache size than that of the original cache scheme in CCN and the Most-Popular Content cache strategy.

The rest of this paper is organized as follows. “Related works” section introduces and discusses existing literatures of cache schemes in CCN. “Problem definition and proposed scheme” section formulates the defined cache problem and proposes our cache scheme. “Simulation results” section shows simulation results and compares the proposed cache scheme with others. “Conclusions” section concludes this paper.

Related works

Cache scheme carries out the feature and functionality of CCN. When a user requests data from server, the routers along routing path temporally cache the requested data in their cache capacity. Two kinds of data packets are used in CCN, i.e., interest packet and data packet. Data packets are similar to traditional packets in Internet. It carries corresponding packets to users. The interest packet is newly proposed to forward data range and name through CCN routers. IP-based architecture is replaced with named data in CCN, and content store is processed for improving the defects of client–server architecture [16]. Users are able to request data content from CCN routers rather than the original content provider or server, thereby the waiting time can be improved.

Two components are newly proposed in CCN, i.e., Forwarding Information Base (FIB) and Pending Interest Table (PIT). FIB achieves name-based data forwarding and searching [17], and PIT records the information of requested data [18]. Zhao et al. [19] proposed a new FIB approach that dynamically allocates memory. The proposed FIB reduces memory consumption and decreases processing time by using hash function. Bouk et al. [20] investigated PIT entry lifetime (PEL) and proposed a hop limit based adaptive PEL (LAPEL) scheme. The LAPEL scheme reduces PIT size and achieve less PEL.

When an information content is delivered from server to user, all routers among the transmission path cache this content in their cache capacity. Once cache capacity is fully filled with data content, a replacement scheme is needed such as least recently used (LRU) [21], Least Frequently Used (LFU) [22] and First In First Out (FIFO) schemes. CCN brings a benefit way to acquire data but also leads to some problems. For example, cache capacity will be occupied with different data when a huge plenty of data transferred through many routers. Moreover, some specific data are often requested as well as the popular data but may be deleted from cache capacity when users ask for different data content. Therefore, a sophisticated cache scheme is definitely required to cache the specific data content wisely and intelligently.

The related works of cache scheme in CCN are investigated and discussed as follows. Jacobson et al. [23] designed the packet format of data acknowledgement and proposed a forwarding strategy to reduce redundant data transmission. Liu et al. [24] integrated dynamic adaptive streaming over CCN. Based on the niche of cache ability, server’s bandwidth consumption can be reduced. Rossi et al. [25] investigated multi-path routing, caching and replacement policies. Besides, the popularity of data content was studied. Zhang et al. [26] proposed a new cache replacement scheme called popularity prediction caching (PPC). The PPC predicts the most popular chunk and caches it in a linear complexity. Unlike this paper, we not only consider the cache strategy of both popular content and normal content but also cache them in a suitable router based on user location. Wang et al. [27] studied how to distribute the limited cache capacity of routers. The heterogeneous cache allocation method puts most of the capacity over some central nodes. Experimental results showed that the heterogeneous cache method with simple cache replacement strategy saves more remaining traffic.

Xu et al. [28] proposed a collaborative cache scheme based on the concept of dominating set. Both content placement and request routing are considered to reduce routers’ communication time and to enhance cache hit rate. Chang et al. [29] improved network efficiency by exploring big data analytics and employing learning-based schemes for edge caching. In [30], a hierarchical-caching-based CCN architecture was presented, and three hierarchical edge caching mechanisms were proposed, i.e., random, proactive and game-theory-based hierarchical caching mechanisms. Li et al. [31] proposed a chunk caching location and searching scheme (CLS) in CCN. Results showed that the CLS improves the defects of Leave Copy Down and Move Copy Down cache schemes with lower server workload. Bernardini et al. [32], the authors proposed the Most-Popular Content (MPC) caching strategy to decrease the consumption of data transmission. The consideration of content popularity is similar to our work, but we further tackle the placement of normal content. In addition, the location where user sends content request is further considered in our paper while deciding the cache place. Wang et al. [33] proposed the intra-AS cache cooperation scheme to manage the redundancy level within the AS. In the proposed scheme, nodes in an AS cooperate with each other in serving content requests. In [34], we proposed a cache scheme that categories content into popular content and normal content. However, where to cache the popular and normal content is vital to improve cache hit rate time when user requests data. As a result, in this paper, the different kinds of data content are cached in different CCN routers based on user location. The proposed cache scheme aims at improving cache hit rate and reducing cache capacity usage.

Problem definition and proposed scheme

In this section, the cache problem based on content popularity and user location is defined. Existing approaches consider either content popularity or cache location. An intelligent cache scheme named Content Popularity and User Location (CPUL) is proposed to determine what kind of data should be cached in which router at the same time. The cache problem of both popular content and normal content is considered in this paper.

Problem definition

The underlying cache scheme in CCN cannot utilize the cache capacity of routers efficiently. Routers among the routing path cache the redirect data content without consideration and optimization. Existing cache scheme results in a large amount of redundant replica data content in CCN routers. The designed cache approach for CCN of this work is depicted in Fig. 1. First of all, data is classified into normal and popular data according to its request frequency. When a user requests a specific data content, we expect to transmit the data content from a suitable router that raises the cache hit rate. Therefore, which content and where to cache is the primary goal of this work. Moreover, the paper aims at improving cache hit rate under the condition of limited cache capacity without modifying network topology.

Fig. 1
figure 1

Cache problem of CCN

The defined variables are listed in Table 1. The cache problem considered in this work is defined as follows. Given an undirected graph \(G = \left( {V,E} \right)\), where \(V\) is a set of CCN routers. Assume that \(V = \left\{ {z_{1} ,z_{2} , \ldots ,z_{s} } \right\}\) and the number of routers be \(\left| V \right| = s\). Then, let \(E\) be a set of links among these routers, where \(E = \left\{ {q_{12} , \ldots ,q_{mn} } \right\}\). Because the given graph \(G\) is an undirected graph, it can be known that \(q_{mn} = q_{nm}\). The variable \(R_{j}\) is the total requested number of type \(j\) data in CCN and the variable \(r_{ij}\) represents the requested number of type \(j\) data on the \(i\)th router \(z_{i}\). The total requested number of one data type can be calculated as.

Table 1 Definition of variables
$$R_{j} = \mathop \sum \limits_{i = 1}^{s} \mathop \sum \limits_{j = 1}^{u} r_{ij} ,$$
(1)

where \(u\) is the category of data types. In Eq. (2), \(C\) represents the released cache capacity of all routers, where \(c_{i}\) is the released cache capacity of router \(z_{i}\). The total cache capacity released in CCN can be calculated as

$$C = \mathop \sum \limits_{i = 1}^{s} c_{i} .$$
(2)

In Eq. (3), the notation \({\mathbb{H}}_{lj}\) is a Boolean operator that records cache hit or miss of the data \(j\) on the router \(z_{i}\), which is defined as

$${\mathbb{H}}_{lj} = \left\{ {\begin{array}{*{20}l} {1, \quad content\,j\, cache\, hit\, on\, router\, z_{i} } \\ {0,\quad content\, j\, cache\, miss\, on\, router\, z_{i} } \\ \end{array} } \right..$$
(3)

In Eq. (4), \(h_{j}\) stands for the hit rate of data content \(j\). It is obtained from the hit rate of content \(j\) on all routers, which can be calculated as

$$h_{j} = \mathop \sum \limits_{i = 1}^{s} \mathop \sum \limits_{j = 1}^{u} \frac{{r_{ij} {\mathbb{H}}_{lj} }}{{D_{j}^{i} }} ,$$
(4)

where \(D_{j}^{i}\) is the cache capacity occupied by content \(j\) on router \(z_{i}\). In Eq. (5), the variable \(H_{ij}\) is the cache hit rate of content \(j\) on router \(z_{i}\). The variable \(B_{i}\) represents the benefit of router \(z_{i}\), which can be calculated as

$$B_{i} = \mathop \sum \limits_{i = 1}^{s} \mathop \sum \limits_{j = 1}^{u} \frac{{H_{ij} {\mathbb{H}}_{lj} }}{{D_{j}^{i} }}.$$
(5)

In Eq. (6), the variable \(U_{ij}\) stands for the cache capacity utilization of data content \(j\) on router \(z_{i}\). Recall that \(D_{j}^{i}\) is the cache capacity, \({\mathbb{H}}_{lj}\) is a Boolean value records cache hit or miss, and the variable \(C\) is the released cache capacity of all routers. The utilization of cache capacity can be calculated as

$$U_{ij} = \mathop \sum \limits_{i = 1}^{s} \mathop \sum \limits_{j = 1}^{u} \frac{{D_{j}^{i} {\mathbb{H}}_{lj} }}{C}.$$
(6)

The variable \(P\) is the average of cache utilization, which is shown as Eq. (7). The average cache utilization is obtained from the cache hit of data content on all routers.

$$P = \mathop \sum \limits_{i = 1}^{s} \mathop \sum \limits_{j = 1}^{u} \frac{{h_{j} }}{{U_{ij} }}.$$
(7)

The cache problem of CCN is defined as

$$\varvec{max }P$$
(8)
$$s.t.$$
$$0 < P \le 1 ,$$
(9)
$$c_{i} > 0 ,$$
(10)
$$D_{j}^{i} \le c_{i} ,$$
(11)
$$0 < h_{j} \le 1 ,$$
(12)
$$0 < U_{ij} \le 1 .$$
(13)

The primary goal aims to maximize the average of cache utilization, where it is restricted within 0 to 1 as well as the constraint (9). Constraint (10) guarantees that each router is equipped with cache capacity. Constraint (11) ensures that the cache data of a router should be less than or equal to its cache capacity. Constraints (12) and (13) guarantee that the hit rate and cache utilization are percentage values among 0 to 1.

Proposed CPUL cache scheme

Existing researches only consider content popularity or cache chunk location separately, but what kind of data should be cached in which router must be tackled at the same time. In this paper, we propose a novel cache scheme based on content popularity and user location, viz CPUL cache scheme. Unlike existing literatures on cache approach for CCN, the proposed CPUL scheme is able to cache the right data content on suitable routers for raising cache hit rate. Firstly, a period of time to collect users’ requests is needed so that the popularity of data content can be calculated. In this work, users request data content randomly. Routers receive users’ requests and then the CPUL computes the number of requests received on each router. On the basis of request number, data content is classified into popular and normal content. Two algorithms are proposed to solve the cache problem of them, respectively.

The cache policy for popular content is introduced in Algorithm 1. The Algorithm 1 is designed to tackle the cache problem of popular content. Line 1 to line 2 receive data requests and calculate the number of data requests to recognize popular content and normal content. In line 4 to line 6, the popular content is cache on the router \(z_{i}\) if a user under the router \(z_{i}\) requests the popular content and the related cache capacity of router \(z_{i}\) is larger than the amount of the popular content. In line 7 to line 9, the CPUL scheme checks the cache capacity occupied by content \(j\) on router \(z_{i}\) and caches the content with the highest request number.

figure a
figure b

The cache policy for normal content is introduced in Algorithm 2. The Algorithm 2 is designed to tackle the cache problem of normal content. The input is same as Algorithm 1 and output is routers for caching normal content. In line 1, CPUL scheme generates a descending order list of user requests on normal content. In line 3 to line 5, CPUL scheme searches routers which has enough cache capacity and calculates their benefit \(B_{i}\). The router with the highest benefit is selected to cache normal content. In the proposed CPUL scheme, normal content only caches on the router with the highest benefit. Therefore, router’s cache capacity can be used to cache popular content for the higher cache hit rate. In line 6 to line 9, if the cache capacity of the router \(z_{i}\) is exhausted, normal content will be cached to other routers which has remaining cache capacity, until the content of all users’ requests cached in routers.

Example of CPUL cache scheme

Herein, we illustrate the CPUL scheme with an example. The network topology of the cache example and the request distribution of data content are captured in Fig. 2. There are 7 routers in this network and numbered with router A to router G. Routers A, B, C, E and G receive users’ requests for data content x, routers A, D and E receive requests for data content y, and only router F receives request for data content z. It can be observed the majority of routers receive requests for data content x. According the number of request for data content, content x is marked as popular content and content y and z are marked as normal content.

Fig. 2
figure 2

Request distribution of data content

After determining data category, the proposed CPUL scheme caches data content based on user’s location. The result of content cache is captured in Fig. 3. According to Algorithm 1, popular content is cached on routers where receive request for popular content, i.e. routers A, B, C, E and G. Therefore, data content can be delivered to users with the higher cache hit rate and cache utilization. Then, according to Algorithm 2, data content y is cached on router B so that it can be provided to its neighbor routers as well as routers A, D and E. If the cache capacity of router B is insufficient to cache content y, the data content y will be stored in the routers which receive requests for content y as well as routers A, D and E. As a result, it can be observed that the CPUL scheme not only caches popular content on the routers receive requests for data content x but also caches normal content on router B for providing data content y to its neighbor routers.

Fig. 3
figure 3

Cache results of CPUL scheme

Simulation results

Simulation settings

The simulation was conducted on a PC running Linux and using ndnSIM [35] to construct the proposed CPUL scheme. The used parameters in simulations are captured in Table 2. In simulations, a tree-structured network topology includes 31 routers is used, and the maximum cache capacity of each router is 100 MB. Then, the data content is categorized into 10 kinds, and the size of each content ranges from 1 to 50 MB. The number of request for data content is randomly generated. When simulation starts as well as initialization stage, each router randomly requests five to ten types of data content. According to the number of content requests, data content is classified into popular content and normal content. The proposed CPUL scheme is compared with the original cache scheme of CCN and the MPC cache strategy [32], in terms of cache hit rate, total size of cache data, average hop count and delay time, and the utilization of cache capacity.

Table 2 Simulation parameters

Simulation results

The results of released cache size versus cache hit rate is captured in Fig. 4. It can be observed that the cache hit rate improves when the ratio of released cache size increases. When the cache capacity of a router is small as well as 0.1, its released cache capacity is inadequate for the proposed CPUL scheme. Because the CPUL scheme needs sufficient cache capacity to cache popular content, its hit rate is lower than the original CCN and MPC scheme. When the released cache size is equal to or larger than 0.2, the cache hit rate of proposed CPUL is higher than that of CCN and MPC schemes. In addition, the CPUL scheme yields significantly higher cache hit rate than the CCN and MPC schemes when the released cache size is equal to or higher than 0.5. This is attributed to the fact that the CPUL scheme efficiently utilizes cache capacity to cache popular content.

Fig. 4
figure 4

The released cache size versus hit rate

The results of related cache size versus the total size of cache data are captured in Fig. 5. The total size of cache data is calculated by the summation of content store usage of all routers. In other words, a lower total size of cache data represents a cache scheme uses less content store, and vice versa. It can be observed that the CPUL scheme always caches less data than that of the original CCN and MPC scheme. Besides, the original cache scheme of CCN spends the highest total size of cache data. This is attributed to the fact that the CPUL scheme caches popular content and normal content on suitable and correct routers, thereby it doesn’t need to cache redundant data content.

Fig. 5
figure 5

The released cache size versus the total size of cache data

Herein, the average hop count and average delay time are discussed at the same time. The results of released cache size versus average hop count are captured in Fig. 6. The average hop count represents that each router obtains data content from which router and then averages the hop count of all routers. In other words, a lower average hop count means routers obtain data content through less hops. The results of released cache size versus average delay time are captured in Fig. 7. The average delay time represents the waiting time of a user from requesting to receive data content. It can be observed that the CPUL scheme needs higher average hop count and yields higher delay time than the MPC scheme when the released cache size is less than 0.8. When the released cache size is higher than 0.8, the CPUL scheme efficiently utilizes cache capacity to place data content. The original cache scheme in CCN caches data content on routers among the routing path, thereby it yields lower average hop count and delay time than that of the MPC and the proposed CPUL scheme when the released cache size is higher than 0.6.

Fig. 6
figure 6

The released cache size versus average hop count

Fig. 7
figure 7

The released cache size versus average delay time

The results of released cache size versus average cache utilization are captured in Fig. 8. It can be observed that the cache utilization increases when the released cache size increases. In addition, the proposed CPUL scheme yields the highest cache utilization than that of the original CCN and the MPC schemes. No matter the ratio of released cache size is small or big, the proposed CPUL scheme utilizes cache capacity more efficient than the CCN and MPC schemes. This is attributed to the fact that the CPUL scheme caches popular and normal content on suitable routers for the higher cache hit rate so that it uses cache capacity with high effect.

Fig. 8
figure 8

The released cache size versus the average cache utilization

Herein, the cache hit rate and the total size of cache data are discussed at the same time. The results of data category versus hit rate are captured in Fig. 9. It can be observed that the cache hit rate decreases when the number of data category increases. The results of data category versus the total size of cache data are captured in Fig. 10. It can be observed that the total size of cache data accompanies with the number of data category increases. First of all, no matter how many categories of requested data, the proposed CPUL scheme yields the highest hit rate and the lowest total size of cache data than that of the original CCN and MPC schemes. The original cache scheme of CCN has the lowest hit rate and highest size of cache data because it caches redundant data content on routers. When data category increases, the original CCN cache scheme suffers from limited cache capacity thus results in the lowest hit rate. The MPC scheme is better than the original CCN but worse than the proposed CPUL scheme, because it caches more redundant data content than the CPUL scheme and yields lower hit rate and higher cache size.

Fig. 9
figure 9

The categories of requested data versus hit rate

Fig. 10
figure 10

The categories of requested data versus the total size of cache data

Herein, the average hop count and average delay time are discussed at the same time. The results of data category versus average hop count and average delay time are captured in Figs. 11 and 12, respectively. It can be observed that the CPUL scheme yields lower average hop count and delay time than the MPC scheme when the number of data category is lower than 30, but has higher hop count and delay time when data categories is more than 30. This is attributed to the fact that the proposed CPUL scheme caches popular and normal content on suitable routers. When the number of data category increases, the CPUL scheme needs to cache data content on routers with higher hop count that leads to higher delay time. However, we consider that the slightly higher average hop count and delay time is acceptable since the CPUL scheme achieves significantly higher cache hit rate.

Fig. 11
figure 11

The categories of requested data versus average hop count

Fig. 12
figure 12

The categories of requested data versus average delay time

The results of data category versus average cache utilization are captured in Fig. 13. It can be observed that the cache utilization decreases when the category of requested data increases. Moreover, the proposed CPUL scheme yields the highest cache utilization than that of the original CCN and MPC schemes. No matter how many data categories exist in the network, the proposed CPUL scheme achieves the highest cache utilization. The is attributed to the fact that the CPUL scheme efficiently utilizes the cache capacity of routers to cache popular and normal content. Since the cache capacity of a router is a finite resource, the CPUL scheme has the highest cache utilization is an outstanding achievement.

Fig. 13
figure 13

The categories of requested data versus average cache utilization

Conclusions

In this paper, the cache problem of CCN is studied and solved by the proposed CPUL scheme. The CPUL scheme categories data content into popular content and normal content according to the number of requested data from users. Then, the CPUL caches popular and normal content on suitable routers based on user location and content popularity. The normal content is temporally stored in neighbor routers to preserve more cache capacity for popular content. Simulation results showed that the CPUL scheme is superior to the original cache scheme in CCN and the MPC scheme in terms of higher cache hit rate and cache capacity utilization with slightly higher average hop count and delay time. In the future, we will propose a service-oriented cache scheme for solving the cache problem of different types of services in CCNs.