# Research on SWIM Services Dynamic Migration Method +
## 4 SWIM Service Dynamic Migration Method
### Destination Node Selection Mechanism
\begin{cases}1&\text{$requires$ user authentication and communication encryption}\\ 0&\text{$doesn^{\prime}t$ requires user authentication and communication encryption}\end{cases} . \tag{7}\]  
Integrity refers to the ability of a service to prevent unauthorized access or modification of data. As shown in Equation (8). \[I_{nt}= \begin{cases}1&\text{$requires$ access control}\\ 0&\text{$doesn^{\prime}t$ requires access control}\end{cases} . \tag{8}\]  
Non-repudiation refers to the extent to which an operation or event has occurred, so that it cannot be denied in the future. As shown in Equation (9). \[NonR= \begin{cases}1&\text{$with$ digital sign}\\ 0&\text{$without$ digital sign}\end{cases}  \tag{9}\]  
The QoS index of each SWIM service provider consists of an octet, which represents the quality of service of the SWIM service \(k\) provided by the service provider \(i\) in the SWIM network, as shown in Equation (10). \[QoS_{ik}=\left[ \begin{array}{cc}Ca_{ik}&TB_{ik}&Av_{ik}&FT_{ik}&Au_{ik}&Con_{ ik}&Int_{ik}&NonR_{ik}\end{array} \right] \tag{10}\]  
The SWIM domain periodically updates and records the QoS index of each SWIM service provider. When the dynamic migration mechanism is trigged by the time interval, the service node SP needs to hand over the service authority to the optimal quality of service node, and the destination node selection module acquires the QoS index of the candidate destination node in the migration cluster, and calculates the SWIM service provision according to Equation (11). The total QoS index of the service \(k\) provided by \(i\). \[QoS_{ik}^{total}=\sum\limits_{j=1}^{n}w_{ik}^{j}\times QoS_{ik}^{j} \tag{11}\]  
\[w_{ik}^{j}=\frac{\sum\limits_{i\
eq j}t_{trigger}-t_{i}^{j}}{(n-1)\sum\limits_{ i=1}^{n}t_{trigger}-t_{i}^{j}} \tag{12}\]  
where \(QoS_{ik}^{total}\) represents the total QoS index of the service \(k\) provided by the SWIM service provider \(i\), \(w_{ik}^{j}\) represents the degree of influence of the \(j\)-th QoS record of the SWIM service provider \(i\) on the service \(k\), and \(t_{trigger}\) represents the service dynamic migration mechanism trigger timestamp, \(t_{i}^{j}\) represents the timestamp of the \(j\)-th QoS record of the SWIM service provider \(i\). The total QoS index of all candidate nodes in the migration cluster can be obtained by Equation (11), and the candidate node QoS index matrix is constructed. \[QoS_{k}\prime=\left[ \begin{array}{cccccccc}Ca_{1k}&TB_{1k}&Av_{1k}&FT_{1k}& Au_{1k}&Con_{1k}&Int_{1k}&NonR_{1k}\\ Ca_{2k}&TB_{2k}&Av_{2k}&FT_{2k}&Au_{2k}&Con_{2k}&Int_{2k}&NonR_{2k}\\ \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\ Ca_{nk}&TB_{nk}&Av_{nk}&FT_{nk}&Au_{nk}&Con_{nk}&Int_{nk}&NonR_{nk}\\ \end{array} \right]. \tag{13}\]  
The sensitivity of the service to be transferred service \(k\) to the indicators of the QoS index is shown in Equation (14). \[\mu=\left[ \begin{array}{cccccccc}\mu_{1}&\mu_{2}&\mu_{3}&\mu_{4}&\mu_{5}&\mu _{6}&\mu_{7}&\mu_{8}\\ \end{array} \right] \tag{14}\]  
According to Equation (15), the QoS index of each SP of the SWIM service topic \(k\) is calculated and ranked, and the optimal QoS node is selected as the service migration destination node. \[QoS_{k}^{\prime\prime}=QoS_{k}^{\prime}\times\mu \tag{15}\]