## 2 Materials and Methods
### MK-Mediod Algorithm
#### 2.3.3 Collaborative Storage and Resolution based on Index Neighbor Structure
```
Input: master node \(RN_{i}\), child nodes \(\{RN_{i+1}\}\), \(T_{i}\), \(T_{i+1}\) Output: index neighbor groups \(\{indexNet^{k},[RN_{i+1}^{1},RN_{i+1}^{2},\dots,RN_{i+1}^{t}]\}\)
1 sort \(\{RN_{i+1}\}\) with latency to \(RN_{i}\) in ascend order for\(i\) in \(range(1,number\ of\ \{RN_{i+1}\})\)do
2 choose the top i nodes as cluster centrics and each with a null sub-node list, and initialize cluster result \(\{\textit{centric}^{k},[]\}\) whiletruedo
3 for\(RN_{i+1}^{j}\) in \(\{RN_{i+1}\}\)do
4 measure latency from \(RN_{i+1}^{j}\) to each centric and choose the nearest centric, add \(RN_{i+1}^{j}\) to sub-node list of this centric
5 forcentric\({}^{k}\),sub node list in \(\{\textit{centric}^{k},\textit{sub node list}\}\)do
6 for\(RN_{i+1}^{j}\) in sub node listdo
7 lat = maximum latency from \(RN_{i+1}^{j}\) to other nodes in _sub node list_\(lat=lat+latency(RN_{i+1}^{j},RN_{i})\)
8 sort sub node list with \(lat\) in ascend order, choose the first node as cluster centric in this cluster
9 if all centric nodes remains the same as the former round then
10 break
11
12 for\(RN_{i+1}^{k}\) in \(\{\textit{centric}^{k}\}\)do
13 if\(lat>T_{i}-T_{i+1}\)then
14 this clustering fails the validation, continue with the next loop
15
16 return\(\{\textit{centric}^{k},\textit{sub node list}\}\)
```  
**Algorithm 2**MK-Mediod-based index neighbor construction  
```
Input: master node \(RN_{i}\), index neighbors set \(\{indexNet^{k}\}\), mapping items for co-storage \(\{items\}\)
1 store index information of \(\{items\}\) in \(RN_{i}\)
2 forindex neighbor node in \(\{indexNet^{k}\}\)do
3 store \(\{items\}\) in index neighbor node
4 remove \(\{items\}\) from \(RN_{i}\)
```  
**Algorithm 3**Collaborative Storage  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 4**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 5**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
9 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
10 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
11 redirect the request to \(indexNet^{k}\)
12
13 else
14 returnrecord to \(u_{i}\)
```  
**Algorithm 6**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 7**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
9 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
10 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
12 redirect the request to \(indexNet^{k}\)
13
14
15 else
16 returnrecord to \(u_{i}\)
```  
**Algorithm 8**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 9**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
9 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
10 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
11 redirect the request to \(indexNet^{k}\)
12
13 else
14 returnrecord to \(u_{i}\)
```  
**Algorithm 10**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 11**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
9 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
10 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
12 redirect the request to \(indexNet^{k}\)
13
14 end if
15 returnrecord to \(u_{i}\)
```  
**Algorithm 12**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 13**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
9 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
10 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
11 redirect the request to \(indexNet^{k}\)
12
13 end if
14 returnrecord to \(u_{i}\)
```  
**Algorithm 14**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4 find the index neighbor group where \(RN_{i+1}\) belongs to find the index neighbor node \(indexNet^{k}\) of this index neighbor group
15 redirect the request to \(indexNet^{k}\)
16
17 end if
18 returnrecord to \(u_{i}\)
```  
**Algorithm 15**Collaborative Resolution  
```
Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
2 ifrecord is nullthen
3 find the corresponding \(RN_{i+1}\) of \(u_{i}\)
4
5 redirect the request to \(indexNet^{k}\)
6
7 else
8 returnrecord to \(u_{i}\)
```  
**Algorithm 16**Collaborative Resolution  
``` Input: master node \(RN_{i}\), name in the resolution request \(name\), user for this resolution request \(u_{i}\)
1 record = resolve \(name\) in the mapping record table of \(RN_{i}\)
9

## 3 Evaluation and Discussion

### Experimental Setup

To evaluate the collaborative storage and resolution method in this paper, we generate a two-level resolution system structure according to the latency constraint of LNMRS, where level 1 corresponds to a latency parameter of 50 ms with only one master node, and level 2 corresponds to a latency parameter of 25 ms.