# Collaborative Web Service Discovery and Recommendation Based on Social Link
## 3 Social Link
### Link Factors
#### 3.1.2 Clustering Link  
Clustering Link (\(CL\)) contains two sub-classes: Service Clustering Link (\(SCL\)) and User Clustering Link (\(UCL\)), the former is the set of services and their similarities, which is described as Equation (2).  
\[SCL_{i}=\left\{(ws_{j},SSim_{ij})\big{|}SSim_{ij}>SSim_{0}\right\} \tag{2}\]  
where, \(SCL_{i}\) denotes the Service Clustering Link of Web service \(ws_{i}\); \(SSim_{ij}\) is the service similarity between \(ws_{i}\) and \(ws_{j}\), and \(SSim_{0}\) is the threshold of it.  
A representation of a service specification was introduced in [15], which can be shown as following:  
* A service profile \(P=\langle sn;\odot\rangle\) consists of a service name \(sn\) and a set \(\odot\) of operations.
* An operation \(O\)\(\in\)\(\odot\) has a name \(O\):\(m\) and a set \(O\):\(IN\) and \(O\):\(O\):\(OUT\) of inputs and outputs: \(O=<\)\(n\); \(IN\); \(OUT\)\(>\). For example, \(P\):\(sn\) is the service name, and \(P\):\(\odot_{i}\):\(IN_{j}\) is the \(j\)-th input of the \(i\)-th operation.  
Based on the representation, we can calculate the similarity \(SSim_{ij}\) by Equation (3).  
\[SSim_{ij}=\omega_{1}\times NSim(ws_{i}.sn,ws_{j}.sn)+\omega_{2}\times FSim(ws_{ i}.o,ws_{j}.o) \tag{3}\]  
where, \(ws_{i}\):\(sn\) and \(ws_{i}.o\) are respectively the name and the set of function properties of \(ws_{i}\); \(NSim(\cdot)\) and \(FSim(\cdot)\) are the similarity functions proposed in [2]; additionally, \(0<\omega_{1}\), \(\omega_{2}<1\) and \(\omega_{1}+\omega_{2}=1\).  
Figure 2: The user personalization model of \(u_{a}\).  
Similarly, User Clustering Link can be defined as the set of users and their similarities, which is described as Equation (4).  
\[UCL_{m}=\{(u_{n},USim_{mn})|USim_{mn}>USim_{0}\} \tag{4}\]  
In this equation, \(UCL_{m}\) denotes the User Clustering Link of user \(u_{m}\); \(USim_{mn}\) is the user similarity between \(u_{m}\) and \(u_{n}\), and \(USim_{0}\) is the threshold of it.  
In our view, we can get the value of a user similarity between two users by comparing their personalization models. For example, if there is another personalization model of \(u_{b}\) which is shown as Figure 2  
Based on the match tree, we can calculate the value of the user similarity between users according Equations (5) and (6), for \(u_{a}\) and \(u_{b}\), the user similarity \(USim_{ab}\) = 0.68.  
\[USim_{ab}=\frac{2\times FDO_{ab}\times\sum_{cp_{k}\in MT}\left( Intr(cp_{k})\times Sim(cp_{k})\times\frac{D(cp_{k})}{DOM_{ab}\times(\sum_{c_{i}\in P _{a}}\left(Intr(c_{i})\times\frac{D(c_{i})}{DOM_{a}}\right)+\sum_{c_{j}\in P_{b }}\left(Intr(c_{j})\times\frac{D(c_{j})}{DOM_{b}}\right)}\right)}{\left.S(cp_{k })-1+D(par(cp_{k}))+\sqrt{\frac{N(par(c_{i}))\times N(par(c_{j}))}{N(par(c_{i})) +N(par(c_{j}))}},cp_{k}=(c_{i},c_{j}) \tag{6}\]  
where, \(MT\) represents the matching tree between user preference models; \(S(cp_{k})\) is the distance between concept \(c_{i}\) and concept \(c_{j}\); \(par(cp_{k})\) is the parent node of \(cp_{k}\); \(Intr(c_{i})\) means the interestingness in concept \(c_{i}\); \(D(cp_{k})\) is the depth of \(cp_{k}\); \(DO_{a}\) signifies the depth of user personalization model \(P_{a}\); \(N(c_{k})\) denotes the density of concept \(c_{k}\); \(FDO_{ab}\) is the floor depth between user personalization model \(P_{a}\) and user personalization model \(P_{b}\), and \(RDO_{ab}\) is the roof depth between them. Their definitions and calculations are shown in [2].