## 4 Proposed Method
### WOA-Based Alarm Hierarchical Clustering Process  
After introducing the coding and decoding scheme, fitness function and crossover and mutation operator of the WOA applied to hierarchical clustering, in this section, we present the processing of the local and global versions of WOA applied to the alarm hierarchical clustering process. In order to express clearly, the WOA hierarchical clustering of the local version and global version are respectively called WOAHC-L and WOAHC-G. Compared with the traditional alarm hierarchical clustering algorithm, which can only generate one random generalization alarm at a time, WOA uses multiple search agents to search the solution set space of the generalization alarm simultaneously, which can improve efficiency and obtain more possibilities of solution sets. The random agent selection stage of WOA provides a higher possibility to jump out of the local optimum to find a better solution set. The use of crossover operators and mutation operators can help WOA deal with various types of data and enhance the ability of local search and global search. We first provide the algorithm flow of WOAHC-L. The process of WOAHC-L can be described as follows: the algorithm first initializes several search agents, each representing a cluster center of the alarm. Then, we calculate the fitness value of each search agent according to the fitness function. The cluster center represented by the search agent with  
Figure 11: An alarm record before/after mutation operation. Figure 10: Two new alarm records after a crossover operation. Figure 9: Property fields for the two alarm records waiting for a crossover operation. the best fitness value is the optimal solution. After that, according to WOA's search mechanism, the remaining search agents explore the solution set space around the optimal solution through exploitation phase and exploration phase and update the value of the optimal solution whenever there is a better solution. After several iterations, the cluster center represented by the search agent with the optimal fitness value is output, and alarms belonging to that cluster are added to the cluster and removed from the original alarm set. Each time the algorithm is executed, a cluster center is output and the alarms belonging to the cluster are deleted from the original alarm set. When the remaining alarms no longer meet the clustering rules after several times of algorithm execution, the algorithm is finished. The alarm clustering process based on WOAHC-L is shown in Figure 12.  
The algorithm pseudocode of WOAHC-L is shown in Algorithm 2. ```
0:threshold, N, maxIteration, mutation rate, t = 0, k = 0
0:alarm_center[], alarms after clustering
1:while the number of current alarms is bigger than threshold do
2: Randomly generate initial population Xi (i = 1, 2,..., N)
3: Calculate the fitness value of each solution
4: Get the best Xi that has the largest fitness value, mark it as X*
5:while\(t<\) MaxIterationdo
6:for population Xi(i = 1, 2,..., N) do
7: Use Equations (3)-(5) to update a,A



Based on the excellent local and global search capabilities and the group search mechanism of WOAHC-L algorithm, we can find excellent alarm cluster centers. However, the problem of WOAHC-L is that there may be a high degree of overlap between the cluster centers obtained by executing WOAHC-L several times, so that the alarm sets originally belonging to the same cluster may be divided into multiple clusters. In other words, WOAHC-L only focuses on the generation of single cluster centers and does not consider the overlap between the finally obtained cluster centers. In order to solve the above problem of the WOAHC-L algorithm, we propose a global version based on WOA hierarchical clustering, namely WOAHC-G, which uses the second encoding scheme of the search agent mentioned in Section 4.1 above. The process of WOAHC-G can be described as follows: the algorithm initializes several search agents, each of which is composed of \(N\) cluster centers and represents the final clustering result.