A method and system for constructing a multi-layer annotation data package of a non-homogeneous light-transmitting mineral material
The method of constructing multi-layer annotation data packages by using structural hash locking and cross-modal consistency verification solves the consistency and reproducibility problems of heterogeneous transparent mineral material annotation datasets, and achieves the reliability and standardization of data packages.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNIV OF GEOSCIENCES (WUHAN)
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-12
Smart Images

Figure CN122196529A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary fields of geology and mineralogy, computer image processing and artificial intelligence, and more specifically, to a method and system for constructing multi-layer labeled data packages of heterogeneous transparent mineral materials. Background Technology
[0002] Heterogeneous, translucent minerals are key targets in geological research and resource exploration. Their optical properties, such as the "four bright and four dark" patterns and interference colors observed under crossed polarized light microscopy, are core identification criteria. However, traditional mineral identification heavily relies on manual observation by experts, a time-consuming, inefficient, and highly subjective process. With the development of artificial intelligence technology, automatic mineral identification based on deep learning has become possible, but it depends on large-scale, high-quality labeled datasets. In tasks such as jadeite material identification, texture / transparency assessment, and design of cracks / color enhancements and generative designs, training data often includes: multiple views such as the main reflection view, backlit transmission image, and side view; multiple mask annotations for contours, cracks, color enhancements, and transparency; and gemological semantic metadata such as "texture, color, clarity, and craftsmanship potential." Existing dataset construction typically suffers from the following problems:
[0003] Metadata structure drift (Schema Drift) and uncontrollable versioning: Field additions, deletions, hierarchical changes, and type changes can lead to parsing crashes or hidden errors; relying solely on manual conventions makes long-term stability difficult.
[0004] Inconsistent terminology / labels: The use of industry slang, synonyms, and aliases (such as "Floating Orchid / Floating Orchid / Floating (Floating) Flower") creates label noise, making training unreproducible.
[0005] Inconsistencies across files / modalities: incorrect metadata reference paths, missing files, mask size inconsistencies with the image, local mask out-of-bounds errors, logical conflicts between derived annotations and the original mask, etc.
[0006] Quality inspection is unexplainable: it only gives PASS / FAIL, without severity classification, error code, evidence chain and repair suggestions, resulting in high engineering iteration costs.
[0007] Therefore, how to avoid parsing anomalies or silent misreadings caused by structural drift, reduce semantic noise, automatically block unqualified data packets from entering the database, make data packet standardization converge with iteration, and reduce manual debugging and rework costs are urgent problems to be solved. Summary of the Invention
[0008] The purpose of this invention is to provide a method and system for constructing multi-layer labeled data packages of heterogeneous transparent mineral materials, which can avoid structural drift and reduce semantic noise.
[0009] This invention provides a method for constructing multi-layer labeled data packages for heterogeneous, transparent mineral materials, comprising the following steps: S1: Construct a sample directory structure and a unique audit layer identifier based on the target sample's unique identifier, collection batch, and shooting parameters; S2: Based on the sample directory structure and the unique identifier of the audit layer, collect and import the original target sample multi-view images to obtain a list of view files; S3: Perform image normalization on the original target sample multi-view image according to the calibration parameters to obtain a standardized view; S4: Mark the outline, color features, cracks and transparency of the standardized view to obtain a multi-layer mask; S5: Based on the backlight image of the original target sample multi-view image and the contour mask and slit mask of the multi-layer mask, derived annotations are performed to obtain the transmittance tensor and slit vector; S6: Perform statistical analysis and terminology alias normalization based on the file paths and current version numbers of the standardized view, multilayer mask, transmittance tensor, and crack vector to obtain a hierarchical meta-database; S7: Extract the structural signature from the hierarchical metadata database and the gold metadata template to obtain the hierarchical metadata structural signature sequence and the gold metadata structural signature sequence; S8: Based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence, perform structure hash locking to obtain the storage file or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint; S9: Collect the original target sample multi-view image, multi-layer mask, transmittance tensor and crack vector, and hierarchical metadata database into a unified data package. Perform quality gating verification on the unified data package according to the metadata structure fingerprint or missing and redundant paths to obtain the quality gating verification result. S10: If the quality gating verification result is confirmed to be passed, the unified data packet is entered into the database for archiving; if the quality gating verification result is confirmed to be failed, the unified data packet is blocked from entering the database for archiving and a quality control report is generated.
[0010] This invention also provides a system for constructing multi-layer annotation data packages for heterogeneous, transparent mineral materials, the system comprising the following modules: The acquisition module is configured to: construct a sample directory structure and an audit layer unique identifier based on the target sample's unique identifier, acquisition batch, and shooting parameters; The import module is configured to: collect and import the original target sample multi-view images according to the sample directory structure and the unique identifier of the audit layer, and obtain a list of view files; The image normalization module is configured to: normalize the original target sample multi-view image according to the calibration parameters to obtain a standardized view; The annotation module is configured to annotate the outline, color features, cracks, and transparency of the standardized view to obtain a multi-layer mask; The derived annotation module is configured to perform derived annotation based on the backlight image of the original target sample multi-view image and the contour mask and crack mask of the multi-layer mask to obtain the transmittance tensor and crack vector. The metadata construction module is configured to perform statistical analysis and term alias normalization based on the file paths and current version numbers of the standardized view, multilayer mask, transmittance tensor, and crack vector to obtain a hierarchical metadata database. The structural signature extraction module is configured to extract structural signatures from the hierarchical metadata database and the gold metadata template to obtain hierarchical metadata structural signature sequences and gold metadata structural signature sequences. The structure hash locking module is configured to: perform structure hash locking based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence to obtain the storage file or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint; The quality gating module is configured to: collect the original target sample multi-view image, multi-layer mask, transmittance tensor and crack vector, and hierarchical metadata database into a unified data packet; perform quality gating verification on the unified data packet according to the metadata structure fingerprint or missing and redundant paths; and obtain the quality gating verification result. The quality control judgment module is configured to: confirm that the quality gating verification result is passed, and then archive the unified data packet into the database; confirm that the quality gating verification result is failed, and then block the unified data packet from being archived into the database and generate a quality control report.
[0011] The method and system for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials provided by this invention have the following beneficial effects: This invention, when automatically processing multimodal training data of jadeite by a computer, performs algorithmic extraction and hash signing of metadata structure. Utilizing Structure Hash Lock, it enforces metadata structure and version consistency during the parsing phase, preventing schema drift and reducing parsing anomalies and silent misreads, ensuring structural reliability. It also automates and standardizes jadeite gemological semantic tags, including controlled vocabulary, alias / candidate normalization, and definition consistency checks to reduce tag noise and semantic noise, improving comparability and reproducibility, ensuring semantic reliability. Furthermore, it automatically calculates jadeite transparency and fracture structure from images / masks into tensors / vectors, and utilizes the optical complementarity of reflected and transmitted light to construct a cross-modal consistency check gating system, effectively intercepting logical errors such as mislabeling surface highlights as internal inclusions. Finally, it establishes consistency gating rules to ensure that derived annotations... It is usable, reproducible, and trainable, with reliable derived annotations. It performs cross-file, cross-modal, and cross-topological geometric consistency checks on images, masks, derived tensors / vectors, and metadata references, and outputs interpretable error codes and evidence, reducing logical error samples such as mask out-of-bounds, misdirected paths, and size mismatches. It automatically blocks unqualified data packets from entering the database / training, ensuring content reliability. It constructs a closed loop driven by quality collaborative gating for structural, semantic, and cross-modal consistency, provides gating reports, and improves the pass rate with iteration. The reasons for failure converge from multi-dimensional structural / semantic problems to a small number of format errors, achieving consistent, reproducible, and auditable output of data packets. It also ensures that data packet standardization converges with iteration, reducing manual debugging and rework costs. Attached Figure Description
[0012] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a flowchart of the method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials provided by the present invention; Figure 2 This is the overall system architecture provided by the present invention; Figure 3 This is a flowchart of the operation steps of the method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials provided by the present invention; Figure 4 This is a schematic diagram of the data packet directory structure provided by the present invention; Figure 5 This is a schematic diagram of the multi-layered metadata structure provided by the present invention; Figure 6 This is a flowchart of the structure hash algorithm provided by the present invention; Figure 7 This is a quality control gating flowchart provided by the present invention; Figure 8 This is a schematic diagram of the quality control report structure provided by the present invention; Figure 9This is a schematic diagram of mask topology verification provided by the present invention; Figure 10 This is a schematic diagram of tensor / vector generation and consistency verification provided by the present invention; Figure 11 This is a schematic diagram of the failure blocking and repair closed loop provided by the present invention. Detailed Implementation
[0013] To provide a clearer understanding of the technical features, objectives, and effects of the present invention, specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0014] Figure 1 A schematic diagram of the method for constructing multi-layer annotation data packages for heterogeneous transparent mineral materials according to this embodiment is shown. In this embodiment, the method for constructing multi-layer annotation data packages for heterogeneous transparent mineral materials includes the following steps: S1: Construct a sample directory structure and a unique audit layer identifier based on the target sample's unique identifier, collection batch, and shooting parameters.
[0015] S2: Based on the sample directory structure and the unique identifier of the audit layer, collect and import the original target sample multi-view images to obtain a list of view files.
[0016] In one exemplary embodiment, the original target sample multi-view image includes at least a reflected front view image and a backlit image of the target sample.
[0017] In one exemplary embodiment, the original target sample multi-view image further includes at least one side view and detail view of the target sample.
[0018] S3: Perform image normalization on the original target sample multi-view image according to the calibration parameters to obtain a standardized view.
[0019] In one exemplary embodiment, the calibration parameters include resolution and white balance.
[0020] S4: Annotate the outline, color features, cracks and transparency of the standardized view to obtain a multi-layer mask.
[0021] In one exemplary embodiment, the multilayer mask includes a contour mask, a color mask, a slit mask, and a transparency mask.
[0022] In the jadeite embodiment, the color features include the color-changing features, and the color feature mask is also called the color-changing mask.
[0023] S5: Based on the backlight image of the original target sample multi-view image and the contour mask and slit mask of the multi-layer mask, derived annotations are performed to obtain the transmittance tensor and slit vector.
[0024] In one exemplary embodiment, the process of generating the transmittance tensor includes: performing grayscale processing, background baseline estimation, and normalization processing based on the backlight image of the original target sample multi-view image and the contour mask of the multi-layer mask to obtain the transmittance tensor.
[0025] In one exemplary embodiment, the process of generating the transmittance tensor further includes thickness compensation.
[0026] In one exemplary embodiment, the process of generating the transmittance tensor further includes a tensor statistical consistency check.
[0027] In one exemplary embodiment, the process of generating the crack vector includes: skeletonizing the crack mask of the multilayer mask to obtain a skeleton set, extracting the graph structure to obtain a graph structure; simplifying the graph structure with polylines and calculating geometric features to obtain the crack vector.
[0028] In one exemplary embodiment, the generation process of the crack vector further includes a vector back-projection consistency check.
[0029] S6: Perform statistical analysis and terminology alias normalization based on the file paths and current version numbers of the standardized view, multilayer mask, transmittance tensor, and crack vector to obtain a hierarchical meta-database.
[0030] In one exemplary embodiment, the term alias normalization includes alias normalization, adaptive candidate normalization, and definition library consistency verification.
[0031] S7: Extract the structural signature from the hierarchical metadata database and the gold metadata template to obtain the hierarchical metadata structural signature sequence and the gold metadata structural signature sequence.
[0032] In one exemplary embodiment, the gold metadata template is a preset metadata structure template.
[0033] S8: Based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence, perform structure hash locking to obtain the storage file or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint.
[0034] In one exemplary embodiment, step S8 specifically includes: S8-1: Parse the metadata file corresponding to the hierarchical metadata database into a memory object, perform a depth traversal on the memory object to obtain a set of structure signatures; wherein, for list type nodes, only record the path and type information of the list type node, or record the list element type set, and do not recursively record the item-by-item path information of the list elements; S8-2: Sort the structure signature set according to the path dictionary order to obtain the sorted structure signature set; S8-3: Perform deterministic serialization on the sorted structure signature set to obtain a standardized string of the structure signature set; S8-4: Calculate the metadata structure fingerprint based on the standardized string of the structure signature set; calculate the gold template fingerprint based on the gold metadata structure signature sequence; In one exemplary embodiment, the calculation method for the metadata structure fingerprint is the SHA-256 algorithm or the SM3 algorithm; the calculation method type for the gold template fingerprint is the same as the calculation method type for the metadata structure fingerprint. S8-5: Determine that the metadata structure fingerprint and the gold template fingerprint are consistent, and generate storage files for the metadata structure fingerprint and the gold template fingerprint; determine that the metadata structure fingerprint and the gold template fingerprint are inconsistent, and output missing and redundant paths.
[0035] S9: Collect the original target sample multi-view image, multi-layer mask, transmittance tensor and crack vector, and hierarchical metadata database into a unified data packet. Perform quality gating verification on the unified data packet according to the metadata structure fingerprint or missing and redundant paths to obtain the quality gating verification result.
[0036] In one exemplary embodiment, the quality gating verification includes verifying the infrastructure layer, data integrity layer, semantic compliance layer, and physical logic layer of the unified data packet; wherein, the verification of the infrastructure layer includes metadata reading and root type verification, and structure hash locking verification; the verification of the data integrity layer includes required field and type verification, and file reference existence verification; the verification of the semantic compliance layer includes controlled vocabulary compliance and definition library consistency verification; and the verification of the physical logic layer includes mask topology and size consistency verification, derived data consistency verification, and cross-view physical consistency verification.
[0037] In one exemplary embodiment, the derived data consistency check includes performing a tensor statistical consistency check on the transmittance tensor and a vector back projection consistency check on the crack vector.
[0038] S10: If the quality gating verification result is confirmed to be passed, the unified data packet is entered into the database for archiving; if the quality gating verification result is confirmed to be failed, the unified data packet is blocked from entering the database for archiving and a quality control report is generated.
[0039] In one exemplary embodiment, the quality control report includes at least an error code, a data object path or file path corresponding to the error code, and error severity rating information.
[0040] In one exemplary embodiment, the quality control report fields include Gate_ID / Reason_Code / Evidence / Suggest_Fix.
[0041] In one exemplary embodiment, the method for constructing a multi-layer labeled data package for heterogeneous transparent mineral materials further includes: generating a repair work order based on the quality control report, repairing the unified data package based on the repair work order to obtain a repaired unified data package, and returning to step S8.
[0042] refer to Figure 2 This embodiment provides a system for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials. The system includes the following modules: an acquisition module configured to construct a sample directory structure and an audit layer unique identifier based on the unique identifier of the target sample, the acquisition batch, and the shooting parameters; an import module configured to acquire and import the original target sample multi-view images based on the sample directory structure and the audit layer unique identifier to obtain a list of view files; an image normalization module configured to normalize the original target sample multi-view images based on calibration parameters to obtain a standardized view; an annotation module configured to annotate the standardized view based on the contour, color features, cracks, and transparency to obtain a multi-layer mask; a derived annotation module configured to derive annotation based on the backlight image of the original target sample multi-view images and the contour mask and crack mask of the multi-layer mask to obtain a transmittance tensor and a crack vector; and a metadata construction module configured to construct metadata based on the file paths and current version numbers of the standardized view, multi-layer mask, transmittance tensor, and crack vector. The system employs a hierarchical metadata database, which is obtained through statistical analysis and terminology alias normalization. A structure signature extraction module is configured to extract structure signatures from the hierarchical metadata database and the gold metadata template, resulting in a hierarchical metadata structure signature sequence and a gold metadata structure signature sequence. A structure hash locking module is configured to perform structure hash locking based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence, obtaining the storage files or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint. A quality gating module is configured to aggregate the original target sample multi-view images, multi-layer masks, transmittance tensors, and crack vectors, along with the hierarchical metadata database, into a unified data package. The unified data package is then subjected to quality gating verification based on the metadata structure fingerprint or missing and redundant paths, yielding a quality gating verification result. A quality control judgment module is configured to: if the quality gating verification result is passed, archive the unified data package; if the quality gating verification result is failed, block the unified data package from being archived and generate a quality control report.
[0043] In one exemplary embodiment, the metadata construction module is further configured to: generate an extended field namespace identified by a predefined extended prefix ext in the hierarchical metadata database, and configure the extended field to not participate in the structure signature extraction and structure hash locking calculation.
[0044] In some embodiments, the above-described method for constructing multi-layer annotation data packages for heterogeneous transparent mineral materials can be implemented in the following ways.
[0045] refer to Figure 3 In this embodiment, the method for constructing a multi-layer annotation data package for heterogeneous transparent mineral materials includes the following: 1. Standardized data packet object It should be noted that the reference Figure 4 The requirements for the standardized data package (SamplePackage) are as follows: Each jade sample is named with a unique identifier material_id (e.g., J25_0005), and its standardized data package must contain at least: raw_clean / : standardized preprocessed multi-view images (at least including the main reflection and backlight; may include side / side2 / detail, etc.); masks / : mask annotations, at least including silhouette (main outline), optionally including bridge / crack / translucency; tensors / : derived annotation files, which may include translucency_map.npy (translucency tensor), crack_vectors.json (crack vectors), meta / meta.yml: hierarchical metadata (automatic layer + expert layer + audit layer), explicitly recording version numbers (schema / template / vocab / defs), and referencing the relative paths of the above files; this data package is a structured object that can be automatically parsed and gated by a computer. Structure locking and gating are performed at the file system / memory parsing level to ensure the reliability of data processing, rather than simply relying on human management conventions.
[0046] 2. Multi-layered metadata structure refer to Figure 5The metadata multi-layer structure (meta.yml) should at least include: schema_version, template_version, controlled_vocab_version, (optional) definitions_version; views: multi-view path references (relative paths); masks: mask path references; tensors: derived annotation path references; auto_layer_ref: automatic calculation layer (color statistics, transparency tensor statistics, crack statistics, etc.); expert_layer: expert semantic layer (seed quality, color, clarity, process potential, etc.); audit: audit layer (collection conditions, version tags, operator, run_id, etc.).
[0047] 3. Structure Hash Locking Algorithm refer to Figure 6 The Structure Hash Lock algorithm includes: (1) Structure signature extraction (flattening) Parse meta.yml into an in-memory object M (dict / list / scalar), perform a depth-first traversal, and output a set of structure signatures; where the path is... (e.g., expert_layer.gemology.color.color_category_7_zh); the structure type is The set of structural signatures is as follows: , Among them, the non-recursive recording strategy for list nodes is as follows: In order to avoid false alarms caused by "changes in list length", this invention preferably records only the list node itself (path, list) and does not recursively record list elements; or only records the set of its element types for list elements, thereby improving robustness to dynamic arrays while maintaining the ability to lock the structure.
[0048] (2) Structure hash calculation right S Sort by path lexicographical order P After deterministic serialization, SHA-256 is calculated: , , It should be noted that the structure hash in this embodiment differs from traditional file MD5 verification. MD5 typically targets the byte stream content of a file, and any change in any character within the file will alter the MD5 hash; however, this embodiment targets the topology of metadata (field path + structure type).
[0049] When a field value changes but the structure remains the same (e.g., the size changes from 10mm to 11mm), the structure hash remains unchanged; the structure hash only changes and triggers an alarm when a field is added / deleted or its type changes. Therefore, this invention achieves locking of the data structure, rather than locking of the data value.
[0050] (3) Comparison with the gold template and output of the difference path The pre-defined gold template, golden_meta.yml, has the following structure signature: Structure hash is Sign any metadata to be inspected. S : like If the output is structure_hash_mismatch(Fatal), then the output will be structure_hash_mismatch(Fatal). Output the set of missing and added paths:
[0051]
[0052] Structure hash locking is enforced during the resolution phase to prevent resolution errors or silent misreads caused by schema drift.
[0053] 4. Terminology standardization, including controlled vocabularies, definition libraries, and adaptive normalization; (1) Canonicalization Given a controlled vocabulary V Alias Mapping Table A For input terms x implement: Unification check Otherwise, vocab_mismatch will occur (Fatal is preferred for the training label field).
[0054] (2) Adaptive candidate normalization (optional enhancement) When the term is not A And not V In this embodiment, candidate normalization is selected to reduce manual maintenance costs. Define similarity:
[0055] in Edit the distance for Levenshtein.
[0056] Pick like If the value is 0.85, the output will be alias_suggested(Warning) or auto-normalized alias_rewrite(Info / Warning); otherwise, the output will be vocab_mismatch(Fatal).
[0057] (3) Definition library consistency check Perform the following for each definition in expert_layer.definitions_zh (term_zh / definition_zh / optional id): If the id does not exist, output: definition_invalid(Fatal); If the id exists but term_zh is inconsistent with the term in the library, the output will be: definition_term_mismatch(Fatal). If definition_zh is empty, the output will be: missing_or_empty (Fatal if the field is important, otherwise Warning).
[0058] 5. Quality control (QC Gate) to achieve automation, interpretability, and auditability; refer to Figure 7 This is a quality control gate flowchart; (1) Gating Severity Fatal: If the code is undeliverable / untrainable, then output Overall FAIL. Warning: If the document is deliverable but requires review / recording, output Overall PASS or PASS_WITH_WARNINGS. Info: Prompt / Auto-repair history; Overall judgment: If any Fatal condition exists, output FAIL; otherwise, PASS (record Warning).
[0059] (2) Mapping between Gate partitions (Gate_ID) and actual error codes (Reason_Code); G001: Metadata reading and root type verification (Fatal); missing_meta_yml; type_error (example: [type_error] meta.yml root expected dict); G002: Fatal (Structure Hash Lock); structure_hash_mismatch; structure_missing; structure_extra; G003: Required fields and type validation (Fatal / Warning); missing_field (If a critical field is missing, output Fatal); missing_or_empty (If a key field is empty, output Fatal; for comments, output Warning). type_error (If the key field has an incorrect type, output Fatal); G004: File reference existence (Fatal); missing_file (any reference path in views / masks / tensors does not exist); G005: Controlled vocabulary compliance (Fatal / Warning); vocab_mismatch (Fatal is preferred for training label fields); type_error; Optional: alias_rewrite, alias_suggested; G006: Definition library consistency (Fatal); definition_invalid; definition_term_mismatch; missing_or_empty; G007: Mask topology and size consistency (Fatal / Warning). The output can be a separate reason_code: mask_size_mismatch, mask_out_of_silhouette (or it can be incorporated into type_error and accompanied by evidence); G008 Derived Tensor / Vector Consistency (Fatal / Warning). tensor_stat_out_of_range; vector_mask_inconsistent; G009 Cross-view physical consistency (optional, negative case gating); consistency_error_03; (3) Quality (QC) report structure (CSV alignment + JSON extension); refer to Figure 8 This is a schematic diagram of the quality control report structure; The CSV fields must include at least: material_id, status, issues_count, issues, and meta_path; Recommended JSON extension: Gate_ID / Severity / Reason_Code (error code) / Path / Evidence / Suggest_Fix, and you can add: Report_Hash_SHA256, Signed_By, Signed_At_UTC; 6. Unique verification methods for jadeite (1) Mask topology geometry verification refer to Figure 9 This is a schematic diagram of mask topology verification; Let the main body contour mask be Any local mask is Calculate the coverage ratio:
[0060] like (e.g., 0.995), output mask_out_of_silhouette(Fatal / Warning).
[0061] If the mask size is inconsistent with the corresponding view image size, output mask_size_mismatch(Fatal).
[0062] (2) Derived annotation generation and consistency verification refer to Figure 10 This is a schematic diagram of tensor / vector generation and consistency verification; 1) Translucency tensor generation algorithm (automatic calculation of backlight map) Input: Backlight image Contour mask (Optional) Thickness d .
[0063] Grayscale conversion:
[0064] Background baseline estimation (outside the profile):
[0065] Transmittance calculation and truncation:
[0066] Thickness compensation:
[0067] Output: translucency_map.npy; Statistics: , ,
[0068] Write to auto_layer_ref.
[0069] 2) Crack vector generation algorithm Input: Crack mask .
[0070] Skeletonization yields a skeleton set. ; Construct a graph structure and fit / simplify it with a polyline, outputting a polyline; Output crack_vectors.json (including length, orientation angle, number of branches, etc.).
[0071] 3) Consistency check (G008) Tensor statistical consistency: If Out of range or inconsistent with records (tolerance) ), output tensor_stat_out_of_range.
[0072] Vector backprojection consistency: vector rasterization to A , and the crack mask B :
[0073] like The output is vector_mask_inconsistent.
[0074] 7. Negative Case Gating (G009: consistency_error_03) Scenario: The annotator mistakenly labels the surface highlights in the reflective front view as internal lint / bags. This error is prone to occur on a single reflectance map, but usually lacks a corresponding physical response in backlit transmittance maps and transmittance tensors.
[0075] Input: Reflection image Backlight image Candidate region mask M Transmission tensor T .
[0076] Calculate gradient energy: ,
[0077] If the following conditions are met: high, Low, and T If the mean change within the region is less than the threshold, it is determined to be a cross-modal logic conflict, and the output is: consistency_error_03 (Fatal / Warning). And recorded in Evidence , , .
[0078] Technical effect: By utilizing the complementary optical properties of jadeite's reflection and transmission, a cross-modal consistency gating system can be constructed, which can intercept logical errors that are common but difficult to detect in manual annotation, something that conventional single-modal quality inspection cannot achieve.
[0079] This example is a pass / pass scenario. Run: qc_gate_20260103_201657; Sample size: 26; Result: OK=26, FAIL=0; Explanation: This proves that the solution can run and is stable.
[0080] This example is a near-pass test. Run: qc_gate_20251227_220512; Samples: 25; Results: OK=23, FAIL=2; FAIL: [type_error]meta.yml root expected dict; Note: Gating can locate fatal structural errors.
[0081] This example is a comparison example of failed batches, such as: qc_gate_20251227_091625, qc_gate_20251227_115919, qc_gate_20260104_121737; Note: When the structure / vocabulary / definition does not converge, multiple types of errors occur concurrently. QC Gate can interpret the output and drive the repair convergence.
[0082] This example is a negative case where the annotator mistakenly labeled the surface highlights in the main reflection view as internal lint / bags. This error is prone to occur on a single reflection map, but it usually lacks a corresponding physical response in the backlit transmittance map and the transmittance tensor; triggering consistency_error_03 demonstrates the blocking effect of cross-modal gating.
[0083] refer to Figure 11 This is a diagram illustrating the closed loop of failure prevention and repair.
[0084] Without altering the core structural hash locking and quality gating framework, the method and system of this invention can be extended to other heterogeneous translucent mineral materials. The structural hash can be calculated using the SHA-256 algorithm; alternatively, SM3 or other collision-resistant cryptographic hash algorithms can be used as equivalent replacements without changing the structural fingerprint determination principle. Furthermore, to support the evolution and compatibility of the metadata structure, the metadata can also include an extended field namespace (e.g., the ext prefix) identified by a predefined extended prefix. These extended fields do not participate in the structural hash calculation, while the core fields remain subject to structural locking constraints, thus supporting subsequent expansions while maintaining structural consistency.
[0085] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for constructing a multi-layer labeled data package for heterogeneous, translucent mineral materials, characterized in that, Includes the following steps: S1: Construct a sample directory structure and a unique audit layer identifier based on the target sample's unique identifier, collection batch, and shooting parameters; S2: Based on the sample directory structure and the unique identifier of the audit layer, collect and import the original target sample multi-view images to obtain a list of view files; S3: Perform image normalization on the original target sample multi-view image according to the calibration parameters to obtain a standardized view; S4: Mark the outline, color features, cracks and transparency of the standardized view to obtain a multi-layer mask; S5: Based on the backlight image of the original target sample multi-view image and the contour mask and slit mask of the multi-layer mask, derived annotations are performed to obtain the transmittance tensor and slit vector; S6: Perform statistical analysis and terminology alias normalization based on the file paths and current version numbers of the standardized view, multilayer mask, transmittance tensor, and crack vector to obtain a hierarchical meta-database; S7: Extract the structural signature from the hierarchical metadata database and the gold metadata template to obtain the hierarchical metadata structural signature sequence and the gold metadata structural signature sequence; S8: Based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence, perform structure hash locking to obtain the storage file or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint; S9: Collect the original target sample multi-view image, multi-layer mask, transmittance tensor and crack vector, and hierarchical metadata database into a unified data package. Perform quality gating verification on the unified data package according to the metadata structure fingerprint or missing and redundant paths to obtain the quality gating verification result. S10: Confirm that the quality gating verification result is passed, and archive the unified data packet into the database; If the quality gating verification result is confirmed to be a failure, the unified data packet will be blocked from being archived and a quality control report will be generated.
2. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, The process of generating the transmittance tensor includes: performing grayscale processing, background baseline estimation, and normalization processing based on the backlight image of the original target sample multi-view image and the contour mask of the multi-layer mask to obtain the transmittance tensor.
3. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, The process of generating the crack vector includes: skeletonizing the crack mask of the multilayer mask to obtain a skeleton set, extracting the graph structure to obtain a graph structure; simplifying the graph structure with polylines and calculating geometric features to obtain the crack vector.
4. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, Step S8 specifically includes: S8-1: Parse the metadata file corresponding to the hierarchical metadata database into a memory object, perform a depth traversal on the memory object to obtain a set of structure signatures; wherein, for list type nodes, only record the path and type information of the list type node, or record the list element type set, and do not recursively record the item-by-item path information of the list elements; S8-2: Sort the structure signature set according to the path dictionary order to obtain the sorted structure signature set; S8-3: Perform deterministic serialization on the sorted structure signature set to obtain a standardized string of the structure signature set; S8-4: Calculate the metadata structure fingerprint based on the standardized string of the structure signature set; calculate the gold template fingerprint based on the gold metadata structure signature sequence; S8-5: Determine that the metadata structure fingerprint and the gold template fingerprint are consistent, and generate storage files for the metadata structure fingerprint and the gold template fingerprint; determine that the metadata structure fingerprint and the gold template fingerprint are inconsistent, and output missing and redundant paths.
5. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 4, characterized in that, The calculation method for the metadata structure fingerprint is either the SHA-256 algorithm or the SM3 algorithm; the calculation method for the gold template fingerprint is the same as the calculation method for the metadata structure fingerprint.
6. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, The quality gating verification includes verification of the infrastructure layer, data integrity layer, semantic compliance layer, and physical logic layer of the unified data packet. Specifically, the verification of the infrastructure layer includes metadata reading and root type verification, and structure hash locking verification. The verification of the data integrity layer includes required field and type verification, and file reference existence verification. The verification of the semantic compliance layer includes controlled vocabulary compliance and definition library consistency verification. The verification of the physical logic layer includes mask topology and size consistency verification, derived data consistency verification, and cross-view physical consistency verification.
7. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 6, characterized in that, The consistency check of the derived data includes performing a tensor statistical consistency check on the transmittance tensor and a vector back projection consistency check on the crack vector.
8. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, The quality control report includes at least the error code, the path to the data object or file corresponding to the error code, and error severity rating information.
9. The method for constructing multi-layer labeled data packages for heterogeneous transparent mineral materials according to claim 1, characterized in that, The method for constructing a multi-layer labeled data package for heterogeneous transparent mineral materials further includes: generating a repair work order based on the quality control report, repairing the unified data package based on the repair work order to obtain the repaired unified data package, and returning to step S8.
10. A system for constructing multi-layer labeled data packages for heterogeneous, translucent mineral materials, characterized in that, The system includes the following modules: The acquisition module is configured to: construct a sample directory structure and an audit layer unique identifier based on the target sample's unique identifier, acquisition batch, and shooting parameters; The import module is configured to: collect and import the original target sample multi-view images according to the sample directory structure and the unique identifier of the audit layer, and obtain a list of view files; The image normalization module is configured to: normalize the original target sample multi-view image according to the calibration parameters to obtain a standardized view; The annotation module is configured to annotate the outline, color features, cracks, and transparency of the standardized view to obtain a multi-layer mask; The derived annotation module is configured to perform derived annotation based on the backlight image of the original target sample multi-view image and the contour mask and crack mask of the multi-layer mask to obtain the transmittance tensor and crack vector. The metadata construction module is configured to perform statistical analysis and term alias normalization based on the file paths and current version numbers of the standardized view, multilayer mask, transmittance tensor, and crack vector to obtain a hierarchical metadata database. The structural signature extraction module is configured to extract structural signatures from the hierarchical metadata database and the gold metadata template to obtain hierarchical metadata structural signature sequences and gold metadata structural signature sequences. The structure hash locking module is configured to: perform structure hash locking based on the hierarchical metadata structure signature sequence and the gold metadata structure signature sequence to obtain the storage file or missing and redundant paths of the metadata structure fingerprint and the gold template fingerprint; The quality gating module is configured to: collect the original target sample multi-view image, multi-layer mask, transmittance tensor and crack vector, and hierarchical metadata database into a unified data packet; perform quality gating verification on the unified data packet according to the metadata structure fingerprint or missing and redundant paths; and obtain the quality gating verification result. The quality control judgment module is configured to: confirm that the quality gating verification result is passed, and then archive the unified data packet into the database; confirm that the quality gating verification result is failed, and then block the unified data packet from being archived into the database and generate a quality control report.