Multi-information fusion machining feature recognition method and device based on graph neural network
By constructing a face adjacency graph and edge connection matrix based on graph neural networks, and combining semantic and bottom face classifiers, accurate identification of processing features is achieved, solving the problem of not being able to identify processing feature instances in existing technologies and improving the guiding significance of process design.
Patent Information
- Application Number
- CN202411509171.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-10-28
AI Technical Summary
Existing attribute adjacency graph and graph neural network models cannot effectively identify processing feature instances, resulting in a lack of communication between design and manufacturing information and affecting the practical guiding significance of process design.
A multi-information fusion method based on graph neural networks is adopted. By constructing a face adjacency graph and an edge connection matrix, combined with semantic and bottom face classifiers, and using deep graph library tools to display the recognition results, the accurate recognition of processing features is achieved.
It improves the accuracy and adaptability of processing feature identification, and can determine which single face belongs to a certain type of feature and which faces together constitute a processing feature, providing practical technical support for subsequent process planning.
Smart Images

Figure CN119646729B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a machining feature recognition method, in particular to a multi-information fusion machining feature recognition method and device based on a graph neural network. BACKGROUND
[0002] With the rapid development of economy and the intensification of market competition, various advanced design technologies and advanced manufacturing technologies have been popularized and applied in product development and production processes. Among them, the popularization of three-dimensional CAD and CAPP systems has promoted the efficiency of product design and production of enterprises. The design department of an enterprise uses three-dimensional design software such as UG, CATIA and Pro / E to realize parametric modeling of parts; the process department uses three-dimensional CAPP systems to improve the efficiency of process design. However, the independent operation of CAD and CAPP systems leads to the fact that design information and manufacturing information cannot be communicated. The traditional way is to convert design information into manufacturing information through manual means, which increases the product development time and reduces the competitiveness of enterprises. Therefore, studying machining feature recognition technology to realize the intercommunication of design information and manufacturing information is one of the effective ways to improve the efficiency of product design and process planning, and has important significance for improving the production efficiency of enterprises and reducing the production cost of products.
[0003] In this field, researchers have proposed various feature recognition methods based on traces, graphs and volume decomposition. In traditional feature recognition methods, researchers must develop reliable recognition rules based on a full understanding of the structures of various machining features. With the continuous development of deep learning technology, research on the application of multi-layer neural network technology to machining feature recognition is being continuously deepened, and the representation of part models is also being continuously updated. By using attribute adjacency graphs and graph neural network models, the original model can be converted into data that can be processed by neural networks while maintaining the geometric topological properties of the part model, and complex feature representations can be automatically learned, enabling efficient analysis of machining features. However, existing research on machining feature recognition using attribute adjacency graphs and graph neural network models mainly realizes semantic classification of machining features on part surfaces, but not instance recognition, i.e., it cannot determine which surfaces constitute a machining feature instance, which has no practical guiding significance for subsequent process design.
[0004] In view of this, a multi-information fusion machining feature recognition method based on a graph neural network is designed and implemented, which is of great significance for integrating CAD and CAPP systems, automatically generating part process plans and automatically deciding process parameters. SUMMARY
[0005] Invention purposes: The application provides a multi-information fusion machining feature recognition method and device based on a graph neural network, which solves the problems of part model representation distortion and difficult recognition of complex features and cross features.
[0006] Technical scheme: The multi-information fusion machining feature recognition method based on the graph neural network comprises the following steps:
[0007] (1) Select a series of basic machining features for combination to form a part model with multiple features and label to form a machining feature data set;
[0008] (2) Preprocess the machining feature data set, including sampling and constructing a face adjacency graph for the faces and edges of the part, constructing a face connection relationship matrix, and constructing a face and edge attribute table of geometric attributes;
[0009] (3) Perform encoding processing on the data processed in step (2), including encoding the data of the faces and edges and encoding the geometric attributes of the faces and edges; the data after encoding processing is used as the feature vector of the nodes and edges in the adjacency graph to form an attribute adjacency graph data set;
[0010] (4) Construct a graph neural network with a machining feature semantic classifier and a bottom surface classifier, extract the machining feature information of the part face edge combination, and perform machining feature semantic classification and bottom surface classification on the node face;
[0011] (5) Fuse the outputs of the two classifiers and the connection relationship matrix, and use a deep graph library to display the recognition effect.
[0012] Further, the labeling implementation process of step (1) is as follows:
[0013] A feature classification label vector T is constructed for each face m , the dimension m is determined by the total number of machining feature categories, if the face belongs to a certain feature, the dimension value is 1, and the other dimensions are 0;
[0014] A bottom surface classification label a is constructed for each face i , if the face belongs to a bottom surface, the value is 1, otherwise it is 0.
[0015] Further, the data preprocessing implementation process of step (2) is as follows:
[0016] The faces and edges of the part are represented and sampled by using a UV-Net to construct an input tensor of the faces and edges, wherein the input tensor of the face contains the absolute coordinates xyz of the sampling points, the derivatives d U and d V of the sampling points in the UV direction; the input tensor of the edge contains the absolute coordinates xyz of the sampling points, the derivatives d iTangent vector T on xi T yi T zi Sampling points are on surface f j Tangent vector T on xj T yj T zj ;
[0017] Using Python's OCC module, the part model's step file is read, the model's faces and edges are identified, and each is assigned a unique identifier f. i , l j Construct an adjacency graph with faces as nodes and edges as relation edges; construct a connection relation matrix L for all faces of the entire part. n×n , n represents the number of facets of the part, and the matrix value l ij This indicates the connection relationship between face i and face j. When identifying faces and edges, if they are connected, then l... ij It is 1 if it is 1, otherwise it is 0, and l ii The value is also set to 1;
[0018] The OCC module in Python is used to read the attribute information of faces and edges in a part model. The face attributes include face number, type, area, and concavity / convexity; the edge attributes include edge number, type, length, concavity / convexity, and adjacent face f. i Number and adjacent face f j serial number.
[0019] Furthermore, the implementation process of step (3) is as follows:
[0020] The face edge is encoded to extract spatial feature information. The face encoder contains three layers of two-dimensional convolutional neural network, each layer containing a 2DCNN layer, a regularization layer and an activation layer. The sampled data of the face is processed by the encoder to obtain the corresponding vector. The edge encoder contains three layers of one-dimensional convolutional neural network, each layer containing a 1DCNN layer, a regularization layer and an activation layer. The sampled data of the edge is processed by the encoder to obtain the corresponding vector.
[0021] The geometric attributes of the face and the edge are encoded. Both the geometric attribute encoders of the face and the edge contain multilayer perceptron neural networks, each containing a linear layer, a regularization layer, and an activation layer. The geometric attributes of the face and the edge are input into their respective encoders to obtain corresponding vectors.
[0022] Furthermore, the implementation process of step (4) is as follows:
[0023] The surface encoding vector and surface attribute encoding vector are fused as the feature vectors of the graph nodes; the edge encoding vector and edge attribute encoding vector are fused as the feature vectors of the graph edges; the graph neural network contains s graph neural subnetworks, each of which contains a normalization, information transfer neural network MPNN, normalization, and multilayer perceptron.
[0024] The machining feature semantic classifier and the bottom surface classifier are constructed to extract more information of the part, the semantic recognition and the bottom surface recognition classifier both contain a multilayer perceptron neural network, each layer includes a linear layer, a normalization layer and an activation layer, data obtained through the graph neural network processing is input into two tasks to determine whether the node surface belongs to a certain machining feature and whether it belongs to the bottom surface of the machining feature; the loss function of the semantic recognition and the bottom surface recognition classifier is as follows:
[0025]
[0026] L=αL s +βL b
[0027] Wherein, L s , L b , L respectively represent the semantic recognition loss, the bottom surface recognition loss and the comprehensive task loss function, N represents the number of node surfaces, K represents the number of machining feature categories, t i represents the label vector of node i, p i represents the predicted probability vector of node i, and alpha and beta are the hyperparameters for balancing the semantic recognition loss and the bottom surface recognition loss to the comprehensive task loss.
[0028] Further, the step (5) is implemented as follows:
[0029] The machining feature semantic classifier can output the machining feature classification vector f i of the node surface f i,m , m represents the number of machining feature categories, and the machining feature classification vectors of all surfaces of the part form the machining feature classification matrix F n×m of the part, n represents the number of part surfaces; the bottom surface classifier can output the bottom surface classification vector b i of the node surface f i,1 , and the bottom surface classification vectors of all surfaces of the part form the bottom surface classification matrix B n×1 of the part; the machining feature classification matrix F n×m , the bottom surface classification matrix B n×1 and the connection relationship matrix L n×n are spliced to obtain the part machining feature recognition matrix Z n×(m+1+n) ; the information of the matrix is integrated, and the machining feature recognition result is displayed by using the depth map library tool.
[0030] The device of the application comprises a memory and a processor, wherein:
[0031] The memory is used for storing a computer program capable of running on the processor;
[0032] A processor is configured to execute the steps of the method for identifying machining features based on multi-information fusion of graph neural networks when the computer program is executed.
[0033] The storage medium stores a computer program, and the computer program is executed by at least one processor to implement the steps of the method for identifying machining features based on multi-information fusion of graph neural networks.
[0034] Advantages: Compared with the prior art, the present application has the following advantages:
[0035] 1. The present application uses attribute adjacency graph and graph neural network to identify machining features, improving the adaptability of the method.
[0036] 2. Compared with the prior art, the present application combines the connection relationship between the bottom surface and the surface of the machining feature, can identify that a single surface belongs to a certain feature, and can judge which surfaces jointly constitute a machining feature, providing actual technical support for subsequent process planning.
[0037] 3. The present application uses UV-Net to represent the surface and edge of the part, which can represent small machining features, and normalizes the sampling points, which is beneficial to processing new parts. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a flowchart of the method for identifying machining features based on multi-information fusion of graph neural networks.
[0039] Figure 2 is a schematic diagram of the machining feature identification network structure proposed by the present application. DETAILED DESCRIPTION
[0040] The present application will be further described in detail below with reference to the accompanying drawings.
[0041] For the information communication between CAD and CAPP, effective identification and expression of part machining features, the present application proposes a method for identifying machining features based on multi-information fusion of graph neural networks, as shown in Figure 1 The method comprises the following steps:
[0042] Step 1: Select a series of basic machining features for combination, construct a part model with multiple features, and label to form a machining feature data set.
[0043] For each surface, a feature classification label vector T m is constructed, the dimension m is determined according to the total number of machining feature categories, if the surface belongs to a certain feature, the value of the dimension is 1, and the values of other dimensions are 0; for each surface, a bottom surface classification label a i is constructed, if the surface belongs to the bottom surface, the value is 1, otherwise the value is 0.
[0044] Step 2: Preprocess the processing feature dataset, including sampling the faces and edges of the parts and constructing a face adjacency graph, constructing a face connection matrix, constructing the geometric attributes of faces and edges, and constructing an attribute table for faces and edges.
[0045] The faces and edges of the part are represented and sampled using UV-Net, and the input tensors of the faces and edges are constructed. The input tensor of the face contains the absolute coordinates (x, y, z) of the sampling point and the derivative (d) of the sampling point in the UV direction. U and d V The input tensor of the edge contains the absolute coordinates (x, y, z) of the sampling point, and the sampling point is located on surface f. i Tangent vector T on xi T yi T zi Sampling points are on surface f j Tangent vector T on xj T yj T zj .
[0046] Using Python's OCC module, the part model's step file is read, the model's faces and edges are identified, and each is assigned a unique identifier f. i , l j Construct an adjacency graph with faces as nodes and edges as relation edges; construct a connection relation matrix L for all faces of the entire part. n×n , n represents the number of facets of the part, and the matrix value l ij This indicates the connection relationship between face i and face j. When identifying faces and edges, if they are connected, then l... ij It is 1 if it is 1, otherwise it is 0, and l ii The value is also set to 1.
[0047] The OCC module in Python is used to read the attribute information of faces and edges in a part model. Face attributes include face number, type, area, and concavity / convexity; edge attributes include edge number, type, length, and concavity / convexity. Adjacent faces f... i Number, adjacent face f j serial number.
[0048] Step 3: Encode the data processed in Step 2, including encoding the face edges and encoding the geometric attributes of the face and edges; the encoded data is used as the feature vectors of nodes and edges in the adjacency graph, thus forming an attribute adjacency graph dataset.
[0049] The spatial feature information of the face and the edge is extracted by data coding. The face encoder comprises three two-dimensional convolutional neural networks, each of which comprises a 2DCNN layer, a regularization layer and an activation layer. The sampling data of the face is processed by the encoder to obtain a corresponding vector. The edge encoder comprises three one-dimensional convolutional neural networks, each of which comprises a 1DCNN layer, a regularization layer and an activation layer. The sampling data of the edge is processed by the encoder to obtain a corresponding vector.
[0050] The geometric attribute of the face and the edge is coded. The geometric attribute encoder of the face and the edge comprises multiple perceptron neural networks, each of which comprises a linear layer, a regularization layer and an activation layer. The geometric attribute of the face and the edge is input into the respective encoder to obtain a corresponding vector.
[0051] In this embodiment, the face of the part is represented by a point of the adjacency graph, denoted as f i The edge of the part is represented by an edge of the adjacency graph, denoted as l i The connection relationship matrix L n×n represents the connection between the faces, l ij represents the connection relationship between the face f i and the face f j , if connected, l ij is 1, otherwise 0, wherein l ii is 1; the face and the edge are sampled using OCC to represent, the sampling data F ic of the face includes the absolute coordinates xyz of the sampling points, the derivatives d U and d V of the sampling points in the UV direction, and the sampling data of the face has a size of [u f , v f , 3, 2]; the sampling data E ic of the edge includes the absolute coordinates xyz of the sampling points, the tangent vectors T i , T xi , T yi of the sampling points on the face f zi , the tangent vectors T j , T xj , T yj of the sampling points on the face f zj , and the sampling data of the edge has a size of [u e , 3, 3]; the attribute information of the face and the edge is read using OCC, the attribute F is of the face includes the number, the type, the concave-convex property and the area, and the attribute E is of the edge includes the number, the type, the concave-convex property, the length, the number of the adjacent face f i and the number of the adjacent face f j . The part attribute adjacency graph data set composed of all the features is divided into a training set and a test set in a ratio of 8:2.
[0052] Step 4: Construct a machining feature recognition network based on a graph neural network, which fuses the geometric information, topological information and attribute information of the face and edge, and realizes both the semantic classification of the face and the classification of the feature instance. The main structure of the machining feature recognition network based on the graph neural network is shown in Figure 2 , and is as follows:
[0053] The encoding vector of the fused face and the face attribute encoding vector are taken as the feature vector of the graph node; the encoding vector of the fused edge and the attribute encoding vector of the edge are taken as the feature vector of the graph edge; the graph neural network comprises s graph neural sub-networks, each sub-network comprising a normalization, an information transmission neural network MPNN, a normalization and a multi-perception machine;
[0054] A machining feature semantic classifier and a bottom surface classifier are constructed to extract more information of the part. The semantic recognition and bottom surface recognition classifiers both comprise a multi-layer perception neural network, each layer comprising a linear layer, a normalization layer and an activation layer. The data obtained by the graph neural network processing is input into the two tasks to determine whether the node face belongs to a certain machining feature and whether it belongs to the bottom surface of the machining feature; the loss functions of the two classifiers are as follows:
[0055]
[0056]
[0057] L = aL s + bL b
[0058] Wherein, L s , L b , L respectively represent the semantic recognition loss, the bottom surface recognition loss and the comprehensive task loss function, N represents the number of node faces, K represents the number of machining feature categories, t i represents the label vector of node i, p i represents the predicted probability vector of node i, and a and b are the hyperparameters for balancing the semantic recognition loss and the bottom surface recognition loss of the comprehensive task loss.
[0059] The sampling data of the face and the edge are respectively encoded by a two-dimensional convolutional neural network and a one-dimensional convolutional neural network to obtain corresponding vectors F ie and E ie ; the attribute of the face and the edge is encoded by a multi-perception machine to obtain corresponding vectors F im and E im ; the sampling vector and the attribute vector are spliced to form the feature vectors F i and E i of the node face and the edge in the attribute adjacency graph, wherein F i = [F ie | F im ], E i = [Eie |E im The face feature matrix F of the part is composed of all the face feature vectors, and the edge feature matrix E is composed of all the edge feature vectors. A graph neural network is constructed, taking F and E as inputs, and processing through Norm, MPNN, MLP, etc. to extract node and edge information and obtain information features Z in a high-dimensional space.
[0060] The training process of the machining feature recognition network model based on the graph neural network takes F c , E c , F s , and E s as inputs, and takes F n×24 and B n×1 as outputs. The training data amount is 40,000 data in the part data set, and 1,000 data are selected for verification. The training round is 1,000 rounds, the learning rate is 0.006, the optimizer is Adam, and the training batch is set to 64. The machining feature recognition network based on the graph neural network finally obtained can achieve a relatively good effect on part machining feature recognition.
[0061] Step 5: Fuse the outputs of the two classifiers and the connection relationship matrix, and use the depth map library to display the recognition effect.
[0062] The machining feature semantic classifier can output the machining feature classification vector f i of the node face f i,m , and m represents the number of machining feature categories. The machining feature classification vectors of all faces of the part constitute the machining feature classification matrix F n×m of the part, and n represents the number of faces of the part. The bottom surface classifier can output the bottom surface classification vector b i of the node face f i,1 , and the bottom surface classification vectors of all faces of the part constitute the bottom surface classification matrix B n×1 of the part. The machining feature classification matrix F n×m , the bottom surface classification matrix B n×1 , and the connection relationship matrix L n×n are spliced to obtain the part machining feature recognition matrix Z n×(m+1+n) . Integrating the information of the matrix, the machining feature recognition result can be displayed by using the depth map library tool.
[0063] The application also provides a device, which comprises a memory and a processor, wherein the memory is used to store a computer program capable of running on the processor; and the processor is used to execute the steps of the multi-information fusion machining feature recognition method based on the graph neural network when the computer program is running.
[0064] The application further provides a storage medium, and the storage medium stores a computer program.
[0065] The above merely describes the preferred embodiments of the present application, and it should be noted that those skilled in the art can make several improvements and refinements without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A multi-information fusion machining feature recognition method based on a graph neural network, characterized in that, It comprises the following steps: (1) selecting a series of basic machining features for combination to form a part model with multiple features and labeling to form a machining feature dataset; (2) preprocessing the machining feature dataset, including sampling the faces and edges of the part and constructing a face adjacency graph, constructing a face connection relationship matrix, and constructing the geometric properties of the faces and edges and an attribute table of the faces and edges; (3) encoding the data processed in step (2), including encoding the data of the faces and edges and encoding the geometric properties of the faces and edges; the encoded data is used as the feature vector of the nodes and edges in the adjacency graph to form an attribute adjacency graph dataset; (4) constructing a graph neural network with a machining feature semantic classifier and a bottom surface classifier, extracting machining feature information composed of part faces and edges, and classifying the node faces according to machining feature semantics and bottom surfaces; (5) fusing the outputs of the two classifiers and the connection relationship matrix, and using a deep graph library to display the recognition effect; The preprocessing of the data in step (2) is implemented as follows: The face and edge of the part are characterized and sampled by using a UV-Net, and an input tensor of the face and edge is constructed, wherein the input tensor of the face contains absolute coordinates xyz of the sampling points, derivatives d U and d V of the sampling points in UV directions i The input tensor of the edge contains absolute coordinates xyz of the sampling points, tangent vectors T xi , T yi , T zi of the sampling points on the face f j , tangent vectors T xj , T yj , T zj of the sampling points on the face f The OCC module of Python is used to read the part model step file, identify the faces and edges of the model, and assign unique identification number f i , j An adjacency graph is constructed with faces as nodes and edges as relationship edges; a connection relationship matrix L n×n is constructed for all faces of the entire part, where n represents the number of part faces, and the matrix value l ij represents the connection relationship between face i and face j. If connected, l ij is 1, otherwise 0, and the value of l ii is also set to 1. The OCC module of Python is used to read the attribute information of the faces and edges in the part model; The implementation process of step (3) is as follows: The data of the faces and edges is encoded to extract the spatial feature information of the faces and edges. The encoder of the face contains three layers of 2D convolutional neural networks, each layer containing a 2DCNN layer, a regularization layer and an activation layer. The sampling data of the face is processed by the encoder to obtain the corresponding vector. The encoder of the edge contains three layers of 1D convolutional neural networks, each layer containing a 1DCNN layer, a regularization layer and an activation layer. The sampling data of the edge is processed by the encoder to obtain the corresponding vector. The attributes of the faces and edges are encoded. The geometric attribute encoders of the faces and edges both contain multiple layers of perceptron neural networks, each layer containing a linear layer, a regularization layer and an activation layer. The geometric attributes of the faces and edges are input into the respective encoders to obtain the corresponding vectors. The implementation process of step (5) is as follows: The machining feature semantic classifier can output the machining feature classification vector f i of the node face f i,m , m represents the number of machining feature categories, and the machining feature classification vectors of all faces of the part form a machining feature classification matrix F n×m of the part, and n represents the number of faces of the part; the bottom surface classifier can output the bottom surface classification vector b i of the node face f i,1 , and the bottom surface classification vectors of all faces of the part form a bottom surface classification matrix B n×1 of the part; the machining feature classification matrix F n×m , the bottom surface classification matrix B n×1 and the connection relationship matrix L n×n are spliced to obtain a part machining feature recognition matrix Z n×(m+1+n) ; the information of the matrix is integrated, and a machining feature recognition result is displayed by using a depth map library tool.
2. The multi-information fusion machining feature recognition method based on a graph neural network according to claim 1, characterized in that, The labeling implementation process of step (1) is as follows: A feature classification label vector T is constructed for each face m The dimension m is determined by the total category of machining features. If the face belongs to a certain feature, the value of this dimension is 1, and the values of other dimensions are 0. a bottom surface classification label a is constructed for each face i a value of 1 if the face belongs to a bottom surface, otherwise 0.
3. The multi-information fusion machining feature recognition method based on a graph neural network according to claim 1, characterized in that, The implementation process of step (4) is as follows: The encoding vector of the face and the encoding vector of the face attribute are fused as the feature vector of the graph node. The encoding vector of the edge and the attribute encoding vector of the edge are fused as the feature vector of the graph edge. The graph neural network contains s graph neural subnetworks, each subnetwork containing normalization, information transmission neural network MPNN, normalization and multilayer perceptron; The machining feature semantic classifier and the bottom surface classifier are constructed to extract more information of the part. The semantic recognition and bottom surface recognition classifiers both contain multiple layers of perceptron neural networks, each layer including a linear layer, a normalization layer and an activation layer. The data obtained by the graph neural network processing is input into the two tasks to determine whether the node face belongs to a certain machining feature and whether it belongs to a machining feature bottom surface; The loss function of the semantic recognition and bottom surface recognition classifiers is as follows: L = aL + βL s L = aL + βL b wherein L s , L b , L respectively represent semantic recognition loss, bottom surface recognition loss and comprehensive task loss function, N represents the number of node surfaces, K represents the number of processing feature categories, t i represents the label vector of node i, p i represents the predicted probability vector of node i, and α and β are the superparameters for balancing the semantic recognition loss and the bottom surface recognition loss to the comprehensive task loss.
4. The multi-information fusion machining feature recognition method based on a graph neural network according to claim 1, characterized in that, The attributes of the face include the number, type, area and concave-convex property of the face.
5. The multi-information fusion machining feature recognition method based on a graph neural network according to claim 1, characterized in that, The properties of the edges include the number, the type, the length, the concavity- convexity, the adjacent faces f of the edges i number and the adjacent faces f j number.
6. An apparatus device comprising: It comprises a memory and a processor, wherein: The memory is used to store a computer program capable of running on the processor; The processor is used to execute the steps of the multi-information fusion machining feature recognition method based on the graph neural network as claimed in any one of claims 1 to 5 when the computer program is running.
7. A storage medium, characterized by The storage medium has stored thereon a computer program, and the computer program, when executed by at least one processor, implements the steps of the multi-information fusion processing feature recognition method based on the graph neural network according to any one of claims 1 to 5.
Citation Information
Patent Citations
Graph tensor neural network model establishment method and source code semantic recognition method
CN114327483A
Processing feature classification and identification method based on deep learning
CN116824226A