A method, system, device and medium for verifying three-dimensional models
By acquiring the geometric and material feature information of the 3D model and using MD5 code matching verification, the problem of insufficient material feature verification of 3D models in the existing technology is solved, and the rapid identification and management of 3D models is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies cannot effectively verify the material characteristics of 3D models, resulting in the repeated entry of the same model into the database under different materials, making it impossible to achieve fast and accurate 3D model management.
By acquiring the geometric and material features of a 3D model, and using MD5 codes for matching and verification, including the calculation of 3D face vertex features and centroid features, combined with the splicing and matching of material parameters, the 3D model can be quickly identified and stored.
It improves the efficiency of 3D model recognition and management, solves the problem in existing technologies that cannot accurately achieve automatic matching and data updating between the 3D model to be verified and each 3D model in the database, and realizes fast and efficient 3D model import and management.
Smart Images

Figure CN114661935B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer graphics technology, and in particular to a method, system, device and medium for verifying three-dimensional models. Background Technology
[0002] With the rapid development of computer technology and related hardware, the application of 3D models in the interior design industry is increasing, leading to a surge in the number of 3D models used for design. Libraries of millions of 3D models are not uncommon in current design software. This has brought with it the challenge of managing massive amounts of 3D models. For 3D models with materials, an effective verification method is needed. For example, before adding a 3D model to the library, it's necessary to determine if the model already exists. Early verification methods based on filenames are no longer effective. Common file characteristics such as large file size or MD5 hashes are also insufficient, because opening a 3D model file, switching viewports, and saving the file as a different file will result in different file sizes and MD5 hashes, even though both files contain the same 3D model. Therefore, in addition to verifying the geometric features of the 3D model, its material characteristics also need to be considered. For example, two sofas with the same geometric features, a red leather sofa and a yellow fabric sofa, can be added to the library separately. Summary of the Invention
[0003] The purpose of this invention is to propose a method, system, device, and medium for verifying three-dimensional models. For three-dimensional models with materials in the design industry, a precise and effective verification method is used to achieve rapid storage and management of three-dimensional models.
[0004] To achieve this objective, the present invention adopts the following technical solution:
[0005] A method for verifying a 3D model includes the following steps:
[0006] Step S1: Receive the user's detection command in real time and obtain the 3D model to be verified;
[0007] Step S2: Analyze the 3D model to be verified and obtain geometric and material feature information;
[0008] Step S3: Match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D model in the system's database one by one, and determine whether the two are consistent. If they are consistent, perform the first operation; if they are inconsistent, perform the second operation.
[0009] First operation: Output the matching results as the current 3D model that already exists in the database, and return feedback information indicating that the import system failed;
[0010] The second operation is to output the matching result as "the 3D model does not exist in the database", bind the geometric feature information and material feature information with the current 3D model, store them together in the database, and return a feedback message indicating successful import.
[0011] Preferably, in step S2, the geometric feature information includes three-dimensional face vertex feature information and centroid feature information.
[0012] Preferably, in step S2, the calculation steps for obtaining the three-dimensional face vertex feature information include the following:
[0013] Step A1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table;
[0014] Step A2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face;
[0015] Step A3: Based on the distance of each vertex's coordinates from the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sorting. Then, obtain the point table based on the vertex sorting.
[0016] Step A4: Based on the distance between the starting point and the origin of each point table, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data.
[0017] Step A5: Concatenate the first and last characters of the MD5 hash of the sorted data to form a vertex-length string, and calculate the MD5 hash of the vertex-length string.
[0018] Preferably, in step S2, the calculation steps for obtaining the centroid feature information include the following:
[0019] Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table;
[0020] Step B2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face;
[0021] Step B3: Add up the coordinates of all vertices of each sub-surface and then average them to obtain the average value of the vertex coordinates.
[0022] Preferably, in step S2, the calculation steps for obtaining the material feature information include the following:
[0023] Step C1: Traverse all materials on the 3D model;
[0024] Step C2: Read all material information and obtain the parameters corresponding to all material information;
[0025] Step C3: Keep the thousands separator of all material parameter values, format them into strings, and then concatenate the first and last parts to form a long material string. Calculate the MD5 hash of the long material string.
[0026] Preferably, step S1: receive the user's detection command in real time and obtain the 3D model to be verified;
[0027] Step S2: Analyze the 3D model to be verified and obtain geometric and material feature information;
[0028] Step S3: Match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D model in the system's database one by one, and determine whether the two are consistent. If they are consistent, perform the first operation; if they are inconsistent, perform the second operation.
[0029] First operation: Output the matching results as the current 3D model that already exists in the database, and return feedback information indicating that the import system failed;
[0030] The second operation is to output the matching result as "the 3D model does not exist in the database", bind the geometric feature information and material feature information with the current 3D model, store them together in the database, and return a feedback message indicating successful import.
[0031] A three-dimensional model verification system includes a model device and a model analysis server, wherein the model device and the model analysis server are communicatively connected.
[0032] The model device includes an upload module and a send module;
[0033] The upload module is used by users to upload 3D models to be verified;
[0034] The sending module is used to send the 3D model to be verified to the model analysis server;
[0035] The model analysis server includes a receiving module, an analysis module, a comparison module, a judgment module, a feedback module, and a synchronization module;
[0036] The receiving module is used to receive the user's detection command in real time and obtain the 3D model to be verified.
[0037] The analysis module is used to analyze the 3D model to be verified and obtain geometric feature information and material feature information;
[0038] The comparison module is used to match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D models in the system's database one by one;
[0039] The judgment module is used to determine whether the two are consistent. If they are consistent, the first operation is performed; if they are inconsistent, the second operation is performed.
[0040] The feedback module is used to return feedback information indicating that the import into the system failed or that the import into the system was successful.
[0041] The synchronization module is used to output the matching result as "the 3D model does not exist in the database", and then bind the geometric feature information and material feature information with the current 3D model and store them together in the database.
[0042] Preferably, the comparison module includes a geometric feature information acquisition subunit and a material feature information acquisition subunit;
[0043] The geometric feature information acquisition subunit is used to acquire the calculation steps of the three-dimensional face vertex feature information: Step A1: Acquire all sub-surfaces of the three-dimensional model to be verified and establish a triangular face table; Step A2: According to the triangular face table, acquire all vertices and corresponding vertex coordinates of each sub-surface; Step A3: According to the distance between each vertex coordinate and the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sorting, and then obtain the point table according to the vertex sorting; Step A4: According to the distance between the starting point of each point table and the origin, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data; Step A5: Concatenate the first and last parts of the MD5 code of the sorted data to form a vertex-length string, and calculate the MD5 code of the vertex-length string;
[0044] The calculation steps for obtaining the centroid feature information are as follows: Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table; Step B2: According to the triangular face table, obtain all vertices and corresponding vertex coordinates of each sub-surface; Step B3: Add up all vertex coordinates of each sub-surface and then calculate the average to obtain the average vertex coordinates.
[0045] The material feature information acquisition subunit is used to acquire the calculation steps of the material feature information: Step C1: Traverse all materials on the 3D model; Step C2: Read all material information and obtain the parameters corresponding to all material information; Step C3: Keep the parameter values of all materials in thousands place, format them into strings, and then concatenate the beginning and end to form a long material string, and calculate the MD5 code of the long material string.
[0046] The judgment module includes a first analysis subunit and a second analysis subunit;
[0047] The first analysis subunit is used to perform a first match between the MD5 code of the vertex long string and the average value of the vertex coordinates and the MD5 code of the geometric feature information of the existing 3D model in the system's database; if the first match does not match, a second operation is performed; if the first match matches, the MD5 code of the material long string is matched with the MD5 code of the material feature information of the existing 3D model in the system's database.
[0048] The second analysis subunit is used to perform a second match between the MD5 code of the material long string and the MD5 code of the material feature information of the existing 3D model in the system's database; if the second match matches, the first operation is performed; if the second match does not match, the second operation is performed.
[0049] The second analysis subunit is used to match the MD5 code of the material long string with each 3D model in the system and analyze the matching results.
[0050] A three-dimensional model verification terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the steps of the three-dimensional model verification method described above.
[0051] A storage medium storing a computer program that, when executed by a processor, implements the three-dimensional model verification method as described above.
[0052] Compared with existing technologies, the above technical solution has the following beneficial effects:
[0053] (1) This verification method obtains the geometric and material feature information of the three-dimensional model, and quickly and effectively compares and identifies the three-dimensional model, thereby improving the efficiency of three-dimensional model comparison and identification. At the same time, it combines the matching results of the two types of information to verify each other, solving the problem that the existing technology cannot accurately achieve automatic matching, verification and data update of the three-dimensional model to be verified with each three-dimensional model in the database.
[0054] (2) The verification system of the present invention uses the geometric feature information and material feature information obtained from the three-dimensional model imported by the user to quickly analyze all three-dimensional models in the database, and feeds back the matching results obtained after the analysis to the user in real time, thereby realizing the storage and management of three-dimensional models. Attached Figure Description
[0055] Figure 1 This is a flowchart illustrating the three-dimensional model verification method of the present invention;
[0056] Figure 2This is a flowchart illustrating the calculation steps of the three-dimensional face vertex feature information in the three-dimensional model verification method of the present invention.
[0057] Figure 3 This is a flowchart illustrating the calculation steps of the centroid feature information in the three-dimensional model verification method of the present invention.
[0058] Figure 4 This is a flowchart illustrating the calculation steps of material feature information in the three-dimensional model verification method of the present invention.
[0059] Figure 5 This is a schematic diagram of the principle of the three-dimensional model verification system of the present invention;
[0060] Figure 6 This is a schematic diagram of the structure of the three-dimensional model verification terminal device of the present invention;
[0061] Figure 7 These are schematic diagrams of two embodiments of the three-dimensional model verification method of the present invention;
[0062] In the attached diagram: Model device 1, Model analysis server 2, Upload module 11, Sending module 12, Receiving module 21, Analysis module 22, Comparison module 23, Judgment module 24, Feedback module 25, Synchronization module 26, Geometric feature information acquisition subunit 231, Material feature information acquisition subunit 232, First analysis subunit 241, Second analysis subunit 242. Detailed Implementation
[0063] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0064] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0065] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, unless otherwise stated, "a plurality of" means two or more.
[0066] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0067] like Figure 1-4 As shown, a three-dimensional model verification method includes the following steps:
[0068] Step S1: Receive the user's detection command in real time and obtain the 3D model to be verified;
[0069] Step S2: Analyze the 3D model to be verified and obtain geometric and material feature information;
[0070] Step S3: Match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D model in the system's database one by one, and determine whether the two are consistent. If they are consistent, perform the first operation; if they are inconsistent, perform the second operation.
[0071] First operation: Output the matching results as the current 3D model that already exists in the database, and return feedback information indicating that the import system failed;
[0072] The second operation is to output the matching result as "the 3D model does not exist in the database", bind the geometric feature information and material feature information with the current 3D model, store them together in the database, and return a feedback message indicating successful import.
[0073] Existing technologies require an effective verification method for 3D models with materials. For example, when adding a 3D model to a library, it's necessary to first determine if the model already exists in the library. Early verification methods based on filenames are no longer effective. Similarly, using common file characteristics such as large file size or MD5 hashes is also ineffective, because opening the 3D model file, switching viewports, and then saving the file again... Figure 7 As shown, the two files have different file sizes and MD5 hashes, even though they contain the same 3D model. Besides verifying the geometric features of the 3D model, its material characteristics also need to be considered. For example, two sofas with the same geometric features, a red leather sofa and a yellow fabric sofa, can be stored in the database separately. Therefore, to solve the above problems, this application proposes a 3D model verification method.
[0074] This verification method quickly and effectively compares and identifies 3D models by acquiring their geometric and material feature information, thereby improving the efficiency of 3D model comparison and identification. At the same time, by combining the matching results of the two types of information, mutual verification is achieved, solving the problem that existing technologies cannot accurately achieve automatic matching, verification, and data updating of the 3D model to be verified with each 3D model in the data.
[0075] To further explain, in step S2, the geometric feature information includes three-dimensional face vertex feature information and centroid feature information. After obtaining the three-dimensional face vertex feature information through a predetermined algorithm, this invention also needs to calculate the centroid feature information because the three-dimensional face vertex feature information only yields the three-dimensional face composition information of the three-dimensional model, but not the positional information of the three-dimensional faces. Figure 6 The two 3D models shown have the same MD5 hash for their vertex feature information. Therefore, the geometric feature information includes the 3D face vertex feature information and the centroid feature information to obtain the MD5 hash for verifying the uniqueness of the 3D model's geometric features.
[0076] To further explain, in step S2, the calculation steps for obtaining the three-dimensional face vertex feature information include the following:
[0077] Step A1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table;
[0078] Step A2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face;
[0079] Step A3: Based on the distance of each vertex's coordinates from the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sorting. Then, obtain the point table based on the vertex sorting.
[0080] Step A4: Based on the distance between the starting point and the origin of each point table, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data.
[0081] Step A5: Concatenate the first and last characters of the MD5 hash of the sorted data to form a long vertex string, and calculate the MD5 hash of the long vertex string. It should be noted that the order of the triangle facets in the 3D model remains unchanged after translation, rotation, and scaling. Therefore, the vertex strings of the triangle facets can be sorted twice to establish a one-to-one correspondence between the triangle facets of each model. Then, by concatenating the triangle facet strings and calculating the MD5 hash of the concatenated long string, the number of uploads during the matching process is reduced, saving resources.
[0082] To further explain, in step S2, the calculation steps for obtaining the centroid feature information include the following:
[0083] Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table;
[0084] Step B2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face;
[0085] Step B3: Add up the coordinates of all vertices of each sub-surface and then average them to obtain the average value of the vertex coordinates.
[0086] To further explain, in step S2, the calculation steps for obtaining the material feature information include the following:
[0087] Step C1: Traverse all materials on the 3D model;
[0088] Step C2: Read all material information and obtain the parameters corresponding to all material information;
[0089] Step C3: All material parameter values are formatted into strings, retaining the thousands separator, and then concatenated to form a long material string. The MD5 hash of this long material string is then calculated. Specifically, in step S2, the MD5 hash of the obtained long material string is matched against each 3D model in the system. This invention retains all material parameter values in the thousands separator because a higher decimal place increases the sensitivity of 3D model recognition. Specifically, material information includes, but is not limited to, the following: Color: RGB values are commonly used; Surface finish: 0-1; Transparency: 0-1; Refraction: 0-1; Angle / Concavity: 0-1; Reflection: 0-1.
[0090] To further explain, step S3 specifically includes:
[0091] The MD5 hash of the vertex long string and the average value of the vertex coordinates are matched for the first time with the MD5 hash of the geometric feature information of the existing 3D model in the system's database.
[0092] If the first match does not match, then perform the second operation;
[0093] If the first match is successful, the MD5 hash of the material long string will be matched a second time with the MD5 hash of the material feature information of the existing 3D model in the system's database.
[0094] If the second match matches, then the first operation is executed;
[0095] If the second match does not match, then perform the second operation.
[0096] The 3D model verification process of this invention is as follows: First, the geometric feature information and material feature information of the acquired 3D model to be verified are calculated to obtain geometric feature information and material feature information respectively. Second, the MD5 code of the vertex long string and the average value of the vertex coordinates in the geometric feature information are matched with the MD5 code of the geometric feature information of the existing 3D models in the system's database for the first time to verify whether there are 3D models with the same vertex feature MD5 and centroid in the existing 3D models. If no match is found, the model is allowed to be imported into the database, and the geometric feature information and material feature information are bound to the current 3D model and stored together in the database, and a feedback message of successful import is returned. If a match is found, the MD5 code of the material long string is matched with the MD5 code of the material feature information of the existing 3D models in the system's database for the second time. If no match is found, the model is allowed to be imported into the database, and the geometric feature information and material feature information are bound to the current 3D model and stored together in the database, and a feedback message of successful import is returned. If a match is found, the matching result is output as the current 3D model already exists in the database, and a feedback message of import failure is returned, ending the verification process.
[0097] It should be noted that the MD5 hash of the geometric feature information of the existing 3D model is actually the average of the MD5 hash of the vertex long string and the vertex coordinates.
[0098] like Figure 5 As shown, a three-dimensional model verification system includes a model device 1 and a model analysis server 2, wherein the model device 1 and the model analysis server 2 are communicatively connected.
[0099] The model device 1 includes an upload module 11 and a send module 12;
[0100] The upload module 11 is used by users to upload 3D models to be verified;
[0101] The sending module 12 is used to send the 3D model to be verified to the model analysis server 2;
[0102] The model analysis server 2 includes a receiving module 21, an analysis module 22, a comparison module 23, a judgment module 24, a feedback module 25, and a synchronization module 26;
[0103] The receiving module 21 is used to receive the user's detection command in real time and obtain the three-dimensional model to be verified.
[0104] The analysis module 22 is used to analyze the three-dimensional model to be verified and obtain geometric feature information and material feature information;
[0105] The comparison module 23 is used to match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing three-dimensional models in the system's database one by one;
[0106] The judgment module 24 is used to determine whether the two are consistent. If they are consistent, the first operation is performed; if they are inconsistent, the second operation is performed.
[0107] The feedback module 25 is used to return feedback information indicating that the import into the system failed or that the import into the system was successful.
[0108] The synchronization module 26 is used to output the matching result as "the 3D model does not exist in the database", and to bind the geometric feature information and material feature information with the current 3D model and store them together in the database.
[0109] The verification system of this invention uses the geometric and material feature information obtained from the 3D model imported by the user to quickly analyze all 3D models in the database, and feeds back the matching results obtained after the analysis to the user in real time, thereby realizing the storage and management of 3D models.
[0110] It should be noted that the functional units in the various embodiments of the present invention can be integrated into one processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0111] To further explain, the comparison module 23 includes a geometric feature information acquisition subunit 231 and a material feature information acquisition subunit 232;
[0112] The geometric feature information acquisition subunit 231 is used to acquire the calculation steps of the three-dimensional face vertex feature information: Step A1: Acquire all sub-surfaces of the three-dimensional model to be verified and establish a triangular face table; Step A2: According to the triangular face table, acquire all vertices and corresponding vertex coordinates of each sub-surface; Step A3: According to the distance between each vertex coordinate and the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sorting, and then obtain the point table according to the vertex sorting; Step A4: According to the distance between the starting point of each point table and the origin, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data; Step A5: Concatenate the first and last parts of the MD5 code of the sorted data to form a vertex-length string, and calculate the MD5 code of the vertex-length string;
[0113] The calculation steps for obtaining the centroid feature information are as follows: Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table; Step B2: According to the triangular face table, obtain all vertices and corresponding vertex coordinates of each sub-surface; Step B3: Add up all vertex coordinates of each sub-surface and then calculate the average to obtain the average vertex coordinates.
[0114] The material feature information acquisition subunit is used to acquire the calculation steps of the material feature information: Step C1: Traverse all materials on the 3D model; Step C2: Read all material information and obtain the parameters corresponding to all material information; Step C3: Keep the parameter values of all materials in thousands place, format them into strings, and then concatenate the beginning and end to form a long material string, and calculate the MD5 code of the long material string.
[0115] The judgment module 24 includes a first analysis subunit 241 and a second analysis subunit 242;
[0116] The first analysis subunit 241 is used to perform a first match between the MD5 code of the vertex long string and the average value of the vertex coordinates and the MD5 code of the geometric feature information of the existing three-dimensional model in the system's database; if the first match does not match, a second operation is performed; if the first match matches, the MD5 code of the material long string is matched with the MD5 code of the material feature information of the existing three-dimensional model in the system's database for a second match.
[0117] The second analysis subunit 242 is used to perform a second match between the MD5 code of the material long string and the MD5 code of the material feature information of the existing three-dimensional model in the system's database; if the second match matches, the first operation is performed; if the second match does not match, the second operation is performed.
[0118] like Figure 6 As shown, a three-dimensional model verification terminal device includes a memory 3, a processor 4, and a computer program 5 stored in the memory 3 and executable on the processor 4. The processor 4 executes the computer program 5 to perform the steps of the three-dimensional model verification method described above.
[0119] A storage medium storing a computer program 5, which, when executed by a processor 4, implements the three-dimensional model verification method described above.
[0120] For the purposes of this specification, "computer storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting programs for use in or in conjunction with an instruction execution system, apparatus, or device. More specific examples of computer storage media (a non-exhaustive list) include: electrical connections (control methods) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, a computer storage medium can even be paper or other suitable media on which the programs are printed, since the programs can be obtained electronically, for example, by optical scanning of the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0121] The technical principles of the present invention have been described above with reference to specific embodiments. These descriptions are merely for explaining the principles of the invention and should not be construed as limiting the scope of protection of the invention in any way. Based on this explanation, those skilled in the art can readily conceive of other specific embodiments of the invention without inventive effort, and these equivalent variations or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A method for verifying a three-dimensional model, characterized in that, Includes the following steps: Step S1: Receive the user's detection command in real time and obtain the 3D model to be verified; Step S2: Analyze the 3D model to be verified and obtain geometric and material feature information; Step S3: Match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D model in the system's database one by one, and determine whether the two are consistent. If they are consistent, perform the first operation; if they are inconsistent, perform the second operation. First operation: Output the matching results as the current 3D model that already exists in the database, and return feedback information indicating that the import system failed; The second operation is to output the matching result as "the 3D model does not exist in the database", bind the geometric feature information and material feature information with the current 3D model, store them together in the database, and return a feedback message indicating successful import. In step S2, the geometric feature information includes three-dimensional face vertex feature information and centroid feature information; In step S2, the calculation steps for obtaining the three-dimensional face vertex feature information include the following: Step A1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table; Step A2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face; Step A3: Based on the distance of each vertex's coordinates from the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sort. Then, obtain the point table based on the vertex sort. Step A4: Based on the distance between the starting point and the origin of each point table, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data. Step A5: Concatenate the first and last characters of the MD5 hash of the sorted data to form a vertex-length string, and calculate the MD5 hash of the vertex-length string; In step S2, the calculation steps for obtaining the centroid feature information include the following: Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table; Step B2: Based on the triangular face table, obtain all vertices and their corresponding vertex coordinates for each sub-face; Step B3: Add up the coordinates of all vertices on each sub-surface and then average them to obtain the average value of the vertex coordinates; In step S2, the calculation steps for obtaining the material feature information include the following: Step C1: Traverse all materials on the 3D model; Step C2: Read all material information and obtain the parameters corresponding to all material information; Step C3: Keep the thousands separator of all material parameter values, format them into strings, and then concatenate the first and last parts to form a long material string. Calculate the MD5 code of the long material string. Step S3 specifically includes: The MD5 hash of the vertex long string and the average value of the vertex coordinates are matched for the first time with the MD5 hash of the geometric feature information of the existing 3D model in the system's database. If the first match does not match, then perform the second operation; If the first match is successful, the MD5 hash of the material long string will be matched a second time with the MD5 hash of the material feature information of the existing 3D model in the system's database. If the second match matches, then the first operation is executed; If the second match does not match, then perform the second operation.
2. A three-dimensional model verification system, characterized in that, It includes a model device and a model analysis server, wherein the model device and the model analysis server are communicatively connected; The model device includes an upload module and a send module; The upload module is used by users to upload 3D models to be verified; The sending module is used to send the 3D model to be verified to the model analysis server; The model analysis server includes a receiving module, an analysis module, a comparison module, a judgment module, a feedback module, and a synchronization module; The receiving module is used to receive the user's detection command in real time and obtain the 3D model to be verified. The analysis module is used to analyze the 3D model to be verified and obtain geometric feature information and material feature information; The comparison module is used to match the geometric feature information and material feature information with the geometric feature information and material feature information of the existing 3D models in the system's database one by one; The judgment module is used to determine whether the two are consistent. If they are consistent, the first operation is performed; if they are inconsistent, the second operation is performed. The feedback module is used to return feedback information indicating that the import into the system failed or that the import into the system was successful. The synchronization module is used to output the matching result as "the 3D model does not exist in the database", and then bind the geometric feature information and material feature information with the current 3D model and store them together in the database. The comparison module includes a geometric feature information acquisition subunit and a material feature information acquisition subunit; The geometric feature information acquisition subunit is used to acquire three-dimensional face vertex feature information and centroid feature information; The calculation steps for obtaining the vertex feature information of the three-dimensional surface are as follows: Step A1: Obtain all sub-surfaces of the three-dimensional model to be verified and establish a triangular face table; Step A2: According to the triangular face table, obtain all vertices and corresponding vertex coordinates of each sub-surface; Step A3: According to the distance between each vertex coordinate and the origin, determine the vertex closest to the origin, and use this point as the starting point to connect other vertices in a counterclockwise direction to obtain the vertex sorting, and then obtain a point table according to the vertex sorting; Step A4: According to the distance between the starting point of each point table and the origin, sort each sub-surface in ascending order to obtain sorted data, and then calculate the MD5 code of the sorted data; Step A5: Concatenate the first and last parts of the MD5 code of the sorted data to form a vertex-length string, and calculate the MD5 code of the vertex-length string; The calculation steps for obtaining the centroid feature information are as follows: Step B1: Obtain all sub-surfaces of the 3D model to be verified and establish a triangular face table; Step B2: According to the triangular face table, obtain all vertices and corresponding vertex coordinates of each sub-surface; Step B3: Add up all vertex coordinates of each sub-surface and then calculate the average to obtain the average vertex coordinates. The material feature information acquisition subunit is used to acquire the calculation steps of the material feature information: Step C1: Traverse all materials on the 3D model; Step C2: Read all material information and obtain the parameters corresponding to all material information; Step C3: Keep the parameter values of all materials in thousands place, format them into strings, and then concatenate the beginning and end to form a long material string, and calculate the MD5 code of the long material string. The judgment module includes a first analysis subunit and a second analysis subunit; The first analysis subunit is used to perform a first match between the MD5 code of the vertex long string and the average value of the vertex coordinates and the MD5 code of the geometric feature information of the existing 3D model in the system's database; if the first match does not match, a second operation is performed; if the first match matches, the MD5 code of the material long string is matched with the MD5 code of the material feature information of the existing 3D model in the system's database. The second analysis subunit is used to perform a second match between the MD5 code of the material long string and the MD5 code of the material feature information of the existing 3D model in the system's database; if the second match matches, the first operation is performed; if the second match does not match, the second operation is performed.
3. A three-dimensional model verification terminal device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the three-dimensional model verification method as described in claim 1.
4. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the three-dimensional model verification method as described in claim 1.
Citation Information
Patent Citations
A similarity detection method for a three-dimensional patch model file based on a model identification code
CN109165669A