# A Research Approach to Port Information Security Link Prediction Based on HWA Algorithm
## 4 Research Methodology
### Constructing the Data Model Based on the HWA Algorithm  
In the research method of port information security link prediction based on the HWA algorithm, the first part is the data construction part, which is based on the adjacency matrix of the general graph to understand the relationship between nodes, and an algorithm based  
Figure 2: The overall flow diagram of the research method of port information security link prediction based on the HWA algorithm. The graph comprises three parts: (1) data construction, where the adjacency matrix is constructed from port relationships and transformed into a hypergraph adjacency matrix using the HWA algorithm; (2) data preprocessing, where the hypergraph adjacency matrix is input to a GCN model for training, generating optimized node feature vectors; and (3) model evaluation, where the MLP utilizes these vectors for edge scoring in link prediction, with the model performance evaluated using the AUC and F1 metrics. on HWA is proposed to construct the hypergraph association matrix. For some current real-world applications, the relationship between nodes can be extremely complex, and the edges of the general graph can only connect two nodes, and it is difficult to accurately represent complex relationships such as many-to-many, many-to-one, and so on; at this time, the general graph can not satisfy the demand, so the hypergraph is used to capture the complex relationship structure. For hypergraphs where node information is difficult to obtain, the first thing that should be carried out is to construct a hypergraph, and determining the number of hyperedges is a key issue in constructing a hypergraph, so this experiment represents the hypergraph association matrix by the adjacency matrix of the general graph. The target output of the algorithm defined in this experiment is the hypergraph association matrix \(H\), and Figure 3 describes the HWA algorithm as a flow diagram. Based on the existing network topology, this paper proposes the HWA algorithm to construct the hypergraph. The hypergraph constructed by this algorithm mainly reflects the higher-order attribute information, and in order to better capture the higher-order relationships in the hypergraph and improve the performance of the prediction, the self-attention mechanism is used. Through the self-attention mechanism, these relationships can be transformed into hyperedges in the hypergraph while preserving the complex relationships between nodes, thus better representing the connection patterns between nodes. A major problem in the implementation of this algorithm is how to determine the total number of hyperedges. To solve this problem, this paper uses the node \(e\) as the center  
Figure 3: The schematic diagram of the HWA algorithm. The adjacency matrix of the general graph is formed into a hypergraph adjacency matrix through the HWA algorithm, and a self-attention mechanism is added to better capture high-order relationships in the hypergraph and improve prediction performance. node of the hyperedges in the hypergraph \(\xi\) and then determines the non-center nodes in each hyperedge by the optimal coefficient matrix of the HWA algorithm \(R^{*}\). Finally, the association matrix \(H\) of the hypergraph \(\xi\) is obtained by combining the variables of the adjacency matrix \(A\) of the general graph \(G\). The optimal coefficient matrix reflects the interactions between nodes in a general graph based on the local structure. The HWA algorithm to find the optimal coefficient matrix is shown in Equation (9), where \(I\) is the unit matrix, \(A^{T}\) is the transpose of the adjacency matrix of the general graph and \(\lambda\) is the penalty coefficient.