# Proactive Caching at the Edge Leveraging Influential User Detection in Cellular D2D Networks
## 4 Proposed Methodology
### Finding Influential Users and Popular Content  
After clustering of the social network, our task is to find the Influential Users (IUs) of the network and then find their content. An influential user can be defined as the most connected and active user of the network [43]. In order to find the IUs, we use the notion of centrality [44], which is a well-known concept in SNA. The centrality measure provides a way to quantify the importance of nodes with respect to their positions and neighborhood connectivity within a social network. While various centrality measures exist, eigenvalue centrality is the most successful measure for detecting the social hubs or IUs within a social network. It is a widely used measure for finding the nodes centrality in the networks [16; 45; 46].  
In order to find the IUs, we exploit the EigenVector Centrality measure. This measure uses the notion of eigenvector and eigenvalue of the adjacency matrix. It quantifies centrality of nodes based on centrality of its neighbors. Based on this measure, a node having more central neighbors will have greater centrality value. It can be formally defined as follows:  
\[x_{v_{i}}=\frac{1}{\lambda}\sum_{N\in G}a_{i,j}x_{v_{i}}, \tag{8}\]  
where \(\lambda\) is a normalization constant and \(N\) represents neighbors of node \(v_{i}\). \(a_{i,j}\) is 1 if nodes \(i\) and \(j\) are directly connected to each other, and 0, otherwise. The greatest value of \(x_{v_{i}}\) represents the highest influence of the user in the network. Equation (8) can be rewritten in a vector form as follows:  
\[\lambda x=Ax, \tag{9}\]  
where A represents the adjacency matrix of the graph, and \(x\) is the vector of the eigenvalue scores. Based on eigenvector centrality measure, if our clustering algorithm returns \(K\) clusters of the network, then we find \(K\) influential users, one for each cluster in our social network. As we are considering D2D communication, it is necessary to identify at least one influential user in each cluster in order to communicate with other users directly. In our social network model shown in Figure 2, different clusters of the network have been shown in different colors after applying our clustering algorithm. There is one central influential user (nodes with greater sizes) found by using an eigenvector centrality measure. For example, user 11 is the influential user of its community represented with the green color, and there are 16 members of its community. Overall, the network is divided into 15 different communities and each community has one influential user. Furthermore, users who join the network earlier have more of a chance to become more connected and are hence more popular and influential (users 0-20).  
Once we know the influential users and their communities, our next step is to determine the popular content of each community. For this purpose, inspired by the pervasive use of online social media, we assume that the content requested, generated, or accessed by the influential users is going to be the popular content for the same community, and we proactively cache this content based on the available cache size.  
Algorithm 2 shows a pseudocode for computing the centrality values. We initialize an empty matrix \(M^{N}\) for storing the centrality value of each node. Then, the algorithm recomputes the centrality score of each node as a weighted sum for centralities of all nodes in a node neighborhood. In order to normalize the centrality score, \(\lambda\) is used. We set the value of \(\lambda\) to the largest value of \(x_{u}\). The procedure repeats until the values of each node converge.  
After describing all the essentials in the following, we shall now present the proposed algorithm.  
```
1:procedureComputeCentrality(\(A\))
2: Initialize matrix \(M^{N}\) by 1
3:repeat
4:for\(v\in V\)do
5:\(x_{u}=\frac{1}{\lambda}\sum_{u\in|A|}A_{u,v}x_{u}\)
6: Update \(M_{u}\)
7:endfor
8:untilvalues of \(x_{u}\) converge
9:endprocedure
10:Return \(M\)
```  
**Algorithm 2** Compute Centrality