# DTL-GNN: Digital Twin Lightweight Method Based on Graph Neural Network
## 3 Virtual Model Lightweight Approach
### Method Main Process
#### 4.3.1 DTL Knowledge Graph Database Construction

In practical industrial applications, the efficient maintenance and updating of the DTL knowledge graph database are crucial for ensuring its long-term value: A dynamic update mechanism is employed for real-time data collection and analysis, automatically incorporating new knowledge or relationships into the graph. Integrating automated maintenance tools, such as machine learning-based error detection and repair algorithms, can enhance the integrity and accuracy of the data. Well-defined data governance processes, including version management and permission control, are essential for ensuring the stable operation of knowledge graphs in multi-user environments. These measures will contribute to optimizing knowledge graphs and provide reliable support for industrial systems. The association network of the model can be mapped as a knowledge network of multiple ternary combinations, as shown in Figure 9, with parts as the ontology (V), attribute parameters, and classification information in the form of vectors as the attributes of the ontology \(\mathrm{A_{part_{n}}}=[\mathrm{a_{i1}},\mathrm{a_{i2}},\ldots,\mathrm{a_{in}}]\). The assembly information between parts is the relationship between nodes, and the parts' information vectors are the nodes' attributes. And connections between parts as the relationships E, which constitutes the knowledge graph of the model G, Equation (13). Figure 5.7

Figure 5.8

When modifying or adding components to a physical model, they are classified and simplified based on the existing database of the virtual model, and the entire model is updated accordingly. This means that new components are not only added to the DT but also processed according to the existing classification standards and simplification methods. This ensures consistency and efficiency across the entire system while effectively integrating the relationships between new and existing components. Upon completion of the calculation, DTL-GNN will integrate graph structures that are not present in the DTL database into the DTL database. The DTL database is continuously updated with the application of DTL-GNN, Equation (14). \(G_{update}\) is the updated knowledge graph, and \(G_{new}\) is the newly added knowledge graph. Figure 5.9 The structure of the knowledge graph and the composition of the knowledge unit in the DTL database. #### 4.3.2 Graph Matching Strategy

This section uses the construction of a digital twin for a robotic arm as a case study and imports raw virtual models from the physical space. Attribute maps are established using DTL-GNN and matched with the DTL database. Graph matching, an essential concept in graph theory, is defined as identifying all graph structures in a data graph G that are isomorphic to a target graph q. In the academic community, research on graph matching is primarily divided into two categories: exact matching and approximate matching [51]. Exact matching entails finding all subgraphs identical to the target graph q, including the corresponding nodes and edges. This strict constraint holds significant importance in theoretical computer science. However, real-world data often contain noise or missing information. The primary objective of graph matching in the DTL database is to identify graph structures that are similar to the target model. Consequently, exact matching methods are challenging to apply and may not meet the DTL database's requirements. Moreover, some algorithms perform well in exact graph-matching studies when dealing with minor to medium-sized graphs. However, as the size of the graph increases, the computational costs to meet these strict constraints grow exponentially, making the search time unmanageable [52]. Approximate matching, on the other hand, relaxes these constraints, allowing for some degree of difference between the data graph G and the target graph q, such as missing or imperfectly corresponding edges or nodes.