# CoKnowEMe: An Edge Evaluation Scheme for QoS of IoMT Microservices in 6G Scenario
## 3 Results
### CoKnowMe: Architectural and Analytical Model
#### 3.3.7 Pseudocode of the Model  
The pseudocode of the model is shown as Algorithm 1:  
Figure 5: Evaluation of the individual levels. The figure shows the different outputs of the different individual levels and the role of the use context in the definition of the attributes’ weights.  
Figure 6: Overall Evaluation. The figure puts in evidence how the different individual levels of the proposed architectural model can be chained to provide an overall evaluation.The figure also takes into account the role of the use context in the definition of the attributes’ weights.  
```
INPUT:\(s\), a IoMT Microservice; microservice graph \(G^{\prime}=(R_{k},E^{\prime})\) with \(R_{k}\) set of Resources, \(E^{\prime}\) set of edges; \(i\) use context; \(N\) the whole attributes population with elements \(j\in N\). OUTPUT:\(G^{\prime\prime}=(N^{\prime},E^{\prime\prime})\) evaluation graph, with \(N^{\prime}\) set of vertices with \(N^{\prime}=N^{\prime}_{A}\cup N^{\prime}_{ll}\cup N^{\prime}_{llX}\) a merging of selected subset of attributes in function of \(i\) use context and \(s\) microservice and \(E^{\prime\prime}\) set of edges; \(QoS_{i}\) quality of service value. PHASE 1:\"Selection and Clustering of Attributes Set\".
1:INITIALIZE Acceptability Attributes Set \(N^{\prime}_{A}\leftarrow\emptyset\)
2:INITIALIZE Usability Attributes Set \(N^{\prime}_{ll}\leftarrow\emptyset\)
3:INITIALIZE User Experience Attributes Set \(N^{\prime}_{llX}\leftarrow\emptyset\)
4:GET the use context \(i\)
5:SET the \(N^{\prime}\subset N\) population of attribute.
6:SET \(N^{\prime}\) into three clusters as the three different levels of evaluation, respectively \(N^{\prime}_{A}\), \(N^{\prime}_{ll}\), \(N^{\prime}_{llX}\).
7:COMPUTE the values \(w_{j}\) and the weight \(x_{ij}\), \(\forall j\in N^{\prime}\), with the use context \(i\). PHASE 2:\"WSM method in complex graph for QoS computation\".
8:SET \(G^{\prime\prime}\) the Evaluation Graph as the weighted complex network graph \(G^{\prime\prime}=(N^{\prime},E^{\prime\prime})\) with \(N^{\prime}\) population and \(E^{\prime\prime}\) edges, with \(x_{ij}\) weights of the weighted directed links.
9:GET \(p\in P\) the evaluation paths in \(G^{\prime\prime}=(N^{\prime},E^{\prime\prime})\), composed by a sequence of weighted edges among \(j\in N^{\prime}\), with \(j\in N^{\prime}_{A}\) or \(j\in N^{\prime}_{ll}\) or \(j\in N^{\prime}_{lX}\) or \(j\in N^{\prime}_{A}\cup N^{\prime}_{ll}\) or \(j\in N^{\prime}_{A}\cup N^{\prime}_{llX}\).
10:COMPUTE the resulting sum of a sequence of weighted directed links that constitutes the path \(p\in P\) mined from \(G^{\prime\prime}=(N^{\prime},E^{\prime\prime})\) with weights \(x_{ij}\), \(\forall j\in N^{\prime}\) in the use context \(i\), with values \(w_{j}\), based on clusters to which nodes \(j\) of the path \(p\) belong to.
11:COMPUTE \(QoS_{i}\) quality of service value for \(s\in S\), whose topology is expressed as \(G^{\prime}=(R_{k},E^{\prime})\), with \(i\) use context. END
```  
**Algorithm 1****CoKnowEMe Evaluation Algorithm for IoMT Microservices**  
The various steps of our modelling approach and procedure allow us to quantify the quality of service of an IoMT microservice, in particular, starting from the attributes set, the use context and graph that represents the networked resources of the \(s\) microservice, we are able to quantify a measure of quality of service through a selection and clustering of the networked attributes and by applying the WSM methodology.