MBD model retrieval method and device based on graph neural network

Through the MBD model retrieval method based on graph neural network, the attribute adjacency graph is established and the graph neural network is embedded, and the rapid and accurate retrieval of three-dimensional MBD models is achieved, which solves the problems that are difficult to reuse in the existing technology and improves design efficiency and quality.

CN114238676BActive Publication Date: 2025-03-07XINQING (SHANGHAI) INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111580480.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-03-07
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

It is difficult for the existing technology to achieve rapid and accurate retrieval of three-dimensional MBD models, resulting in the inability to effectively reuse existing three-dimensional resource knowledge during product design.

Method used

Using the MBD model retrieval method based on graph neural network, the graph neural network is embedded in the continuous vector space by establishing an MBD-based attribute adjacency graph, introducing an attention mechanism to adaptively identify more important feature information, and achieving similarity matching and sorting.

Benefits of technology

It realizes rapid and accurate retrieval of MBD models, solves the interference effects caused by mixed characteristics such as chamfers, improves product design quality and efficiency, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238676B_ABST
    Figure CN114238676B_ABST
Patent Text Reader

Abstract

The present invention discloses a MBD model retrieval method and device based on a graph neural network, the method comprising the following steps: step S1, for a three-dimensional MBD model to be retrieved, establishing an MBD-based attribute adjacency graph to fully express product semantic information, wherein the product semantic information includes geometric and non-geometric information of the MBD model; step S2, using a graph neural network to embed the established attribute adjacency graph into a continuous vector space, according to a specific distance metric, and introducing an attention mechanism to adaptively identify more important feature information, performing similarity matching and sorting in the continuous vector space, and taking the model with the highest similarity as the final retrieval result of the three-dimensional MBD model to be retrieved; step S3, using a series of MBD model samples as a training data set to train the graph neural network, so that the trained graph neural network can achieve fast and accurate retrieval of MBD models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional MBD (Model Based Definition) model retrieval technology, and in particular to a MBD model retrieval method and device based on graph neural network. Background Art

[0002] As the number of product models increases, the importance of 3D product model retrieval in large model databases also increases. In the process of intelligent manufacturing, different types of products often contain the same or similar parts. Studies have shown that in new product development, about 40% of the parts directly reuse existing designs without modification, about 40% can be obtained on the basis of modifying existing designs, and only about 20% come from new designs. If similarity retrieval can be achieved in each design stage of the product, the existing design models and related resources can be fully reused, thereby improving product design quality and efficiency, reducing production costs, shortening processing preparation time, and achieving rapid response manufacturing. Therefore, 3D product model retrieval technology is one of the key technologies to achieve product model design reuse. In-depth research on the product model retrieval mechanism and solution implementation of the product design process has important practical application value for improving the product development capabilities and information level of manufacturing enterprises.

[0003] How to enable users to quickly and conveniently reuse existing 3D resource knowledge for redesign is one of the academic issues in 3D model data research. Traditional 3D model retrieval mainly targets mesh models and B-rep models. Although both types of models are general, they are low-level geometric models that contain little or no manufacturing information. MBD technology fully integrates the information required in the product manufacturing process into a 3D solid model for expression, making the model the only basis for product manufacturing. A complete MBD data set should include the product's 3D geometric information, design references, dimensions, tolerances, and process information. The Standard for the Exchange of Product Model Data (STEP) AP242 is a widely used standard for MBD data transmission. It contains geometric information and product manufacturing information (PMI), such as dimensions and tolerances. Therefore, how to implement MBD model retrieval has become an urgent problem to be solved in the industry. Summary of the invention

[0004] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide an MBD model retrieval method and device based on graph neural network, which realizes the reuse of MBD model related design and manufacturing knowledge by using MBD-based attribute adjacency graph neural network (MAAGNN) for the retrieval of MBD models.

[0005] To achieve the above and other purposes, the present invention proposes a MBD model retrieval method based on graph neural network, comprising the following steps:

[0006] Step S1, for the 3D MBD model to be retrieved, establish an MBD-based attribute adjacency graph to fully express product semantic information, where the product semantic information includes geometric and non-geometric information of the MBD model;

[0007] Step S2, using a graph neural network to embed the established attribute adjacency graph into a continuous vector space, based on a specific distance metric, and introducing an attention mechanism to adaptively identify more important feature information, perform similarity matching and sorting in the continuous vector space, and use the model with the highest similarity as the final retrieval result of the 3D MBD model to be retrieved;

[0008] Step S3, using a series of MBD model samples as a training data set to train the graph neural network, so that the trained graph neural network can achieve fast and accurate retrieval of MBD models.

[0009] Preferably, step S1 further comprises:

[0010] Step S100, converting the three-dimensional MBD model to be retrieved into a model in STEP format;

[0011] Step S101, converting the model in the STEP format into a graph structure, traversing each face in the STEP format model, generating face nodes and adding them to the geometric node set of the model;

[0012] Step S102, for a geometric node, traverse each face in the geometric node set of the geometric model, create a corresponding graph node in the attribute adjacency graph, and extract face information to initialize the node geometric properties;

[0013] Step S103, for non-geometric nodes, traverse each PMI information in each STEP format model, add the PMI information to the non-geometric node set of the model, and initialize the non-geometric node according to the type and content of the PMI information;

[0014] Step S104, using one-hot encoding to distinguish geometric nodes from non-geometric nodes, and connecting them with corresponding features;

[0015] Step S105, initializing the attribute adjacency graph.

[0016] Preferably, in step S105, for every two faces f i and f jIf they are adjacent, an edge is established between the corresponding two nodes. The attributes of the edge are determined by the type of edge, the angle between the two faces, and the concavity of the edge. For each PMI information in the non-geometric node set PS of the model, an edge is established between the relevant nodes in the attribute adjacency graph. The attributes of the edge are determined by the type of edge and other information.

[0017] Preferably, step S2 further comprises:

[0018] Step S200, inputting the initialized attribute adjacency graph into a graph neural network, wherein the graph neural network includes an embedding layer, a propagation layer, and an aggregation layer;

[0019] Step S201, calculating the node state after embedding and the edge state after embedding;

[0020] Step S202, calculating the weight coefficient from the neighbor node w to the current central node v;

[0021] Step S203, using the softmax function to calculate the weight coefficient from the normalized neighbor node w to the current center node v to generate the final attention coefficient;

[0022] Step S204, using the fully connected layer as the message transfer function of the propagation layer to calculate the messages between the nodes at time t;

[0023] Step S205, using the final attention coefficient and the messages between the nodes at time t to calculate the weighted aggregated message;

[0024] Step S206, using GRU as a node state update function, and using weighted aggregated messages to update the node state;

[0025] Step S207, after T rounds of propagation, output the embedding vector representation of the to-be-retrieved 3D MBD model through the clustering layer;

[0026] Step S208, after calculating the embedded vector representation of the 3D MBD model to be retrieved, similarity calculation is performed with the vector representations of all MBD models in the model library;

[0027] Step S209, sorting the calculated similarity results, and the model with the highest similarity is the retrieved result.

[0028] Preferably, in step S201, the node state after embedding is calculated as:

[0029]

[0030] in, represents the hidden state of the graph node at time t=0, x vRepresents the initial input feature vector of the current node and uses a multi-layer perceptron MLP as the encoder of the embedding layer;

[0031] The edge state after computing the embedding is expressed as:

[0032]

[0033] where e vw represents the embedding representation of the edge between two nodes v and w, x vw Preferably, the weight coefficient from the neighbor node w to the current center node v is:

[0034] g vw =a(Wh v ,Wh w ),

[0035] Where a represents a single-layer feedforward neural network in the propagation layer, W∈R F′×F represents a weight matrix, and F′ and F represent the feature dimensions of the output nodes and input nodes of the single-layer feedforward neural network a, respectively.

[0036] Preferably, in step S205, a fully connected layer is used as the message passing function of the propagation layer, the number of hidden layer nodes is set to twice the dimension of the state vector, and a rectified linear unit is used as the activation function to calculate the message between the nodes at time t.

[0037] Preferably, in step S209, the similarity calculation is performed using the Euclidean distance formula, the cosine distance formula, or the Hamming distance formula.

[0038] Preferably, after step S3, the method further comprises the following steps:

[0039] Step S4, using a test set to test the trained graph neural network, and using multiple indicators to evaluate the test results. If the test results do not meet the requirements, the parameters of the network model are updated and retrained to obtain more accurate results. The indicators include nearest neighbor, first layer, second layer, E-measure, discounted cumulative gain, and recall rate.

[0040] To achieve the above object, the present invention also provides an MBD model retrieval device based on graph neural network, comprising:

[0041] An attribute adjacency graph building unit is used to build an attribute adjacency graph based on MBD for the three-dimensional MBD model to be retrieved, so as to fully express the product semantic information, wherein the product semantic information includes geometric and non-geometric information of the MBD model;

[0042] The attribute adjacency graph creation module uses a graph neural network to embed the established attribute adjacency graph into a continuous vector space. Based on the specific distance metric, an attention mechanism is introduced to adaptively identify more important feature information, perform similarity matching and sorting in the continuous vector space, and use the model with the highest similarity as the final retrieval result of the 3D MBD model to be retrieved.

[0043] The training unit is used to train the graph neural network using a series of MBD model samples as a training data set, so that the trained graph neural network can achieve fast and accurate retrieval of MBD models.

[0044] Compared with the prior art, the MBD model retrieval method and device based on graph neural network of the present invention fully expresses the product semantic information by establishing an attribute adjacency graph (MAAG) based on MBD, embeds MAAG into a continuous vector space by using a graph neural network (GNN), and introduces an attention mechanism to adaptively identify more important feature information, thereby solving the interference caused by mixed features such as chamfers. Finally, a series of MBD model samples are used to train the graph neural network to achieve fast and accurate retrieval of MBD models. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of the steps of a MBD model retrieval method based on a graph neural network of the present invention;

[0046] Figure 2 A structural diagram of a graph neural network created in a specific embodiment of the present invention;

[0047] Figure 3 This is a system structure diagram of an MBD model retrieval device based on graph neural network in the present invention. DETAILED DESCRIPTION

[0048] The following describes the implementation of the present invention through specific examples and in conjunction with the accompanying drawings. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific examples, and the details in this specification can also be modified and changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0049] Figure 1 FIG. 1 is a flowchart of a MBD model retrieval method based on a graph neural network according to the present invention. Figure 1 As shown, the present invention provides a MBD model retrieval method based on a graph neural network, comprising the following steps:

[0050] Step S1, for the 3D MBD model to be retrieved, establish an MBD-based attribute adjacency graph (MAAG) to fully express product semantic information, where the product semantic information includes geometric and non-geometric information of the MBD model.

[0051] Specifically, step S1 further includes:

[0052] Step S100, converting the three-dimensional MBD model to be retrieved into a model in STEP (STEP AP242) format.

[0053] Step S101, converting the STEP format model into a graph structure, traversing each face in the STEP format model, generating face nodes and adding them to the model's geometric node set FS = {f i},1<i<m, where m is the number of faces.

[0054] Step S102, create an attribute adjacency graph: for a geometric node, traverse each face f in the geometric node set FS of the geometric model i , create a corresponding graph node in the attribute adjacency graph (one graph node for each face), and extract face information (such as face type and concavity) to initialize the node geometry feature f g Specifically, the attribute adjacency graph is empty at the beginning, and the attribute adjacency graph is created after all graph nodes and edges are created. It should be noted that since the nodes in the geometric node set contain less information and do not meet the requirements of the attribute adjacency graph, the present invention needs to create graph nodes that better meet the requirements of the graph structure and have richer information.

[0055] Step S103: for non-geometric nodes, traverse each PMI (Product and Manufacturing Information) information in each STEP format model, and add the PMI information to the non-geometric node set PS = {p i},1<<i<<n, where n represents the total number of non-geometric nodes, and the non-geometric nodes are initialized according to the type and content of the PMI information.

[0056] The characteristic of MBD model is that it carries PMI information, and STEP AP242, as one of the formats of MBD model, naturally has rich PMI information. Therefore, each PMI information in each STEP format model can be traversed and the PMI information can be added to the node set of the non-geometric model.

[0057] Step S104, using one-hot encoding to distinguish geometric nodes from non-geometric nodes, and connect them with corresponding features.

[0058] In a specific embodiment of the present invention, after both geometric nodes and non-geometric nodes are generated, unique hot encoding is used to distinguish geometric nodes from non-geometric nodes. Specifically, [1,0] and [0,1] are used to represent geometric nodes and non-geometric nodes respectively, and they are connected with corresponding features (for geometric nodes, the features include the type of face, the concavity and convexity of the face, and the number of edges on the face; for non-geometric nodes, the features include the type of PMI information, the content of PMI information, and the connection relationship of PMI information) to initialize the hidden state of the node. It is specifically expressed as follows:

[0059]

[0060] x v Represents the initial input feature vector of the current node v.

[0061] Step S105, initializing the attribute adjacency graph.

[0062] For every two faces f i and f j , if they are adjacent, then the edge between the two corresponding nodes is established, and the attributes of the edge are determined by the type of edge, the angle between the two faces, the concavity of the edge, etc. For each PMI information in the node set PS of the non-geometric model, the edge between the related nodes is established in the attribute adjacency graph, and the attributes of the edge are determined by the type of edge and other information.

[0063] In step S2, the established attribute adjacency graph (MAAG) is embedded into a continuous vector space using a graph neural network (GNN). Similarity matching and sorting are performed in the continuous vector space according to a specific distance metric. The model with the highest similarity is used as the final retrieval result of the three-dimensional MBD model to be retrieved, and an attention mechanism is introduced to adaptively identify more important feature information (steps S203-S206).

[0064] Specifically, step S2 further includes:

[0065] Step S200, input the initialized attribute adjacency graph into the graph neural network. In a specific embodiment of the present invention, the framework structure of the graph neural network is as follows: Figure 2 As shown, the graph neural network includes an embedding layer, a propagation layer, and an aggregation layer.

[0066] Step S201, after the attribute adjacency graph is processed by the embedding layer, the embedded node state is calculated.

[0067] In a specific embodiment of the present invention, the node state after calculation embedding is expressed as V, where represents the hidden state of the graph node v at time t = 0, x vRepresents the initial input feature vector of the current node, and uses a multi-layer perceptron MLP as the encoder of the embedding layer.

[0068] Step S202, calculating the edge state after embedding.

[0069] In a specific embodiment of the present invention, the edge state after the embedding is calculated is represented by e vw =MLP edge (x vw ), where e vw represents the embedding representation of the edge between two nodes v and w, x vw The feature vector representing this edge. In the present invention, the role of the embedding layer is to map the high-dimensional feature vector to a low-dimensional vector representation space while maintaining the important properties of the network.

[0070] Step 203, calculating the weight coefficient from the neighbor node w to the current central node v.

[0071] In a specific embodiment of the present invention, at the propagation layer, the weight coefficient g from the neighbor node w to the current central node v is calculated. vw :

[0072] g vw =a(Wh v ,Wh w ),

[0073] Where a represents a single-layer feedforward neural network in the propagation layer, W∈R F′×F represents a weight matrix, and F′ and F represent the feature dimensions of the output nodes and input nodes of the single-layer feedforward neural network a, respectively.

[0074] Step S204, using the softmax function to calculate the weight coefficient g from the normalized neighbor node w to the current center node v vw Generate the final attention coefficient α vw .

[0075] In a specific embodiment of the present invention, the final attention coefficient is generated as follows:

[0076]

[0077] g vk It represents the weight coefficient between node v and node k.

[0078] Step S205, using the fully connected layer as the message passing function of the propagation layer to calculate the messages between the nodes at time t.

[0079] In a specific embodiment of the present invention, a fully connected layer is used as the message transfer function f of the propagation layer. message, set the number of hidden layer nodes to twice the dimension of the state vector, and use the rectified linear unit (ReLu) as the activation function to calculate the message between the nodes at time t They represent the hidden state representations of node w and point v at time t respectively.

[0080] Step S206, using the final attention coefficient and the messages between the nodes at time t to calculate the weighted aggregated message.

[0081] In a specific embodiment of the present invention, the weighted aggregated message is calculated as follows:

[0082]

[0083] It should be noted here that the aggregation here is still the propagation layer. The aggregated messages here are only used to update the status of a single node, while the role of the aggregation layer is to aggregate the information of the entire graph structure.

[0084] Step S207, using GRU as the node state update function, and using the weighted aggregated message to update the node state.

[0085] Specifically, GRU is used as the node state update function to calculate the node state update representation

[0086] Step S208: After T rounds of propagation, the embedding vector representation of the three-dimensional MBD model to be retrieved is output through the clustering layer.

[0087] Specifically, after a certain T rounds of propagation, the aggregation layer is in the final state Take all nodes as input and compute and output the embedding vector representation of the entire graph:

[0088]

[0089]

[0090] Among them, MLP G There is only one linear layer, and the number of neuron nodes is equal to the dimension of the final output graph vector. Represents the sigmoid function.

[0091] Step S209: After the embedded vector representation of the 3D MBD model to be retrieved is calculated, similarity calculation is performed with the vector representations of all MBD models in the model library.

[0092] In a specific embodiment of the present invention, the Euclidean distance formula can be used. Or the formula for cosine distance Or the formula for the Hamming distance Similarity calculation is performed, where the role of Tanh transformation is to improve retrieval efficiency.

[0093] Step S210, sorting the calculated similarity results, and the model with the highest similarity is the retrieved result.

[0094] Step S3, using a series of MBD model samples as a training data set to train the graph neural network, so that the trained graph neural network can achieve fast and accurate retrieval of MBD models.

[0095] Specifically, step S3 further includes:

[0096] Step S300 , using a series of MBD model samples ( G1 , G2 ) as a training data set.

[0097] The initialized graph neural network needs a lot of training and learning to improve the reliability of the network model and the accuracy of the algorithm. In the present invention, a series of MBD model samples (G1, G2) are used as training data sets, in which a pair of relatively similar samples is marked as positive and a pair of dissimilar samples is marked as negative.

[0098] Step S301, according to the defined loss function, the graph neural network is optimized using a gradient descent-based algorithm.

[0099] When using Euclidean distance as the distance metric, the following formula is used as the loss function:

[0100] L euclidean =max{0,1-t(1-d(G1,G2))}

[0101] where d(G1,G2) represents the Euclidean distance between the embedding vectors in graphs G1 and G2, and t∈{1,-1} represents the labels of the training samples.

[0102] When the graph database is large and the computational efficiency is fast enough, the Hamming distance can be used as the distance measure and the graph embedding vector can be set to the form of a second-order system, i.e., h G ∈{0,1} H , so that the efficient k-nearest neighbor algorithm can be applied, and the loss function adopted is as follows: where s(G1,G2) represents the Hamming distance between the embedding vectors G1 and G2

[0103] Step S302, after sufficient training, the loss function will converge. When G1 and G2 are similar, the calculated d(G1, G2) is small; when G1 and G2 are not similar, the calculated d(G1, G2) is large.

[0104] Step S4: Use the test set to test the trained graph neural network, and use multiple indicators to evaluate the test results. If the test results do not meet the requirements, update the parameters of the network model and retrain to obtain more accurate results.

[0105] Specifically, step S4 further includes:

[0106] Step S400: Select a test data set.

[0107] In order to ensure the reliability of the network model, a certain number of test data sets need to be used for testing. When selecting test data, some interference models need to be added. These models have similar geometric structures but large differences in non-geometric information.

[0108] Step S401, set the operating parameters, and control the output vector dimension by setting the number of nodes in the relevant MLP output layer. The node vector dimension is set to 32, the edge vector dimension is set to 16, and the graph embedding vector dimension is set to 128. The number of propagation layers is set to 5. The learning rate is fixed to 0.00001, and the Adam optimizer is used for gradient descent.

[0109] Step S402, multiple common indicators are used to evaluate the test results, including nearest neighbor (NN), first layer (FT), second layer (ST), E-measure (E), discounted cumulative gain (DCG) and recall (PR). If the test results do not meet the requirements, the parameters of the network model need to be updated and retrained to obtain more accurate results.

[0110] Figure 3 This is a system structure diagram of an MBD model retrieval device based on a graph neural network according to the present invention. Figure 3 As shown, the present invention provides an MBD model retrieval device based on a graph neural network, comprising:

[0111] The attribute adjacency graph building unit 301 is used to build an MBD-based attribute adjacency graph (MAAG) for the 3D MBD model to be retrieved, so as to fully express the product semantic information, wherein the product semantic information includes geometric and non-geometric information of the MBD model.

[0112] Specifically, the attribute adjacency graph establishing unit 301 further includes:

[0113] The model conversion module is used to convert the 3D MBD model to be retrieved into a model in STEP (STEP AP242) format.

[0114] The node set generation module of the geometric model is used to convert the model in the STEP format into a graph structure, and traverse each face in the STEP format model to generate the nodes of the face and add them to the geometric node set FS = {fi},1<<i<<m, where m is the number of faces.

[0115] The attribute adjacency graph creation module is used to create an attribute adjacency graph. For a geometric node, it traverses each face f in the geometric node set FS of the geometric model. i , create a corresponding graph node in the attribute adjacency graph (one graph node for each face), and extract face information (such as face type and concavity) to initialize the node geometry feature f g ,Specifically, the attribute adjacency graph is empty at the beginning, and when all graph nodes and edges are created, the attribute adjacency graph is created.

[0116] The node set generation module of the non-geometric model is used to traverse each PMI (Product and Manufacturing Information) information in each STEP format model for the non-geometric node, and add the PMI information to the non-geometric node set PS of the model. i},1<<i<<n, where n represents the total number of non-geometric nodes, and the non-geometric nodes are initialized according to the type and content of the PMI information.

[0117] The characteristic of MBD model is that it carries PMI information, and STEP AP242, as one of the formats of MBD model, naturally has rich PMI information. Therefore, each PMI information in each STEP format model can be traversed and the PMI information can be added to the node set of the non-geometric model.

[0118] The module for distinguishing geometric nodes from non-geometric nodes is used to distinguish geometric nodes from non-geometric nodes by using one-hot encoding and connect them with corresponding features.

[0119] In a specific embodiment of the present invention, after both geometric nodes and non-geometric nodes are generated, unique hot encoding is used to distinguish geometric nodes from non-geometric nodes. Specifically, [1,0] and [0,1] are used to represent geometric nodes and non-geometric nodes respectively, and they are connected with corresponding features (for geometric nodes, the features include the type of face, the convexity and concavity of the face, and the number of edges on the face; for non-geometric nodes, the features include the type of PMI information, the content of the PMI information, and the connection relationship of the PMI information) to initialize the hidden state of the node.

[0120]

[0121] Initialization module, used to initialize the attribute adjacency graph.

[0122] For every two faces f i and f j, if they are adjacent, then the edge between the two corresponding nodes is established, and the attributes of the edge are determined by the type of edge, the angle between the two faces, the concavity of the edge, etc. For each PMI information in the node set PS of the non-geometric model, the edge between the related nodes is established in the attribute adjacency graph, and the attributes of the edge are determined by the type of edge and other information.

[0123] The graph neural network creation unit 302 is used to create a graph neural network (GNN), and use the graph neural network (GNN) to embed the established attribute adjacency graph (MAAG) into a continuous vector space, perform similarity matching and sorting in the vector space according to a specific distance metric, and use the model with the highest similarity as the final retrieval result of the three-dimensional MBD model to be retrieved, and introduce an attention mechanism to adaptively identify more important feature information.

[0124] Specifically, the graph neural network creation unit 302 further includes:

[0125] A creation module is used to create a graph neural network and input the initialized attribute adjacency graph into the graph neural network. In a specific embodiment of the present invention, the framework structure of the created graph neural network is as follows: Figure 2 As shown, it includes an embedding layer, a propagation layer and an aggregation layer.

[0126] The post-embedded node state calculation module is used to calculate the node state after embedding.

[0127] In a specific embodiment of the present invention, the node state after calculation embedding is expressed as V, where represents the hidden state of the graph node at time t=0, x v Represents the initial input feature vector of the current node, and uses a multi-layer perceptron MLP as the encoder of the embedding layer.

[0128] The post-embedding edge state calculation module is used to calculate the edge state after embedding.

[0129] In a specific embodiment of the present invention, the edge state after the embedding is calculated is represented by e vw =MLP edge (x vw ), where e vw represents the embedding representation of the edge between two nodes v and w, x vw The function of the embedding layer is to map the high-dimensional feature vector to a low-dimensional vector representation space while maintaining the important properties of the network.

[0130] The weight coefficient calculation module is used to calculate the weight coefficient from the neighbor node w to the current central node v.

[0131] In a specific embodiment of the present invention, at the propagation layer, the weight coefficient g from the neighbor node w to the current central node v is calculated. vw =a(Wh v ,Wh w ), where a represents a single-layer feedforward neural network in the propagation layer, W∈R F′×F represents a weight matrix, and F′ and F represent the feature dimensions of the output nodes and input nodes of the single-layer feedforward neural network a, respectively.

[0132] The final attention coefficient calculation module is used to calculate the weight coefficient g from the normalized neighbor node w to the current center node v using the softmax function vw Generate the final attention coefficient.

[0133] In a specific embodiment of the present invention, the final attention coefficient is generated as follows:

[0134]

[0135] g vk It represents the weight coefficient between node v and node k.

[0136] The inter-node message calculation module is used to use the fully connected layer as the message passing function of the propagation layer to calculate the messages between nodes at time t.

[0137] In a specific embodiment of the present invention, a fully connected layer is used as the message transfer function f of the propagation layer. message , set the number of hidden layer nodes to twice the dimension of the state vector, and use the rectified linear unit (ReLu) as the activation function to calculate the message between the nodes at time t

[0138] The aggregate message calculation module is used to calculate the weighted aggregate message using the final attention coefficient and the messages between the nodes at time t.

[0139] In a specific embodiment of the present invention, the weighted aggregated message is calculated as follows:

[0140]

[0141] It should be noted here that the aggregation here is still the propagation layer. The aggregated messages here are only used to update the status of a single node, while the role of the aggregation layer is to aggregate the information of the entire graph structure.

[0142] The node state update module is used to use GRU as the node state update function and update the node state using weighted aggregate messages.

[0143] Specifically, GRU is used as the node state update function to calculate the node state update representation

[0144] The embedding vector representation output module is used to output the embedding vector representation of the three-dimensional MBD model to be retrieved through the clustering layer after T rounds of propagation.

[0145] Specifically, after a certain T rounds of propagation, the aggregation layer is in the final state Take all nodes as input and compute and output the embedding vector representation of the entire graph:

[0146]

[0147]

[0148] Among them, MLP G There is only one linear layer, and the number of neuron nodes is equal to the dimension of the final output graph vector. Represents the sigmoid function.

[0149] The similarity calculation module is used to calculate the similarity with the vector representations of all MBD models in the model library after calculating the embedded vector representation of the three-dimensional MBD model to be retrieved.

[0150] In a specific embodiment of the present invention, the Euclidean distance formula can be used. Or the formula for cosine distance Or the formula for the Hamming distance Similarity calculation is performed, where the role of Tanh transformation is to improve retrieval efficiency.

[0151] The retrieval result output module is used to sort the calculated similarity results, and the model with the highest similarity is the retrieved result.

[0152] The training unit 303 is used to train the graph neural network using a series of MBD model samples as a training data set, so that the trained graph neural network can achieve fast and accurate retrieval of MBD models.

[0153] Specifically, the training unit 303 is specifically used for:

[0154] A series of MBD model samples (G1, G2) are used as training data sets.

[0155] The initialized graph neural network needs a lot of training and learning to improve the reliability of the network model and the accuracy of the algorithm. In the present invention, a series of MBD model samples (G1, G2) are used as training data sets, in which a pair of relatively similar samples is marked as positive and a pair of dissimilar samples is marked as negative.

[0156] According to the defined loss function, a gradient descent-based algorithm is used to optimize the graph neural network.

[0157] When using Euclidean distance as the distance metric, the following formula is used as the loss function:

[0158] L euclidean =max{0,1-t(1-d(G1,G2))}

[0159] where d(G1,G2) represents the Euclidean distance between the embedding vectors in graphs G1 and G2, and t∈{1,-1} represents the labels of the training samples.

[0160] When the graph database is large and the computational efficiency is fast enough, the Hamming distance can be used as the distance measure and the graph embedding vector can be set to the form of a second-order system, i.e., h G ∈{0,1} H , so that the efficient k-nearest neighbor algorithm can be applied, and the loss function adopted is as follows: where s(G1,G2) represents the Hamming distance between the embedding vectors G1 and G2

[0161] After sufficient training, the loss function will converge. When G1 and G2 are similar, the calculated d(G1, G2) is small; when G1 and G2 are dissimilar, the calculated d(G1, G2) is large.

[0162] The testing unit 304 is used to test the trained graph neural network using a test set and evaluate the test results using multiple indicators. If the test results do not meet the requirements, the parameters of the network model are updated and retrained to obtain more accurate results.

[0163] Specifically, the testing unit 304 is used for:

[0164] Select the test dataset.

[0165] In order to ensure the reliability of the network model, a certain number of test data sets need to be used for testing. When selecting test data, some interference models need to be added. These models have similar geometric structures but large differences in non-geometric information.

[0166] Set the running parameters to control the output vector dimension by setting the number of nodes in the relevant MLP output layer. The node vector dimension is set to 32, the edge vector dimension is set to 16, and the graph embedding vector dimension is set to 128. Set the number of propagation layers to 5. The learning rate is fixed to 0.00001, and the Adam optimizer is used for gradient descent.

[0167] The test results are evaluated using multiple common indicators, including nearest neighbor (NN), first layer (FT), second layer (ST), E-measure (E), discounted cumulative gain (DCG), and recall (PR). If the test results do not meet the requirements, the parameters of the network model need to be updated and retrained to obtain more accurate results.

[0168] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Any person skilled in the art may modify and alter the above embodiments without violating the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be as set forth in the claims.

Claims

1. A MBD model retrieval method based on graph neural network, comprising the following steps: Step S1, for the 3D MBD model to be retrieved, establish an MBD-based attribute adjacency graph to fully express product semantic information, where the product semantic information includes geometric and non-geometric information of the MBD model; Step S1 further comprises: Step S100, converting the three-dimensional MBD model to be retrieved into a model in STEP format; Step S101, converting the model in the STEP format into a graph structure, traversing each face in the STEP format model, generating face nodes and adding them to the geometric node set of the model; Step S102, for a geometric node, traverse each face in the geometric node set of the geometric model, create a corresponding graph node in the attribute adjacency graph, and extract face information to initialize the node geometric properties; Step S103, for non-geometric nodes, traverse each PMI information in each STEP format model, add the PMI information to the non-geometric node set of the model, and initialize the non-geometric node according to the type and content of the PMI information; Step S104, using one-hot encoding to distinguish geometric nodes from non-geometric nodes, and connecting them with corresponding features; Step S105, initializing the attribute adjacency graph; Step S2, using a graph neural network to embed the established attribute adjacency graph into a continuous vector space, based on a specific distance metric, and introducing an attention mechanism to adaptively identify feature information, perform similarity matching and sorting in the continuous vector space, and use the model with the highest similarity as the final retrieval result of the 3D MBD model to be retrieved; Step S2 further comprises: Step S200, inputting the initialized attribute adjacency graph into a graph neural network, wherein the graph neural network includes an embedding layer, a propagation layer, and an aggregation layer; Step S201, calculating the node state after embedding and the edge state after embedding; Step S202, calculating the weight coefficient from the neighbor node w to the current central node v; Step S203, using the softmax function to calculate the weight coefficient from the normalized neighbor node w to the current center node v to generate the final attention coefficient; Step S204, using the fully connected layer as the message transfer function of the propagation layer to calculate the messages between the nodes at time t; Step S205, using the final attention coefficient and the messages between the nodes at time t to calculate the weighted aggregated message; Step S206, using GRU as a node state update function, and using weighted aggregated messages to update the node state; Step S207, after T rounds of propagation, output the embedding vector representation of the to-be-retrieved 3D MBD model through the clustering layer; Step S208, after calculating the embedded vector representation of the 3D MBD model to be retrieved, similarity calculation is performed with the vector representations of all MBD models in the model library; Step S209, sorting the calculated similarity results, and the model with the highest similarity is the retrieved result; Step S3, using a series of MBD model samples as training data sets to train the graph neural network.

2. The MBD model retrieval method based on graph neural network according to claim 1, characterized in that: In step S201, the node state after embedding is calculated as: in, represents the hidden state of the graph node at time t=0, x v Represents the initial input feature vector of the current central node, and uses a multi-layer perceptron MLP as the encoder of the embedding layer; The edge state after computing the embedding is expressed as: where e vw represents the embedding representation of the edge between the current central node v and the neighbor node w, x vw The eigenvector representing this edge.

3. The MBD model retrieval method based on graph neural network according to claim 2, characterized in that: The weight coefficient from the neighbor node w to the current central node v is: g vw =a(Wh v ,Wh w ), Where a represents a single-layer feedforward neural network in the propagation layer, W∈R F′×F represents a weight matrix, F′ and f represent the feature dimensions of the output nodes and input nodes of the single-layer feedforward neural network a respectively.

4. The MBD model retrieval method based on graph neural network according to claim 3, characterized in that: In step S205, a fully connected layer is used as the message passing function of the propagation layer, the number of hidden layer nodes is set to twice the dimension of the state vector, and a rectified linear unit is used as the activation function to calculate the message between the nodes at time t.

5. The MBD model retrieval method based on graph neural network according to claim 4, characterized in that: In step S209 , similarity calculation is performed using the Euclidean distance formula, the cosine distance formula, or the Hamming distance formula.

6. The MBD model retrieval method based on graph neural network according to claim 1, characterized in that: After step S3, the method further comprises the following steps: Step S4, using a test set to test the trained graph neural network, and using multiple indicators to evaluate the test results. If the test results do not meet the requirements, the parameters of the network model are updated and retrained to obtain more accurate results. The indicators include nearest neighbor, first layer, second layer, E-measure, discounted cumulative gain, and recall rate.

7. A MBD model retrieval device based on graph neural network, comprising: An attribute adjacency graph building unit is used to build an attribute adjacency graph based on MBD for the three-dimensional MBD model to be retrieved, so as to fully express the product semantic information, wherein the product semantic information includes geometric and non-geometric information of the MBD model; The attribute adjacency graph establishment unit converts the three-dimensional MBD model to be retrieved into a model in STEP format; converts the model in STEP format into a graph structure, and traverses each face in the STEP format model, generates nodes of the face and adds them to the geometric node set of the model; for geometric nodes, traverses each face in the geometric node set of the geometric model, creates a corresponding graph node in the attribute adjacency graph, and extracts the face information to initialize the node geometry characteristics; for non-geometric nodes, traverses each PMI information in each STEP format model, adds the PMI information to the non-geometric node set of the model, and initializes the non-geometric nodes according to the type and content of the PMI information; uses unique hot encoding to distinguish geometric nodes from non-geometric nodes, and connects them with corresponding features; initializes the attribute adjacency graph; The attribute adjacency graph creation module uses a graph neural network to embed the established attribute adjacency graph into a continuous vector space. Based on the specific distance metric, an attention mechanism is introduced to adaptively identify more important feature information, perform similarity matching and sorting in the continuous vector space, and use the model with the highest similarity as the final retrieval result of the 3D MBD model to be retrieved. The attribute adjacency graph creation module inputs the initialized attribute adjacency graph into the graph neural network, which includes an embedding layer, a propagation layer, and an aggregation layer; calculates the node state and the edge state after embedding; Calculate the weight coefficient from neighbor node w to the current center node v; Use the softmax function to calculate the weight coefficient from the normalized neighbor node w to the current center node v to generate the final attention coefficient; use the fully connected layer as the message passing function of the propagation layer to calculate the message between the nodes at time t; The weighted aggregate message is calculated using the final attention coefficient and the messages between nodes at time t; Use GRU as the node state update function and use weighted aggregate messages to update the node state; After T rounds of propagation, the embedding vector representation of the three-dimensional MBD model to be retrieved is output through the aggregation layer; After calculating the embedded vector representation of the 3D MBD model to be retrieved, similarity calculation is performed with the vector representations of all MBD models in the model library; the calculated similarity results are sorted, and the model with the highest similarity is the retrieved result; The training unit is used to train the graph neural network using a series of MBD model samples as a training data set.

Citation Information

Patent Citations

  • CAD model local structure retrieval method fusing engineering semantics

    CN110309332A

  • Method for identifying CAD model assembly interface based on improved graph attention network

    CN112699915A