Method for lightweight three-dimensional CAD model classification and retrieval based on graph convolution network

By extracting topological geometric information from B-rep data using the FuS-GCN framework, the computational resource and time cost issues of 3D CAD model classification and retrieval in existing technologies are resolved. This enables efficient and accurate 3D CAD model classification and retrieval, which is suitable for reuse tasks in industrial manufacturing.

CN116187200BActive Publication Date: 2026-04-14HANGZHOU DIANZI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU DIANZI UNIV
Filing Date
2023-03-20
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively utilize the topological and geometric information of 3D CAD models represented by B-rep for classification and retrieval, and existing methods are insufficient to meet the demands of industrial applications in terms of computational resources and time costs.

Method used

A lightweight method based on graph convolutional networks is adopted. The topological geometric information is extracted from B-rep data through the FuS-GCN framework. Feature aggregation is performed using fused self-attention GCNs to construct a graph structure descriptor suitable for 3D CAD models, and then classification and retrieval are performed.

Benefits of technology

It achieves efficient and accurate classification and retrieval of 3D CAD models, reduces computing resource requirements, is suitable for reuse tasks in industrial manufacturing, and improves model reuse rate and classification accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187200B_ABST
    Figure CN116187200B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on graph convolution network's light weight three-dimensional CAD model classification and retrieval method, S1, constructs a three-dimensional CAD model dataset;S2, the data preprocessing and feature extraction of three-dimensional CAD model dataset are carried out, and then obtain geometric information and topological information, and the extracted geometric information and topological information are converted into three-dimensional model descriptor represented with graph structure;S3, construct graph convolution network FuS-GCN, according to graph convolution network FuS-GCN, three-dimensional model descriptor is input to guide three-dimensional CAD model classification and retrieval, obtain global feature vector, S4, global feature vector is input through a fully connected layer and obtains classification result;S5, the classification retrieval model that is composed of graph convolution network FuS-GCN and fully connected layer is applied to dataset and is trained and tested.The method is based on B-rep graph and designs the light weight fusion self-attention GCNs framework named FuS-GCN, to aggregate topological geometric features, realizes the classification and retrieval of CAD model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing knowledge reuse technology, specifically to a method for feature extraction, classification and retrieval of 3D CAD models represented by B-rep using a graph convolutional network based on feature fusion and self-attention pooling. Background Technology

[0002] As the foundation of the entire production process, 3D CAD (Computer-Aided Design) models play a crucial role in industrial manufacturing. With the development of intelligent manufacturing technologies and systems, the amount of data in 3D CAD models is rapidly increasing. These models contain a wealth of reusable embedded knowledge. However, designers need to expend considerable effort to find models that meet their requirements. A significant proportion of existing 3D CAD models can be reused for new product development; at least 75% of new product designs reuse existing knowledge and models. Only 20% of parts require entirely new designs, of which 40% can be directly reused for construction, and another 40% can be constructed by modifying existing CAD models. Therefore, reusing existing models significantly shortens the development cycle in industrial manufacturing and greatly reduces development costs.

[0003] Among the technologies involved in achieving 3D CAD model reuse, 3D CAD model classification and retrieval is one of the key technologies, requiring further in-depth research. However, B-rep, as a standard method for describing 3D shapes in CAD applications, is difficult to directly use for model classification and retrieval in neural network learning, thus hindering direct reuse. The main technical difficulties affecting direct reuse are as follows:

[0004] First, 3D CAD models in real-world industrial applications possess complex structures, diverse topological information, precise geometric features, and are closely related to the specific field, containing rich engineering semantic details. Even two models of the same category, while containing similar engineering semantics, may differ significantly in appearance. Therefore, extracting the rich topological and geometric information from the model in a reasonable manner without sacrificing engineering semantics is crucial. Existing classification or retrieval methods are mostly based on applications such as point clouds and multi-view images. These 3D model descriptors can only extract and represent discrete information fitted from the surface of the 3D model. This means that the rich internal topological information and engineering semantic details contained in B-rep are not utilized during feature construction.

[0005] Secondly, it is difficult to find suitable descriptors to efficiently express engineering semantics and to characterize 3D models from different CAD systems with a universal approach. Existing CAD model formats are diverse, and different CAD systems (such as SolidWorks, CATIA, and AutoCAD) use incompatible file storage and transmission formats. Most research in this field is conducted on specific discrete data formats, but such discrete data is not suitable for accurately representing 3D CAD models. Furthermore, there are few universal methods that can uniformly process, classify, and retrieve 3D CAD models in different formats.

[0006] Finally, the graph descriptors extracted from 3D models contain a large amount of complex information, which classical GCNs (Graph Convolutional Networks) and graph pooling methods struggle to process effectively. Furthermore, the classification capabilities of existing graph-level neural network methods have not yet reached the ideal level for reuse in 3D CAD models. On the other hand, to improve the accuracy of 3D model recognition, the creation of deeper and more complex 3D shape recognition models has become a trend, inevitably leading to increasingly larger network model parameters. The excessively high computational resource requirements and time costs make it difficult to apply these models with good recognition performance to real-world industrial CAD model reuse tasks. Summary of the Invention

[0007] This invention addresses the shortcomings of existing technologies by proposing a lightweight 3D CAD model classification and retrieval method based on graph convolutional networks. This method extracts the topological geometric information of the model from B-rep information. B-rep data is stored in 3D model files using STEP (Standard for the Exchange of Product Data) as the storage and transmission format. A lightweight fusion self-attention GCN framework, named FuS-GCN, is designed based on the B-rep graph to aggregate topological geometric features and effectively learn global 3D CAD shape feature descriptors. Based on this, CAD model classification and retrieval are achieved.

[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0009] A lightweight 3D CAD model classification and retrieval method based on graph convolutional networks includes the following steps:

[0010] Step S1: Construct a 3D CAD model dataset for industrial manufacturing scenarios. A database of industrial parts used in actual production was collected from local companies and factories that manufacture industrial parts. The 3D CAD models in this dataset are all precise representations, stored and transmitted using the STEP (Standard for the Exchange of Product Data) standard. After filtering, a dataset containing 9419 parts was compiled, labeled into forty categories.

[0011] Step S2: Perform data preprocessing and feature extraction on the 3D CAD model dataset. Extract geometric and topological information as completely as possible from the complex B-rep information of the 3D CAD model, and construct it into a representation suitable for effective learning and use by existing neural networks. The specific steps are as follows:

[0012] Step S21: Based on the B-rep information of the 3D CAD model, extract its topological and geometric information. The specific steps are as follows:

[0013] Step S211: Extract the topological structure information of the model based on the adjacency relationship between its faces and edges.

[0014] Step S212: Extract the geometric information of the face and edge of the model based on the geometric data such as the shape, size, and direction of its face and edge.

[0015] Step S22: Based on the topological and geometric information obtained from feature extraction, construct a 3D model descriptor with a graph structure suitable for neural networks. The topological structure of the 3D model is represented in graph form, and the geometric information of the faces and edges of the 3D model is represented by the node attributes and edge attributes in the graph. Simultaneously, perform statistical analysis on the 3D model sample data of each category in the dataset.

[0016] Step S3: Construct a graph convolutional network FuS-GCN that can learn a fusion representation of global and local information of graph data based on topological geometric information. The complete FuS-GCN architecture includes three structurally identical FuS-GCN sub-modules. Each FuS-GCN sub-module consists of a graph convolution module and a self-attention graph pooling module, which realizes the aggregation of graph structure information and the fusion of features based on geometric topological information through self-attention graph pooling. Finally, the global feature vector that fuses the global representation of local information of multi-layer graph data is obtained through the Readout module. The specific steps are as follows:

[0017] Step S31: The graph convolution module is based on the spectral graph convolution method GCNConv (Graph Convolutional Network Layer). A graph convolution module consists of a graph convolutional hidden layer and an activation function layer stacked together. The 3D model of the graph structure is input to the hidden layer in the form of a graph adjacency matrix and a node feature matrix, and then the output is obtained after passing through the activation function. In the hidden layer, message passing occurs between graph nodes to capture local information within their neighborhood, as shown in the following formula:

[0018]

[0019] Where H l Let A represent the nodes of the l-th layer, where A ∈ R. N×N Represents the adjacency matrix of a graph. I represents the adjacency matrix with self-connections, and I represents the identity matrix. for The degree matrix of the diagonal nodes, W l Let σ(·) represent the weight matrix of the l-th neural network layer, and let σ(·) represent a non-linear activation function, such as ReLU.

[0020] Step S32: The self-attention graph pooling module is divided into a first sub-module and a second sub-module. The first sub-module calculates the self-attention score based on the fusion of geometric and topological information features. The second sub-module performs feature fusion based on the two self-attention scores to construct a fused self-attention mask. The specific steps are as follows:

[0021] Step S321: Calculate the self-attention evaluation scores for the geometric information and topological structure of the 3D model, which is divided into two steps:

[0022] Step S3211: Calculate the topology self-attention score S using GCNConv. topology ∈R N×1 The calculation formula is as follows:

[0023]

[0024] Where X∈R N×F Let θ represent the input features of a graph with N nodes and feature size F. att ∈R F×1 This represents the weight parameter matrix.

[0025] Step S3212: Calculate the geometric information self-attention score S using a fully connected layer. geometric ∈R N×1 The calculation formula is as follows:

[0026] S geometric =σ(Linear(X, A))

[0027] Where σ(·) represents a nonlinear activation function, Linear(·) represents a fully connected layer, X represents the node feature matrix, and A is the adjacency matrix of the graph.

[0028] Step S322: First, feature fusion is performed on the two self-attention evaluation scores obtained from the calculation. Then, a fused self-attention mask based on top-k selection is constructed to complete node selection. Finally, graph pooling is performed. The specific steps are as follows:

[0029] Step S3221: Construct a learnable fusion feature weight matrix W β The weight matrix is ​​optimized through training, and then used to perform feature fusion of geometric information self-attention and topological structure self-attention, as shown in the following formula:

[0030]

[0031] Where S represents the final self-attention score obtained after feature fusion, and W... β S represents the weight matrix guiding feature fusion. topology With S geometric These are the two self-attention evaluation scores calculated in steps S3211 and S3212, respectively.

[0032] Step S3222: Construct a fused self-attention mask to perform node selection and pooling on the graph data. Based on the fused self-attention score constructed in step S3221, retain a subset of the input graph data with [kN] nodes, where k∈(0,1] is the pooling ratio hyperparameter controlling the number of nodes retained during pooling, and N represents the number of nodes in the input graph data. The calculation formula for constructing the fused self-attention mask is as follows:

[0033] idx = top-rank(S, [KN]), S mask =S idx

[0034] Where top-rank(·) represents the operation of sorting nodes from high to low based on the fused self-attention scores, returning the graph node indices corresponding to the [kN] highest scores in the self-attention score set S of the nodes, · idx S represents the index operation. mask This represents the constructed fusion self-attention mask.

[0035] Step S3223: Based on the fused self-attention mask constructed in step S3222, perform downsampling and graph pooling operations to obtain a subgraph of the current input graph data:

[0036] X pooled =Xidx,: ⊙S mask A pooled =A idx,idx

[0037] Where X pooled With A pooled X represents the feature matrix and its corresponding adjacency matrix obtained after graph pooling. idx,: This represents the feature matrix indexed by row (i.e., node), ⊙ is the broadcast dot product operator, and A idx,idx This represents the adjacency matrix indexed by row and column.

[0038] Step S33: Use the Readout module to aggregate node features, thereby representing the graph data as a fixed-size vector. The formula for the global feature vector obtained by fusing multi-level global representations is as follows:

[0039]

[0040] Where N is the number of nodes, x i It is the feature vector of the i-th node, and || represents the concatenation operation.

[0041] Step S4: Based on the global feature representation vector of the 3D CAD model obtained in Step S3, guide the classification and retrieval of the 3D CAD model. The global feature vector is used as input through a fully connected layer to obtain the classification result. The global feature vector serves as a high-dimensional embedding representation of the 3D model, and retrieval is achieved based on the measurement between samples.

[0042] Step S5: Train and test the constructed network model on the dataset to verify its classification and retrieval performance, as well as the number of model parameters and inference computation time. The specific steps are as follows:

[0043] Step S51: Compare the classification results of cutting-edge 3D model classification methods on the 3D CAD model dataset constructed in this paper with the public dataset FabWave.

[0044] Step S52: Compare the classification results of cutting-edge graph neural network methods for performing graph-level tasks with the 3D CAD model dataset constructed in this paper.

[0045] Step S53: Verify the experimental results of the retrieval task on the 3D CAD model dataset constructed in this paper.

[0046] Step S54: Compare the experimental results of the fusion of self-attention graph pooling modules under different structures.

[0047] Step S55: Compare the number of model parameters and computation time of the FuS-GCN model constructed in this paper with the industry's leading 3D model classification methods.

[0048] Step S6: Use the trained network model to achieve intelligent classification, retrieval and reuse of 3D CAD models.

[0049] This invention has the following characteristics and beneficial effects:

[0050] 1. A lightweight method capable of intelligently classifying, retrieving, and reusing 3D CAD models represented by B-rep data. This method more intuitively and naturally utilizes graph structure information to overcome the challenges of using complex topology and engineering semantics of 3D models as features. Existing research often struggles to leverage the precise topological relationships and geometric information between sub-components of 3D models, and studies achieving high 3D shape classification accuracy typically have a large number of network model parameters, placing high demands on computational and time costs. This method, through excellent feature extraction from B-rep data and optimization of the network model, demonstrates superior performance in learning complex graph data. It achieves the highest accuracy in 3D CAD model classification tasks without human intervention and exhibits excellent performance in retrieval tasks. The trained network model meets the needs of intelligent manufacturing CAD model reuse in 3D model classification and retrieval tasks, and achieves an industry-leading level in comparative experiments with cutting-edge 3D shape classification methods.

[0051] 2. A novel feature descriptor for 3D CAD models based on B-rep captures topological information in the form of a graph structure and captures the geometric features of the model's faces and edges in the form of node and edge attributes. This descriptor can uniformly represent 3D CAD models from different CAD systems, overcoming the pain points in the field such as the difficulty in accurately representing 3D CAD models, the complexity and difficulty in constructing feature descriptors from different data formats, and the difficulty in using general methods to build feature descriptors for neural network learning from 3D CAD models of different data formats.

[0052] 3. To improve the performance of existing graph neural networks in processing graph-level tasks, we use a fusion self-attention pooling method based on the characteristics of complex graph data in this scenario. This method combines the topological structure and geometric information of the 3D model to reasonably compress and aggregate the graph data, making the network more suitable for the task scenario of 3D CAD model classification and retrieval. Attached Figure Description

[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1This is a flowchart illustrating the specific operation process of the present invention.

[0055] Figure 2 This is a sample image of the dataset created by this invention.

[0056] Figure 3 This is a schematic diagram of a 3D CAD model based on B-rep representation.

[0057] Figure 4 This is a schematic diagram illustrating the extraction of topological geometric information from the B-rep information of an entity model according to the present invention.

[0058] Figure 5 This is a pseudocode flowchart of the present invention for extracting topological geometric information from an entity model.

[0059] Figure 6 This is a schematic diagram of the graph-structured 3D CAD model descriptor constructed in this invention.

[0060] Figure 7 This is a diagram of the overall architecture of the model of this invention.

[0061] Figure 8 This is a diagram of the graph convolutional network structure used in this invention.

[0062] Figure 9 This is a schematic diagram of the self-attention graph pooling module designed in this invention.

[0063] Figure 10 This is the experimental result of the present invention in the retrieval task. Based on the input Query model, the 10 most similar 3D models are retrieved from the database. Detailed Implementation

[0064] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.

[0065] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.

[0066] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art will understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0067] This invention provides a lightweight 3D CAD model classification and retrieval method based on graph convolutional networks, such as... Figure 1 As shown, the specific steps are as follows:

[0068] Step S1: Since there are few available datasets of 3D CAD solid models online, and most are represented using meshes or point clouds, such as the Princeton ModelNet dataset, these shape descriptor-based models are not practical for industrial manufacturing with high precision requirements. Therefore, we collected an industrial parts database from local companies and factories. These parts models are used in actual production. They are accurately represented using B-rep and can be easily and quickly converted to the STEP standard format. This dataset contains 9419 3D CAD models of parts, which were labeled and constructed into 40 categories under the guidance of professionals. Because this 3D model database has 40 classes, we named it CadNet40. In this invention, we conducted experiments on this dataset to verify the effectiveness and feasibility of the proposed method.

[0069] Some entity model examples in this dataset, such as Figure 2As shown, the dataset includes 3D-CAD models of industrial parts, such as bearing housings, forged shackles, and end wrenches.

[0070] Step S2: Perform data preprocessing and feature extraction on the 3D CAD model dataset. Extract geometric and topological information as completely as possible from the complex B-rep information of the 3D CAD model, and construct it into a general representation suitable for effective learning and use by neural networks. The specific steps are as follows:

[0071] Step S21: B-rep represents a solid model using a set of closed faces, each face represented by its attributes and boundaries. The boundary of a face is formed by a set of edges. This representation method includes both the topological information and the geometric information of the 3D model. The topological information is like the skeleton representing the boundary of the solid model, while the geometric information is like the flesh and blood attached to the skeleton. The data structure of the B-rep representation method consists of the following topological entities (components) with attributes: faces, edges, and vertices, such as... Figure 3 As shown, the relationships between these topological entities (components) describe the topological information of the 3D model. The geometric information of the model is described by the attributes of the entities (components), such as the type of face (plane, cone, curved surface, cylinder, etc.), the type of edge (straight line, curve, B-spline curve, etc.), the length of the edge, and so on. However, due to the complex data structure of B-rep information, it is difficult to input its original representation into a neural network for learning.

[0072] The STEP AP203 standard, developed by the International Organization for Standardization (ISO), is based on B-rep information and used to represent parts, assemblies, and product and manufacturing information for data exchange and interoperability between computer-aided design (CAD), manufacturing (CAM), analysis (CAE), and inspection (CMM) software. Therefore, the STEP standard is the fundamental format for storing and transmitting CAD models in industry, applicable to almost all CAD modeling systems. It can easily and quickly convert 3D CAD models from different CAD systems into a unified STEP file format. Subsequently, based on the B-rep information of the 3D CAD model, topological information of the model's topology is extracted according to the adjacency relationships between its faces and edges, followed by the extraction of geometric information of the model's faces and edges.

[0073] The specific steps for extracting topological and geometric information are as follows:

[0074] Step S211: The B-rep-based graph descriptor (B-rep graph) uses an attributed face adjacency graph as its data structure to model the topological information of the entity model, such as... Figure 4As shown. The topological information of the model is expressed by the following formula:

[0075] G = {N, E, ψ}

[0076] Where N represents the set of graph nodes, E represents the set of graph edges, and ψ represents the set of direct connections between nodes and edges. A face of a 3D model consists of multiple edges, and two faces are connected by sharing an edge. Nodes in the B-rep graph correspond to the faces of the 3D model, and the connections between nodes correspond to the edges of the 3D model.

[0077] Further settings in this embodiment, such as Figure 5 As shown, based on the STEP standard, the set of faces in a 3D model can be obtained by traversing the B-rep data: current sub-component → current face → edge loop → edge → next face → next sub-component. A solid model consists of one or more sub-components, a sub-component consists of multiple faces, and a face consists of one or more edge loops. Discovered edges are marked and mapped to their corresponding faces. After the set of faces (nodes) is constructed, the marked edges belonging to each face are traversed. A marked edge becomes a node of that node, and another face containing that edge is found as another node. Thus, all face-edge relationships and sets in a B-rep-based 3D CAD model can be effectively mined and extracted.

[0078] Step S212: The geometric information of the 3D CAD model is extracted from the face and edge attributes and stored and represented as node and edge attributes in the B-rep graph. The geometric information of the faces is stored in the node attributes, and the geometric information of the edges is stored in the attributes of the edges connecting the nodes. For example... Figure 4 and Figure 6 As shown, different styles of graph nodes represent different types of faces, and different styles of edges represent different types of edges. For example... Figure 5 As shown, this geometric information is extracted during the traversal of the face and edge sets, and used to jointly represent the solid model with the topological structure. The node and edge (face and edge of the 3D model) attributes of the B-rep graph are optional input features, applied to different task scenarios in the 3D CAD modeling domain. Each topological edge also possesses its own geometric information, including edge type, length, and direction.

[0079] Step S22: As Figure 6 As shown, the topological geometric information extracted based on B-rep in steps S211 and S212 will be naturally transformed into graph structure data with attributes. The relevant statistical analysis of the three-dimensional model sample data of each category in the dataset is shown in Table 1.

[0080]

[0081]

[0082]

[0083]

[0084]

[0085] Table 1 is a statistical table of graph-structured 3D descriptors for the 3D CAD model dataset of this invention.

[0086] This B-rep-based graph descriptor inherits the advantages of B-rep in terms of logic and interpretability, while also solving the problem that complex B-rep information is difficult to directly use for learning in existing neural networks. After constructing all 3D CAD models as this descriptor, statistical analysis was performed on the graph structure data obtained from the 3D model samples of each category in this dataset. Detailed statistical information is shown in Table 1.

[0087] The undirected heterogeneous graph in this invention is named a B-rep graph, where each node and edge has corresponding attributes. The basic structure of the B-rep graph is built upon the face-edge relationships mined in step S211. The complete topological structure is contained within these face-edge relationships, which are extracted, captured, and represented by the face adjacency graph. Therefore, both local and global topological information can be effectively captured by the B-rep graph. To ensure the efficiency of the model, we only used the type and area of ​​the face, which have the strongest representational power, as node attributes in our experiments. In practical applications, multiple geometric features can be selected as node attributes as needed. Among the geometric information related to edges, we selected the type and length of the edges as attributes of the connecting edges in the graph. Based on the information obtained from the two extraction methods described above, the B-rep graph can describe the topological geometric information of the 3D solid model as accurately and completely as possible, providing a good foundation for subsequent model classification and retrieval. This graph structure data will be processed into the form of an adjacency matrix and used as input to the FuS-GCN neural network.

[0088] Step S3: As Figure 7 As shown, a graph convolutional network FuS-GCN is constructed that can learn a fusion representation of global and local information of graph data based on topological geometric information. The complete FuS-GCN architecture includes three structurally identical FuS-GCN sub-modules. Each FuS-GCN sub-module consists of a graph convolution module and a self-attention graph pooling module, which realizes the aggregation of graph structure information and the fusion of features based on geometric topological information through self-attention graph pooling. Finally, the global feature vector that fuses the global representation of multi-layer graph data local information is obtained through the Readout module. The specific steps are as follows:

[0089] Step S31: The graph convolution module is the GCNConv (Graph Convolutional Network Layer) method, which is based on spectral graph convolution. For example... Figure 8 As shown, a graph convolutional module consists of a graph convolutional hidden layer and an activation function layer stacked together. The input is the graph adjacency matrix A and the node feature matrix H. l A can be viewed as an expression of the topological structure, H l This represents the node features. The output is a new graph obtained through aggregation and feature extraction.

[0090] The 3D model of the graph structure is input into the hidden layer in the form of a graph adjacency matrix and a node feature matrix, and then passed through an activation function to obtain the output. In the hidden layer, graph nodes exchange messages to capture local information within their neighborhoods, as shown in the following formula:

[0091]

[0092] Where H l Let A represent the nodes of the l-th layer, where A ∈ R. N×N Represents the adjacency matrix of a graph. I represents the adjacency matrix with self-connections, and I represents the identity matrix. for The degree matrix of the diagonal nodes, W l Let σ(·) represent the weight matrix of the l-th neural network layer, and let σ(·) represent a non-linear activation function, such as ReLU.

[0093] Step S32: This embodiment uses a self-attention mechanism to optimize the evaluation method, thereby distinguishing between graph nodes that need to be retained and those that need to be deleted. This mechanism helps the neural network focus on more critical features. Based on this mechanism, a fusion self-attention graph pooling module called FuSPool is designed, which can comprehensively evaluate the importance of graph nodes, thereby constructing a reasonable pooling mask.

[0094] Specifically, such as Figure 9 As shown, the FuSPool graph pooling module is mainly divided into a first sub-module and a second sub-module. The first sub-module calculates the self-attention score based on geometric and topological information features, and the second sub-module performs feature fusion based on the two self-attention scores, and then constructs a fused self-attention mask. The specific steps are as follows:

[0095] Step S321: Calculate the self-attention evaluation scores for the geometric information and topological structure of the 3D model, which is divided into two steps:

[0096] Step S3211: Calculate the topology self-attention score S using GCNConv. topology ∈RN×1 The calculation formula is as follows:

[0097]

[0098] Where X∈R N×F Let θ represent the input features of a graph with N nodes and feature size F. att ∈R Fx1 This represents the weight parameter matrix.

[0099] Step S3212: Calculate the geometric information self-attention score S using a fully connected layer. geometric ∈R N×1 The calculation formula is as follows:

[0100] S geometric =σ(Linear(X, A))

[0101] Where σ(·) represents a nonlinear activation function, Linear(·) represents a fully connected layer, X represents the node feature matrix, and A is the adjacency matrix of the graph.

[0102] Step S322: First, feature fusion is performed on the two self-attention evaluation scores obtained from the calculation. Then, a fused self-attention mask based on top-k selection is constructed to complete node selection. Finally, graph pooling is performed. The specific steps are as follows:

[0103] Step S3221: Construct a learnable fusion feature weight matrix W β The weight matrix is ​​optimized through training, and then used to perform feature fusion of geometric information self-attention and topological structure self-attention, as shown in the following formula:

[0104]

[0105] Where S represents the final self-attention score obtained after feature fusion, and W... β S represents the weight matrix guiding feature fusion. topology With S geometric These are the two self-attention evaluation scores calculated in steps S3211 and S3212, respectively.

[0106] Step S3222: Construct a fused self-attention mask to perform node selection and pooling on the graph data. Based on the fused self-attention score constructed in step S3221, retain a subset of the input graph data with [kN] nodes, where k∈(0,1] is the pooling ratio hyperparameter controlling the number of nodes retained during pooling, and N represents the number of nodes in the input graph data. The calculation formula for constructing the fused self-attention mask is as follows:

[0107] idx = top-rank(S, [KN]), S mask =S idx

[0108] Where top-rank(·) represents the operation of sorting nodes from high to low based on the fused self-attention scores, returning the graph node indices corresponding to the [kN] highest scores in the self-attention score set S of the nodes, · idx S represents the index operation. mask This represents the constructed fusion self-attention mask.

[0109] Step S3223: Based on the fused self-attention mask constructed in step S3222, perform downsampling and graph pooling operations to obtain a subgraph composed of the current input graph data:

[0110] X pooled =X idx,: ⊙S mask A pooled =A idx,idx

[0111] Where X pooled With A pooled X represents the feature matrix and its corresponding adjacency matrix obtained after graph pooling. idx,: This represents the feature matrix indexed by row (i.e., node), ⊙ is the broadcast dot product operator, and A idx,idx This represents the adjacency matrix indexed by row and column.

[0112] Step S33: Use the Readout module to aggregate node features, thereby representing the graph data as a fixed-size vector. This module fuses the global feature vector obtained from multi-level global representations, and its expression is as follows:

[0113]

[0114] Where N is the number of nodes, x i It is the feature vector of the i-th node, and || represents the concatenation operation.

[0115] Step S4: Based on the global feature representation vector of the 3D CAD model obtained in Step S3, guide the classification and retrieval of the 3D CAD model. The global feature vector is used as input through a fully connected layer to obtain the classification result. The global feature vector will be used with metric learning to obtain a more reasonable distribution in the feature space, and retrieval will be achieved by calculating the cosine similarity of the 3D model embedding.

[0116] Step S5: Train and test the constructed network model on the dataset to verify its classification and retrieval performance, as well as the number of model parameters and inference computation time. The specific steps are as follows:

[0117] Step S51: Compare the experimental results of cutting-edge 3D model classification methods on the 3D CAD model dataset constructed in this paper and public datasets. This paper reproduces some cutting-edge methods in the field of 3D model classification for comparative experiments, including LFD, 3D ShapeNets, PointNet++, MVCNN, MeshCNN, DGCNN, KPConv, CurveNet, and UV-Net. In implementation, the dataset constructed in this paper and the public 3D CAD dataset FabWave are converted into 3D model descriptors corresponding to these methods, such as point clouds, meshes, and multiple views.

[0118]

[0119]

[0120] Table 2 compares the classification performance of the present invention and other cutting-edge 3D model classification methods on the self-built 3D CAD model dataset CadNet40 and the public dataset FabWave.

[0121] Table 2 shows the comparison results of commonly used cutting-edge 3D model classification methods in the industry with the 3D model descriptor and improved depth model proposed in this paper on a 3D CAD model dataset. Top-1 accuracy was used as the evaluation metric in the experiments. By comparing with industry-leading methods, the superior performance of the 3D model descriptor and depth model proposed in this paper was more objectively verified.

[0122] Step S52: Compare the experimental results of industry-leading graph neural network methods for performing graph-level tasks on the 3D CAD model dataset constructed in this paper. To verify the effectiveness and advancement of the proposed Fus-GCN model, multiple sets of comparative experiments were conducted on the constructed 3D CAD model dataset using the same graph-structured 3D model descriptor (B-rep graph). The graph neural network methods participating in the comparative experiments that handle graph-level tasks include: GCN, HGP-SL, Graph U-Nets, and SAGPool.

[0123] Pooling method Feature descriptor Graph Convolutional Network Structure Top-1 accuracy GCNConv B-rep graph GCN 95.0 DiffPool B-rep graph HGP-SL 93.2 gPool B-rep graph Graph U-Nets 96.2 SAGPool B-rep graph SAGPool 97.0 FuSPool B-rep graph FuS-GCN 99.3

[0124] Table 3 compares the classification performance of the present invention with that of cutting-edge graph neural network methods in the industry on the self-built 3D CAD model dataset CadNet40.

[0125] Table 3 shows the comparison results of the graph neural network methods for performing graph-level tasks at the forefront of the industry with the method in this paper on a 3D CAD model dataset. It can be seen that the model proposed in this paper has superior performance and accuracy in processing complex graph data in 3D model scenarios, which illustrates the effectiveness of the model improved and optimized based on the characteristics of the data in this paper.

[0126] Step S53: Visualize the retrieval results using the trained model on the self-built dataset. To verify the effectiveness of our method in the retrieval task, we obtain high-dimensional embedding vector representations of all 3D models in the self-built dataset based on the trained model. We randomly select 7 3D CAD models from the training set, and then recall the top 10 most similar 3D models in the dataset based on the Euclidean distance between the vectors. Figure 10 The results of the retrieval experiment are shown in the figure, demonstrating that the proposed method effectively retrieves highly similar 3D models and has good retrieval performance.

[0127] Step S54: Compare the experimental results of fusion self-attention map pooling modules under different structures. To analyze the effectiveness of different components in FuSPool and to study the impact of FuSPool layers, we removed or replaced some modules from the overall FuSPool architecture design. For example, we discarded topological or geometric information in pooling, or replaced feature fusion techniques with weighted sum operations. Through ablation experiments on FuSPool pooling layers with different structures, we can more objectively verify the effectiveness and role of each component of FuSPool.

[0128]

[0129] Table 4 compares the performance of this invention with cutting-edge 3D model classification methods in terms of model complexity and computation time.

[0130] In Table 4, the "Topology Information Module" indicates that topological information was used for pooling, the "Geometric Information Module" indicates that geometric information was used for pooling, and the "Feature Fusion Module" indicates that a feature fusion method was used to combine two types of features instead of a direct weighted sum. The results show that using either topological or geometric features during pooling improves overall accuracy. However, using only topological or geometric information for pooling does not achieve the highest classification accuracy. Furthermore, combining these two features in a weighted manner negatively impacts the model. Effectively combining these two features through feature fusion improves accuracy by approximately 2.3%, achieving the optimal model accuracy.

[0131] Step S55: Compare the number of model parameters and inference computation time of the FuS-GCN constructed in this paper with the industry's leading 3D model classification methods.

[0132]

[0133] Table 5 shows the experimental results of testing the FuSPool self-attention map pooling module under different structures according to this invention.

[0134] Table 5 presents the comparative experimental results of the proposed method and leading 3D model classification methods on the proposed 3D model dataset in terms of model complexity. It is evident that the proposed FuS-GCN model achieves a good balance between model complexity (number of parameters), inference computation time, and classification accuracy, making it more lightweight compared to other methods. Benefiting from the B-rep graph constructed in this invention, our 3D model descriptor has a more concise and powerful representation ability of the topological structure and geometric information of 3D CAD models, containing a large amount of accurate information about the 3D model, and can selectively add or remove geometric features according to different task scenarios. Therefore, our model does not need to use a complex model structure to learn model information in discrete data, ensuring the lightweight nature of the proposed method, thereby achieving efficient classification and retrieval, and meeting the needs of 3D CAD model reuse in industrial manufacturing.

[0135] The above technical solution addresses the shortcomings of existing 3D CAD model classification and retrieval methods by proposing a novel and efficient neural network architecture and graph structure feature descriptor. It solves the classification and retrieval tasks by directly learning from 3D CAD entity models and generating global feature embeddings. This method intelligently extracts accurate topological and geometric information from B-rep-based entity models and uses self-attention optimized GCNs to improve the accuracy and efficiency of classification and retrieval tasks. This invention aims to overcome the following three key problems that are prevalent in the field of B-rep-based 3D CAD model classification and retrieval and urgently need to be solved:

[0136] How can we develop a more general and effective method for classifying and retrieving B-rep-based solid models from different CAD systems? Most 3D model classification and retrieval methods are based on point cloud and mesh data formats. While they achieve good accuracy, the high model complexity makes it difficult to balance efficiency and accuracy, making them unsuitable for applications in real-world intelligent manufacturing industries. Furthermore, their compatibility with different CAD system data formats needs improvement, and the process of converting 3D CAD models into point clouds or meshes is generally quite complex.

[0137] How to naturally and effectively extract and represent structural semantics and geometric information from 3D CAD models? Current popular feature extraction methods, such as multi-view images and point clouds, represent 3D shapes through images or discrete data. These descriptors can only partially represent the external topology and geometric information of the model, failing to achieve accurate representation and resulting in the loss of topological structure between internal sub-components. A complete 3D topology is a significant distinguishing feature of a 3D model. Of course, accurate geometric features also help improve classification and retrieval capabilities. How to extract and combine these two aspects to construct feature descriptors for neural network learning is a fundamental problem that urgently needs to be solved in this field.

[0138] How to optimize the performance of deep neural networks to meet the task requirements of learning and classifying large and complex graph data? The aggregation capabilities of current graph pooling methods need improvement. It is crucial to effectively downsample complex B-rep-based graph data and compress the input into a unified-dimensional global feature vector. This is fundamental for neural network learning; the feature vector needs to contain local topological and geometric information from the global model while retaining the more important features after pooling.

[0139] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments, including components, without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.

Claims

1. A lightweight 3D CAD model classification and retrieval method based on graph convolutional networks, characterized in that, Includes the following steps: S1. Construct a 3D CAD model dataset; S2. Perform data preprocessing and feature extraction on the 3D CAD model dataset to obtain geometric and topological information, and convert the extracted geometric and topological information into a 3D model descriptor represented by a graph structure. The method for extracting geometric and topological information is as follows: from the B-rep information of the 3D CAD model, the topological information of the topological structure is extracted based on the adjacency relationship between the face and the edge, and the geometric information of the face and the edge is extracted based on the geometric data of the face and the edge. The method for converting to a 3D model descriptor is as follows: the topological structure of the 3D CAD model is represented by a graph structure, and the geometric information of the faces and edges of the 3D CAD model is represented by the node attributes and edge attributes in the graph. S3. Construct a graph convolutional network FuS-GCN that can learn the fusion representation of global and local information of graph data based on topological and geometric information. Using the 3D model descriptor as input, guide the classification of 3D CAD models according to the FuS-GCN to obtain global feature vectors. The graph convolutional network FuS-GCN includes three structurally identical FuS-GCN sub-modules and a Readout module; Each FuS-GCN submodule consists of a graph convolution module and a self-attention graph pooling module, which aggregates the 3D model descriptor and performs self-attention graph pooling with features based on geometric and topological information. Finally, the Readout module obtains a global representation that integrates local information from multi-layer graph data, thereby obtaining a global feature vector. S4. The global feature vector is used as input to obtain the classification result through a fully connected layer; and the retrieval result is obtained based on the similarity between the global feature vectors. S5. The classification retrieval model composed of the graph convolutional network FuS-GCN and fully connected layers is used to train and test on the dataset. S6. Use the trained classification and retrieval model to classify, retrieve, and reuse 3D CAD models.

2. The lightweight 3D CAD model classification and retrieval method based on graph convolutional networks according to claim 1, characterized in that, The 3D CAD model dataset constructed in step S1 uses the STEP standard as the file storage and transmission format.

3. The lightweight 3D CAD model classification and retrieval method based on graph convolutional networks according to claim 1, characterized in that, In step S1, the method for preprocessing the data in the dataset is to convert the 3D CAD model into B-rep representation and to label the data.

4. The lightweight 3D CAD model classification and retrieval method based on graph convolutional networks according to claim 1, characterized in that, The graph convolution module consists of a graph convolutional hidden layer and an activation function layer stacked together. The graph convolutional hidden layer takes the graph adjacency matrix and graph node feature matrix of the 3D model descriptor as input, and then passes through the activation function layer to obtain the output. In the graph convolutional hidden layer, message passing occurs between graph nodes to capture local information in the neighborhood, as shown in the following formula: in For the first Layer node representation, Represents the adjacency matrix of a graph. Indicates the number of nodes. This indicates an adjacency matrix with self-connections. Represents the identity matrix. for The degree matrix of the diagonal nodes, Indicates the first The weight matrix of each neural network layer This represents a non-linear activation function.

5. The lightweight 3D CAD model classification and retrieval method based on graph convolutional networks according to claim 4, characterized in that, The self-attention graph pooling module includes a first sub-module and a second sub-module. The first sub-module calculates the self-attention score based on geometric topological information feature fusion, and the second sub-module performs feature fusion based on the two self-attention scores to construct a fused self-attention mask. The specific steps are as follows: Calculate the self-attention evaluation scores for geometric information and topological structure separately: Calculate the self-attention score of the topology using GCNConv. The calculation formula is as follows: in Indicates having The number of nodes and the feature size are The input features of the graph, Represents the weight parameter matrix; The geometric self-attention score is computed using a fully connected layer. The calculation formula is as follows: in Represents a non-linear activation function. This represents a fully connected layer. Represents the node feature matrix, Let be the adjacency matrix of the graph; The two self-attention evaluation scores obtained from the calculation are fused to perform feature fusion. A fused self-attention mask based on top-k selection is constructed to complete node selection. Finally, graph pooling is performed. The specific steps are as follows: Construct a learnable fusion feature weight matrix The weight matrix is ​​optimized through training, and then used to perform feature fusion of geometric information self-attention and topological structure self-attention, as shown in the following formula: in This represents the final self-attention score obtained after feature fusion. This represents the weight matrix that guides feature fusion; Construct a fusion self-attention mask to perform node selection and pooling on graph data. Based on the final self-attention score obtained from feature fusion, retain the ownership of the input graph data. A subset of nodes, This is a pooling ratio hyperparameter that controls the number of nodes retained during the pooling process. The number of nodes in the input graph data is represented by the following formula for calculating the self-attention mask: in This operation sorts nodes from highest to lowest based on their fused self-attention scores, and returns a set of self-attention scores for each node. middle The graph node index corresponding to the highest score. This indicates an index operation. This represents the constructed fusion self-attention mask; Based on the constructed fusion self-attention mask, downsampling and graph pooling operations are implemented to obtain a subgraph composed of the current input graph data: = , in and This represents the feature matrix and its corresponding adjacency matrix obtained after graph pooling. This represents the feature matrix indexed by row. For broadcast dot product operators, This represents the adjacency matrix indexed by row and column.

6. The lightweight 3D CAD model classification and retrieval method based on graph convolutional networks according to claim 5, characterized in that, The output method of the Readout module is as follows: Representing graph data as vectors of fixed size, the global feature vector obtained by fusing multi-level global representations in this module is formulated as follows: in It is the number of nodes. It is the first The feature vector of each node This indicates a splicing operation.

Citation Information

Patent Citations

  • A CAD model classification method based on feature-level graph descriptors and graph convolutional networks

    CN114936609A

  • Three-dimensional CAD model retrieval method based on image and attribute graph fusion network

    CN115439722A