A three-dimensional model fingerprint generation method, system, terminal and storage medium

CN121600175BActive Publication Date: 2026-09-15FOSHAN SIYU TECH SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511778798.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-09-15
Estimated Expiration
2045-11-28

AI Technical Summary

Technical Problem

挑战1:计算效率问题:三维模型文件通常包含数十万至数百万个三角面,大型BIM模型文件可达2-5GB,传统的全文件哈希计算耗时过长(分钟级甚至小时级);

Benefits of technology

[0017] The beneficial effects of this invention are as follows: it distinguishes between structured and unstructured files, and for triangular mesh entities in structured files, it uses triangular face area sampling and adopts an alternating traversal mode of "sampling block-skip block". Sampling blocks are used to calculate features, and skip blocks are skipped directly, which greatly reduces the amount of computation while maintaining sensitivity to modifications, and improves performance by 69-83 times compared to existing methods. In addition, it adopts a two-level hash structure. The first level calculates the MD5 value of the accumulated sum of the faces for each sampling block. The second level calculates the overall MD5 value for the concatenation sequence of all block-level MD5 values. The two-level structure enhances the uniqueness and collision resistance of fingerprints.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600175B_ABST
    Figure CN121600175B_ABST
Patent Text Reader

Abstract

The present application relates to a three-dimensional model fingerprint generation method, system, terminal and storage medium, the method comprising: identifying a file type, for the file type containing structured entity information, parsing the file structure, and extracting triangle mesh entity data; for the file type not containing structured entity information, performing a block sampling strategy based on file size; for the triangle mesh entity data, counting the total number of triangular faces, and selecting an adaptive hierarchical sampling strategy according to the total number of triangular faces; using triangular face area sampling for the triangle mesh entity, adopting an alternating traversal mode of "sampling block-skip block", which improves performance by 69-83 times compared with the existing mode; in addition, a two-level hash structure is adopted, the first level: calculating the MD5 value of the area accumulation sum of each sampling block, the second level: calculating the overall MD5 value of the connection sequence of all block-level MD5 values, and the two-level structure enhances the uniqueness and anti-collision ability of the fingerprint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer graphics and 3D model data processing technology, and more specifically, to a method, system, terminal, and storage medium for generating 3D model fingerprints. Background Technology

[0002] With the rapid development of computer graphics and 3D modeling technology, 3D models have been widely used in Building Information Modeling (BIM), industrial design, game development, digital twins, and metaverse. 3D model files typically contain large amounts of geometric data, ranging in size from several MB to several GB. The following practical needs exist in the production, dissemination, and use of 3D models: 1. Copyright protection needs: The problem of illegal copying and plagiarism of original 3D models is becoming increasingly serious, and technical means are needed to identify the originality and ownership of the models.

[0003] 2. Asset management needs: Enterprises and platforms need to manage massive amounts of 3D model assets and need to quickly identify duplicate models and detect similar models.

[0004] 3. Data deduplication requirement: In cloud storage and collaborative design platforms, different versions of the same model occupy a large amount of storage space, requiring efficient deduplication technology.

[0005] 4. Traceability of requirements: In the supply chain and design process, it is necessary to trace the origin and modification history of the model.

[0006] To meet the above requirements, a unique "fingerprint" or "hash" needs to be generated for the 3D model, similar to the MD5 or SHA256 value of a file. However, 3D model fingerprinting technology faces the following specific challenges: Challenge 1: Computational efficiency: 3D model files typically contain hundreds of thousands to millions of triangular faces, and large BIM model files can reach 2-5GB. Traditional full-file hash calculation takes too long (minutes or even hours). Challenge 2: Transformation Invariance Requirement: The same model may undergo geometric transformations such as scaling, rotation, and mirroring. Traditional vertex coordinate-based methods are sensitive to these transformations, and fingerprints need to be invariant to reasonable geometric transformations. Challenge 3: The problem of identifying lightweight processing: During the propagation process, models often undergo lightweight processing such as face reduction and simplification. It is necessary to identify the same source model before and after lightweighting, but at the same time, it is also necessary to detect malicious modifications. Challenge 4: Processing efficiency of models of different sizes: The processing strategies for small models (thousands of faces) and large models (millions of faces) should be different, requiring an adaptive sampling strategy to balance efficiency and accuracy; Currently, 3D model fingerprint recognition technology mainly employs the following methods: 1: Vertex coordinate-based hashing method: Extract all vertex coordinates of the model, serialize the vertex coordinates into a byte stream, and calculate the MD5 or SHA256 hash value; The drawbacks of this scheme are: lack of transformation invariance (the fingerprint is completely different after model scaling, rotation, and mirroring); sensitivity to vertex order (re-exporting the model may change the vertex order); and high computational cost (it requires processing all vertex data). 2: Shape descriptor-based method technical solution: Using shape descriptors such as D2, 3D-SIFT, and Shape Context to extract geometric feature vectors from a model, and then performing hashing or similarity calculations on these feature vectors, has its drawbacks: The drawbacks of this scheme are: high computational complexity (the feature extraction algorithm is complex and not suitable for real-time processing); and low efficiency in processing large files (processing GB-level files takes a long time). Parameter tuning is difficult: different types of models require different parameters; 3: Topology-based approach: Analyze the topological graph structure of the model, extract topological features such as connectivity and edge-face relationships, and generate fingerprints based on these features; The shortcomings of this scheme are: sensitivity to mesh reconstruction (lightweight processing changes the topology); insufficient robustness (difficulty in handling non-manifold meshes); and complex implementation (complex topology analysis algorithm). 4. Full-file hashing method technical solution: Directly calculate MD5 / SHA256 on the entire file; The shortcomings of this solution are: inability to identify fingerprints from the same source: any slight modification will result in completely different fingerprints; inability to identify fingerprints after lightweight processing: it cannot be identified after face reduction and format conversion; and slow processing of large files: it requires reading the entire file content. Based on the above analysis, existing 3D model fingerprinting technologies suffer from the following common problems: 1. A trade-off between efficiency and accuracy: full-scale computation is accurate but slow, while sampling computation is fast but potentially inaccurate; 2. Transform sensitivity: most methods are sensitive to geometric transformations and lack invariance; 3. Poor scale adaptability: lacking adaptive strategies for models of different scales; 4. Insufficient practicality: complex algorithms, numerous parameters, and difficulty in engineering applications. Therefore, there is an urgent need for a computationally efficient, transformation-invariant, and adaptive 3D model fingerprinting generation method, system, terminal, and storage medium capable of handling models of different scales. Summary of the Invention The technical problem to be solved by the present invention is to provide a three-dimensional model fingerprint generation method, a three-dimensional model fingerprint generation system, a three-dimensional model fingerprint generation terminal, and a computer-readable storage medium, in order to address the above-mentioned deficiencies of the prior art.

[0007] The technical solution adopted by the present invention to solve its technical problem is: Construct a three-dimensional model fingerprint generation method, wherein the method comprises the following steps: Obtain a to-be-processed three-dimensional model file and identify the file type; for file types containing structured entity information, parse the file structure and extract triangular mesh entity data; for file types not containing structured entity information, implement a chunking sampling strategy based on file size; for triangular mesh entity data, count the total number of triangular faces, select an adaptive hierarchical sampling strategy according to the total number of triangular faces, and determine the sampling block size and jump block size; traverse the triangular face sequence in an alternating sampling block-jump block mode: calculate and accumulate the areas of all triangular faces in each sampling block to obtain the accumulated area sum of the sampling block, skip the jump block and directly process the next sampling block; calculate a first-level hash value for the accumulated area sum of each sampling block; connect the first-level hash values of all sampling blocks into a sequence in order, calculate a second-level hash value for the sequence, use the second-level hash value as the fingerprint identifier of the triangular mesh entity data; output the fingerprint identifier.

[0008] The three-dimensional model fingerprint generation method according to the present invention, wherein said adaptive hierarchical sampling strategy comprises: When P ≤ 5,000, the sampling block size S = P / A1, the jump block size J1= S × B1; when 5,000 < P ≤ 20,000, the sampling block size S = P / A2, the jump block size J1= S × B2; when 20,000 < P ≤ 100,000, the sampling block size S = P / A3, the jump block size J1= S × B3; when 100,000 < P ≤ 300,000, the sampling block size S = P / A4, the jump block size J1= S × B4; when 300,000 < P ≤ 1,000,000, the sampling block size S = P / A5, the jump block size J1= S × B5; when 1,000,000 <p ≤ 3,000,000时,采样块大小s="P" a6,跳跃块大小j1="S" × b6;当p>when 3,000,000, the sampling block size S = P / A7, and the jump block size J1 = S × B7; where A1 < A2 < A3 < A4 < A5 < A6 < A7, and B1 < B2 < B3 < B4 < B5 < B6 < B7, such that as the total number P of triangular faces increases, the sampling density decreases gradually, the jump ratio increases gradually, and the sampling rates of adjacent levels smoothly transit in a geometric progression.

[0009] In the three-dimensional model fingerprint generation method according to the present invention, A1 = 150, B1 = 1.5; A2 = 300, B2 = 3; A3 = 500, B3 = 5.25; A4 = 1000, B4 = 9; A5 = 2000, B5 = 15.7; A6 = 4000, B6 = 27.6; A7 = 8000, B7 = 49.

[0010] In the three-dimensional model fingerprint generation method according to the present invention, the area of a triangular face is calculated as follows: for a triangular face with vertex coordinates V1(x1, y1, z1), V2(x2, y2, z2), V3(x3, y3, z3), calculate the edge vector V 12 = V2 - V1 and V 13 = V3 - V1; calculate the cross product Cross = V 12 × V 13 ; calculate the area Area = |Cross| / 2.

[0011] In the three-dimensional model fingerprint generation method according to the present invention, the method further comprises: for file types containing structured entity information, parsing the file structure, extracting at least one of a file header entity, a metadata entity, a material entity, a texture map entity, a lighting entity and an animation entity, and calculating a hash value of the entity; wherein for texture map entities, a multi-level file block jumping sampling strategy is adopted: determining the level according to the size of each texture map file, determining corresponding sampling block size and jump block size, traversing the texture map file according to an alternating sampling block-jump block mode, calculating a hash value for each sampling block, connecting all block-level hash values to calculate the fingerprint of the texture map file; connecting the fingerprints of all texture map files and then calculating the overall hash value of the texture map entity; combining the fingerprint identifier of the triangular mesh entity with the hash values of each entity to calculate the overall fingerprint of the file.

[0012] The three-dimensional model fingerprint generation method of this invention, wherein determining the level based on the size of each texture file and determining the corresponding sampling block size and skip block size includes: when the texture file size ≤ 100KB, the sampling block size S_tex = 4KB, the skip block size J_tex = 4KB, and the sampling-skip ratio is 1:1; when 100KB < texture file size ≤ 500KB, the sampling block size S_tex = 16KB, the skip block size J_tex = 32KB, and the sampling-skip ratio is 1:2; when 500KB < texture file size ≤ 2MB, the sampling block size S_tex = 32KB, the skip block size J_tex = 96KB, and the sampling-skip ratio is 1:3; when 2MB < texture file size ≤ 8MB, the sampling block size S_tex = 64KB, the skip block size J_tex = 256KB, and the sampling-skip ratio is 1:4; when 8MB < texture file size ≤ 32MB, the sampling block size S_tex = 128KB, skip block size J_tex = 640KB, sample-skip ratio is 1:5; when the texture file size is >32MB, sample block size S_tex = 256KB, skip block size J_tex = 1536KB, sample-skip ratio is 1:6.

[0013] The three-dimensional model fingerprint generation method of the present invention includes the following: the block sampling strategy based on file size includes: determining the number of bytes in the sampling block B and the number of bytes in the skip block J2 according to the file size F; traversing the file content according to the alternating pattern of "sampling block-skip block"; calculating the hash value of the byte data of each sampling block; and concatenating the hash values ​​of all sampling blocks to calculate the overall hash value as the file fingerprint. The correspondence between file size F, sampling block bytes B, and skip block bytes J2 is as follows: when 1KB ≤ F < 1MB, B = 16KB, J2 = 16KB; when 1MB ≤ F < 5MB, B = 64KB, J2 = 256KB; when 5MB ≤ F < 10MB, B = 256KB, J2 = 1MB; when 10MB ≤ F < 500MB, B = 1MB, J2 = 4MB; when 500MB ≤ F < 2GB, B = 10MB, J2 = 40MB; when F ≥ 2GB, B = 80MB, J2 = 320MB.

[0014] A 3D model fingerprint generation system is provided to implement the 3D model fingerprint generation method described above. The system includes a file type identification module, an entity extraction module, an adaptive strategy selection module, a skip sampling module, a hash calculation module, and a fingerprint output module. The file type identification module is used to identify the format type of the 3D model file. The entity extraction module is used to parse the file structure and extract entities for file types containing structured entity information. The adaptive strategy selection module is used to execute a block sampling strategy based on file size for file types that do not contain structured entity information, and to execute a corresponding block sampling strategy for the extracted entities. Specifically, for triangular meshes... The entity data is processed as follows: The total number of triangular faces is counted, and an adaptive hierarchical sampling strategy is selected based on this count to determine the sampling block size and skip block size. The skip sampling module traverses the triangular face sequence in an alternating sampling block-skip block pattern: it calculates the area of ​​all triangular faces within each sampling block and sums them to obtain the cumulative sum of the faces of that sampling block, skipping skip blocks and directly processing the next sampling block. The hash calculation module calculates the first-level hash value based on the cumulative sum of the faces of each sampling block; the first-level hash values ​​of all sampling blocks are sequentially concatenated into a sequence, and a second-level hash value is calculated for this sequence, serving as the fingerprint identifier for the triangular mesh entity data. The fingerprint output module outputs the fingerprint identifier.

[0015] A three-dimensional model fingerprint generation terminal 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 implement the steps of the method described above.

[0016] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described above.

[0017] The beneficial effects of this invention are as follows: it distinguishes between structured and unstructured files, and for triangular mesh entities in structured files, it uses triangular face area sampling and adopts an alternating traversal mode of "sampling block-skip block". Sampling blocks are used to calculate features, and skip blocks are skipped directly, which greatly reduces the amount of computation while maintaining sensitivity to modifications, and improves performance by 69-83 times compared to existing methods. In addition, it adopts a two-level hash structure. The first level calculates the MD5 value of the accumulated sum of the faces for each sampling block. The second level calculates the overall MD5 value for the concatenation sequence of all block-level MD5 values. The two-level structure enhances the uniqueness and collision resistance of fingerprints. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort: Figure 1 This is a logical flowchart of a preferred embodiment of the three-dimensional model fingerprint generation method of the present invention; Figure 2 This is an overall flowchart of the three-dimensional model fingerprint generation method according to a preferred embodiment of the present invention; Figure 3 This is a schematic diagram of the adaptive hierarchical strategy of the three-dimensional model fingerprint generation method according to a preferred embodiment of the present invention; Figure 4 This is a flowchart of the skip sampling traversal of the three-dimensional model fingerprint generation method according to a preferred embodiment of the present invention; Figure 5 This is a geometric schematic diagram of the triangular face area calculation of the three-dimensional model fingerprint generation method according to a preferred embodiment of the present invention; Figure 6 This is a two-level hash structure diagram of the three-dimensional model fingerprint generation method of the preferred embodiment of the present invention; Figure 7 This is a flowchart of the entity separation process in the three-dimensional model fingerprint generation method of the present invention according to a preferred embodiment; Figure 8 This is a comparison diagram of the transformation invariance verification of the three-dimensional model fingerprint generation method of the preferred embodiment of the present invention; Figure 9 This is a comparison chart of the 3D model fingerprint calculation performance of the 3D model fingerprint generation method according to a preferred embodiment of the present invention; Figure 10 This is a histogram of the pure geometric model performance improvement of the three-dimensional model fingerprint generation method according to a preferred embodiment of the present invention (the three curves from top to bottom in the figure represent the traditional full calculation method, the existing sampling method and the method of the present invention, respectively). Figure 11 This is a histogram showing the performance improvement of a three-dimensional model fingerprint generation method with a large number of textures according to a preferred embodiment of the present invention. Figure 12 It is a combination Figure 10 and Figure 11 A schematic diagram; Figure 13 This is a schematic diagram of the principle of a three-dimensional model fingerprint generation system according to a preferred embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, a clear and complete description will be provided below in conjunction with the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.

[0020] The preferred embodiment of the three-dimensional model fingerprint generation method of the present invention, such as... Figure 1 As shown, see also Figures 2-12 This includes the following steps: S01: Obtain the 3D model file to be processed and identify the file type; S02: For file types containing structured entity information, parse the file structure and extract triangular mesh entity data; for file types not containing structured entity information, execute a block sampling strategy based on file size. S03: For triangular mesh entity data, count the total number of triangular faces, select an adaptive hierarchical sampling strategy based on the total number of triangular faces, and determine the sampling block size and skip block size; S04: Traverse the triangular face sequence according to the alternating sampling block-jump block pattern: calculate the area of ​​all triangular faces in each sampling block and accumulate them to obtain the cumulative sum of the faces of that sampling block, skip the jump block and directly process the next sampling block; S05: Calculate the first-level hash value by summing the facets of each sample block; S06: Concatenate the first-level hash values ​​of all sampling blocks into a sequence, calculate the second-level hash value of the sequence, and use it as the fingerprint identifier of the triangular mesh entity data; S07: Output fingerprint identifier; See Figure 2 The specific details of the plan are as follows: 1. File type identification: File types are identified based on file extension and file header, and are divided into two categories: Type A: Ordinary file types (OBJ, STL, etc.) and Type B: Structured file types (FBX, GLTF, etc.). For Type A, block sampling based on file size is performed (see step S2-A). For Type B, sampling based on triangular mesh entities is performed (see step S2-B). Step S2-A: Block sampling strategy for general files (for ordinary files without textures). Based on the file size F (in bytes), determine the sampling block size B and the skip block size J2:

[0021] Traverse the file: Read the B bytes of data starting at position 0, calculate the MD5 value: hash_1; skip J2 bytes; read the next B bytes of data, calculate the MD5 value: hash_2, repeat until the end of the file; final fingerprint = MD5(hash_1 + hash_2 + ... + hash_n); Note: The general file strategy is applicable to unstructured 3D model files such as OBJ and STL.

[0022] Step S2-A2: 6-level block skipping strategy for texture files (specifically for texture entities) (see...) Figure 3 ); A specialized 6-level block skipping strategy was designed to address the characteristics of texture files (PNG, JPG, DDS, TGA, etc.): Level 1: File size ≤ 100KB (small icons, UI elements); Sampling block size: S_tex = 4KB; Skip block size: J_tex = 4KB; Sampling-skip ratio: 1:1; Sampling rate: 50%; Typical resolution: 128×128, 256×256; Application scenarios: UI icons, small decorative textures; Level 2: 100KB < File size ≤ 500KB (low-resolution textures); Sampling block size: S_tex = 16KB; Skip block size: J_tex = 32KB; Sampling-skip ratio: 1:2; Sampling rate: 33%; Typical resolution: 512×512; Application scenarios: common small textures, basic material textures; Level 3: 500KB < File size ≤ 2MB (medium resolution texture); Sampling block size: S_tex = 32KB; Skip block size: J_tex = 96KB; Sampling-skip ratio: 1:3; Sampling rate: 25%; Typical resolution: 1024×1024; Application scenarios: mainstream texture sizes, wall textures; Level 4: 2MB < File size ≤ 8MB (high-resolution textures); Sampling block size: S_tex = 64KB; Skip block size: J_tex = 256KB; Sampling-skip ratio: 1:4; Sampling rate: 20%; Typical resolution: 2048×2048; Application scenarios: high-definition textures, normal maps; Level 5: 8MB < File size ≤ 32MB (Ultra-high resolution texture); Sampling block size: S_tex = 128KB; Skip block size: J_tex = 640KB; Sampling-skip ratio: 1:5; Sampling rate: 16.7%; Typical resolution: 4096×4096; Application scenarios: 4K textures, HDR environment textures; Level 6: File size > 32MB (Very large texture); Sampling block size: S_tex = 256KB; Skip block size: J_tex = 1536KB (1.5MB) Sampling-skip ratio: 1:6; Sampling rate: 14.3%; Typical resolution: 8192×8192 or uncompressed format; Application scenarios: ultra-large panoramic textures, uncompressed raw textures; Processing flow: 1. Obtain the texture file size `size_tex`; 2. Determine the level (1-6) based on `size_tex`; 3. Determine the sampling block size `S_tex` and skip block size `J_tex`; 4. Traverse the file according to the "sampling block-skip block" pattern; 5. Calculate the MD5 value of each sampling block; 6. Concatenate all block-level MD5s and calculate the overall MD5 value of the texture; 7. Store in `texture_hash_list`; The final texture entity fingerprint = MD5(texture_hash_list[0] + ... + texture_hash_list[n]); Design principles: Progressive decrease: The sampling block size increases from 4KB to 256KB, and the jump ratio increases from 1:1 to 1:6; Block size doubling: The sampling block size doubles at each level, facilitating memory alignment and cache optimization; Linear increase in jump ratio: The jump ratio is equal to the number of levels, achieving a balanced performance improvement; Coverage of mainstream sizes: From 128×128 to 8192×8192, covering 99% of texture application scenarios; Unlike triangular meshes: the texture files are already compressed data with a relatively higher sampling rate (14%-50%), ensuring fingerprint uniqueness. Unlike general files: optimized for the characteristics of texture files, with finer hierarchical structure and better performance. Step S2-B: Entity separation of structured documents (see...) Figure 7 ); For FBX files: parse the file structure and identify each entity type; extract and process the following entities separately: file header entity → MD5 of full data (small data volume, calculated directly); metadata entity → MD5 of full data (small data volume, calculated directly); triangular mesh entity → perform steps S3-S7 (core processing, area sampling); material entity → MD5 of full data (small data volume, calculated directly); texture entity → jump sampling MD5 (large data volume, adopt file block sampling strategy); light entity → MD5 of full data (small data volume, calculated directly); animation entity → MD5 of full data (medium data volume, can be calculated directly); combine the MD5 values of all entities to form the overall fingerprint of the file; special processing for texture entities: since texture files (such as PNG, JPG, DDS, etc.) can be large (a single texture can reach tens of MB), a special step S2-A2 is adopted for them: 6-level block jumping strategy for texture files: Determine the level (level 1 to 6) according to the size of each texture file; Perform jump sampling according to the sampling block and jump block size of the corresponding level, and calculate an independent fingerprint for each texture file; After connecting all texture fingerprints, calculate the overall fingerprint of the texture entity, and finally combine it with fingerprints of other entities to form a complete file fingerprint; Step S3: adaptive grading strategy for triangular meshes (see Figure 3 , where J1 is shown as J in the figure); For a triangular mesh entity, count the total number of triangular faces P, and determine the sampling block size S and jump block size J1 according to P: Level 1: P ≤ 5,000 (ultra-small model); sampling block size: S = P / 150; jump block size: J1= (P / 150) × 1.5; sampling-jump ratio: 1:1.5; sampling coverage: about 40%; typical block size: about 33 triangular faces; Level 2: 5,000 < P ≤ 20,000 (small model); sampling block size: S = P / 300; jump block size: J1= (P / 300) × 3; sampling-jump ratio: 1:3; sampling coverage: about 25%; typical block size: about 67 triangular faces; Level 3: 20,000 < P ≤ 100,000 (small and medium model); sampling block size: S = P / 500; jump block size: J1= (P / 500) × 5.25; sampling-jump ratio: 1:5.25; sampling coverage: about 16%; typical block size: about 200 triangular faces; Level 4: 100,000 < P ≤ 300,000 (medium-sized model); sampling block size: S = P / 1000; jump block size: J1= (P / 1000) × 9 sampling-jump ratio: 1:9; sampling coverage: about 10%; typical block size: about 300 triangular faces; Level 5: 300,000 < P ≤ 1,000,000 (large-sized model); sampling block size: S = P / 2000; jump block size: J1= (P / 2000) × 15.7 sampling-jump ratio: 1:15.7; sampling coverage: about 6%; typical block size: about 500 triangular faces; Level 6: 1,000,000 <p ≤ 3,000,000(超大型模型);采样块大小:s="P" 4000;跳跃块大小:j1="(P" 4000) × 27.6采样-跳跃比例:1:27.6;采样覆盖率:约3.5%;典型块大小:约750个三角面; 级别7:p>3,000,000 (Giant Model); Sampling Block Size: S = P / 8000; Skip Block Size: J1 = (P / 8000) × 49; Sampling-Skipping Ratio: 1:49; Sampling Coverage: Approximately 2%; Typical Block Size: Approximately 1000 triangles; Design principles: Geometric decrease: The sampling rate decreases smoothly in a geometric progression from 40% to 25% to 16% to 10% to 6% to 3.5% to 2%. Block size increases gradually: the number of sampling blocks increases from 33 to 1000, which facilitates memory management and parallel computing. Jump ratio increases gradually: the jump multiple increases from 1.5 times to 49 times, ensuring that the computation time of large models does not increase linearly with the number of faces. Full range coverage: from thousands of faces to tens of millions of faces, 7 levels are fully covered to adapt to various scales. Smooth transition: The difference in sampling rate between adjacent levels is controlled within a reasonable range (approximately 0.625 times) to avoid sudden performance changes. Step S4: Skip sampling traversal; Traverse the triangular face sequence according to the alternating pattern of "sampling block - skip block": initialization: Current position current_pos = 0; Block count block_count = 0; Loop condition: current_pos <P; Processing sampling blocks: Sampling block start position = current_pos; Sampling block end position = current_pos + S; For all triangular faces within the sampling block: Calculate the area of ​​a single triangular face → area_i; accumulate it to the total area of ​​the sampling block → area_sum += area_i; Calculate the sample block hash: hash_block[block_count] = MD5(area_sum); Update location: current_pos = current_pos + S block_count++; Skip the jump block: current_pos = current_pos + J1; End the loop; Step S5: Calculate the area of ​​the triangular face (see...) Figure 5 ); For the triangle Triangle(V1, V2, V3), the vertex coordinates are: V1(x1, y1, z1) V2(x2, y2, z2) V3(x3, y3, z3); The area is calculated using the vector cross product method (preferred method): Step 5.1: Calculate the edge vectors V12 = V2 - V1 = (x2-x1, y2-y1, z2-z1) V13 = V3 - V1 = (x3-x1, y3-y1,z3-z1); Step 5.2: Calculate the cross product Cross = V12 × V13; Cross.x = V12.y × V13.z - V12.z × V13.y Cross.y = V12.z × V13.x -V12.x × V13.z Cross.z = V12.x × V13.y - V12.y × V13.x; Step 5.3: Calculate the area: Area = |Cross| / 2; Area = √(Cross.x² + Cross.y² + Cross.z²) / 2; Key features (see) Figure 8 ): The area of ​​a triangle is a scalar value and does not depend on the coordinate system. For rotational transformations: the area remains unchanged; For mirror transformation: the area remains unchanged; For scaling transformations: the area is scaled proportionally (this can be achieved through normalization). For minor vertex movements: the area of ​​all triangles associated with that vertex is affected. Step S6: Block-level hash calculation (see...) Figure 6 ) Calculate the MD5 hash value by summing the facets of each sample block: for i = 0 to block_count-1: area_sum_i = the sum of the areas of sampled block i; Convert area_sum_i to a byte sequence: bytes_i = DoubleToBytes(area_sum_i); Calculate the MD5 hash: hash_block[i] = MD5(bytes_i); Example of generated results: hash_block[0]="a1b2c3d4e5f6..." hash_block[1]= "f7e8d9c0b1a2..." ... hash_block[n] = "9x8y7z6w5v4u..."; Step S7: Overall hash calculation; Concatenate all block-level hash values ​​in order to calculate the final fingerprint: Step 7.1: Join all block-level hashes; all_hashes = hash_block[0] + hash_block[1]+ ... + hash_block[n] Step 7.2: Calculate the final fingerprint; fingerprint = MD5(all_hashes); Step 7.3: Output fingerprint; Returns a 32-character hexadecimal string; For example: "3f4e5d6c7b8a9f0e1d2c3b4a5968778"; Step S8: Fingerprint combination (for FBX files). If it is a structured file, combine the fingerprints of all entities: final_fingerprint = MD5(file header MD5 + metadata MD5 + triangular mesh fingerprint + material MD5 + texture MD5 + lighting MD5 + animation MD5); The beneficial effects are explained as follows: Compared with the prior art, the present invention has the following significant technical effects: Effect 1: Significantly improved computational efficiency (see...) Figures 10-12 ); Test Group A: Pure geometric model (without textures or with only a few small textures)

[0023] Average performance improvement: approximately 69-83 times (after optimization of level 7 strategy); Test Group B: Contains a large number of texture models (BIM, game assets, etc.)

[0024] Average performance improvement: approximately 50-58 times (after level 7 strategy optimization) Comparative analysis:

[0025] Key conclusions: Advantages of Level 7 strategy: Compared to Level 5 strategy, it provides finer sampling rate control, resulting in an overall performance improvement of 5-8%; Pure geometric model: The most significant performance improvement (69-83 times), highlighting the efficiency of the triangular face area sampling of this invention. Model with a large number of textures: Although texture processing takes up extra time, a 50-58 times improvement can still be achieved through texture skip sampling. Smooth transition: The geometric progression design of the 7-level strategy ensures that models of different sizes can achieve optimal performance. The value of texture skip sampling: The processing time for a single large texture (5MB) was reduced from about 300ms to about 12ms, an improvement of about 25 times; Effect 2: Transform invariance; Scaling transformation: Enlarge / shrink the model by any factor while maintaining the same fingerprint. Rotation transformation: Rotate the model around any axis and at any angle while maintaining the same fingerprint. Mirror transformation: Mirror the model while maintaining the same fingerprint. Combined transformation: Combine scaling, rotation, and mirroring while maintaining the same fingerprint. Effect 3: Modify sensitivity; Moving a single vertex by 0.1% affects the area of ​​3-6 adjacent triangle faces; This change can be detected with a probability of approximately 3%-50% through skip sampling (depending on model size). Multiple vertex modifications: Detection probability is further improved; Deletion of 1% of triangles: Differences are detected with a high probability. Effect 4: Adaptive performance optimization;

[0026] Effect 5: Broad application compatibility; Supports triangular mesh models (OBJ, STL, PLY, etc.); Supports structured model files (FBX, GLTF, COLLADA, etc.) and triangular face models converted from CAD. It can be expanded to support other 3D file formats; Effect 6: Engineering practicality; The algorithm is simple and easy to implement, requiring no complex parameter tuning. Small memory footprint (block-by-block processing) supports parallel computing acceleration; A 3D model fingerprint generation system is provided to implement the 3D model fingerprint generation method described above. Figure 13 As shown, the system includes a file type identification module 100, an entity extraction module 101, an adaptive strategy selection module 102, a skip sampling module 103, a hash calculation module 104, and a fingerprint output module 105. File type recognition module 100 is used to identify the format type of 3D model files; The entity extraction module 101 is used to parse the file structure and extract entities from file types containing structured entity information; The adaptive strategy selection module 102 is used to execute a block sampling strategy based on file size for file types that do not contain structured entity information, and to execute a corresponding block sampling strategy for the extracted entities; wherein, for triangular mesh entity data, the total number of triangular faces is counted, and an adaptive hierarchical sampling strategy is selected based on the total number of triangular faces to determine the sampling block size and skip block size. The skip sampling module 103 is used to traverse the triangular face sequence according to the alternating sampling block-skip block pattern: calculate the area of ​​all triangular faces in each sampling block and accumulate them to obtain the cumulative sum of the faces of the sampling block, skip the skip block and directly process the next sampling block; The hash calculation module 104 is used to calculate the first-level hash value by summing the face values ​​of each sampling block; to connect the first-level hash values ​​of all sampling blocks in sequence, to calculate the second-level hash value of the sequence, and to use it as the fingerprint identifier of the triangular mesh entity data; Fingerprint output module 105 is used to output fingerprint identification; This method distinguishes between structured and unstructured files, and uses triangular face area sampling for triangular mesh entities in structured files. It employs an alternating "sampling block-skip block" traversal mode, where sampling blocks are used to calculate features and skip blocks are skipped directly. This significantly reduces computational load while maintaining sensitivity to modifications, and improves performance by 69-83 times compared to existing methods. In addition, a two-level hash structure is adopted: the first level calculates the MD5 value of the accumulated sum of faces for each sampling block, and the second level calculates the overall MD5 value for the concatenation sequence of all block-level MD5 values. The two-level structure enhances the uniqueness and collision resistance of fingerprints.

[0027] A three-dimensional model fingerprint generation terminal 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 implement the steps of the method described above.

[0028] A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described above.

[0029] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. A method for generating fingerprints from a three-dimensional model, characterized in that, The method comprises the following steps: Acquiring a to-be-processed three-dimensional model file and identifying a file type; For the file type containing structured entity information, parsing the file structure and extracting triangular mesh entity data; for the file type not containing structured entity information, executing a block-based sampling strategy based on file size; For the triangular mesh entity data, counting the total number of triangular faces, selecting an adaptive hierarchical sampling strategy according to the total number of triangular faces, and determining a sampling block size and a skip block size; Traversing a triangular face sequence according to an alternating mode of sampling blocks and skip blocks: for all triangular faces in each sampling block, calculating areas and accumulating the areas to obtain an area accumulated sum of the sampling block, skipping the skip block and directly processing a next sampling block; Calculating a first-level hash value according to the area accumulated sum of each sampling block; Connecting the first-level hash values of all sampling blocks into a sequence in order, calculating a second-level hash value for the sequence, and using the second-level hash value as a fingerprint identifier of the triangular mesh entity data; Outputting the fingerprint identifier; The block-based sampling strategy based on file size comprises: Determining the number of bytes B of a sampling block and the number of bytes J2 of a skip block according to a file size F; Traversing file content according to an alternating mode of "sampling block - skip block"; calculating a hash value for byte data of each sampling block; Connecting the hash values of all sampling blocks and then calculating an overall hash value as a file fingerprint.

2. The three-dimensional model fingerprint generation method according to claim 1, characterized in that, The adaptive hierarchical sampling strategy comprises: when P ≤ 5,000, a sampling block size S = P / A1, a skip block size J1= S × B1; when 5,000<P ≤ 20,000, a sampling block size S = P / A2, a skip block size J1= S × B2; when 20,000<P ≤ 100,000, a sampling block size S = P / A3, a skip block size J1= S × B3; when 100,000<P ≤ 300,000, a sampling block size S = P / A4, a skip block size J1= S × B4; when 300,000<P ≤ 1,000,000, a sampling block size S = P / A5, a skip block size J1= S × B5; when 1,000,000<P ≤ 3,000,000, a sampling block size S = P / A6, a skip block size J1= S × B6; when P>3,000,000, a sampling block size S = P / A7, a skip block size J1= S × B7; wherein A1<A2<A3<A4<A5<A6<A7, and B1<B2<B3<B4<B5<B6<B7, such that as the total number of triangular faces P increases, the sampling density decreases progressively, the skip ratio increases progressively, and the sampling rates of adjacent levels transit smoothly in a geometric progression; A1= 150, B1= 1.5; A2= 300, B2= 3; A3= 500, B3= 5.25; A4= 1000, B4= 9; A5=2000, B5= 15.7; A6= 4000, B6= 27.6; A7= 8000, B7= 49.

3. The three-dimensional model fingerprint generation method according to claim 1, characterized in that, The area of ​​a triangular face is calculated using: For a triangle with vertices V1(x1, y1, z1), V2(x2, y2, z2), and V3(x3, y3, z3), calculate the edge vector V. 12 = V2 - V1 and V 13 = V3 - V1; Calculate the cross product Cross = V 12 × V 13 ; Calculate the area: Area = |Cross| / 2.

4. The three-dimensional model fingerprint generation method according to claim 1, characterized in that, The method further includes: For file types containing structured entity information, parse the file structure, extract at least one of the following: file header entity, metadata entity, material entity, texture entity, lighting entity, and animation entity, and calculate the hash value of the entity. For texture entities, a multi-level file block skip sampling strategy is adopted: The level is determined based on the size of each texture file, the corresponding sampling block size and skip block size are determined, the texture file is traversed in the alternating pattern of sampling block-skip block, the hash value of each sampling block is calculated, and the fingerprint of the texture file is calculated by concatenating all block-level hash values. Calculate the overall hash value of the texture entity by concatenating the fingerprints of all texture files; The fingerprint of the file is calculated by combining the fingerprint identifier of the triangular mesh entity with the hash value of each entity.

5. The three-dimensional model fingerprint generation method according to claim 4, characterized in that, The step of determining the level based on the size of each texture file and determining the corresponding sampling block size and skip block size includes: When the texture file size is ≤ 100KB, the sampling block size S_tex = 4KB, the skip block size J_tex = 4KB, and the sampling-skip ratio is 1:1; When 100KB < texture file size ≤ 500KB, the sampling block size S_tex = 16KB, the skip block size J_tex = 32KB, and the sampling-skip ratio is 1:2; When 500KB < texture file size ≤ 2MB, the sampling block size S_tex = 32KB, the skip block size J_tex = 96KB, and the sampling-skip ratio is 1:3; When 2MB < texture file size ≤ 8MB, the sampling block size S_tex = 64KB, the skip block size J_tex = 256KB, and the sampling-skip ratio is 1:4; When 8MB < texture file size ≤ 32MB, the sampling block size S_tex = 128KB, the skip block size J_tex = 640KB, and the sampling-skip ratio is 1:5; When the texture file size is >32MB, the sampling block size S_tex = 256KB, the skip block size J_tex = 1536KB, and the sampling-skip ratio is 1:

6.

6. The three-dimensional model fingerprint generation method according to claim 4, characterized in that, The correspondence between file size F, number of bytes in sampling blocks B, and number of bytes in skip blocks J2 is as follows: When 1KB ≤ F < 1MB, B = 16KB, J2 = 16KB; When 1MB ≤ F < 5MB, B = 64KB, J2 = 256KB; When 5MB ≤ F < 10MB, B = 256KB, J2 = 1MB; When 10MB ≤ F < 500MB, B = 1MB, J2 = 4MB; When 500MB ≤ F < 2GB, B = 10MB, J2 = 40MB; When F ≥ 2GB, B = 80MB, J2 = 320MB.

7. A three-dimensional model fingerprint generation system, used to implement the three-dimensional model fingerprint generation method as described in any one of claims 1-6, characterized in that, The system includes a file type identification module, an entity extraction module, an adaptive strategy selection module, a skip sampling module, a hash calculation module, and a fingerprint output module; The file type recognition module is used to identify the format type of the 3D model file; The entity extraction module is used to parse the file structure and extract entities from file types containing structured entity information; The adaptive strategy selection module is used to execute a file-size-based block sampling strategy for file types that do not contain structured entity information, and to execute a corresponding block sampling strategy for extracted entities; wherein, for triangular mesh entity data, the total number of triangular faces is counted, and an adaptive hierarchical sampling strategy is selected based on the total number of triangular faces to determine the sampling block size and skip block size. The skip sampling module is used to traverse the triangular face sequence in an alternating sampling block-skip block pattern: calculate the area of ​​all triangular faces in each sampling block and sum them up to obtain the total area of ​​the sampling block, skip the skip block and directly process the next sampling block; The hash calculation module is used to calculate the first-level hash value by summing the face values ​​of each sampling block; to connect the first-level hash values ​​of all sampling blocks in sequence, to calculate the second-level hash value of the sequence, and to use it as the fingerprint identifier of the triangular mesh entity data; The fingerprint output module is used to output fingerprint identifiers.

8. A three-dimensional model fingerprint generation terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Digital fingerprint generation and similarity comparison method based on fuzzy hash algorithm

    CN118013577A

  • Three-dimensional model block chain copyright infringement identification method, system and program product

    CN120823589A