# DTL-GNN: Digital Twin Lightweight Method Based on Graph Neural Network
## 3 Virtual Model Lightweight Approach
### Method Main Process  
The logic and implementation of the DTL-GNN method are illustrated in Figure 2. Initially, Parts are extracted from the Model, followed by the extraction of geometric information from the Parts itself. Subsequently, an AAG is generated, from which topological information is extracted. The Model is then used to generate a complex network corresponding to the graph connection data. Component Gattribute reads the topological and geometric information to output the attribute embedding vector. Component Gstruc inputs the model's graph connection data and generates the structural embedding vector. Subsequently, the adaptation function dynamically merges these two types of embedding vectors into Multiple embeddings, and the classification model outputs the corresponding part category based on the multiple embedding. Finally, the simplification method is applied to the parts according to their category, achieving hierarchical simplification. The Data extraction stage is the foundation for building DTL-GNN, providing comprehensive data for subsequent operations. The required data includes the topological relationships and geometric information of the parts. The geometric \(G_{i}\) and topological \(T_{i}\) data are extracted from the model, complex networks, and AAG, as shown in Equations (1) and (2). The extraction of each element in \(T_{i}\) is shown in Equations (3)-(5). \[G_{i}\in[fc_{i},m_{i},v_{i}] \tag{1}\]  
\[T_{i}\in[N_{i,\max},EC_{i,\max},DC_{i,\max}] \tag{2}\]  
\[N_{\max}=\max_{i\in n}N_{i} \tag{3}\]  
\[EC(i)=u_{i}=c\sum_{j=i}^{n}a_{ij}u_{j},EC_{\max}=\max_{i\in n}EC_{i} \tag{4}\]  
Figure 2: DTL-GNN method implementation flow. \[DC(i)=\frac{N_{i}}{n-1},DC_{\max}=\max_{i\in n}DC_{i} \tag{5}\]  
In the Graph Neural Net stage, the analysis of parts should comprehensively consider factors such as their characteristic attributes, assembly level, and the importance of neighboring parts. Therefore, graph neural networks are used to aggregate the above information iteratively. Topological and geometric information are transmitted downwards as data reflecting part features. DTL-GNN uses a graph neural network to process the data. Since the parts play different assembly roles in different models, two types of embedding are generated for the parts' intrinsic properties and the models' assembly relationships. The analysis phase includes graph attribute and graph structure analysis. Graph attribute analysis generates corresponding embeddings based on geometric and topological information, assembly relationships, and graph data in complex networks. Graph structure analysis generates embeddings that reflect the structural features of nodes based on complex relational networks in the model. In the Classification and Simplify stage, the attribute and structure embedding are synthesized into multiple embeddings through the Adaptation Function. The simplification method and parameters are assigned based on the results of classification prediction to perform simplification operations on the part ontology. The following eight steps can summarize the building process of DTL-GNN:  
* Step 1: Import the virtual model corresponding to the real space and read the geometric information of each part;
* Step 2: Treat model parts as nodes and abstract assembly relationships as edges, building a complex network of the model. Consider the faces and intersection lines of the parts as nodes and edges to create their attribute adjacency graph;
* Step 3: Extract topology information in AAG and complex networks;
* Step 4: Take geometric information, topological information, and complex network as graph data and input them into the graph model to obtain the embedding of attributes and structures, respectively;
* Step 5: Find the central node in the graph and initialize the hyperparameters;
* Step 6: The Adaptation Function synthesizes multi-embedding and performs classification prediction.