## 2 Methods
### Improved Branch-and-Bound Algorithm for Topology Comparison between Diagrams and Physical Entities
#### 2.4.2 Node Search Model Based on the DQN with MGCN Networks  
As previously mentioned, different node search strategies yield varying results in the MCS search algorithm. Traditional algorithms often suffer from computational overload and are ill-suited for handling large-scale topological structures in real-world scenarios. For this reason, this paper adopts the form of fusion multi-module graph convolution for the extraction of topological graph information, and then realizes the evaluation of the results of different search nodes through the deep Q-network, so as to achieve the fast implementation of the subgraph search algorithm. Considering that the action space of each new search node may be large and has many influencing factors, it is difficult to achieve a quantitative description of each action result. Instead, using the DQN, each node action space \((a_{t},b_{t})\) can be mapped to a specific score, \(Q(a_{t},b_{t})\), through the automatic learning of various neural network parameters, which in turn achieves the autonomous selection of node pairs. Based on the aforementioned approach, in order to consider the matched nodes and the whole graph information fully, the graph convolution network is used to embed the node subgraph information in the topological graph that has been matched, which are denoted as \(h_{a1}\) and \(h_{a2}\), respectively. The information of the whole topological graph is denoted as \(h_{G1}\) and \(h_{G2}\) through the embedding network. Each state can thus be represented as \(h_{st}=CONCAT(h_{a1},h_{a2},h_{G1},h_{G2})\). The node information corresponding to the action space can be represented as \(h_{bt}=CONCAT(h_{i},h_{j})\) after passing through the embeddingfunction. The corresponding Q-value (Equation (1)) can be represented by the MLP network as follows:  
\[Q(a_{t},b_{t})=\text{MPL}(\text{CONCAT}(h_{at},h_{bt}))\] \[=\text{MPL}\big{(}\text{CONCAT}\big{(}h_{G1},h_{G2},h_{a1},h_{a2},h _{i},h_{j}\big{)}\big{)} \tag{1}\]  
To enhance the impact of adding node pairs \((i,j)\) on the search result further, a discount factor, \(\lambda\), is introduced. The Q-function can be further improved, \(Q^{*}(a_{t},b_{t})=1+\lambda V^{*}(a_{t+1})\), where \(V\) represents the reward function. To introduce symmetry into the model, a function \(IET(\cdot)\) with commutative properties is introduced, enhancing the model's adaptability to symmetric graphs. Using the previously defined domain to amplify the impact of different actions on the results further. For domain \(D^{k}\), its embedded information can be represented as Equation (2), where \(GETOUT(\cdot)\) denotes the aggregation of all elements in a particular set to obtain the result. \[h_{R_{k}}=\text{IET}\big{(}\text{GETOUT}\big{(}\big{\{}h_{i} \mid i\in V^{\prime}_{k1}\big{\}}\big{)},\] \[\text{GETOUT}\big{(}\big{\{}h_{j}\mid i\in V^{\prime}_{k2}\big{\}} \big{)}\big{)} \tag{2}\]  
The embedding information for all connected domains, \(h_{R_{C}}\), can be expressed as \(h^{R_{C}}=\text{GETOUT}\Big{(}\Big{\{}h_{R_{k}}\mid k\in R^{(c)}\Big{\}}\Big{)}\). Based on the above definition, the Q function is rewritten as shown in Equation (3). \[Q(a_{t},b_{t})=1+\lambda\,\text{MPL}(\text{IET}(h_{G1},h_{G2}),\] \[\text{IET}(h_{a1},h_{a2}),h_{Rc},h_{R0}) \tag{3}\]  
The DQN network employed in this study is illustrated in Figure 8. For graph embedding of topological nodes, we select adjacency matrix \(A\), node attribute matrix \(B\), and node degree vector \(l\) as inputs to the graph embedding module. The GCN is used for feature extraction from both the entire topological graph and its matched subgraphs. To enhance the efficiency of graph embedding, we adopt the SAGE model described in [27] for rapid embedding of node and graph features. This is followed by a CNN to form embedding information vectors for different topological graphs, and convolutional computations are performed to enable the function \(IET(\cdot)\) for topological graph information.