CAD (Computer Aided Design) model searching and clustering method and device, classification model generation method and device and storage medium

CN119278446APending Publication Date: 2025-01-07SIEMENS AG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280096286.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

Existing CAD search engines have low search efficiency when faced with a large number of CAD model databases, resulting in a significant increase in search time and unable to meet the real-time needs of users.

Method used

By extracting the geometric information of the CAD model, performing structured representation and converting it into vectors, clustering and classification models are generated, the search scope is narrowed, and the classification model is used to quickly search for similar CAD models.

Benefits of technology

Significantly improves the efficiency of CAD model search, shortens search time, is suitable for large-scale CAD model databases, and supports million/billion-level CAD model search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119278446A_ABST
    Figure CN119278446A_ABST
Patent Text Reader

Abstract

The invention provides a CAD model searching and clustering method and device, a classification model generation method and device and a storage medium. The CAD model clustering and classification model generation method comprises the following steps: aiming at each CAD model in a database, extracting geometric information of the CAD model, performing structured representation on the geometric information, and converting the structured representation geometric information into a vector with a predefined length to obtain a vector of the CAD model; clustering the vectors of all the CAD models in the database to obtain a plurality of CAD model clusters not exceeding the set number, so as to locate a search range to a CAD model cluster not exceeding the set number during CAD model search; and for each CAD model cluster, training by using all CAD models in the CAD model cluster as training samples to obtain a classification model corresponding to the CAD model cluster, and performing CAD model search in the CAD model cluster by using the corresponding classification model. According to the technical scheme in the embodiment, the efficiency of CAD model searching can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

CAD model search, clustering and classification model generation method, device and storage medium Technical Field

[0001] The present application relates to the field of computers, and in particular to a CAD model clustering and classification model generation, as well as a CAD model search method, device and computer-readable storage medium.

[0002] Background of the Invention

[0003] Currently, there is a great demand for CAD search engines to find similar CAD models so that their designs or underlying manufacturing processes can be reused. However, improving the search efficiency of CAD search engines is a major challenge. Search efficiency is related to the time consumption of the search strategy. For example, the simplest implementation of a search engine resembles the following pseudocode:

[0004] Pseudo Code Start

[0005] Vars: Input Model = IN, Model = M, Database = DB, Similarity = S, Threshold = T, Candidate List = L, Display Number = NUM ​​# Input model IN, search for model M in database DB, similarity S, similarity threshold T, candidate list L, display number NUM

[0006]

[0007] In the above implementation, the search time will increase as the number of CAD models in the database increases. If each iteration takes 1 second and the database size is 10 4 models. Then the search time is 10 4 seconds, which is about 3 hours. This is unacceptable to search engine users.

[0008] To this end, those skilled in the art are still working on finding other CAD model search solutions.

[0009] Summary of the Invention

[0010] In view of this, the embodiments of the present application provide, on the one hand, a CAD model clustering and classification model generation method and a CAD model search method; and on the other hand, provide a CAD model clustering and classification model generation device, a CAD model search device, a computer device and a computer-readable storage medium, which can improve the efficiency of CAD model search.

[0011] To solve the above technical problems, the technical solution of this application is implemented as follows:

[0012] A method for clustering and generating a classification model of CAD models comprises: for each CAD model in a database, extracting geometric information of the CAD model, performing a structured representation of the geometric information, converting the structured represented geometric information into a vector of a predefined length, and obtaining a vector of the CAD model; clustering the vectors of all CAD models in the database to obtain a plurality of CAD model clusters not exceeding a set size, so that when performing a CAD model search, the search range is positioned to a CAD model cluster not exceeding a set size; for each CAD model cluster, using all CAD models in the CAD model cluster as training samples to obtain a classification model corresponding to the CAD model cluster, so that when performing a CAD model search, the corresponding classification model is used to search for CAD models in the CAD model cluster not exceeding a set size.

[0013] A CAD model search method comprises: receiving an input current CAD model; extracting geometric information of the current CAD model, and performing a structured representation on the geometric information, converting the structured represented geometric information into a vector of a predefined length, and obtaining the vector of the current CAD model; searching for a CAD model cluster sample based on the vector of the current CAD model to obtain a target CAD model cluster of no more than a set size that is most similar to the current CAD model; the CAD model cluster sample comprises: a plurality of CAD model clusters of no more than a set size obtained by clustering vectors of all CAD models in a database; inputting the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster; the classification model is obtained by training all CAD models in the target CAD model cluster as training samples; and obtaining the target CAD model based on the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

[0014] A CAD model clustering and classification model generation device comprises: a first module for extracting geometric information of each CAD model in a database, performing a structured representation of the geometric information, and converting the structured represented geometric information into a vector of a predefined length to obtain a vector of the CAD model; a second module for clustering the vectors of all CAD models in the database to obtain a plurality of CAD model clusters not exceeding a set size, so that when performing a CAD model search, the search range is positioned to a CAD model cluster not exceeding a set size; a third module for training, for each CAD model cluster, all CAD models within the CAD model cluster as training samples to obtain a classification model corresponding to the CAD model cluster, so that when performing a CAD model search, the corresponding classification model is used to search for CAD models within the CAD model cluster not exceeding a set size.

[0015] A CAD model search device comprises: a fourth module for receiving an input current CAD model, extracting geometric information of the current CAD model, and performing a structured representation of the geometric information, converting the structured geometric information into a vector of a predefined length, and obtaining the vector of the current CAD model; a fifth module for searching a CAD model cluster sample based on the vector of the current CAD model, and obtaining a target CAD model cluster of no more than a set size that is most similar to the current CAD model; the CAD model cluster sample comprises: a plurality of CAD model clusters of no more than a set size obtained by clustering the vectors of all CAD models in a database; a sixth module for inputting the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster, and obtaining the likelihood between the current CAD model and each CAD model in the target CAD model cluster; the classification model is obtained by training all CAD models in the target CAD model cluster as training samples; a seventh module for obtaining the target CAD model based on the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

[0016] A computer device comprises at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory to execute the CAD model clustering and classification model generation method described in any of the above embodiments, or the CAD model search method described in any of the above embodiments.

[0017] A computer-readable storage medium having a computer program stored thereon; the computer program can be executed by a processor and implement the CAD model clustering and classification model generation method described in any of the above embodiments, or the CAD model search method described in any of the above embodiments.

[0018] It can be seen from the above technical solution that in this application, since each CAD model in the database is converted into a vector, and then all CAD models in the database are clustered based on the vector, and multiple CAD model clusters not exceeding a set size are obtained, when searching for CAD models, the search range can be positioned to a CAD model cluster not exceeding a set size, thereby narrowing the search space and improving the search efficiency; by training a classification model for each CAD model cluster, and using the corresponding classification model to search for CAD models within the CAD model cluster not exceeding a set size, the search speed can be further accelerated and the search efficiency can be improved.

[0019] BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to better understand the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings so that those skilled in the art can better understand the above and other features and advantages of the present application. In the accompanying drawings:

[0021] FIG1 is an exemplary flow chart of a CAD model clustering and classification model generation method in an embodiment of the present application.

[0022] 2A and 2B are schematic diagrams of geometric information of a CAD model in an example of the present invention.

[0023] 3A and 3B are schematic diagrams of geometric information of a structured representation of a CAD model in an example of the present invention.

[0024] FIG4 is a schematic diagram of re-clustering the clustered CAD model in an example of the present application.

[0025] FIG5 is a schematic diagram of a hierarchically indexed CAD model clustering sample in an example of this application.

[0026] FIG6 is an exemplary flowchart of a CAD model search method in an embodiment of the present application.

[0027] FIG7 is a flow chart of a method for searching and locating CAD model clusters in an embodiment of the present application.

[0028] FIG8 is an exemplary structural diagram of a CAD model clustering and classification model generating apparatus according to an embodiment of the present invention.

[0029] FIG9 is an exemplary structural diagram of a CAD model search device in an embodiment of the present invention.

[0030] FIG10 is an exemplary structural diagram of a computer device in an embodiment of the present application.

[0031] The accompanying drawings are numerals as follows:

[0032] Meaning of reference numerals 101-105, 601-605, 701-704 Step 21 Through hole 22, 23 Cone 24 Through groove 41 Center point of cluster 42 Next cluster 43 Center point of next cluster

[0033] 801 First unit 802 Second unit 803 Third unit 901 Fourth unit 902 Fifth unit 903 Sixth unit 904 Seventh unit 1001 Memory 1002 Processor 1003 Bus

[0034] Methods of implementing this application

[0035] In an embodiment of the present application, in order to improve the efficiency of CAD model search, it is considered to provide a search solution that first clusters and then searches based on the classification model corresponding to each cluster, so as to reduce the search space and speed up the search process.

[0036] In order to make the purpose, technical solutions and advantages of this application more clear, the technical solutions of this application are described in detail below with reference to the accompanying drawings and examples.

[0037] FIG1 is an exemplary flow chart of a method for generating a CAD model clustering and classification model in an embodiment of the present application. As shown in FIG1 , the method may include the following steps:

[0038] Step 101: extract the geometric information of each CAD model in the database.

[0039] In this step, the geometric information may include design features and boundary representation (B-rep) information. Among them, design features are basic shape descriptions that define the appearance of the CAD model. Typical design features may include bosses, holes, pockets, grooves, and notches. Although different CAD model suppliers may have different definitions of design features, in this application example, they can be converted using a standard CAD format, that is, the design features of CAD models from different providers are first converted based on a standard CAD format to obtain uniformly defined design features. B-rep information consists of the topological components of the CAD model, which may include faces, edges, and vertices.

[0040] Figures 2A and 2B illustrate the geometric information of an example CAD model. Figure 2A is a boundary representation diagram, and Figure 2B is a geometric feature diagram. Numbers ① through ⑨ in Figure 2A represent boundary representation information, i.e., individual faces, in the CAD model. Number 21 in Figure 2B represents a through hole, number 22 represents a frustum 1, number 23 represents a frustum 2, and number 24 represents a through slot.

[0041] Step 102: Structure the extracted geometric information of each CAD model.

[0042] In this step, the geometric information extracted in step 101 is organized into an appropriate form for subsequent calculations. Because the extracted CAD geometric information contains semantics, it can be organized into a graph-like form, such as a topological graph structure as shown in Figure 3A or a tree structure as shown in Figure 3B. These structured representations, such as topological graphs or trees, differ only in their embedding methods, but can all be considered graph-like structured representations.

[0043] Step 103: Convert the geometric information of the structured representation into a vector of a predefined length to obtain a vector of each CAD model.

[0044] In this step, the geometric information of the structured representation is converted into a vector of a predefined length, for example, the geometric information of the structured representation is embedded to obtain the corresponding embedding vector. For the topological graph structured representation, topological graph embedding methods such as random walk and Node2Vec can be used to convert it into an embedding vector. For the tree structured representation, tree embedding methods such as tree kernel and attention selection vector (ACV) tree can be used to convert it into an embedding vector. In this embodiment, both the topological graph embedding method and the tree embedding method will output a normalized vector v∈R d , where d is the predefined vector size (dimension), R represents a real number, R d represents a d-dimensional real vector.

[0045] Step 104 , clustering the vectors of all CAD models in the database to obtain a plurality of CAD model clusters of no more than a set size, so that when searching for CAD models, the search range is positioned to a CAD model cluster of no more than a set size.

[0046] In this step, vectors of a large number of CAD models may be clustered in a hierarchical manner to obtain CAD model clusters of no more than a set size, thereby narrowing the search space to a single cluster of no more than a predefined size.

[0047] In practice, the distances between the vectors of various CAD models in a high-dimensional (e.g., greater than three dimensions) space can be calculated, and then the vectors of a large number of CAD models can be clustered based on their proximity. Clustering methods can include K-means, Gaussian mixture models (GMM), and density-based spatial clustering of applications with noise (DBSCAN).

[0048] In order to divide a cluster exceeding a predefined size into smaller clusters to obtain subclusters not exceeding a predefined size, in this embodiment, a hierarchical recursive method may be used for clustering, as shown in the following pseudo code:

[0049]

[0050]

[0051] It can be seen that the process expressed by the above pseudo code is: taking the vectors of all CAD models in the database as the current CAD model to be clustered; clustering the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters to obtain the current number of clusters; for each cluster in the current number of clusters, judging whether the size of the cluster exceeds the set size; if so, taking the cluster that exceeds the set size as the current CAD model to be clustered, and returning to execute the operation of clustering the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters; otherwise, obtaining a cluster that does not exceed the set size.

[0052] FIG4 is a schematic diagram showing the re-clustering of clustered CAD models in an example. As shown in FIG4 , for each cluster, there is a CAD model 41 embedded in the position closest to the cluster center in space, and the next layer of clusters 42 divided by each cluster is the same, and also has a CAD model 43 closest to the cluster center. In this embodiment, in order to facilitate the retrieval of clusters that do not exceed a set number of sizes, all clusters involved in the clustering process can be set up as a knowledge graph according to their inclusion relationship, which is referred to as a hierarchically indexed CAD model cluster sample. And in order to reduce the amount of retrieval, each layer of CAD model cluster can use its CAD model closest to the cluster center as the representative of the cluster of that layer. As shown in FIG5 , for the input IN, the vector of the CAD model of the center point of the first iteration cluster can be used as the sample of the first layer, denoted as SP, the vector of the CAD model of the center point of the second iteration cluster can be used as the sample of the second layer, denoted as SSP, and the vector of the CAD model of the center point of the third iteration cluster can be used as the sample of the third layer, denoted as S 2SP, the vector of the CAD model of the center point of the fourth iteration cluster is used as the sample of the fourth layer, denoted as S 3 SP, and so on, resulting in the hierarchically indexed CAD model cluster sample shown in Figure 5. This hierarchically indexed CAD model cluster sample has a tree structure, consisting of leaf node CAD model clusters and parent node CAD model clusters above each leaf node. Each parent node CAD model cluster includes its child node CAD model clusters, and the sample of each CAD model cluster is represented by the vector of the CAD model at the center of the cluster. Furthermore, as shown in Figure 5, each leaf node CAD model cluster is further associated with the vectors CLV of all the CAD models it contains.

[0053] When searching, you can start from the top-level parent node and search towards the leaf nodes according to the tree cluster samples of the hierarchical index until the leaf node is retrieved. When retrieving the parent node, you only need to compare the current CAD model with a CAD model representing the CAD model cluster of the parent node, which greatly reduces the number of comparisons.

[0054] The clustering method can be approximately exponential. For example, if the "maximum number of clusters" is set to 3, each iteration will complete the clustering completely, and assuming 6 iterations are completed. Then, the cluster size of the final output will be divided by 3 6 , i.e., 729. As shown in Figure 5, assuming each output cluster size is 500 CAD models, a traditional search method may need to compare a total of 500 × 7 = 3500 models. Using a clustering method, the search process searches from top to bottom based on the hierarchically indexed CAD model tree cluster samples shown in Figure 5. For example, the search path follows the bold double-dotted dashed box in Figure 5, and the search route is shown in the bold double-dotted dashed line in Figure 5. In this embodiment, only 7 + 500 = 507 comparisons are required.

[0055] In step 105, for each cluster, all CAD models in the cluster are used as training samples to train a classification model corresponding to the cluster, so that when searching for CAD models, the corresponding classification model is used to search for CAD models within the CAD model clusters that do not exceed the set size.

[0056] In this step, all CAD models in the cluster can be used as training samples to train the classification model. For example, for each CAD model cluster, each CAD model within the cluster can be used as an input training sample, and the likelihood between the CAD model and each CAD model within the cluster can be used as an output training sample to train an intelligent network to obtain a classification model corresponding to the CAD model cluster. There are many ways to implement this training, some of which are listed below:

[0057] The first method is to use screenshots of different views of each CAD model in the cluster as a training data set, and use each screenshot as an input sample in turn. The likelihood between the screenshot and each CAD model in the sub-cluster is used as an output sample to train an intelligent network such as a convolutional neural network, and obtain a classification model corresponding to the CAD model cluster.

[0058] The second method is to train an intelligent network such as a convolutional neural network for each CAD model in the cluster, using videos of the CAD model from different perspectives as input training samples and the likelihood between the CAD model and each CAD model in the CAD model cluster as output training samples, and obtain a classification model corresponding to the CAD model cluster.

[0059] The third method is to train an intelligent network such as a convolutional neural network for each CAD model in the cluster, using the vector of the CAD model as the input training sample and the likelihood between the CAD model and each CAD model in the CAD model cluster as the output training sample, and obtain a classification model corresponding to the CAD model cluster.

[0060] Convolutional neural networks can use VGG, MobileNet, ResNet, and others. Furthermore, to improve the robustness of the classification model, more data augmentation methods can be used to enrich the training dataset. For example, existing data, such as CAD model screenshots, can be enriched by adding random background images or rotating the screenshots to generate new training data.

[0061] Furthermore, the classification model corresponding to each CAD model cluster not exceeding a predefined size may be further associated with the leaf node CAD model cluster of the aforementioned hierarchically indexed CAD model cluster samples as shown by the dotted line portion in FIG5 .

[0062] FIG6 is an exemplary flow chart of a CAD model search method in an embodiment of the present application. As shown in FIG6 , the method may include the following steps:

[0063] Step 601: Receive an input current CAD model.

[0064] Step 602 : extracting geometric information of the current CAD model, performing structured representation on the geometric information, and converting the structured geometric information into a vector of a predefined length to obtain the vector of the current CAD model.

[0065] The specific implementation process of this step is similar to steps 101 to 103 and will not be repeated here.

[0066] Step 603: Based on the vector of the current CAD model, a CAD model cluster sample is searched to obtain a target CAD model cluster of no more than a set number that is most similar to the current CAD model. The CAD model cluster sample includes: a plurality of CAD model clusters of no more than a set number obtained by clustering the vectors of all CAD models in a database.

[0067] As previously described, in one embodiment, the CAD model cluster sample can be a hierarchically indexed CAD model tree cluster sample. The hierarchically indexed CAD model tree cluster sample includes the CAD model clusters of no more than a set size as leaf nodes and the CAD model clusters of parent nodes above the leaf nodes. Each parent node CAD model cluster includes the CAD model clusters of its child nodes, and the sample of each CAD model cluster is represented by the vector of the CAD model at the center point of the cluster. Furthermore, each leaf node CAD model cluster is further associated with its corresponding classification model and the vectors of all CAD models it contains.

[0068] Accordingly, in this step, the hierarchically indexed CAD model tree cluster samples can be searched layer by layer to obtain a leaf node CAD model cluster that is most similar to the current CAD model. This leaf node CAD model cluster is the target CAD model cluster. The specific process of searching and locating the CAD model cluster can be described in Figure 7, including the following processing:

[0069] Step 701 : sequentially compare the vector of the current CAD model with the CAD model samples in the top layer of the hierarchically indexed CAD model tree cluster samples to determine the most similar CAD model sample.

[0070] Step 702 , determining whether the most similar CAD model sample is the last layer CAD model sample, if yes, executing step 704 ; otherwise, executing step 703 .

[0071] Step 703 : Search for each CAD model sample in the layer below the most similar CAD model sample, and determine the most similar CAD model sample, and then return to step 702 .

[0072] Step 704 : Determine that the most similar CAD model sample corresponds to a CAD model cluster whose size does not exceed a set number.

[0073] In step 604, the current CAD model is input as an input sample into a classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster. The classification model is trained by using all CAD models in the target CAD model cluster as training samples.

[0074] In this step, when it is specifically implemented, there can be multiple implementation methods for the different training methods of the aforementioned classification model, which are described below respectively.

[0075] The first method is to obtain screenshots of the current CAD model from different perspectives, and input each of the screenshots from different perspectives as an input sample into the classification model corresponding to the target CAD model cluster to obtain the likelihood of the screenshots and each CAD model in the target CAD model cluster. For the first method, the likelihoods corresponding to the screenshots from different perspectives of the current CAD model can be further post-processed, such as by calculating the mathematical mean or standard deviation of the likelihoods, to obtain the final likelihood. The following pseudo code illustrates the processing method in an example:

[0076]

[0077]

[0078] The second method is to obtain videos of the current CAD model including different perspectives, and input the videos as input samples into a classification model corresponding to the target CAD model cluster to obtain the likelihood of the current CAD model and each CAD model in the target CAD model cluster.

[0079] The third method is to input the vector of the current CAD model as an input sample into the classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster.

[0080] Step 605 : Obtain a target CAD model based on the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

[0081] The above describes in detail the CAD model clustering and classification model generation method and the CAD model search method according to the embodiments of the present invention. The following describes in detail the CAD model clustering and classification model generation apparatus and the CAD model search apparatus according to the embodiments of the present invention. The apparatus embodiments of the embodiments of the present invention can be used to implement the corresponding method embodiments of the embodiments of the present invention. For details not disclosed in the apparatus embodiments of the present invention, please refer to the corresponding description of the method embodiments of the present invention.

[0082] FIG8 is an exemplary structural diagram of a CAD model clustering and classification model generation device according to an embodiment of the present invention. As shown in FIG8 , the device includes: a first module 801 , a second module 802 , and a third module 803 .

[0083] Among them, the first module 801 is used to extract the geometric information of each CAD model in the database, and structure the geometric information, and convert the structured geometric information into a vector of a predefined length to obtain the vector of the CAD model.

[0084] The second module 802 is used to cluster the vectors of all CAD models in the database to obtain a plurality of CAD model clusters whose size does not exceed a set number.

[0085] In specific implementation, the second module 802 may use the vectors of all CAD models in the database as the current CAD model to be clustered; cluster the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters to obtain the current number of clusters; for each cluster in the current number of clusters, determine whether the size of the cluster exceeds the set number size; if so, use the cluster that exceeds the set number size as the current CAD model to be clustered, and return to execute the operation of clustering the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters; otherwise, obtain a cluster that does not exceed the set number size. In addition, the second module 802 further utilizes the inclusion relationship between the clusters generated in each iteration of the clustering process to construct a hierarchically indexed CAD model tree cluster sample; the hierarchically indexed CAD model tree cluster sample includes a CAD model cluster as a leaf node and a CAD model cluster of parent nodes at all levels above the leaf node, each parent node CAD model cluster includes the CAD model clusters of its child nodes, and the CAD model cluster as a leaf node is a CAD model cluster of no more than a set size, and the sample of each CAD model cluster is represented by a vector of the CAD model located at the center point within the cluster.

[0086] The third module 803 is used to train, for each CAD model cluster, all CAD models in the CAD model cluster as training samples to obtain a classification model corresponding to the CAD model cluster. In specific implementation, the third module 803 can, for each CAD model cluster, use screenshots of each CAD model in the CAD model cluster from different perspectives as input training samples, and the likelihood between the screenshots and each CAD model in the CAD model cluster as output training samples to obtain a classification model corresponding to the CAD model cluster; or, for each CAD model cluster, use videos of each CAD model in the CAD model cluster including different perspectives as input training samples, and the likelihood between the CAD model and each CAD model in the CAD model cluster as output training samples to obtain a classification model corresponding to the CAD model cluster; or, for each CAD model cluster, use the vector of each CAD model in the CAD model cluster as input training samples, and the likelihood between the CAD model and each CAD model in the CAD model cluster as output training samples to obtain a classification model corresponding to the CAD model cluster.

[0087] FIG9 is an exemplary structural diagram of a CAD model search device in an embodiment of the present invention. As shown in FIG3 , the device may include: a fourth module 901 , a fifth module 902 , a sixth module 903 , and a seventh module 904 .

[0088] Among them, the fourth module 901 is used to receive the input current CAD model, extract the geometric information of the current CAD model, and structure the geometric information, convert the structured geometric information into a vector of a predefined length to obtain the vector of the current CAD model.

[0089] The fifth module 902 is used to search for a CAD model cluster sample based on the vector of the current CAD model to obtain a target CAD model cluster of no more than a set size that is most similar to the current CAD model; the CAD model cluster sample includes: a plurality of CAD model clusters of no more than a set size obtained by clustering the vectors of all CAD models in a database. In one embodiment, the CAD model cluster sample can be a hierarchically indexed CAD model tree cluster sample; the hierarchically indexed CAD model tree cluster sample includes the CAD model clusters of no more than a set size as leaf nodes and the CAD model clusters of parent nodes at all levels above the leaf nodes, each parent node CAD model cluster includes the CAD model clusters of its child nodes, and the sample of each CAD model cluster is represented by the vector of the CAD model at the center point within the cluster.

[0090] The sixth module 903 is configured to input the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster; the classification model is trained by using all CAD models in the target CAD model cluster as training samples. In a specific implementation, the sixth module 903 may obtain screenshots of the current CAD model from different perspectives, and input each of the screenshots from different perspectives as an input sample into the classification model corresponding to the target CAD model cluster to obtain the likelihood between the screenshots and each CAD model in the target CAD model cluster; or obtain a video of the current CAD model from different perspectives, and input the video as an input sample into the classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster; or input a vector of the current CAD model as an input sample into the classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster.

[0091] The seventh module 904 is used to obtain a target CAD model according to the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

[0092] In fact, the CAD model clustering and classification model generation device and the CAD model search device provided in this embodiment of the present application can be implemented in various ways. For example, the CAD model clustering and classification model generation device and the CAD model search device can be compiled into a plug-in installed in a smart terminal using an application programming interface that complies with specific rules, or can be packaged into an application for user download and use.

[0093] The CAD model clustering and classification model generation method and the CAD model search method provided by this implementation of the present application can be stored in various storage media in an instruction storage manner or an instruction set storage manner. These storage media include, but are not limited to, floppy disks, optical disks, DVDs, hard disks, flash memories, USB flash memories, CF cards, SD cards, MMC cards, SM cards, memory sticks, and xD cards.

[0094] In addition, the CAD model clustering and classification model generation method and the CAD model search method provided in this embodiment of the present application can also be applied to flash memory (Nand-flash) based storage media, such as USB flash drives, CF cards, SD cards, SDHC cards, MMC cards, SM cards, memory sticks and xD cards.

[0095] It should be clear that the operating system operating in the computer can implement the functions of any of the above embodiments not only by executing the program code read by the computer from the storage medium, but also by using instructions based on the program code to implement part or all of the actual operations.

[0096] For example, Figure 10 is an exemplary structural diagram of a computer device in an embodiment of the present application. This device can be used to perform the method shown in Figure 1 or Figure 6, or to implement the apparatus shown in Figure 8 or Figure 9. As shown in Figure 10, the device may include at least one memory 1001 and at least one processor 1002. In addition, it may also include other components, such as communication ports, input / output controllers, network communication interfaces, etc. These components communicate via a bus 1003, etc.

[0097] At least one memory 1001 is used to store computer programs. In one example, the computer program can be understood to include the various modules of the apparatus shown in Figure 8 or Figure 9. In addition, at least one memory 1001 can store an operating system, etc. Operating systems include, but are not limited to, Android operating system, Symbian operating system, Windows operating system, Linux operating system, etc.

[0098] At least one processor 1002 is configured to invoke a computer program stored in at least one memory 1001 to execute the CAD model search method described in the examples of this application. Processor 1002 may be a CPU, a processing unit / module, an ASIC, a logic module, or a programmable gate array, and may receive and send data via a communication port.

[0099] The input / output controller has a display and an input device, and is used to input, output and display relevant data as a human-computer interaction module.

[0100] It should be understood that "and / or" as used herein is intended to include any and all possible combinations of one or more of the associated listed items.

[0101] It can be seen from the above technical solution that in this application, since each CAD model in the database is converted into a vector, and then all CAD models in the database are clustered based on the vector, and multiple CAD model clusters not exceeding a set size are obtained, when searching for CAD models, the search range can be positioned to a CAD model cluster not exceeding a set size, thereby narrowing the search space and improving the search efficiency; by training a classification model for each CAD model cluster, and using the corresponding classification model to search for CAD models within the CAD model cluster not exceeding a set size, the search speed can be further accelerated and the search efficiency can be improved.

[0102] Furthermore, by using hierarchical indexing of CAD model tree clustering samples, the most similar CAD model clusters can be quickly located, further improving CAD model search efficiency. Furthermore, because hierarchical clustering can reduce the size of each cluster almost exponentially, while the number of indexing layers increases only linearly, the present invention can support searches for millions or billions of CAD models, making it suitable for large-scale CAD model search engines.

[0103] Finally, the technical solution of the present invention can be implemented offline on a local server, so it has better security and privacy.

[0104] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A CAD model clustering and classification model generation method, characterized in that: include: For each CAD model in the database, extract geometric information of the CAD model, perform structured representation on the geometric information, and convert the structured geometric information into a vector of a predefined length to obtain a vector of the CAD model; Clustering the vectors of all CAD models in the database to obtain a plurality of CAD model clusters of no more than a set size, so that when performing a CAD model search, the search range is located within a CAD model cluster of no more than the set size; For each CAD model cluster, all CAD models in the CAD model cluster are used as training samples to train a classification model corresponding to the CAD model cluster, so that when performing a CAD model search, the corresponding classification model is used to search for CAD models in the CAD model clusters that do not exceed a set number.

2. The CAD model clustering and classification model generation method according to claim 1, characterized in that: Clustering the vectors of all CAD models in the database to obtain a plurality of CAD model clusters not exceeding a set number includes: The vectors of all CAD models in the database are used as the current CAD models to be clustered; Clustering the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters to obtain the current number of clusters; For each cluster in the current number of clusters, determine whether the size of the cluster exceeds the set size. If so, use the cluster that exceeds the set size as the current CAD model to be clustered, and return to execute the operation of clustering the current CAD model to be clustered according to the principle of not exceeding the maximum number of clusters; otherwise, obtain a cluster that does not exceed the set size.

3. The CAD model clustering and classification model generation method according to claim 2, characterized in that: The method further includes: constructing a hierarchically indexed CAD model tree clustering sample by utilizing the inclusion relationship between clusters generated in each iteration of the clustering process; the hierarchically indexed CAD model tree clustering sample includes a CAD model cluster as a leaf node and a CAD model cluster of parent nodes at all levels above the leaf node, each parent node CAD model cluster includes the CAD model clusters of its child nodes, the CAD model cluster as a leaf node is a CAD model cluster of no more than a set size, and the sample of each CAD model cluster is represented by a vector of the CAD model located at the center point within the cluster.

4. The CAD model clustering and classification model generation method according to any one of claims 1 to 3, characterized in that: For each CAD model cluster, all CAD models in the CAD model cluster are used as training samples to train a classification model corresponding to the CAD model cluster, including: For each CAD model cluster, screenshots of each CAD model in the CAD model cluster from different perspectives are used as input training samples, and the likelihoods between the screenshots and each CAD model in the CAD model cluster are used as output training samples to train a classification model corresponding to the CAD model cluster; or the method includes: For each CAD model cluster, using videos of each CAD model in the CAD model cluster including different viewpoints as input training samples, and the likelihood between the CAD model and each CAD model in the CAD model cluster as output training samples, to train a classification model corresponding to the CAD model cluster; or including: For each CAD model cluster, the vector of each CAD model in the CAD model cluster is used as an input training sample, and the likelihood between the CAD model and each CAD model in the CAD model cluster is used as an output training sample to train a classification model corresponding to the CAD model cluster.

5. A CAD model search method, characterized in that: include: Receive the current CAD model as input; Extracting geometric information of the current CAD model, performing structured representation on the geometric information, and converting the structured geometric information into a vector of a predefined length to obtain a vector of the current CAD model; Based on the vector of the current CAD model, searching for a CAD model cluster sample to obtain a target CAD model cluster of no more than a set number that is most similar to the current CAD model; the CAD model cluster sample includes: a plurality of CAD model clusters of no more than a set number obtained by clustering the vectors of all CAD models in a database; Inputting the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster to obtain a likelihood between the current CAD model and each CAD model in the target CAD model cluster; the classification model is trained by using all CAD models in the target CAD model cluster as training samples; A target CAD model is obtained according to the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

6. The CAD model search method according to claim 5, characterized in that: The CAD model cluster sample is a hierarchically indexed CAD model tree cluster sample; the hierarchically indexed CAD model tree cluster sample includes the CAD model clusters of no more than a set size as leaf nodes and the CAD model clusters of parent nodes at all levels above the leaf nodes, each parent node CAD model cluster includes the CAD model clusters of its child nodes, and the sample of each CAD model cluster is represented by the vector of the CAD model located at the center point within the cluster.

7. The CAD model search method according to claim 5 or 6, characterized in that: The step of inputting the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster includes: Obtaining screenshots of the current CAD model from different perspectives, inputting each of the screenshots from different perspectives as an input sample into a classification model corresponding to the target CAD model cluster, and obtaining a likelihood between the screenshot and each CAD model in the target CAD model cluster; or comprising: Obtaining a video of the current CAD model including different perspectives, inputting the video as an input sample into a classification model corresponding to the target CAD model cluster, and obtaining a likelihood between the current CAD model and each CAD model in the target CAD model cluster; or comprising: The vector of the current CAD model is input as an input sample into a classification model corresponding to the target CAD model cluster to obtain the likelihood between the current CAD model and each CAD model in the target CAD model cluster.

8. A CAD model clustering and classification model generation device, characterized in that: include: The first module is configured to extract geometric information of each CAD model in the database, perform structured representation on the geometric information, and convert the structured geometric information into a vector of a predefined length to obtain a vector of the CAD model; The second module is configured to cluster the vectors of all CAD models in the database to obtain a plurality of CAD model clusters of no more than a set size, so that when performing a CAD model search, the search range is located within a CAD model cluster of no more than the set size; The third module is used to train, for each CAD model cluster, all CAD models in the CAD model cluster as training samples to obtain a classification model corresponding to the CAD model cluster, so that when performing a CAD model search, the corresponding classification model is used to search for CAD models in the CAD model clusters that do not exceed a set size.

9. A CAD model search device, characterized in that: include: a fourth module, configured to receive an input current CAD model, extract geometric information of the current CAD model, perform structured representation on the geometric information, and convert the structured geometric information into a vector of a predefined length to obtain a vector of the current CAD model; a fifth module configured to search for a CAD model cluster sample based on the vector of the current CAD model to obtain a target CAD model cluster of no more than a set number that is most similar to the current CAD model; the CAD model cluster sample comprising: a plurality of CAD model clusters of no more than a set number obtained by clustering the vectors of all CAD models in a database; a sixth module, configured to input the current CAD model as an input sample into a classification model corresponding to the target CAD model cluster, and obtain a likelihood between the current CAD model and each CAD model in the target CAD model cluster; the classification model is obtained by training all CAD models in the target CAD model cluster as training samples; The seventh module is used to obtain a target CAD model according to the likelihood between the current CAD model and each CAD model in the leaf node CAD model cluster.

10. A computer device, characterized in that: comprising at least one memory and at least one processor, wherein: The at least one memory is used to store a computer program; The at least one processor is configured to call a computer program stored in the at least one memory to execute the CAD model clustering and classification model generation method according to any one of claims 1 to 4, or the CAD model search method according to any one of claims 5 to 7.

11. A computer-readable storage medium having a computer program stored thereon; characterized in that: The computer program can be executed by a processor and implements the CAD model clustering and classification model generation method according to any one of claims 1 to 4, or the CAD model search method according to any one of claims 5 to 7.