## 3 Application of the Proposed MSPSO Algorithm to the IPTBK Problem
### Solving the IPTBK Problem Using the MSPSO Algorithm
#### 3.2.2 Route Construction Phase  
Because traditional PSO algorithms tend to route particle swarms to similar paths with the smallest cost in a large network topology, they cause rapid accumulations of particles to converge to a single path. The subgroup strategy [21] is expected to decrease the speed of accumulation of particles and increase the search space with high accuracy on multiple routing paths for identifying all the attack sources. As displayed in Figure 8, a two-group strategy was implemented in the attack path-search process. For example, the original particle swarm was divided into two, three and five sub-swarms to compare the obtained convergence performance with that provided by a particle swarm in the traditional PSO algorithm. In addition to the local and global update of the position and velocity vectors, the fitness value of each path in each subswarm must be updated to evaluate whether the particles travel on attack paths back to the attack sources. Local Search Process  
Inspired by DMS-PSO [22; 23], the particle swarm uses a greedy local search technique associated with the quasi-Newton gradient descent method (BFGS) to identify the possible local optimal positions with an intelligent reconnaissance strategy, as presented in Equation (9). Theoretically, the BFGS method can efficiently search for the individual optimal position (\(P_{\text{best}}\)) and the optimal position in a subswarm (\(P_{\text{gest}}\)) in a convex space. Moreover, it can efficiently improve the solution quality of each particle. To determine \(P_{\text{best}}\) and \(P_{\text{gbest}}\) for a subswarm, BFGS can be used for dynamically adjusting the particle acceleration (weight \(w_{i}\)) for avoiding overfitting by minimising the routing cost \(C_{i}\), which is expressed in Equation (6). \[w_{i}(t+1)=w_{i}(t+1)-\eta\frac{\partial C_{i}}{\partial w_{i}}, \tag{9}\]  
where \(\eta\) is the learning factor. The recursive process with the aforementioned updating rule causes the \(P_{\text{best}}\) and \(P_{\text{gbest}}\) to use an estimated fitness value for each particle. Moreover, DMS-PSO allows large amounts of information exchange in a subswarm to enhance the movement ability of some individual particles. A fraction (e.g., 30%) of the particle subswarm is selected to remain at the same value as \(P_{\text{gbest}}\) in a subswarm to improve the local search results when the particle position is updated. Once the \(P_{\text{best}}\) and \(P_{\text{gbest}}\) in a subswarm have been calculated, they must be used to update the velocity and position vectors. Considering the practical requirements and  
Figure 8: Improvements in the PSO algorithm when using the two-group strategy in the route-searching process. limitations of traceback to the sources of DDoS attacks, this study revised the updating rule of the MSPSO algorithm to formulate the position and velocity update rules as follows:  
\[v_{i}^{k}(t)=\ w_{i}\cdot v_{i}^{k}\ (t-1)+c_{1}\cdot rand()\cdot\Big{(}p_{\text{ best}}-x_{i}^{k}(\text{t}-1)\Big{)}+c_{2}\cdot rand()\cdot\Big{(}p_{\text{gbest}}-x_{i}^{k}( \text{t}-1)\Big{)} \tag{10}\]  
\[x_{i}^{k}(t)=x_{i}^{k}(t-1)+\Delta t_{ij}^{k}(t-1) \tag{11}\]  
\[\Delta t_{ij}^{k}(t-1)\ =\ \left\{ \begin{array}{ll}\
icefrac{{\pi_{i}^{k}(t) \cdot\text{Q}\xi}}{{d_{ij}^{k}}}&\text{if the path is on the optimal path in $k-subswarm$}\\ 0&\text{otherwise}\end{array} \right. \tag{12}\]  
In Equation (11), \(\Delta t_{ij}^{k}(t-1)\) represents the movement distance of \(\Delta t\) in Equation (10), which is inversely proportional to the path distance \(d_{ij}^{k}\) of the 2 end nodes. The parameter \(d_{ij}^{k}\) is the number of hops on the \(i\) attack path in \(k\) subswarm. Global Search Process: Dynamic Neighbourhood  
To mimic the sociological phenomenon where individuals indirectly share information with others located around themselves, the proposed MSPSO algorithm implements a reorganisation plan of the particle swarm when premature convergence occurs.