Model matching method and device, electronic equipment and program product

By determining the surface adjacency attribute diagram in the assembly model and segmenting it, the graph embedding features are extracted, and the pre-trained matching model is used for matching, the problem of inefficient matching of the assembly model substructure is solved, and more efficient and accurate matching effect is achieved .

CN119494273APending Publication Date: 2025-02-21CHENGDU GONGDING TECHNOLOGY CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411574560.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The prior art is inefficient in the process of substructure matching and alignment of assembly models, and it is difficult to meet the many-to-many matching requirements of complex substructures.

Method used

Through the assembly model based on boundary representation, the face adjacency attribute diagram is determined and the graph is segmented according to the convexity and concaveness of the nodes is obtained to obtain the face adjacency attribute sub-graph set. Then, graph embedded features are extracted using graph neural network and input them into the pre-trained matching model for matching.

Benefits of technology

It improves the accuracy and efficiency of the matching of the assembly model substructure, can better handle complex many-to-many matching tasks, and reduces computational complexity and manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494273A_ABST
    Figure CN119494273A_ABST
Patent Text Reader

Abstract

The invention provides a model matching method and device, electronic equipment and a program product, and relates to the technical field of computer aided design. The method comprises the steps of determining a first surface adjacency attribute graph based on a source assembly model of boundary representation; acquiring the convexity and convexity of nodes in the first surface adjacency attribute graph, segmenting the first surface adjacency attribute graph according to the convexity and convexity of the nodes to obtain a surface adjacency attribute sub-graph set, and performing feature extraction based on the surface adjacency attribute sub-graph set to obtain a first graph embedding feature set; obtaining a second graph embedding feature of the target assembly model represented by the boundary; and inputting the first graph embedding feature set and the second graph embedding feature set into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model. The method is used for solving the problem of low assembling model matching efficiency in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer-aided design, and in particular to a model matching method, device, electronic equipment and program product. Background Art

[0002] Assembly models usually contain multiple substructures, and the matching and alignment between substructures is a crucial part of computer-aided design (CAD) and computer-aided engineering (CAE). In engineering practice, it is necessary to frequently match and align the substructures of assembly models. Traditional matching methods mainly rely on manual operations. Although they are highly accurate, the process is cumbersome and time-consuming, and requires high experience from designers. In addition, with the increase in product complexity, the efficiency and scalability of manual matching are also severely limited.

[0003] The current automatic matching based on the graph representation method of the matching model still has significant problems in the quality and efficiency of the matching results. First, although the Hungarian algorithm can find the global optimal solution of the bipartite graph matching problem in polynomial time, it assumes that only 1-1 mapping exists, which may not meet the needs of many-to-many matching in complex substructure matching tasks in actual engineering. Secondly, although the brute force algorithm can exhaust all possible matching combinations to find the optimal solution, its time complexity is exponential and difficult to implement in practical applications. The VF-2 and VF-3 algorithms have attracted attention for their applications in complex graph matching problems. The VF-2 algorithm can solve the graph isomorphism problem within a reasonable time frame by using a state space search strategy and effective pruning technology. However, the performance of the VF-2 algorithm will significantly decrease when processing large-scale graphs. The VF-3 algorithm introduces more optimization strategies, including more efficient node sorting and more targeted pruning rules, to improve matching efficiency and accuracy. However, the VF-3 algorithm is still based on the 1-1 mapping assumption, which means that it still has limitations when facing many-to-many matching needs. Summary of the invention

[0004] In view of this, embodiments of the present disclosure provide a model matching method, device, electronic device, and program product to solve the problem of low assembly model matching efficiency in the prior art.

[0005] In a first aspect, the present disclosure provides a model matching method, comprising:

[0006] Determine the first face adjacency attribute graph based on the source assembly model represented by the boundary;

[0007] Acquire the convexity and concavity of nodes in the first face adjacency attribute graph, segment the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and perform feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set;

[0008] Obtain a second graph embedding feature of the target assembly model represented by the boundary;

[0009] The first image embedding feature set and the second image embedding feature set are input into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

[0010] In a second aspect, the present disclosure provides a model matching device, comprising:

[0011] A first processing module, configured to determine a first face adjacency attribute graph based on a source assembly model represented by a boundary;

[0012] A second processing module is used to obtain the convexity and concavity of the nodes in the first face adjacency attribute graph, segment the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and perform feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set;

[0013] A third processing module is used to obtain a second graph embedding feature of the target assembly model represented by the boundary;

[0014] The fourth processing module is used to input the first image embedding feature set and the second image embedding feature set into the pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

[0015] In a third aspect, the present disclosure provides an electronic device, including:

[0016] at least one processor; and

[0017] a memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores at least one computer program executable by the at least one processor, and the at least one computer program is executed by the at least one processor so that the at least one processor can perform the model matching method as described in the first aspect.

[0019] In a fourth aspect, the present disclosure provides a computer program product, which includes a computer program, and when the computer program is executed in a processor, it implements the model matching method described in the first aspect.

[0020] The embodiment provided by the present disclosure determines the first face adjacency attribute graph based on the source assembly model represented by the boundary, and divides the first face adjacency attribute graph according to the convexity and concavity of the nodes in the first face adjacency attribute graph to obtain a face adjacency attribute subgraph set, and then extracts the first graph embedding feature set based on the face adjacency attribute subgraph set, and performs model matching with the second embedding feature of the target assembly model represented by the boundary. Among them, the first face adjacency attribute graph is formed by feature engineering, and then the first face adjacency attribute graph is divided based on the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph with moderate granularity, and the segmentation is performed based on the convexity and concavity of the nodes, which eliminates the influence of the model modeling method on the segmentation, so that the graph embedding feature vector obtained based on the face adjacency attribute subgraph with moderate granularity can accurately represent the characteristics of the model, so that the accuracy and efficiency of the matching model when matching the graph embedding features of the model are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0022] Figure 1 The figure is a flow chart of the model matching method in the embodiment of the present disclosure.

[0023] Figure 2 Shown is a schematic diagram of the structure of a surface adjacency graph in an embodiment of the present disclosure.

[0024] Figure 3 Shown is a schematic diagram of the process of constructing a surface adjacency graph in an embodiment of the present disclosure.

[0025] Figure 4 Shown is a schematic diagram of the process of splitting the first surface adjacency attribute graph in an embodiment of the present disclosure.

[0026] Figure 5 Shown is a structural schematic diagram of a feature extraction model based on a graph neural network in an embodiment of the present disclosure.

[0027] Figure 6 The figure is a schematic diagram of the reasoning process of substructure matching of the assembly model in the embodiment of the present disclosure.

[0028] Figure 7 Schematic diagram of the structure of the model matching device in the embodiment of the present disclosure.

[0029] Figure 8 FIG. 1 is a schematic diagram of the structure of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0031] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0032] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0033] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "including" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded. "Connected" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0034] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.

[0035] The present disclosure provides a model matching method, such as Figure 1 As shown, the model matching method mainly includes the following steps:

[0036] Step 101 : determining a first face adjacency attribute graph based on a source assembly model represented by a boundary.

[0037] Boundary Representation (B-Rep) is a geometric representation method that can accurately describe complex geometric shapes. Therefore, in the embodiment of the present disclosure, the B-Rep model corresponding to the source assembly model is used to determine the first-face adjacency attribute graph to ensure the accuracy of the first-face adjacency attribute graph.

[0038] In some embodiments, a first face adjacency property graph is determined based on a source assembly model represented by a boundary, including: extracting topological features of the source assembly model through a pre-built topological extraction program, and extracting geometric features of the source assembly model through a pre-built geometric information extraction program; and determining the first face adjacency property graph based on the topological features and geometric features of the source assembly model.

[0039] In an exemplary embodiment, topological features are used to indicate the connectivity relationship between faces.

[0040] Extracting the topological features of the source assembly model through a pre-built topological extraction program includes: assuming that a face adjacency graph is derived from the B-Rep model of the source assembly model through a pre-built topological extraction program, represented as G(V, E); wherein the vertex V represents the face in the B-Rep model, and the edge E represents the connectivity between the faces, such as Figure 2 The figure shows the structure of the face adjacency graph. By traversing the half edge of the B-Rep model, the face adjacency graph can be constructed within a limited time complexity, as shown in Figure 3 As shown, the specific steps are as follows:

[0041] Step 301, parsing the B-Rep model to obtain the root shape s;

[0042] Step 302: traverse the root shape s, extract all faces V, and initialize the face adjacency graph

[0043] Step 303, for each face v∈V, execute steps 304-307;

[0044] Step 304, traverse all half edges {h 1 ,h 2 , ..., h n};

[0045] Step 305, for each half edge h, find its corresponding adjacent half edge h′;

[0046] Step 306, obtaining the face V' to which the adjacent half edge h' belongs;

[0047] Step 307, if Add edge e=(v,v′) to E;

[0048] Step 308, construct the final face adjacency graph G(V, E).

[0049] In some embodiments, the first face adjacency attribute graph includes geometric features, and the geometric features include face geometric features. The source assembly model represented by the boundary is used to determine the first face adjacency attribute graph, including: initializing a sampling step; sampling the surface of the source assembly model represented by the boundary according to the sampling step to obtain sampling points; determining the geometric distance between adjacent sampling points, and when the geometric distance exceeds a set geometric error threshold, reducing the sampling step, and re-sampling the surface of the source assembly model according to the reduced sampling step; and determining the face geometric features based on each sampling point obtained by sampling.

[0050] Here, adjusting the sampling step size according to the distance between adjacent sampling points can avoid the problem that the distance between sampling points is too large due to a fixed sampling step size, resulting in inaccurate surface geometric features determined based on the sampling points, thereby ensuring the accuracy of the surface geometric features and achieving adaptive optimization of the sampling process.

[0051] In an exemplary embodiment, through a pre-built geometric feature extraction program, UV-Net constructs a face adjacency graph of a B-Rep entity (Solid) to represent the topological features of the Solid model by using UV mesh sampling and convexity and concavity to construct geometric features, and the geometric features of the model are represented by UV mesh sampling features.

[0052] The process of extracting surface geometric features includes:

[0053] For the parameter surface S(u, v), that is, from the parameter domain To the geometric domain R 3 Mapping, initial sampling step and Among them, M init , N init are the initial sampling steps in each dimension respectively. Set the geometric error threshold ∈ and adjust the sampling step lengths Δu and Δv so that the geometric error between sampling points does not exceed ∈. For each sampling point (u i , v j ), calculate the geometric distance (such as Euclidean distance) between adjacent sampling points:

[0054] d u =S(u i +δu,v j )-S(u i , v j )

[0055] d v =S(u i , v j +δv)-S(u i ,v j ).

[0056] If the geometric distance exceeds the error threshold ∈, reduce the step size:

[0057]

[0058] The following local features are calculated and concatenated by channel to encode the surface geometry: (1) The three-dimensional absolute point position S(u i , v j );(2) The unit normal vector of the sampling point pointing outward (3) The pruning mask, where 1 and 0 represent the sampling points in the visible area and the pruning area respectively; (4) The minimum value k of the principal curvature of the surface min and the maximum value k max ; (5) Surface convexity and concavity; (6) Node convexity and concavity.

[0059] The definition of surface convexity and concavity is as follows: if k min <0, k max <0, it is defined as convex; if k min >0,k max >0, it is defined as a concave surface; otherwise, it is defined as other surfaces (plane or saddle surface). The node is defined as follows: if all the adjacent edges of the node are convex edges, the node is defined as a convex node; if all the adjacent edges of the node are concave edges, the node is defined as a concave node; otherwise, the node is defined as an undetermined node.

[0060] In some embodiments, the geometric features further include edge geometric features.

[0061] For the parametric curve C(u), that is, from the parameter domain To the geometric domain R 3 Similarly, the curve is discretized using an adaptive U grid, and the following local features are calculated and concatenated by channel to encode edge geometry: (1) 3D absolute point position C(u i );(2)Unit tangent vector C′ u (u i );3)Edge convexity and concavity.

[0062] The convexity and concavity of the edge is defined according to the convexity and concavity of the two adjacent surfaces: if the two adjacent surfaces are concave (or 1 concave surface and 1 other surface), the edge is defined as a concave edge; if the two adjacent surfaces are convex (or 1 convex surface and 1 other surface), the edge is defined as a convex edge; otherwise, it is defined as a convex edge by default.

[0063] The face adjacency graph includes topological features, that is, the connectivity between faces of the model. The first face adjacency attribute graph includes topological features and geometric features, that is, adding face attributes and node attributes to the face adjacency graph. Nodes are the endpoints of edge connections in the topological structure.

[0064] Step 102, obtaining the convexity and concavity of the nodes in the first face adjacency attribute graph, segmenting the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and performing feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set.

[0065] In some embodiments, the first face adjacency attribute graph is segmented according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, including: segmenting at least one of the nodes that are continuous and have the same convexity and concavity into a face adjacency attribute subgraph, and determining the face adjacency attribute subgraph set based on each face adjacency attribute subgraph obtained by the segmentation.

[0066] In actual engineering application scenarios, the substructure of an assembly model refers to a part (or combination) that can independently complete a specific engineering logic. Due to differences in the habits of modelers, the same substructure may be represented in different modeling methods: some designers may combine multiple parts into an overall model through Boolean operations; some designers may model the same substructure as a subassembly, or directly represent it as a set of independent parts (without a hierarchical structure). These differences lead to ambiguity in the topology and geometry of the model at the coarse-grained structure level. If the faces of the B-Rep model are used as fine-grained structures for matching, the amount of calculation will be too high as the model becomes more complex. Here, feature engineering based on the convex-concave continuity of the nodes is used to segment the first face connection attribute graph, achieving unambiguous segmentation, making the segmentation granularity moderate, and avoiding the impact of too coarse or too fine segmentation granularity on matching efficiency.

[0067] In an exemplary embodiment, the process of determining the convexity and concavity of a node in the first face adjacency attribute graph includes: determining the convexity and concavity of a face in the first face adjacency attribute graph; determining the convexity and concavity of an edge in the first face adjacency attribute graph according to the convexity and concavity of the face; and determining the convexity and concavity of a node in the first face adjacency attribute graph according to the convexity and concavity of the edge. By determining the convexity and concavity of a node in this way by means of feature engineering, the ambiguity caused by the multiple different substructure definition methods of the matching model in segmenting the subgraph is eliminated.

[0068] In an exemplary embodiment, the first face adjacency attribute graph is segmented according to the convex-concave continuity of the nodes, such as Figure 4 As shown, it mainly includes the following steps:

[0069] Step 401, identifying all convex subgraphs composed of convex nodes or all concave subgraphs composed of concave nodes in the first face adjacency attribute graph G, and outputting them to the segmentation result R;

[0070] Step 402: Delete all identified convex subgraphs and concave subgraphs from G, and separate G into multiple subgraph sets {g i};

[0071] Step 403, re-determine g i The node convexity and concavity of the undetermined nodes in the

[0072] Step 404, if g i If there is no pending node in the graph, it will be transformed into a convex subgraph or a concave subgraph. i Add to R;

[0073] Step 405, if g i If there is a pending node, execute steps 406-415;

[0074] Step 406, delete g i All convex edges in g i Further split into {g i,j};

[0075] Step 407, if {g i,j} If there is no concave subgraph, restore g i For all convex edges, execute steps 411-415;

[0076] Step 408, if {g i,j} If there is a concave subgraph, add the concave subgraph to the segmentation result R;

[0077] Step 409, restore the non-concave subgraph g i,k For the deleted edges, re-determine the convexity and concavity of the pending nodes;

[0078] Step 410: If it is not a concave subgraph g i,k If there is no pending node in the output, it will be output to R, otherwise it will be output to g i,k The undetermined subgraph as recursive input executes steps 406-415;

[0079] Step 411, delete g i All concave edges in g i Further split into {g i,j};

[0080] Step 412, if {g i,j} If there is no convex subgraph, the subgraph to be determined cannot separate the concave and convex subgraphs. i Add to R;

[0081] Step 413, if {g i,j}If there is a convex subgraph, add the convex subgraph to the segmentation result R;

[0082] Step 414, restore the non-convex subgraph g i,k For the deleted edges, re-determine the convexity and concavity of the pending nodes;

[0083] Step 415, if it is not a convex subgraph g i,k If there is no pending node in the output, it will be output to R, otherwise it will be output to g i,k The undetermined subgraph as recursive input executes steps 406-415;

[0084] Step 416: output the segmentation result R.

[0085] Among the related technologies of model segmentation, one is that when segmenting an assembly model based on boundary representation, the model surface is classified (such as divided into planes, groove surfaces, etc.). This method cannot effectively identify and segment continuous part surfaces; the other is to classify the model surface (such as divided into planes, groove surfaces, etc.). This method cannot effectively identify and segment continuous part surfaces. In contrast, deep learning models represented by Segment Anything Model (SAM) perform well in feature extraction and continuous semantic segmentation, but require a large amount of labeled segmentation data. The segmentation method based on feature engineering provided in the embodiment of the present disclosure can effectively identify and segment part surfaces, and does not require a large amount of labeled segmentation data. The segmentation granularity is moderate, and the segmentation efficiency is improved, laying the foundation for the subsequent improvement of matching efficiency.

[0086] In some embodiments, the feature extraction based on the face adjacency attribute subgraph set obtains a first graph embedding feature set, including: inputting the face adjacency attribute subgraph set into a feature extraction model based on a graph neural network (Graph Neural Network, GNN); obtaining the first graph embedding feature set output by the feature extraction model based on the graph neural network, wherein the first graph embedding feature set includes graph embedding features corresponding to each face adjacency attribute subgraph in the face adjacency attribute subgraph set.

[0087] B-Rep mainly uses three representation learning methods: graph representation learning, rendered image representation learning, and point cloud representation learning of point sampling. Among them, graph representation learning can better maintain the information of the B-Rep model. Here, the feature extraction model based on graph neural network in graph representation learning is adopted to ensure the accuracy of the extracted graph embedding features. Graph neural network has shown great potential in the processing of graph representation. By efficiently processing graph structure data, graph neural network can capture the complex geometric and topological features in the assembly model.

[0088] In an exemplary embodiment, a B-Rep model classification dataset is obtained, which is composed of multiple categories of B-Rep models and their class labels. Specifically, the B-Rep model classification dataset contains 50 categories of CAD common engineering part models, and each category contains 100 to 500 STEP AP242 format model files, i.e., B-Rep model files.

[0089] The structure of the feature extraction model based on graph neural network is as follows Figure 5 As shown, the input is a face adjacency attribute graph; the features of the face adjacency attribute graph are further embedded using a 2D convolutional neural network or a 1D convolutional neural network according to the node features or edge features respectively; the feature embedding and the face adjacency matrix are processed by a graph neural network to obtain the graph embedding features of the face adjacency attribute graph corresponding to the B-Rep model, and the graph embedding features describe the features of the B-Rep model from a high-dimensional space.

[0090] The feature extraction model is trained on the classification task of the B-Rep model. The data set uses the B-Rep model classification data set described above. The specific steps of training are as follows:

[0091] (1) The B-Rep model classification data set is divided into training data and validation data in a 7:3 ratio for each category;

[0092] (2) The face adjacency attribute graph G is calculated by a topological and geometric information extraction program, such as a STEP AP242 file;

[0093] (3) The face adjacency attribute graph G is calculated by the feature extraction model to obtain the graph embedding feature e g =BR-GNN(G);

[0094] (4) Graph embedding feature e g The logits value l is further calculated by a learnable multilayer perceptron g =MLP(e g );

[0095] (5) According to the B-Rep model, the true class label y and logits value l g Calculate the cross entropy loss function Where N is the number of samples, y i is the true label of the i-th sample, l g,i is the corresponding logits value;

[0096] (6) Perform gradient descent training on model parameters Until convergence.

[0097] Step 103: Obtain a second graph embedding feature of the target assembly model represented by the boundary.

[0098] In some embodiments, the second graph embedding feature of the target assembly model represented by the boundary includes: determining a second surface adjacency attribute graph based on the target assembly model represented by the boundary; and extracting features based on the second surface adjacency attribute graph to obtain the second graph embedding feature. Here, there is no need to segment the target assembly model, and the second graph embedding feature can be directly extracted from the second surface adjacency attribute graph as a whole, thereby avoiding the increase in matching complexity caused by cutting the second surface adjacency attribute graph and simplifying the matching process.

[0099] In some embodiments, the extracting features based on the second face adjacency attribute graph to obtain the second graph embedding features includes: inputting the second face adjacency attribute graph into a feature extraction model based on a graph neural network; and obtaining the second graph embedding features output by the feature extraction model based on the graph neural network. Here, the feature extraction advantage of the graph neural network in graph representation is utilized, and the features of the second face adjacency attribute graph are extracted by a feature extraction model based on the graph neural network, so as to ensure the accuracy of the extracted second graph embedding features, and lay a foundation for the accuracy of subsequent matching.

[0100] Step 104: input the first graph embedding feature set and the second graph embedding feature set into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

[0101] In some embodiments, the step of inputting the first graph embedding feature set and the second graph embedding feature into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model comprises: inputting the first graph embedding feature set and the second graph embedding feature into a pre-trained matching model, wherein the matching model determines a cross-attention score between each graph embedding feature in the first graph embedding feature set and the second graph embedding feature by using a cross-attention mechanism, and determines a matching result based on the cross-attention score; and obtaining a matching result from the source assembly model to the target assembly model output by the matching model.

[0102] The assembly model matching method based on cross-attention score is realized through the inherent characteristics of the attention mechanism. Its deep network reasoning can be completed in polynomial time, and the data-driven characteristics of the deep network make it more accurate than the global optimization scheme based on pruning or filtering. Compared with the graph theory method, it compromises the global context and computational complexity, improves the matching efficiency, and ensures the matching accuracy. The deep network involves a graph neural network and a cross-attention network. The better matching accuracy and efficiency lies in the moderate granularity of the matching unit. Compared with the ambiguity in part matching (the ambiguity is that the granularity of the part as a unit is too large), the method provided by the embodiment of the present disclosure has better accuracy. Compared with the global optimization problem of the face matching method, the method provided by the embodiment of the present disclosure has better efficiency.

[0103] In an exemplary embodiment, a matching data set is used when training a matching model, and the matching data set includes several pairs of similar B-Rep models and their face mapping labels. The face mapping label is used to indicate a true matching value, and the face mapping label is used to mark the mapping relationship between the face i in the sink assembly model and the face j in the source assembly model. A pair of similar B-Rep models includes a source assembly model and a sink assembly model, and a directed matching is performed from the source assembly model to the sink assembly model.

[0104] The training process of the matching model is as follows:

[0105] (1) Use the pre-trained graph neural network-based feature extraction model to calculate the graph embedding features of each adjacent attribute subgraph of the source assembly model Graph Embedding Features of the Hehui Assembly Model

[0106] (2) Using the preset matching model, calculate the average cross-attention score of the graph embedding features of each adjacent attribute subgraph (as a query) to the graph embedding features of the pooled assembly model in are the preconfigured learnable query, the preconfigured key weight matrix, j = 1, 2, ..., the total number of face adjacency attribute subgraphs;

[0107] (3) Extracting the matching node set and the set of truth value nodes Calculating the loss function There are multiple groups of sink matching node sets. The graph embedding features of each face adjacency attribute subgraph of the source assembly model are used as queries, and the average cross-attention score of the graph embedding features of all sink assembly models is calculated (the average refers to the average of all nodes in the face adjacency attribute subgraph). Each face adjacency attribute subgraph as a query will get a set of average cross-attention scores, and the sink assembly models that are greater than or equal to the threshold are the sink matching node sets corresponding to the face adjacency attribute subgraph; the sink truth node set includes the node serial numbers (manually marked real matches) in the marked sink assembly model that match the face adjacency attribute subgraph;

[0108] (4) Perform gradient descent training on model parameters Until convergence.

[0109] In an exemplary embodiment, the structure is as follows Figure 6 The end-to-end assembly model substructure matching reasoning process diagram is shown. Given any pair of assembly models, the substructure matching result can be obtained through the end-to-end assembly model substructure matching reasoning system. Among them, the face adjacency attribute subgraph set of the source assembly model The face adjacency graph G of the assembly model t , the output is the matching result mapping in P(·) represents the power set operation, V(·) represents the vertex set operation, and E(·) represents the edge set operation.

[0110] The embodiment provided by the present disclosure determines the first face adjacency attribute graph based on the source assembly model represented by the boundary, and divides the first face adjacency attribute graph according to the convexity and concavity of the nodes in the first face adjacency attribute graph to obtain a face adjacency attribute subgraph set, and then extracts the first graph embedding feature set based on the face adjacency attribute subgraph set, and performs model matching with the second embedding feature of the target assembly model represented by the boundary. Among them, the first face adjacency attribute graph is formed by feature engineering, and then the first face adjacency attribute graph is divided based on the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph with moderate granularity, and the segmentation is performed based on the convexity and concavity of the nodes, which eliminates the influence of the model modeling method on the segmentation, so that the graph embedding feature vector obtained based on the face adjacency attribute subgraph with moderate granularity can accurately represent the characteristics of the model, so that the accuracy and efficiency of the matching model when matching the graph embedding features of the model are improved.

[0111] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation, the specific execution order of each step should be determined by its function and possible internal logic, and the execution order between the steps is not limited to being implemented according to the step number.

[0112] In addition, the present disclosure also provides a model matching device, an electronic device, and a computer program product, all of which can be used to implement any model matching method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.

[0113] Figure 7 A block diagram of a model matching device provided in an embodiment of the present disclosure, the model matching device mainly includes:

[0114] A first processing module 701 is used to determine a first face adjacency attribute graph based on a source assembly model represented by a boundary;

[0115] The second processing module 702 is used to obtain the convexity and concavity of the nodes in the first face adjacency attribute graph, segment the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and perform feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set;

[0116] The third processing module 703 is used to obtain a second graph embedding feature of the target assembly model represented by the boundary;

[0117] The fourth processing module 704 is used to input the first graph embedding feature set and the second graph embedding feature set into the pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

[0118] Each module in the above-mentioned model matching device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0119] Figure 8 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0120] Reference Figure 8 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 801; at least one memory 802, and one or more I / O interfaces 803, connected between the processor 801 and the memory 802; wherein the memory 802 stores one or more computer programs that can be executed by the at least one processor 801, and the one or more computer programs are executed by the at least one processor 801 so that the at least one processor 801 can execute the above-mentioned model matching method.

[0121] Each module in the above electronic device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0122] The embodiments of the present disclosure also provide a computer program product, including a computer program, which implements the above-mentioned model matching method when executed in a processor.

[0123] The computer program may be stored in a readable storage medium of a computer device or in the cloud; the processor of the computer device reads the computer program from the readable storage medium or in the cloud.

[0124] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0125] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0126] As is known to those of ordinary skill in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable program instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0127] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0128] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0129] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.

[0130] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0131] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0132] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0133] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0134] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A model matching method, characterized in that: include: Determine the first face adjacency attribute graph based on the source assembly model represented by the boundary; Acquire the convexity and concavity of nodes in the first face adjacency attribute graph, segment the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and perform feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set; Obtain a second graph embedding feature of the target assembly model represented by the boundary; The first image embedding feature set and the second image embedding feature set are input into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

2. The method according to claim 1, characterized in that The step of segmenting the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set includes: At least one of the nodes that is continuous and has the same convexity and concavity is divided into a face adjacency attribute subgraph, and the face adjacency attribute subgraph set is determined based on each face adjacency attribute subgraph obtained by the division.

3. The method according to claim 1, characterized in that The extracting features based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set includes: Inputting the face adjacency attribute subgraph set into a feature extraction model based on a graph neural network; Obtain the first graph embedding feature set output by the graph neural network-based feature extraction model, wherein the first graph embedding feature set includes graph embedding features corresponding to each face adjacency attribute subgraph in the face adjacency attribute subgraph set.

4. The method according to claim 1, characterized in that: The step of acquiring a second graph embedding feature of the target assembly model represented by the boundary includes: Determining a second face adjacency attribute graph based on the target assembly model represented by the boundary; Feature extraction is performed based on the second face adjacency attribute graph to obtain a second graph embedding feature.

5. The method according to claim 4, characterized in that The extracting features based on the second face adjacency attribute graph to obtain the second graph embedding features includes: Inputting the second face adjacency attribute graph into a feature extraction model based on a graph neural network; Obtain the second graph embedding feature output by the graph neural network based feature extraction model.

6. The method according to claim 1, characterized in that The step of inputting the first image embedding feature set and the second image embedding feature set into a pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model includes: Inputting the first graph embedding feature set and the second graph embedding feature into a pre-trained matching model, wherein the matching model uses a cross-attention mechanism to determine a cross-attention score between each graph embedding feature in the first graph embedding feature set and the second graph embedding feature, and determining a matching result according to the cross-attention score; A matching result from the source assembly model to the target assembly model output by the matching model is obtained.

7. The method according to claim 1, characterized in that The first face adjacency attribute graph includes geometric features, and the geometric features include face geometric features; The source assembly model based on the boundary representation determines the first face adjacency attribute graph, including: Initialize sampling step size; Sampling the surface of the source assembly model represented by the boundary according to the sampling step to obtain sampling points; Determine a geometric distance between adjacent sampling points, and when the geometric distance exceeds a set geometric error threshold, reduce the sampling step size, and resample the surface of the source assembly model according to the reduced sampling step size; The surface geometric feature is determined based on each sampling point obtained by sampling.

8. A model matching device, characterized in that: include: A first processing module, configured to determine a first face adjacency attribute graph based on a source assembly model represented by a boundary; A second processing module is used to obtain the convexity and concavity of the nodes in the first face adjacency attribute graph, segment the first face adjacency attribute graph according to the convexity and concavity of the nodes to obtain a face adjacency attribute subgraph set, and perform feature extraction based on the face adjacency attribute subgraph set to obtain a first graph embedding feature set; A third processing module is used to obtain a second graph embedding feature of the target assembly model represented by the boundary; The fourth processing module is used to input the first image embedding feature set and the second image embedding feature set into the pre-trained matching model to obtain a matching result from the source assembly model to the target assembly model.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores at least one computer program executable by the at least one processor, and the at least one computer program is executed by the at least one processor so that the at least one processor can perform the model matching method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed in a processor, the model matching method according to any one of claims 1 to 7 is implemented.