A method for constructing 3D model index structure based on object distance measurement

By constructing a three-dimensional model index structure based on object distance measurement, the problem of inefficient three-dimensional model retrieval in the existing technology is solved, and efficient and accurate retrieval effect is achieved.

CN119739904BActive Publication Date: 2025-05-06NORTHWESTERN POLYTECHNICAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510249954.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-05-06
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

The prior art relies on traversal search in three-dimensional model retrieval, resulting in inefficiency, high resource consumption, and lack of effective indexing methods, resulting in wasted design time and labor costs.

Method used

Through an object distance measurement method, the three-dimensional model in the three-dimensional model database is converted into multi-dimensional feature vectors, and an index structure similar to a search tree is constructed, including root nodes, child nodes and index points, to assist designers in improving retrieval efficiency.

Benefits of technology

The accurate quantization and position reflection of three-dimensional models with different shape attribute characteristics in the three-dimensional model database is realized, which saves search time, improves search efficiency and accuracy, and reduces unnecessary calculation of eigenvector amplitude.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739904B_ABST
    Figure CN119739904B_ABST
Patent Text Reader

Abstract

The present application proposes a method for constructing a three-dimensional model index structure based on object distance measurement, which belongs to the field of computer-aided design technology. The method includes the following steps: determining the number of all three-dimensional models in a three-dimensional model database, and converting each three-dimensional model into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all three-dimensional models; treating each three-dimensional model as a node of the three-dimensional model index structure, and each node corresponds to a multi-dimensional feature vector; determining the root node, all child nodes, all index points and index depth of the three-dimensional model index structure according to the retrieval requirements; classifying and storing all information contained in the three-dimensional model index structure to complete the construction of the three-dimensional model index structure. The present application can effectively improve the retrieval efficiency and computing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer-aided design, and in particular to a method for constructing a three-dimensional model index structure based on object distance measurement. Background Art

[0002] With the development of digital design technology, product design and manufacturing with the help of three-dimensional models are increasingly commonly used in the engineering field, resulting in millions of three-dimensional model databases. It has become necessary to retrieve the required specific model structure from these three-dimensional model databases.

[0003] At present, the retrieval of three-dimensional models mainly relies on traversal search, which is cumbersome and consumes a lot of resources, while there are few indexing methods to improve the efficiency of retrieval of specific model structures. From the perspective of retrieval modality, although the method of improving search efficiency by constructing an index structure is relatively common in the field of image retrieval, the one-to-many or many-to-many query method from the three-dimensional model database mainly relies on the designer's own experience to gradually check and classify the shape features of the three-dimensional model. This method of searching based on subjective experience will cause a lot of waste of design time and labor costs, and the results obtained have great uncertainty. Therefore, taking the set of three-dimensional models as input, establishing a three-dimensional model index structure according to the distance metric, so as to assist designers in reducing the number of operations required to retrieve three-dimensional models and improving the search efficiency of three-dimensional models, is of great significance for extracting specific model structures that meet the requirements from the three-dimensional model database.

[0004] In view of the problems existing in the above three-dimensional model retrieval process, design and manufacturing enterprises can use manual traversal recognition to narrow the search scope of three-dimensional models, but this method has the following problems:

[0005] First of all, when using this method for retrieval, there are problems such as large workload, low retrieval efficiency, and easy misjudgment.

[0006] Secondly, although the methods proposed in some domestic literature have certain reference value for building image indexes, mature technical solutions that directly build three-dimensional model index structures to assist three-dimensional model retrieval have not yet been reported. For example, some of the patents disclosed focus on solving the construction of image indexes, focusing on extracting feature vectors of two-dimensional images and improving image indexing efficiency, but not on building index structures with three-dimensional models as the main modality; some other patents disclosed focus on retrieving three-dimensional models with certain fixed features, focusing on identifying three-dimensional models with certain semantic information or shape information from a given three-dimensional model database, but not on improving retrieval efficiency by building index structures.

[0007] Therefore, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.

[0008] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0009] The present application provides a method for constructing a three-dimensional model index structure based on object distance measurement, the method comprising the following steps:

[0010] Determine the number of all three-dimensional models in the three-dimensional model database, and convert each of the three-dimensional models into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all the three-dimensional models;

[0011] Taking each of the three-dimensional models as a node of a three-dimensional model index structure, each of the nodes corresponds to a multi-dimensional feature vector;

[0012] Determine the root node, all child nodes, all index points and index depth of the three-dimensional model index structure according to the retrieval requirements;

[0013] All information included in the three-dimensional model index structure is classified and stored to complete the construction of the three-dimensional model index structure.

[0014] In an exemplary embodiment of the present application, the step of determining the number of all three-dimensional models in the three-dimensional model database and converting each of the three-dimensional models into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all the three-dimensional models includes:

[0015] Open the specified three-dimensional model database and determine the set of all three-dimensional models as , ,in, Indicates the first A three-dimensional model, Indicates the number of all 3D models in the 3D model database;

[0016] Traversing all geometric surfaces of each of the three-dimensional models, and discretizing all the geometric surfaces of each of the three-dimensional models, respectively, to obtain a plurality of geometric points evenly distributed on each geometric surface of each of the three-dimensional models;

[0017] Calculate the distance value between any two geometric points on each geometric surface of each three-dimensional model respectively to obtain all the distance values ​​of each three-dimensional model, and determine all corresponding sampling intervals and all sampling values ​​according to all the distance values ​​of each three-dimensional model respectively;

[0018] According to all the distance values ​​and all the sampling values ​​of each of the three-dimensional models, a shape distribution histogram corresponding to each of the three-dimensional models is constructed respectively, and the number of the distance values ​​contained in each of the sampling intervals corresponding to the shape distribution histogram is recorded respectively, so as to obtain the multi-dimensional feature vector corresponding to each of the three-dimensional models;

[0019] Each of the three-dimensional models includes 64 sampling intervals, and the number of distance values ​​included in each of the sampling intervals corresponding to all the shape distribution histograms is used as the coordinate value of the feature vector at the corresponding dimension.

[0020] In an exemplary embodiment of the present application, the step of determining the root node, all child nodes, all index points and index depth of the three-dimensional model index structure according to the retrieval requirements includes:

[0021] If the three-dimensional model index structure contains only one node, that is, the number of nodes: , then the node is both the root node and the child node, the index depth is 1, and the three-dimensional model index structure is constructed;

[0022] If the number of nodes in the 3D model index structure is: , then according to the retrieval requirements, the index depth and the root node are determined, and all the nodes except the root node are the child nodes;

[0023] The index depth is To express.

[0024] In an exemplary embodiment of the present application, if the number of the nodes in the three-dimensional model index structure is: , then according to the retrieval requirements, the index depth and the root node are determined, and in the step where all the nodes except the root node are the child nodes:

[0025] like , the step of determining the root node includes:

[0026] Moving all the nodes in the three-dimensional model index structure into a two-dimensional space coordinate system, and determining the order of moving in according to the distance attributes of all the nodes;

[0027] Let the distance between any two nodes be equal to the cosine distance between the feature vectors corresponding to the two nodes respectively;

[0028] Let the line between any two of the nodes be The angle of the positive direction of the axis is equal to the angle between the corresponding two eigenvectors;

[0029] Make a first circular area that includes all the nodes in the two-dimensional space coordinate system, and ensure that the radius of the first circular area is the minimum radius when all the nodes are included ;

[0030] At this time, the node with the shortest connection distance to the center of the first circular area is used as the root node of the three-dimensional model index structure.

[0031] In an exemplary embodiment of the present application, if , then all the nodes in the three-dimensional model index structure are divided for the first time, and the step of the first division includes:

[0032] by The root node obtained when the second circular area is taken as the center, so that the second circular area includes all the nodes in the two-dimensional space coordinate system, and the radius of the second circular area is the minimum radius when all the nodes are included. ;

[0033] Calculate the distances between all the nodes and the root node respectively, extract the absolute value and The closest distance ,make , with the root node as the center, Make a circle for the radius , and will fall on a radius of The circle and the radius is on a circle, and on the circle The set of all the nodes outside is recorded as , will fall on the circle In and around the circle The set of all the nodes on .

[0034] In an exemplary embodiment of the present application, if , then all the nodes in the three-dimensional model index structure are divided for the second time, and the second division step includes:

[0035] Make a line through the root node with the two-dimensional space coordinate system A parallel line parallel to the axis, and the direction from left to right on the parallel line is defined as the positive direction;

[0036] Calculate the angles between the lines connecting all the nodes and the root node and the positive direction of the parallel line respectively;

[0037] From the collection Extract the angle whose absolute value is closest to 0° And the corresponding node, let , the angle between the node and the positive direction of the parallel line is The straight line , and will fall on the straight line on, and falls on the straight line The set of all the nodes above is recorded as , will fall on the straight line The set of all the nodes below is recorded as ;

[0038] At the same time, from the collection Extract the angle whose absolute value is closest to 0° And the corresponding node, let , the angle between the node and the positive direction of the parallel line is The straight line , and will fall on the straight line on, and falls on the straight line The set of all the nodes above is recorded as , will fall on the straight line The set of all the nodes below is recorded as .

[0039] In an exemplary embodiment of the present application, if the , then all the nodes in the three-dimensional model index structure are divided for the third time, and the step of the third division includes:

[0040] Calculate the sets separately The distance between all the nodes and the root node, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius to make the straight line Intersecting arcs , and will fall within the radius The circle and the radius is On the circle, and on the arc The set of all the nodes outside is recorded as , will fall on the arc In and around the arc The set of all the nodes on ;

[0041] At the same time, the sets are calculated separately The distance between all the nodes and the root node, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius to make the straight line Intersecting arcs , and will fall within the radius The circle and the radius is On the circle, and on the arc The set of all the nodes outside is recorded as , will fall on the arc In and around the arc The set of all the nodes on ;

[0042] At the same time, the sets are calculated separately The distance between all the nodes and the root node, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius to make the straight line Intersecting arcs , and will fall within the radius The circle and the radius is On the circle, and on the arc The set of all the nodes outside is recorded as , will fall on the arc In and around the arc The set of all the nodes on ;

[0043] At the same time, the sets are calculated separately The distance between all the nodes and the root node, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius to make the straight line Intersecting arcs , and will fall within the radius The circle and the radius is On the circle, and on the arc The set of all the nodes outside is recorded as , will fall on the arc In and around the arc The set of all the nodes on .

[0044] In an exemplary embodiment of the present application, if the , then all the nodes in the three-dimensional model index structure are divided according to the second division and the third division steps in an alternating and iterative manner, and after each division, the value of the index depth is updated, and the next division is restarted. The division process includes:

[0045] Conduct the When the index is divided, let the corresponding index depth be ;

[0046] when When it is an odd number, the second division is performed according to the steps of the second division, and after the division is completed, ;when When it is an odd number, create a set , , the set Used to store the angles required for all even-numbered divisions, where the subset formed by the first even-numbered division , contains 2 elements, the subset formed by the second even-numbered division Include elements, and so on. The subset formed by the even-numbered divisions includes elements; and establish One-to-one correspondence set , , the set It is used to store the angles closest to the absolute value 0° in all the even-numbered divisions, wherein the subset formed by the first even-numbered division , contains 2 elements, the subset formed by the second even-numbered division Include elements, and so on. The subset formed by the even-numbered divisions includes elements;

[0047] when When it is an even number, divide it according to the steps of the third division, and after the division is completed, let ;when When it is an even number, create a set , , the set Used to store the lengths of the radii of circles and arcs required for all odd-numbered divisions, where the subset formed by the first odd-numbered division , contains 1 element, the subset formed by the second odd-numbered division ,Include elements, and so on. The subset formed by the odd number of divisions Include elements, starting from the second odd-numbered division, the length of the radius of the arc used in each subsequent odd-numbered division process is the length of the radius of the arc obtained in the previous odd-numbered division process;

[0048] The above division process is repeated alternately until Stop dividing.

[0049] In an exemplary embodiment of the present application, the expression of the cosine value of the angle between any two of the eigenvectors is:

[0050] (1)

[0051] in, Indicates feature vector and feature vector Angle The cosine value of Indicates feature vector The set of all coordinate values ​​of Indicates feature vector The set of all coordinate values ​​of Indicates feature vector No. Coordinate values, Indicates feature vector No. Coordinate values;

[0052] The distance between any two nodes is expressed as:

[0053] (2)

[0054] in, Represents the feature vector and the eigenvector The distance between Represents the feature vector and the eigenvector The similarity of The value of The values ​​are equal.

[0055] In an exemplary embodiment of the present application, the step of classifying and storing all information contained in the three-dimensional model index structure to complete the construction of the three-dimensional model index structure includes:

[0056] Store the root node in the set root;

[0057] All circles, arcs and straight lines obtained in the division process are used as the index points of the three-dimensional model index structure and stored in the set interior.

[0058] All the nodes except the root node are used as the child nodes of the three-dimensional model index structure, and stored in a leaf set;

[0059] After the classification and storage are completed, the construction of the three-dimensional model index structure is completed.

[0060] Beneficial effects:

[0061] The present application provides a method for constructing a three-dimensional model index structure based on object distance measurement, which has at least the following beneficial effects:

[0062] (1) This application constructs a 3D model index structure similar to a search tree, including establishing a root node, child nodes, and index points to represent 3D models with different shape attribute characteristics in a 3D model database, thereby accurately quantifying information and reflecting the specific position of the 3D model in the entire 3D model index structure, saving retrieval time and improving retrieval efficiency.

[0063] (2) In the process of establishing the three-dimensional model index structure, the present application maps the distance between two feature vectors by utilizing the cosine value of the angle between any two feature vectors in the metric space, thereby eliminating the influence of the amplitude of the feature vectors while retaining the shape characteristics of the three-dimensional model, improving the retrieval accuracy, and effectively avoiding a large number of unnecessary feature vector amplitude calculations, thereby improving the computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 A schematic diagram showing the steps of a method for constructing a three-dimensional model index structure based on object distance measurement in an exemplary embodiment of the present application;

[0066] Figure 2 A schematic diagram showing the principle of constructing a three-dimensional model index structure in an exemplary embodiment of the present application;

[0067] Figure 3 A schematic diagram showing a three-dimensional model index structure in an exemplary embodiment of the present application;

[0068] Figure 4 A schematic diagram showing a three-dimensional model of a laptop part in an exemplary embodiment of the present application;

[0069] Figure 5 A schematic diagram showing a three-dimensional model of airplane parts in an exemplary embodiment of the present application;

[0070] Figure 6 A schematic diagram showing a three-dimensional model of a keyboard part in an exemplary embodiment of the present application;

[0071] Figure 7 A schematic diagram showing a three-dimensional model of a lamp part in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0072] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0073] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0074] To this end, this example embodiment provides a method for constructing a three-dimensional model index structure based on object distance measurement, such as Figure 1 As shown, the method may include the following steps:

[0075] Step S101: determine the number of all three-dimensional models in the three-dimensional model database, and convert each three-dimensional model into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all three-dimensional models.

[0076] Step S102: taking each 3D model as a node of the 3D model index structure, and each node corresponds to a multi-dimensional feature vector.

[0077] Step S103: According to the retrieval requirements, the root node, all child nodes, all index points and index depth of the 3D model index structure are determined.

[0078] Step S104: classify and store all information included in the three-dimensional model index structure to complete the construction of the three-dimensional model index structure.

[0079] The present application embodiment proposes a method for constructing a three-dimensional model index structure based on object distance measurement, which has at least the following beneficial effects:

[0080] (1) This application constructs a 3D model index structure similar to a search tree, including establishing a root node, child nodes, and index points to represent 3D models with different shape attribute characteristics in a 3D model database, thereby accurately quantifying information and reflecting the specific position of the 3D model in the entire 3D model index structure, saving retrieval time and improving retrieval efficiency.

[0081] (2) In the process of establishing the three-dimensional model index structure, the present application maps the distance between two feature vectors by utilizing the cosine value of the angle between any two feature vectors in the metric space, thereby eliminating the influence of the amplitude of the feature vectors while retaining the shape characteristics of the three-dimensional model, improving the retrieval accuracy, and effectively avoiding a large number of unnecessary feature vector amplitude calculations, thereby improving the computing efficiency.

[0082] Next, a method for constructing a three-dimensional model index structure based on object distance measurement proposed in this example embodiment will be described in more detail.

[0083] This embodiment uses Visual Studio Code and MATLAB as development tools, adopts Python and C++ development languages, and implements corresponding technical solutions on 20 typical 3D models in .off format in the 3D model database.

[0084] In step S101 of this embodiment, the number of all three-dimensional models in the three-dimensional model database is determined, and each three-dimensional model is converted into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all three-dimensional models. Step S101 of this embodiment may include the following sub-steps:

[0085] Sub-step S1011: Open the specified 3D model database and determine the set of all 3D models , ,in, Indicates the first A three-dimensional model, Indicates the number of all 3D models in the 3D model database.

[0086] Sub-step S1012: traverse all geometric surfaces of each three-dimensional model, and discretize all geometric surfaces of each three-dimensional model respectively, to obtain a plurality of geometric points evenly distributed on each geometric surface of each three-dimensional model respectively.

[0087] Sub-step S1013: Calculate the distance value between any two geometric points on each geometric surface of each three-dimensional model respectively, obtain all distance values ​​of each three-dimensional model, and determine all corresponding sampling intervals and all sampling values ​​according to all distance values ​​of each three-dimensional model respectively.

[0088] Sub-step S1014: Based on all distance values ​​and all sampling values ​​of each three-dimensional model, a shape distribution histogram corresponding to each three-dimensional model is constructed respectively, and the number of distance values ​​contained in each corresponding sampling interval on the shape distribution histogram is recorded respectively to obtain a multi-dimensional feature vector corresponding to each three-dimensional model.

[0089] In this embodiment, sub-steps S1012, S1013 and S1014 are the entire process of converting each three-dimensional model into corresponding feature vectors of all multi-dimensional dimensions, which are specifically as follows:

[0090] Use the trimesh.load_mesh function to open the 3D model database, and use the trimesh.sample.sample_surface function to traverse All geometric faces in a 3D model, , , Indicates the ordinal number of the geometric surface, Represents the total number of geometric faces, from First, for the geometric surface Discretize according to the preset accuracy to obtain multiple geometric points on each geometric surface. , , Represents the sequence of geometric points, so that The geometric points are evenly distributed on the surface of the 3D model.

[0091] Using np.histogram function, from , First, calculate the Euclidean distance between any two geometric points on each geometric surface of the 3D model, and use this method to obtain distance values, so we can form sampling values, thus forming a shape distribution histogram of the 3D model. , First, the distance interval is divided into 64 equal parts, each distance interval is a sampling interval, and the number of distance values ​​contained in each corresponding sampling interval on all shape distribution histograms is recorded separately as the coordinate value of the feature vector under this dimension. Through this recording method, it can be obtained that each three-dimensional model contains the corresponding 64-dimensional feature vector.

[0092] In step S102 of this embodiment, each three-dimensional model is used as a node of the three-dimensional model index structure, and each node corresponds to a multi-dimensional feature vector.

[0093] In step S103 of this embodiment, the root node, all child nodes, all index points and index depth of the three-dimensional model index structure are determined according to the search requirements. Step S103 of this embodiment may include the following steps:

[0094] Sub-step S1031: If the 3D model index structure contains only one node, that is, the number of nodes: , then the node is both a root node and a child node, the index depth is 1, and the 3D model index structure is completed.

[0095] Sub-step S1032: If the number of nodes in the 3D model index structure is: , then determine the index depth and root node according to the retrieval requirements, and all nodes except the root node are child nodes.

[0096] In this embodiment, the search depth of the three-dimensional model index structure is determined according to the search requirements. ,in, is a positive integer, The larger the value, the more precise the constructed 3D model index structure is, the higher the retrieval accuracy is, but the retrieval time is relatively longer; The smaller it is, the coarser the constructed 3D model index structure is, the lower the retrieval accuracy is, but the retrieval time is relatively short.

[0097] If the 3D model index structure contains only one node and the number of nodes is 1, the default At this point, the node serves as both the root node and child node of the 3D model index structure, completing the construction of the 3D model index structure.

[0098] If the number of nodes in the 3D model index structure is not 1, the index depth and the root node are determined according to the retrieval requirements.

[0099] Furthermore, if , the steps of determining the root node include:

[0100] Move all nodes in the 3D model index structure into a blank 2D space coordinate system, and determine the order of moving in according to the distance attributes of all nodes;

[0101] Let the distance between any two nodes be equal to the cosine distance between the eigenvectors corresponding to the two nodes. The calculation method is as follows:

[0102] Defining a Collection and collection ,gather For storing feature vector The 64 coordinate values ​​of For storing feature vector 64 coordinate values ​​of, among which, , , respectively calculate the feature vector and feature vector Angle The cosine value of is as follows:

[0103] (1)

[0104] in, Indicates feature vector and feature vector Angle The cosine value of Indicates feature vector The set of all coordinate values ​​of Indicates feature vector The set of all coordinate values ​​of Indicates feature vector No. Coordinate values, Indicates feature vector No. Coordinate values.

[0105] With the help of feature vector and feature vector Angle The cosine value of Expression feature vector and the eigenvector The distance between them is expressed as:

[0106] (2)

[0107] in, Represents the feature vector and the eigenvector The distance between Represents the feature vector and the eigenvector The similarity of The value of The values ​​are equal.

[0108] Let the line between any two nodes be the coordinate system of the two-dimensional space The angle between the positive directions of the axes is equal to the angle between the corresponding two eigenvectors. , which can be calculated using formula (1).

[0109] Make a first circular area that includes all nodes in the two-dimensional space coordinate system, and ensure that the radius of the first circular area is the minimum radius when all nodes are included ;

[0110] At this time, the node with the shortest distance from the center of the first circular area is used as the root node of the three-dimensional model index structure. Formulas (1) and (2) can be used for calculation.

[0111] Furthermore, if , then all nodes in the 3D model index structure are divided for the first time, and the steps of the first division include:

[0112] by The root node obtained when the second circular area is made as the center of the circle, so that the second circular area contains all the nodes in the two-dimensional space coordinate system, and the radius of the second circular area is the minimum radius when all nodes are included. ;

[0113] like Figure 2 As shown, the distances between all nodes and the root node are calculated respectively, and the absolute values ​​and The closest distance ,make , with the root node as the center, Make a circle for the radius , and will fall on a radius of The inner circle and radius is On the circle and on the circle The set of all nodes outside is denoted as , will fall on the circle Inner and round The set of all nodes on .

[0114] Furthermore, if , then all nodes in the 3D model index structure are divided for the second time, and the steps of the second division include:

[0115] Make a line through the root node to the two-dimensional space coordinate system The parallel lines are parallel to the axis, and the direction from left to right on the parallel lines is defined as the positive direction;

[0116] Calculate the angles between the lines connecting all nodes and the root node and the positive direction of the parallel line respectively;

[0117] From the collection Extract the angle whose absolute value is closest to 0° and the corresponding nodes, let , the angle between the node and the positive direction of the parallel line is The straight line , and will fall on the straight line On, and on a straight line The set of all nodes above is recorded as , will fall on the straight line The set of all nodes below is recorded as ;

[0118] At the same time, from the collection Extract the angle whose absolute value is closest to 0° and the corresponding nodes, let , and the angle between the node and the positive direction of the parallel line is The straight line , and will fall on the straight line On, and on a straight line The set of all nodes above is recorded as , will fall on the straight line The set of all nodes below is recorded as .

[0119] Furthermore, if , then all nodes in the 3D model index structure are divided for the third time, and the steps of the third division include:

[0120] Calculate the set separately The distance between all nodes and the root node in the table, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius make a straight line Intersecting arcs , and will fall on a radius of The inner circle and radius is On the circle and on the arc The set of all nodes outside is denoted as , will fall on the arc Inner and arc The set of all nodes on ;

[0121] At the same time, the sets are calculated separately The distance between all nodes and the root node in the table, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius make a straight line Intersecting arcs , and will fall on a radius of The inner circle and radius is On the circle and on the arc The set of all nodes outside is denoted as , will fall on the arc In and around the arc The set of all nodes on ;

[0122] At the same time, the sets are calculated separately The distance between all nodes and the root node in the table, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius make a straight line Intersecting arcs , and will fall on a radius of The inner circle and radius is On the circle and on the arc The set of all nodes outside is denoted as , will fall on the arc Inner and arc The set of all nodes on ;

[0123] At the same time, the sets are calculated separately The distance between all nodes and the root node in the table, extract the absolute value and The closest distance ,make , with the root node as the center, For the radius make a straight line Intersecting arcs , and will fall on a radius of The inner circle and radius is On the circle and on the arc The set of all nodes outside is denoted as , will fall on the arc Inner and arc The set of all nodes on .

[0124] Furthermore, if , then all nodes in the 3D model index structure are divided according to the steps of the second and third divisions in alternating iterations, and the value of the index depth is updated after each division, and the next division is restarted. The division process includes:

[0125] Conduct the When the partition is performed, let the corresponding index depth be ;

[0126] when When it is an odd number, divide it according to the second division steps, and after the division is completed, let ;when When it is an odd number, create a set , ,gather Used to store the angles required for all even-numbered divisions, where the subset formed by the first even-numbered division , contains 2 elements, the subset formed by the second even-numbered partition Include elements, and so on. The subset formed by even-numbered partitions includes elements; and establish the same One-to-one correspondence set , ,gather It is used to store the angles closest to the absolute value 0° in all even-numbered divisions, among which the subset formed by the first even-numbered division , contains 2 elements, the subset formed by the second even-numbered partition Include elements, and so on. The subset formed by even-numbered partitions includes elements;

[0127] when When it is an even number, divide it according to the steps of the third division, and after the division is completed, let ;when When it is an even number, create a set , ,gather Used to store the lengths of the radii of circles and arcs required for all odd-numbered divisions, among which the subset formed by the first odd-numbered division , contains 1 element, the subset formed by the second odd-numbered partition ,Include elements, and so on. Subsets formed by odd number of partitions Include elements, starting from the second odd-numbered division, the length of the radius of the arc used in each subsequent odd-numbered division process is the length of the radius of the arc obtained in the previous odd-numbered division process;

[0128] The above division process is repeated alternately until Stop dividing.

[0129] like Figure 3 As shown, in step S104 of this embodiment, all information contained in the three-dimensional model index structure is classified and stored to complete the construction of the three-dimensional model index structure. Step S104 of this embodiment may include the following sub-steps:

[0130] Sub-step S1041: Store the root node in the set root.

[0131] Sub-step S1042: all circles, all arcs and all straight lines obtained in the division process are used as index points of the three-dimensional model index structure and stored in the set interior.

[0132] Sub-step S1043: All nodes except the root node are regarded as child nodes of the three-dimensional model index structure and stored in the leaf set.

[0133] Sub-step S1044: After classification and storage are completed, the construction of the three-dimensional model index structure is completed.

[0134] In step S104 of this embodiment, when a 3D model index structure is established for the 20 3D models in the 3D model database, Indicates the first The feature vector of a 3D model corresponds to a subnode in the 3D model index structure, where: .

[0135] The 20 typical 3D model examples mentioned in this embodiment are as follows: Figures 4 to 7 shown. Figure 4 This is a schematic diagram of a 3D model of laptop parts. Figure 5 This is a schematic diagram of the 3D model of airplane parts. Figure 6 This is a schematic diagram of the 3D model of keyboard parts. Figure 7 This is a schematic diagram of the 3D model of lamp parts.

[0136] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0137] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.

[0138] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the protection scope of the present application.

[0139] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

Claims

1. A method for constructing a three-dimensional model index structure based on object distance measurement, characterized in that: The method comprises the following steps: Determining the number of all three-dimensional models in the three-dimensional model database, and converting each of the three-dimensional models into a corresponding multi-dimensional feature vector in turn according to the distance attributes of all the three-dimensional models, including: Open the specified three-dimensional model database and determine that the set of all three-dimensional models is M i , i=1,2,…,N, where i represents the i-th 3D model in the 3D model database, and N represents the number of all 3D models in the 3D model database; Traversing all geometric surfaces of each of the three-dimensional models, and discretizing all the geometric surfaces of each of the three-dimensional models, respectively, to obtain a plurality of geometric points evenly distributed on each geometric surface of each of the three-dimensional models; Calculate the distance value between any two geometric points on each geometric surface of each three-dimensional model respectively to obtain all the distance values ​​of each three-dimensional model, and determine all corresponding sampling intervals and all sampling values ​​according to all the distance values ​​of each three-dimensional model respectively; According to all the distance values ​​and all the sampling values ​​of each of the three-dimensional models, a shape distribution histogram corresponding to each of the three-dimensional models is constructed respectively, and the number of the distance values ​​contained in each of the sampling intervals corresponding to the shape distribution histogram is recorded respectively, so as to obtain the multi-dimensional feature vector corresponding to each of the three-dimensional models; Each of the three-dimensional models includes 64 sampling intervals, and the number of distance values ​​included in each of the sampling intervals corresponding to all the shape distribution histograms is used as the coordinate value of the feature vector at the corresponding dimension; Taking each of the three-dimensional models as a node of a three-dimensional model index structure, each of the nodes corresponds to a multi-dimensional feature vector; Determine the root node, all child nodes, all index points and index depth of the three-dimensional model index structure according to the retrieval requirements; All information included in the three-dimensional model index structure is classified and stored to complete the construction of the three-dimensional model index structure.

2. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 1, characterized in that: The step of determining the root node, all child nodes, all index points and index depth of the three-dimensional model index structure according to the retrieval requirements includes: If the three-dimensional model index structure contains only one node, that is, the number of nodes is: N=1, then the node is both the root node and the child node, the index depth is 1, and the three-dimensional model index structure is constructed; If the number of nodes in the three-dimensional model index structure is: N≠1, then according to the retrieval requirement, the index depth and the root node are determined, and all the nodes except the root node are the child nodes; The index depth is represented by depth.

3. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 2, characterized in that: If the number of nodes in the three-dimensional model index structure is N≠1, then according to the retrieval requirements, the index depth and the root node are determined, and all the nodes except the root node are the child nodes: If depth=1, the step of determining the root node includes: Moving all the nodes in the three-dimensional model index structure into a two-dimensional space coordinate system, and determining the order of moving in according to the distance attributes of all the nodes; Let the distance between any two nodes be equal to the cosine distance between the feature vectors corresponding to the two nodes respectively; Let the angle between the line between any two of the nodes and the positive direction of the X-axis of the two-dimensional space coordinate system be equal to the angle between the corresponding two eigenvectors; Make a first circular area including all the nodes in the two-dimensional space coordinate system, and ensure that the radius of the first circular area is the minimum radius r1 when including all the nodes; At this time, the node with the shortest line distance to the center of the first circular area is used as the root node of the three-dimensional model index structure.

4. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 3, characterized in that: If depth=2, all the nodes in the three-dimensional model index structure are divided for the first time, and the first division step includes: A second circular area is made with the root node obtained when depth=1 as the center, so that the second circular area includes all the nodes in the two-dimensional space coordinate system, and the radius of the second circular area is the minimum radius r2 when all the nodes are included; Calculate the distances between all the nodes and the root node respectively, extract the absolute value and The closest distance d m , let d med =d m , with the root node as the center and d med Draw a circle O1 with a radius of r2, and record the set consisting of all the nodes that fall inside and on the circle with a radius of r2 and outside the circle O1 as s1, and record the set consisting of all the nodes that fall inside and on the circle O1 as s2.

5. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 4, characterized in that: If depth=3, all the nodes in the three-dimensional model index structure are divided for the second time, and the second division step includes: Draw a parallel line through the root node that is parallel to the X-axis of the two-dimensional space coordinate system, and define the direction from left to right on the parallel line as the positive direction; Calculate the angles between the lines connecting all the nodes and the root node and the positive direction of the parallel line respectively; From the set s1, extract the angle θ whose absolute value is closest to 0° 1-1 And the corresponding node, let θ med1-1 =θ 1-1 , the angle between the node and the positive direction of the parallel line is θ med1-1 The straight line l e1-1 , and will fall on the straight line l e1-1 on the straight line l e1-1 The set of all the nodes above is denoted as s 1-1 , will fall on the straight line l e1-1 The set of all the nodes below is denoted as s 1-2 ; At the same time, from the set s2, the angle θ whose absolute value is closest to 0° is extracted. 1-2 And the corresponding node, let θ med1-2 =θ 1-2 , the angle between the node and the positive direction of the parallel line is θ med1-2 The straight line l e1-2 , and will fall on the straight line l e1-2 on the straight line l e1-2 The set of all the nodes above is denoted as s 2-1 , will fall on the straight line l e1-2 The set of all the nodes below is denoted as s 2-2 .

6. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 5, characterized in that: If the depth=4, all the nodes in the three-dimensional model index structure are divided for the third time, and the step of the third division includes: Calculate the set s separately 1-1 The distance between all the nodes and the root node, extract the absolute value and The closest distance d 1-1 , let d med1-1 =d 1-1 , with the root node as the center and d med1-1 For the radius to make the straight line l e1-1 Intersecting arcs O 1-1 , and will fall inside and on the circle with radius r2, and on the arc O 1-1 The set of all the nodes outside is denoted as s 1-1-1 , will fall on the arc O 1-1 Inside and the arc O 1-1 The set of all the nodes on is denoted as s 1-1-2 ; At the same time, the set s is calculated separately 1-2 The distance between all the nodes and the root node, extract the absolute value and The closest distance d 1-2 , let d med1-2 =d 1-2 , with the root node as the center and d med1-2 For the radius to make the straight line l e1-1 Intersecting arcs O 1-2 , and will fall inside and on the circle with radius r2, and on the arc O 1-2 The set of all the nodes outside is denoted as s 1-2-1 , will fall on the arc O 1-2 Inside and the arc O 1-2 The set of all the nodes on is denoted as s 1-2-2 ; At the same time, the set s is calculated separately 2-1 The distance between all the nodes and the root node, extract the absolute value and The closest distance d 2-1 , let d med2-1 =d 2-1 , with the root node as the center and d med2-1 For the radius to make the straight line l e1-2 Intersecting arcs O 2-1 , and will fall inside and on the circle with radius r2, and on the arc O 2-1 The set of all the nodes outside is denoted as s 2-1-1 , will fall on the arc O 2-1 Inside and the arc O 2-1 The set of all the nodes on is denoted as s 2-1-2 ; At the same time, the set s is calculated separately 2-2 The distance between all the nodes and the root node, extract the absolute value and The closest distance d 2-2 , let d med2-2 =d 2-2 , with the root node as the center and d med2-2 For the radius to make the straight line l e1-2 Intersecting arcs O 2-2 , and will fall inside and on the circle with radius r2, and on the arc O 2-2 The set of all the nodes outside is denoted as s 2-2-1 , will fall on the arc O 2-2 Inside and the arc O 2-2 The set of all the nodes on is denoted as s 2-2-2 .

7. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 6, characterized in that: If the depth>4, all the nodes in the three-dimensional model index structure are divided according to the second division and the third division steps in an alternating manner, and the value of the index depth is updated after each division, and the next division is restarted. The division process includes: When performing the kth division, let the corresponding index depth value be dep k ; When dep k When it is an odd number, the second division is performed according to the steps of the second division, and after the division is completed, dep k +1; when dep k When is an odd number, establish the set Θ med , Θ med ={Θ med1 ,Θ med2 ,Θ med3 ,…,Θ medn }, the set Θ med It is used to store the angles required for all even-numbered divisions, where the subset θ formed by the first even-numbered division is med1 ={Θ med1-1 ,θ med1-2 }, contains 2 elements, the subset Θ formed by the second even-numbered division med2 Contains 2.4 1 = 8 elements, and so on, the subset formed by the nth even-numbered division contains 2·4 n-1 elements; and establish a med One-to-one correspondence set Θ n , Θ n ={θ1,θ2,θ3,…,θ n }, the set Θ n It is used to store the angle closest to the absolute value 0° in all the even-numbered divisions, wherein the subset θ1 formed by the first even-numbered division is θ1={θ 1-1 ,θ 1-2 }, contains 2 elements, and the subset θ2 formed by the second even-numbered division contains 2·4 1 = 8 elements, and so on, the subset formed by the nth even-numbered division contains 2·4 n-1 elements; When dep k When it is an even number, the division is performed according to the steps of the third division, and after the division is completed, dep k +1; when dep k When is an even number, establish the set D med , D med ={D med1 , D med2 , D med3 , …, D medn }, the set D med It is used to store the lengths of the radii of circles and arcs required for all odd-numbered divisions, where the subset D formed by the first odd-numbered division is med1 ={d med }, contains 1 element, the subset D formed by the second odd-numbered division med2 ={d med1-1 , d med1-2 , d med2-1 , d med2-2 }, contains 4 1 elements, and so on, the subset D formed by the nth odd-numbered division medn Contains 4 n-1 elements, starting from the second odd-numbered division, the length of the radius of the arc used in each subsequent odd-numbered division process is the length of the radius of the arc obtained in the previous odd-numbered division process; Alternate and iterate the above division process until dep k >depth, stop dividing.

8. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 7, characterized in that: The expression of the cosine value of the angle between any two of the eigenvectors is: Among them, cosθ represents the a-th eigenvector v a and the bth eigenvector v b The cosine value of the angle θ, Sv a represents the ath eigenvector v a The set of all coordinate values ​​of b represents the bth eigenvector v b The set of all coordinate values ​​of a,d represents the ath eigenvector v a The d-th coordinate value, S b,d represents the bth eigenvector v b The d-th coordinate value of ; The distance between any two nodes is expressed as: Dis(Sv a ,Sv b )=1-Sim(Sv a ,Sv b ) (2) Among them, Dis(Sv a ,Sv b ) represents the feature vector v a and the eigenvector v b The distance between a ,Sv b ) represents the feature vector v a and the eigenvector v b The similarity of Sim(Sv a ,Sv b ) is equal to the value of cosθ.

9. The method for constructing a three-dimensional model index structure based on object distance measurement according to claim 8, characterized in that: The step of classifying and storing all information contained in the three-dimensional model index structure to complete the construction of the three-dimensional model index structure includes: Store the root node in the set root; All circles, all arcs and all straight lines obtained in all division processes are used as the index points of the three-dimensional model index structure and stored in the set interior; All the nodes except the root node are used as the child nodes of the three-dimensional model index structure, and stored in a leaf set; After the classification and storage are completed, the construction of the three-dimensional model index structure is completed.

Citation Information

Patent Citations

  • Storage structure of model, related editing method and device, equipment, and storage medium

    CN108921774A

  • Retrieval-oriented three-dimensional model surface feature adaptive sampling method

    CN119046492A