A method and system for managing rock and mineral analysis testing

By combining dynamic adaptive multimodal fusion with deep collaboration with geological knowledge graphs, a virtual test dataset covering the entire scenario is generated, and an adaptive mineral phase recognition model is constructed. This solves the problem of insufficient recognition accuracy in complex geological scenarios in existing technologies, and realizes high-precision automation and intelligence in rock and mineral analysis.

CN121706622BActive Publication Date: 2026-05-01SICHUAN NATURAL RESOURCES EXPERIMENTAL TESTING & RES CENT (SICHUAN NUCLEAR EMERGENCY TECH SUPPORT CENT)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SICHUAN NATURAL RESOURCES EXPERIMENTAL TESTING & RES CENT (SICHUAN NUCLEAR EMERGENCY TECH SUPPORT CENT)
Filing Date
2026-02-24
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing rock and mineral analysis techniques lack geological prior knowledge constraints in multimodal data fusion, and dynamic weight allocation relies on human experience, resulting in insufficient accuracy in identifying complex geological scenes, insufficient realism in virtual data generation, and limited coverage of extreme scenarios.

Method used

A dynamic adaptive multimodal fusion analysis engine combined with a geological knowledge graph is used to generate a virtual test dataset covering normal geological scenarios and extreme anomaly scenarios. An adaptive mineral phase identification model is built through self-supervised pre-training and deployed to a blockchain-IoT dual-chain traceability system. Modular robots are used to realize an automated analysis-preparation-rejection process.

Benefits of technology

It significantly improves the recognition accuracy and robustness of complex geological scenes, realizes closed-loop control throughout the entire process, and enhances the automation and intelligence level of rock and mineral analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121706622B_ABST
    Figure CN121706622B_ABST
Patent Text Reader

Abstract

The present application provides a kind of rock mineral analysis test management method and system, method includes: collection rock mineral sample multimodal data, constructs digital twin model;Geological knowledge graph is constructed, and the knowledge of both is injected fusion, generates virtual test data set;With the data set self-supervised pre-training, obtains adaptive mineral phase identification model;The model is deployed to blockchain-internet of things double-chain traceability system, obtains identification result and optimization instruction;Sample preparation process is executed and unqualified sample is rejected.The present application generates high real sense virtual test data set by adjusting diffusion step number, integrating data through adaptive noise scheduling and space-time alignment algorithm, combines self-supervised pre-training and knowledge distillation technology, so that the model has space-time feature extraction and dynamic optimization capability, finally realizes full-process closed-loop control through double-chain traceability system and modular robot, improves complex scene recognition precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mineral testing and management technology, and in particular to a method and system for rock and mineral analysis and testing management. Background Technology

[0002] Currently, the field of rock and mineral analysis primarily relies on traditional laboratory testing and single-modal data processing techniques. Conventional methods acquire mineral composition information using equipment such as X-ray diffraction (XRD) and scanning electron microscopy (SEM), combined with human experience for phase identification. Although multimodal data fusion has emerged in recent years, it is mostly limited to simple stitching or weighted averaging, lacking dynamic adaptive mechanisms. The application of geological knowledge remains largely at the expert system level, without deep integration of structured knowledge graphs and digital twin models. While virtual data generation technology has made breakthroughs in computer vision, it still faces challenges such as insufficient realism and limited coverage of extreme scenarios in geological settings. The integration of blockchain and IoT technologies into the analysis process is mainly used for data traceability, lacking a dynamic linkage mechanism with model optimization.

[0003] Existing technologies suffer from insufficient accuracy in recognizing complex geological scenarios (such as fault zones and hydrothermal alteration zones) due to the lack of geological prior knowledge constraints in multimodal data fusion and the reliance on human experience for dynamic weight allocation. Summary of the Invention

[0004] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a method and system for rock and mineral analysis and testing management.

[0005] To achieve the above-mentioned objectives of this invention, this invention provides a method for managing rock and mineral analysis and testing, the method comprising:

[0006] S1. Collect multimodal data of rock and mineral samples, and construct digital twin models of rock and mineral samples based on the multimodal data using a dynamic adaptive multimodal fusion analysis engine;

[0007] S2. Constructing a geological knowledge graph based on geological knowledge;

[0008] S3. Inject and integrate geological knowledge graphs and digital twin models, and generate virtual test datasets covering normal geological scenarios and extreme anomaly scenarios through conditional generative adversarial networks and diffusion models.

[0009] S4. Self-supervised pre-training is performed using a virtual test dataset to obtain an adaptive mineral phase recognition model with spatiotemporal feature extraction capabilities.

[0010] S5. Deploy the adaptive mineral phase identification model and digital twin model to the blockchain-IoT dual-chain traceability system, and obtain mineral phase identification results and dynamic optimization instructions based on smart contracts;

[0011] S6. Based on mineral phase identification results and dynamic optimization instructions, a modular robot is used to perform the preparation process for rock and mineral samples and automatically remove unqualified rock and mineral samples.

[0012] In another aspect, the present invention also provides a rock and mineral analysis and testing management system, the system comprising:

[0013] processor;

[0014] Memory used to store processor-executable instructions;

[0015] The processor is configured to implement a rock and mineral analysis test management method when executing executable instructions.

[0016] The beneficial effects of this invention are as follows: This invention significantly improves the recognition accuracy and robustness of complex geological scenes (such as fault zones and hydrothermal alteration zones) through deep collaboration between dynamic adaptive multimodal fusion and geological knowledge graphs. Specifically, the dynamic adaptive multimodal fusion engine, based on a federated learning framework, collaboratively optimizes the weight matrix and combines sample feature encoding with geological prior knowledge to achieve intelligent weighted fusion of multimodal data (XRD, SEM-EDS, Raman spectroscopy, etc.), overcoming the limitations of traditional methods where weight allocation is dominated by human experience. The geological knowledge graph, through spatiotemporal dimension enhancement and knowledge embedding technology, transforms geological evolution laws and spatial distribution constraints into structured knowledge, and integrates it with digital twin models for knowledge injection and fusion. This provides geological consistency constraints for the generation of virtual data in extreme and abnormal scenarios (such as high-temperature and high-pressure geological processes), solving the problems of traditional virtual data generation. Based on systematic deviations in key parameters such as mineral phase boundaries and microcrack characteristics, an adaptive noise scheduling algorithm and a spatiotemporal alignment algorithm are used to dynamically adjust the diffusion steps and integrate normal / extreme scenario data to generate a highly realistic virtual test dataset covering the entire scenario. Combined with self-supervised pre-training and knowledge distillation techniques, the mineral phase identification model is equipped with spatiotemporal feature extraction and dynamic optimization capabilities in complex geological scenarios. Finally, a blockchain-IoT dual-chain traceability system and modular robots are used to achieve closed-loop control of the entire process of analysis-preparation-rejection, which greatly improves the automation and intelligence level of rock and mineral analysis and testing, as well as the recognition accuracy in complex scenarios.

[0017] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0018] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0019] Figure 1This is a flowchart of a rock and mineral analysis and testing management method according to the present invention. Detailed Implementation

[0020] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0021] Example 1

[0022] like Figure 1 As shown, a rock and mineral analysis and testing management method includes:

[0023] S1. Collect multimodal data of rock and mineral samples, and construct digital twin models of rock and mineral samples based on the multimodal data using a dynamic adaptive multimodal fusion analysis engine;

[0024] S2. Constructing a geological knowledge graph based on geological knowledge;

[0025] S3. Inject and integrate geological knowledge graphs and digital twin models, and generate virtual test datasets covering normal geological scenarios and extreme anomaly scenarios through conditional generative adversarial networks and diffusion models.

[0026] S4. Self-supervised pre-training is performed using a virtual test dataset to obtain an adaptive mineral phase recognition model with spatiotemporal feature extraction capabilities.

[0027] S5. Deploy the adaptive mineral phase identification model and digital twin model to the blockchain-IoT dual-chain traceability system, and obtain mineral phase identification results and dynamic optimization instructions based on smart contracts;

[0028] S6. Based on mineral phase identification results and dynamic optimization instructions, a modular robot is used to perform the preparation process for rock and mineral samples and automatically remove unqualified rock and mineral samples.

[0029] The principle of a rock and mineral analysis and testing management method in this embodiment is as follows: First, various characteristic information of rock and mineral samples is acquired through multimodal data acquisition equipment, such as crystal structure data obtained by XRD, elemental composition and microstructure data obtained by SEM-EDS, and molecular vibration information reflected by Raman spectroscopy. Then, a dynamic adaptive multimodal fusion analysis engine is used. This engine, based on a federated learning framework, collaboratively optimizes the weight matrix and combines sample feature encoding with geological prior knowledge to intelligently weight and fuse the acquired multimodal data, constructing a digital twin model that accurately reflects the actual characteristics of the rock and mineral samples.

[0030] Next, a geological knowledge graph is constructed based on professional geological knowledge. Through spatiotemporal dimension enhancement and knowledge embedding techniques, the laws of geological evolution and spatial distribution constraints are transformed into structured knowledge. Then, the geological knowledge graph and digital twin model are fused through knowledge injection. When generating a virtual test dataset using a conditional generative adversarial network and a diffusion model, an adaptive noise scheduling algorithm dynamically adjusts the number of diffusion steps, controlling the amount of Gaussian noise added at each step to adapt the noise scheduling to different geological scenarios. A spatiotemporal alignment algorithm integrates subsets of virtual test data from normal geological scenarios and extreme anomaly scenarios, forming a spatiotemporally continuous and fully labeled virtual test dataset covering both normal and extreme anomaly scenarios.

[0031] Self-supervised pre-training was performed using a generated virtual test dataset to construct a spatiotemporal Transformer-based self-supervised pre-trained model, extracting spatiotemporal feature vectors of mineral composition, structural features, and environmental parameters from the virtual test dataset. The model was optimized using a contrastive learning loss function, aligning and enhancing the feature space by maximizing the similarity of positive sample pairs and minimizing the similarity of negative sample pairs. The optimized model was collaboratively trained on distributed nodes using a federated learning framework, updating model parameters through a gradient aggregation algorithm and introducing geological consistency constraints for regularization. During pre-training, a dynamic learning rate scheduling strategy was employed, adaptively adjusting the learning rate based on the convergence of the loss function. After pre-training, knowledge distillation was used to compress the model into a lightweight adaptive mineral facies recognition model, and its spatiotemporal feature extraction accuracy and robustness were evaluated using a validation dataset.

[0032] An adaptive mineral phase identification model and a digital twin model are deployed into a blockchain-IoT dual-chain traceability system. The model is deployed on distributed nodes of the blockchain network, and multimodal data streams of rock and mineral samples are accessed in real time via IoT devices. Contract code is written based on a predefined smart contract template. When a recognition trigger signal is received from an IoT device, the smart contract automatically invokes the deployed adaptive mineral phase identification model, inputs real-time multimodal data, executes the mineral phase identification algorithm, and outputs the mineral phase identification result. Combining the real-time status of the digital twin model and a geological knowledge graph, the smart contract generates dynamic optimization instructions, including adjustments to sample preparation parameters, strategies for removing unqualified samples, and maintenance suggestions.

[0033] Finally, based on the mineral phase identification results and dynamic optimization instructions, the multi-axis robotic arm system of the modular robot performs positioning and clamping operations on the rock and mineral samples. According to the rock and mineral sample preparation parameter adjustment information in the dynamic optimization instructions, the cutting, grinding, and polishing modules of the modular robot are automatically configured to execute a standardized physical preparation process on the rock and mineral samples. During the preparation process, visual and mechanical sensor data of the rock and mineral samples are collected in real time. The morphology and structural integrity of the rock and mineral samples are analyzed through an adaptive mineral phase identification model, and unqualified features are detected. When unqualified features are detected in the sample, the rejection mechanism is automatically triggered, driving the modular robot to remove the unqualified sample and update the sample status record in the digital twin model, realizing closed-loop control of the entire process from analysis to preparation to rejection.

[0034] As an optional embodiment of the present invention, optionally, the construction of a digital twin model of the rock and mineral sample based on multimodal data using a dynamic adaptive multimodal fusion analysis engine in step S1 includes:

[0035] S101. Collect multimodal data including XRD, SEM-EDS, Raman spectroscopy, XRF, ambient temperature and humidity, and equipment status;

[0036] In step S101, multimodal data acquisition equipment is used to collect multimodal data. For example, XRD equipment uses crystal diffraction analysis technology to accurately obtain the crystal structure parameters of rock and mineral samples; SEM-EDS equipment has high-resolution microscopic imaging and elemental analysis functions, which can clearly present the microscopic morphology of the sample and accurately determine the elemental composition; Raman spectrometer utilizes the Raman scattering effect to quickly obtain the molecular vibration information of the sample; XRF equipment is used to quickly analyze the types and contents of elements in the sample. At the same time, environmental temperature and humidity sensors monitor the status of the acquisition environment in real time, and equipment status sensors monitor the operating parameters of the data acquisition equipment itself to ensure the reliability of the data acquisition process.

[0037] S102. Preprocess the multimodal data;

[0038] The preprocessing in this embodiment includes data cleaning, which removes abnormal data points caused by equipment failure, environmental interference, or other factors during the acquisition process, such as abnormally sharp peaks in XRD data or elemental content values ​​that deviate significantly from the normal range in SEM-EDS data; data normalization, which unifies multimodal data of different dimensions to a similar numerical range, for example, converting crystal structure parameters obtained from XRD, elemental content data from SEM-EDS, and molecular vibration intensity data from Raman spectroscopy according to a specific normalization formula to make them comparable in subsequent analysis; and data denoising, which uses filtering algorithms, such as mean filtering and median filtering, to remove random noise from the data and improve the signal-to-noise ratio.

[0039] S103. Perform feature extraction on the preprocessed multimodal data to obtain the feature vector of each modality;

[0040] In step S103, it is necessary to explain in detail that for XRD data, crystal structure feature vectors are extracted using existing peak detection algorithms (such as multi-scale wavelet transform algorithms). These feature vectors can accurately reflect key information such as crystal type and lattice parameters of rock and mineral samples. For SEM-EDS data, image processing techniques are used to extract microscopic morphology feature vectors, such as particle size, shape, and distribution, while elemental composition feature vectors are extracted to clarify the types and proportions of each element in the sample. For Raman spectroscopy data, molecular vibration feature vectors are obtained using existing feature peak recognition algorithms (the basic idea of ​​which is to extract the characteristic peaks of the signal by filtering, peak detection, and feature extraction) to characterize the molecular structure and chemical bond information of the sample. After XRF data is processed by existing feature extraction algorithms (such as principal component analysis algorithms), feature vectors of element types and contents are obtained. After feature extraction, feature vectors reflecting the stability of the acquisition environment and the operating status of the equipment are obtained from the environmental temperature and humidity data and equipment status data.

[0041] S104. The feature vectors of each modality data are fused using a dynamic adaptive multimodal fusion analysis engine to construct a digital twin model of the rock and mineral samples.

[0042] The expression for fusing the feature vectors of various modal data using a dynamic adaptive multimodal fusion analysis engine is as follows: , ;in, This represents the fused feature vector. Represents a set of modes. Representing modes The dynamic weights have a value range of [0,1]. Representing modes The original feature vector, This represents a dynamic weight matrix, obtained through collaborative training using a federated learning framework. This represents the sample feature encoding, such as high-silicon samples being encoded as [1,0], and ordinary samples being encoded as [0,1]. Represents the bias vector, and Collaborative optimization ensures that weight allocation aligns with prior geological knowledge.

[0043] In step S104, it is necessary to explain in detail that the dynamic adaptive multimodal fusion analysis engine is based on a federated learning framework, which collaboratively trains the dynamic weight matrix through multiple distributed nodes. During training, each node calculates the initial weights using local sample data and exchanges gradient information through encrypted communication to gradually optimize the global weight matrix. Sample feature encoding serves as prior knowledge input, and together with the bias vector, it constrains the direction of weight allocation. For example, the encoding of high-silicon samples guides the engine to increase the weight of the XRD mode, while ordinary samples focus on the SEM-EDS mode. The fused feature vector is normalized using a nonlinear activation function (such as ReLU) to ensure that the output value is within a reasonable range, ultimately constructing a digital twin model containing multi-dimensional information such as crystal structure, elemental composition, and microstructure. This model can dynamically adapt to the data characteristics of different geological scenarios, overcome the limitations of fixed weight allocation in traditional methods, and significantly improve the characterization accuracy of complex mineral samples.

[0044] As an optional embodiment of the present invention, optionally, constructing a geological knowledge map based on geological knowledge in step S2 includes:

[0045] S201. Extract geological entities and relationships from geological domain knowledge, including geological literature databases, geological exploration reports, and historical mineral analysis data;

[0046] In step S201, it should be briefly explained that the geological literature database in this embodiment includes the formation mechanisms and distribution patterns of various rocks and minerals. From this database, geological entities such as rock type, mineral composition, and geological age can be extracted, as well as their genetic and symbiotic relationships. The geological exploration report records detailed information from the actual exploration process, such as the stratigraphic structure and tectonic features of the exploration area. It can extract geological entities such as strata and structures, as well as their inclusion and contact relationships. Historical mineral analysis data contains previous analytical test results of rocks and minerals, and can extract specific mineral samples, analytical indicators, and other geological entities, as well as their test correlations.

[0047] S202. Semantic annotation and normalization are performed on the extracted geological entities and relationships. Conflicting fields are resolved through an expert voting mechanism to form structured knowledge units.

[0048] In step S202, semantic annotation assigns accurate semantic information to the extracted geological entities and relationships so that computers can understand and process them. For example, for the geological entity of rock type, its specific rock name is labeled, such as granite, limestone, etc.; for genetic relationships, the cause of formation is labeled, such as magma cooling and solidifying to form igneous rocks, etc. Normalization processing unifies and standardizes geological entities and relationships from different sources and with different expressions. For example, the entity of "strata" may be expressed differently in different documents, such as "stratigraphic unit" or "geological strata," and normalization processing unifies it to "strata." During the processing, conflicting fields may appear, that is, different sources describe the same geological entity or relationship differently. In this case, an expert voting mechanism is used to invite experts in the field of geology to evaluate and judge the conflicting fields, and the final expression method is determined based on the experts' opinions, thereby forming structured knowledge units.

[0049] S203. Based on structured knowledge units, an initial framework for a geological knowledge graph is constructed using a graph neural network, and entity links and relationship completion are performed through a geological expert knowledge base to obtain the initial knowledge graph.

[0050] In step S203, it is necessary to explain in detail that the graph neural network can automatically learn complex relationship patterns between geological entities by aggregating the feature information of nodes and their neighboring nodes. For example, for the "granite" node, the network can simultaneously capture its multi-dimensional features such as mineral composition (quartz, amphibole, etc.), formation age (e.g., Early Paleozoic), and spatial distribution (e.g., South China Plate). During the initial framework construction, a heterogeneous graph neural network architecture is used to distinguish different types of relationship edges, such as assigning different weight parameters to genetic relationships and symbiotic relationships. The geological expert knowledge base uses knowledge embedding technology to transform expert experience into structured rules (e.g., "high silica samples are preferentially associated with acidic intrusive rocks"), linking isolated nodes in the initial framework and supplementing missing implicit relationships. For example, when there is an unlabeled "diorite" node in the map, the system can automatically associate it with other rock mass data of the same region and genesis, and infer its formation age by combining expert rules. By iteratively optimizing the message passing mechanism of the graph neural network, an initial knowledge graph containing tens of thousands of geological entity nodes and millions of relation edges was finally obtained. Its node coverage was greatly improved compared with traditional methods, and the accuracy of relation reasoning was also improved.

[0051] S204. Based on geological evolution models and spatial distribution patterns, the initial knowledge graph is enhanced in terms of spatiotemporal dimensions to obtain an enhanced initial knowledge graph.

[0052] In step S204, it is necessary to explain in detail that the geological evolution model injects temporal dimension information into the knowledge graph by simulating tectonic movements, magmatic activity, and sedimentation processes during geological history. For example, when constructing the "sedimentary rock-strata" relationship, the system can combine paleogeographic reconstruction data to dynamically label the stratigraphic sequence and contact relationships of different geological ages, enabling the knowledge graph to reflect the spatiotemporal evolution logic of "Triassic sandstone overlying Permian coal-bearing strata." Spatial distribution patterns are expressed quantitatively by introducing a geographic coordinate system and existing spatial analysis algorithms to quantify the distribution range of geological entities. Specifically, the system uses spatial interpolation techniques (such as the Kriging algorithm) to perform continuous modeling of discrete exploration data, generating spatial distribution surfaces of attributes such as mineral composition and lithology, and automatically labeling spatial constraints such as "a certain deposit is located in the region of 35°-36°N latitude and 117°-118°E longitude." The spatiotemporally enhanced knowledge graph supports complex queries, such as searching for "the spatiotemporal distribution range and formation mechanism of high magnesium andesite in the Mesoproterozoic era of the North China Craton". The system will combine time slice analysis and spatial clustering algorithms to extract a set of geological entities that meet the conditions from the graph and associate their genetic relationships and evolutionary paths.

[0053] S205. The entity representation in the initial knowledge graph is optimized and enhanced through knowledge graph embedding technology, and the graph is verified and iteratively updated based on geological consistency constraints to finally obtain the knowledge graph.

[0054] In step S205, it is necessary to explain in detail that the knowledge graph embedding technology, by mapping geological entities to a low-dimensional vector space, can preserve the semantic relationships and structural features between entities. For example, the TransE model is used to convert the triple of "granite-genesis-magma cooling" into vector operations, so that entities with similar geological properties are close to each other in the vector space. To address the problem that traditional embedding methods ignore the spatiotemporal heterogeneity of geology, this embodiment introduces a dynamic embedding mechanism, which combines a geological evolution model to adjust the representation of entities from different geological eras temporally. For example, the vector representation of Mesozoic granite will be superimposed with tectonic movement feature offsets. Geological consistency constraints ensure the quality of the knowledge graph by defining multi-dimensional verification rules, including:

[0055] 1) Entity co-occurrence constraint: Check whether the associated entities conform to geological laws (e.g., "ultramafic rocks" should not be directly associated with "sedimentary environment");

[0056] 2) Transitive constraints on relationships to verify the rationality of the derived relationships (e.g., if A-symbiotic relationship-B and B-causal relationship-C, then A and C should have an indirect relationship).

[0057] 3) Spatiotemporal logic constraints to ensure that the distribution of entities matches the geological history (e.g., Paleozoic deposits should not be labeled as Cenozoic tectonic units).

[0058] The iterative update employs an incremental learning framework. When new geological literature or exploration data is added, the system automatically triggers the map update process: first, new knowledge units are extracted through named entity recognition; second, conflicting nodes in the map are located using graph matching algorithms; and finally, the embedding vectors are collaboratively corrected through expert review and federated learning. For example, when a discrepancy is found between new exploration data for a certain area and the thickness record of "Permian coal seam" in the map, the system will initiate a multi-source data fusion process. Combining well logging curves, core data, and historical reports, the system updates the attribute values ​​and relationships of the entity using existing Bayesian optimization algorithms, ultimately obtaining the knowledge graph.

[0059] As an optional embodiment of the present invention, optionally, in step S3, the geological knowledge graph and the digital twin model are fused by knowledge injection, and a virtual test dataset covering normal geological scenarios and extreme anomaly scenarios is generated through a conditional generative adversarial network and a diffusion model, including:

[0060] S301. Align and fuse the entity embedding vectors of the geological knowledge graph with the sample feature vectors of the digital twin model, and inject knowledge through a multi-head cross-attention mechanism to obtain the fused features.

[0061] In step S301, it is necessary to explain in detail that the multi-head cross-attention mechanism, through parallel computation of multiple attention heads, can capture complex correlation patterns between the geological knowledge graph and the digital twin model from different subspaces. Specifically, each attention head is assigned differentiated weight parameters for a specific geological dimension (such as mineral composition and tectonic environment). For example, when processing the "granite" sample, a certain attention head may focus on the correlation between the "quartz content" entity in the knowledge graph and the XRD diffraction peak intensity in the digital twin model. During the fusion process, the entity embedding vector of the geological knowledge graph serves as the query vector, and the sample feature vector of the digital twin model serves as both the key and value vectors. Weighted feature representations are obtained through scaling dot product attention calculation. For example, for a high-silica granite sample, the system automatically enhances the connection weight between the "acidic intrusive rock" entity in the knowledge graph and the XRF elemental content vector in the digital twin model, so that the fused features simultaneously include crystal structure data and geological genetic information.

[0062] S302. Using the fused features as conditional input, construct a conditional generative adversarial network to generate a subset of virtual test data covering normal geological scenarios. This subset includes mineral composition distribution, structural features, and environmental parameters. The authenticity of the data is verified by a multi-scale discriminator.

[0063] In step S302, it is necessary to explain in detail that the conditional generative adversarial network consists of a generator and a discriminator. The generator takes the fused features as conditional input and progressively upsamples through a multi-layer transposed convolutional network to generate virtual test data containing mineral composition distribution, crystal structure features, and environmental parameters. For example, for a granite sample, the generator can simultaneously output multi-dimensional data such as quartz content, potassium feldspar phenocryst size, and diagenetic temperature. To ensure the geological rationality of the generated data, a multi-scale discriminator architecture is adopted: the global discriminator verifies the authenticity of the data from the overall distribution, while the local discriminator focuses on the rationality of specific geological features (such as mineral assemblages). During training, the Wasserstein distance loss function is introduced, and the gradient penalty mechanism solves the mode collapse problem, ensuring that the statistical error between the generated virtual data and the real geological samples is less than 5%. For example, when verifying a sedimentary rock sample, the multi-scale discriminator will simultaneously check whether its carbonate mineral content (global) and clastic grain roundness (local) meet the sedimentary environment constraints.

[0064] S303. Construct a diffusion model based on the fused features, add multi-scale Gaussian noise to the latent space using the diffusion model and gradually denoise it, and dynamically adjust the diffusion steps through an adaptive noise scheduling algorithm to generate a subset of virtual test data covering extreme and abnormal geological scenarios.

[0065] The expression for the adaptive noise scheduling algorithm is: ;

[0066] in, Indicates the current diffusion step number The noise intensity, with a value range of [0, This is used to control the amount of Gaussian noise added at each step of the diffusion model. This represents the Sigmoid activation function. This represents a trainable weight matrix, obtained through collaborative training using a federated learning framework, enabling noise scheduling to adapt to different geological scenarios. Indicates the total number of diffusion steps. This represents the fused feature vector. This represents a geological knowledge graph embedding vector. Geological entity relationships are transformed into low-dimensional vectors using knowledge graph embedding techniques (such as TransE), containing geological evolution laws and spatial distribution constraints. Indicates the bias scalar, and Collaborative optimization ensures that the noise intensity distribution conforms to prior geological knowledge (such as the lower noise corresponding to the formation environment of sedimentary rocks). This represents the maximum noise intensity, controlling the upper limit of noise levels to avoid excessively damaging the original data features. Represents the step enhancement function, when >0.7 Time to take (Default 0.9), otherwise take 1, which enhances noise in the later stage of diffusion and promotes the generation of data in extreme and abnormal scenarios.

[0067] In step S303, it is necessary to explain in detail that the diffusion model gradually adds noise to the fusion features through a forward diffusion process, transforming the data from the original distribution to a pure noise distribution, and then reconstructs the data from the noise through a reverse denoising process. Specifically, in the forward diffusion stage, multi-scale Gaussian noise is dynamically added to the latent space according to an adaptive noise scheduling algorithm. For example, in the generation of "plutonic rock" samples, the system dynamically adjusts the noise intensity according to its formation depth (spatial constraints in the knowledge graph), so that the noise intensity of shallow intrusive rocks is lower than that of deep rock masses. In the reverse denoising stage, a neural network with the existing U-Net architecture is used to preserve multi-scale geological features through skip connections. For example, when generating "contact metamorphic zone" samples, the network simultaneously preserves the macroscopic bedding structure (global features) and the microscopic mineral orientation arrangement (local features). The adaptive noise scheduling algorithm is trained collaboratively through a federated learning framework to differentiate the noise parameters of different geological scenarios (such as tectonically active areas and stable cratons). For example, when generating data in active fault zones, the system automatically increases the noise intensity of tectonic deformation-related features to promote the generation of extreme samples such as "fault-mud marble". The diffusion step count dynamic adjustment mechanism automatically optimizes based on geological complexity. For simpler geological bodies (such as homogeneous rock masses), fewer steps (e.g., 50 steps) are used, while for complex contact relationships (such as gradual transitions between the rock mass and surrounding rocks), the number of steps is increased to 200, ensuring the structural rationality of data in extreme scenarios. The final generated virtual dataset includes normal scenarios (such as standard granite triplet points) and extreme anomaly scenarios (such as a mixture of ultra-high pressure metamorphic belts and oceanic crust fragments). Parameters such as the range of mineral composition fluctuations and the degree of structural distortion all conform to prior geological constraints. For example, in the generated "eclogite-blueschist facies transition zone" data, the gradient of garnet end-member composition variation has an error of less than 8% compared to actual high-pressure metamorphic environment observations.

[0068] S304. Integrate virtual test data subsets of normal geological scenarios and extreme abnormal scenarios through a spatiotemporal alignment algorithm to form a spatiotemporally continuous and fully labeled virtual test dataset.

[0069] The expression for the spatiotemporal alignment algorithm is: ;

[0070] in, This represents a spatiotemporally aligned dataset containing continuous spatiotemporal features of both normal and extreme scenarios. This represents the time alignment function for normal scenes. It uses linear interpolation and Fourier transform to achieve smooth alignment in the time dimension, ensuring the temporal continuity of normal geological scenes. This indicates the number of time slices in a normal scene. This represents the time weights for normal scenarios, calculated using an attention mechanism, reflecting the... The contribution of each time slice to the final alignment result. Indicates the normal scenario Each time slice contains geological parameters such as mineral composition and structural characteristics. This represents the spatiotemporal concatenation operator, which concatenates spatially aligned normal and extreme scenario data along a new axis to form a spatiotemporally continuous dataset. This represents a time alignment function for extreme scenarios, employing nonlinear interpolation and wavelet transform to handle abrupt geological processes, thus adapting to the temporal characteristics of extreme and anomalous scenarios. This indicates the number of time slices in extreme scenarios. This represents the time weighting of extreme scenarios. By constraining with prior geological knowledge, it ensures the weighting of extreme scenario data at key geological events (such as fault activity). Indicates the extreme scenario Each time slice contains geological parameters under extreme conditions such as high temperature and high pressure.

[0071] In step S304, it's worth briefly explaining that the spatiotemporal alignment algorithm achieves spatiotemporal fusion of normal and extreme geological scenarios through a dual-channel processing mechanism. The normal scenario channel uses linear interpolation to smoothly transition time slices. For example, the diagenetic period of a granite body is divided into 20 equally spaced time slices. After eliminating high-frequency noise through Fourier transform, weights are assigned according to an attention mechanism (e.g., the weight of late-diagenetic slices is increased by 30% to highlight alteration features). The extreme scenario channel uses nonlinear interpolation to handle abrupt events. For example, when simulating fault activity, wavelet transform is applied to the time slices of the "fault gouge mélange" sample to strengthen the time weight corresponding to earthquake events (e.g., the weight of the slice at the mainshock time is set to 0.8). The spatial alignment stage guides feature matching through knowledge graph embedding vectors. For example, the metamorphic temperature field of the "blueschist" sample and the PT trajectory of "eclogite" are vector-projected in the latent space to ensure the continuity of phase transition boundaries. During the final stitching process, a geological constraint mask is introduced to arbitrate and correct conflict areas (such as pixels that are simultaneously labeled "high temperature metamorphism" and "low temperature alteration"), so that the generated virtual dataset can maintain the gradual characteristics of normal scenes in the spatiotemporal dimension while fully preserving the abrupt change information of extreme scenes.

[0072] As an optional embodiment of the present invention, optionally, in step S4, self-supervised pre-training is performed using a virtual test dataset to obtain an adaptive mineral phase recognition model with spatiotemporal feature extraction capabilities, including:

[0073] S401. Construct a self-supervised pre-trained model based on spatiotemporal Transformer. This model includes a multi-head self-attention mechanism and a three-dimensional convolution module, which are used to extract spatiotemporal feature vectors of mineral composition, structural features and environmental parameters from the virtual test dataset.

[0074] In step S401, it is necessary to explain in detail that the self-supervised pre-trained model based on spatiotemporal Transformer in this embodiment adopts an encoder-decoder architecture, where the encoder part consists of multiple stacked spatiotemporal Transformer blocks. Each Transformer block contains a multi-head self-attention mechanism and a feedforward neural network. The self-attention mechanism captures the spatial correlation (such as mineral symbiotic assemblage) and temporal evolution (such as dynamic changes in diagenesis) of mineral components in the virtual test data. Specifically, the multi-head self-attention mechanism divides the input features into multiple subspaces. Each subspace calculates feature weights through an independent attention head. For example, when processing granite samples, one attention head may focus on the symbiotic relationship between quartz and potassium feldspar, while another attention head analyzes the trend of diagenetic temperature over time. A three-dimensional convolution module is embedded between Transformer blocks. Through 3D convolution kernels, local features in both the spatial dimension (XY plane) and the temporal dimension (Z axis) are extracted simultaneously. For example, for sedimentary rock samples, the convolution kernel can simultaneously capture the spatial arrangement of bedding structures and the temporal changes in deposition rate. To address the long-range dependency issue in geological data, the model incorporates relative positional encoding technology to dynamically encode spatial distances (e.g., mineral grain spacing) and time intervals (e.g., duration of metamorphism). For example, when simulating contact metamorphic zones, the system automatically adjusts attention weights based on the spatial distance between the surrounding rock and the intrusive body, giving lower attention to areas of the surrounding rock far from the intrusive body. During the pre-training phase, a contrastive learning strategy is employed. Different spatiotemporal views of the same geological sample (e.g., different time slices or different observation scales) are used as positive sample pairs, while samples from different geological scenarios are used as negative sample pairs. The InfoNCE loss function is used to optimize model parameters, enabling the model to distinguish subtle geological differences (e.g., granites of different origins). For instance, for two sets of granite samples with similar quartz content but different origins, the model needs to accurately distinguish them by capturing the spatiotemporal correlation between structural features (e.g., phenocryst size) and environmental parameters (e.g., diagenetic pressure). To improve the model's adaptability to extreme scenarios, extreme anomaly scenario samples (e.g., ultra-high pressure metamorphic zone data) are proportionally mixed into the pre-training data, and gradient truncation techniques are used to prevent the model from overfitting to normal scenario features. The resulting adaptive mineral phase identification model can simultaneously extract both static features (such as major element content) and dynamic features (such as temperature-pressure evolution trajectory) of mineral components.

[0075] S402. Optimize the self-supervised pre-trained model using the contrastive learning loss function. Align and enhance the feature space by maximizing the similarity of positive sample pairs and minimizing the similarity of negative sample pairs.

[0076] In step S402, it is important to explain in detail that the goal of this embodiment, using the existing contrastive learning loss function, is to construct a feature space such that different spatiotemporal views (positive sample pairs) of the same geological sample are as close as possible in this space, while samples from different geological scenes (negative sample pairs) are as far apart as possible. Specifically, the InfoNCE loss function is used as the optimization objective. Its mathematical expression includes a temperature coefficient adjustment term, which dynamically adjusts the sensitivity of feature similarity to balance the model's ability to capture subtle geological differences (such as changes in mineral composition gradients) with significant differences (such as abrupt lithological changes). For example, when processing the comparison task between granite and diorite, the temperature coefficient amplifies the differences in phenocryst type distribution between the two while suppressing local noise interference caused by different observation scales. To enhance the robustness of feature alignment, the model incorporates a geological constraint enhancement strategy: During the positive sample pair construction phase, it considers not only differences in time slices or observation scales but also injects prior geological knowledge through knowledge graph embedding vectors. For example, it vector-associates the wall rock alteration characteristics of "contact metamorphic zone" samples with the intrusive temperature field, ensuring the preservation of key geological evolution patterns during feature alignment. During the negative sample pair construction phase, a hierarchical sampling mechanism is employed, dividing the sample pool according to the complexity of the geological scenario (e.g., tectonic activity intensity, metamorphic depth). This allows the model to focus on negative sample pairs with geological comparative value during optimization, prioritizing the distinction between "high-temperature metamorphism" and "low-temperature alteration" scenarios rather than simple lithological differences. Furthermore, for samples in extreme anomalous scenarios (e.g., ultra-high-pressure metamorphic zones), a gradient-weighted comparison strategy is designed. This dynamically adjusts the loss contribution based on the geological rarity of the samples. For instance, it assigns higher weights to ultra-high-pressure mineral assemblage samples like "coesite + diamond," prompting the model to allocate more independent clustering regions for them in the feature space, preventing them from being covered by normal scenario samples. The optimization process employs a momentum update mechanism, which mitigates model oscillations caused by extreme sample imbalances by maintaining parameter buffers between the teacher and student models. For example, extreme scene features are gradually introduced in continuous iterations, allowing model parameters to smoothly transition to an adapted state. Finally, through feature space visualization verification, the optimized model can map "normal granite triplet points" and "ultra-high pressure metamorphic belt" samples to the diagonal regions of the feature space, respectively. Furthermore, the intra-class distance of samples within the same class is reduced to 40% of that in the original model, while the inter-class distance of cross-class samples is increased by 2.5 times, significantly improving the discriminative power and generalization ability of mineral phase identification.

[0077] S403. Based on the federated learning framework, the optimized self-supervised pre-trained model is trained collaboratively on distributed nodes. The model parameters are updated through gradient aggregation algorithm, and geological consistency constraints are introduced for regularization.

[0078] In step S403, it is necessary to explain in detail that the federated learning framework addresses the challenges of scattered geological data, privacy sensitivity, and heterogeneous scenarios by collaboratively training an optimized self-supervised pre-trained model through distributed nodes. Specifically, each node (such as different geological laboratories or field monitoring stations) independently calculates the model gradient based on local data. For example, when a node processes regional metamorphic rock data, it calculates the gradient of the loss function based on its unique PT trajectory characteristics. Subsequently, a gradient aggregation algorithm (such as FedAvg) is used to perform a weighted average of the gradients from multiple nodes to update the global model parameters. The weights are dynamically adjusted according to the node's data scale or the representativeness of the geological scenario. For example, nodes containing samples from ultra-high pressure metamorphic belts are given higher weights. To address the data distribution differences between nodes (such as the geological feature shift between tectonic active areas and stable cratons), a geological consistency constraint regularization term is introduced. This regularization term measures the geological semantic similarity of data from different nodes through knowledge graph embedding vectors. For example, the metamorphic temperature and pressure conditions of the "blueschist facies" sample and the PT trajectory of the "eclogite facies" are vector-projected in the latent space, and the cosine of their included angle is calculated as the constraint strength. If the geological semantic differences between nodes exceed a threshold (such as a phase transition boundary deviation exceeding 10%), the parameter update direction is restricted through gradient pruning techniques to avoid the model overfitting local data features.

[0079] S404. During the pre-training process, a dynamic learning rate scheduling strategy is adopted to adaptively adjust the learning rate based on the convergence of the loss function.

[0080] In step S404, it is necessary to explain in detail that the dynamic learning rate scheduling strategy adjusts the learning rate based on the changes in the loss function during model training to balance training speed and model accuracy. Specifically, this strategy combines cosine annealing and warm restart. Within each training cycle, the learning rate gradually decays from its initial value to its minimum value according to the cosine function. For example, the initial learning rate is set to 0.001, and the minimum learning rate is set to 0.0001. The cycle length is dynamically set according to the scale of the training data (e.g., every 1000 iterations constitute one cycle). When the loss function decreases by less than a preset threshold (e.g., 0.1%) in several consecutive iterations, the warm restart mechanism is triggered, resetting the learning rate to its initial value or a higher value (e.g., 80% of the initial value), and starting a new training cycle. This strategy can effectively prevent the model from getting stuck in local optima. For example, when dealing with complex geological scenarios (such as areas with multiple stages of metamorphism), when the model stagnates due to excessively small parameter updates, warm restart can provide sufficient gradient momentum to break through the bottleneck. To further improve scheduling flexibility, the gradient magnitude of the loss function is introduced as an auxiliary judgment indicator: when the gradient magnitude is large (e.g., greater than 0.5), it indicates that the model is still in the fast convergence stage, and the learning rate should be appropriately increased (e.g., increased by 20%) to accelerate feature learning; when the gradient magnitude is small (e.g., less than 0.1), the learning rate should be reduced (e.g., reduced by 30%) to finely adjust the parameters.

[0081] S405. After pre-training, the self-supervised pre-trained model is compressed into a lightweight adaptive mineral phase recognition model through knowledge distillation technology. The spatiotemporal feature extraction accuracy and robustness are evaluated using a validation dataset to obtain the final adaptive mineral phase recognition model.

[0082] In step S405, it is necessary to explain in detail that the knowledge distillation technique achieves model compression through a teacher-student model architecture. The teacher model is a pre-trained spatiotemporal Transformer model, and the student model is a lightweight convolutional neural network (CNN) or a mobile Transformer architecture. Specifically, the teacher model generates soft targets, which outputs probability distributions for each input sample (e.g., the predicted probabilities of granite, diorite, and gabbro), rather than a single hard target. The student model is trained by mimicking the output distribution of the teacher model. For example, when processing a granite sample, the student model not only needs to predict its lithology as "granite," but also needs to fit the probability distributions of fine-grained geological features output by the teacher model, such as "quartz content 45%±2%, diagenetic temperature 750℃±10℃." To improve distillation efficiency, an intermediate layer feature alignment strategy is adopted: the intermediate outputs of the spatiotemporal Transformer block of the teacher model (such as multi-head self-attention weights and 3D convolutional feature maps) are matched with the feature maps of the corresponding layers of the student model. The consistency of the feature space is constrained by the mean squared error (MSE) loss function. For example, when processing sedimentary rock samples, the layering structure feature maps output by the student model's convolutional layers are forced to be similar to the outputs of the teacher model's Transformer block. For extreme scenario samples (such as ultra-high pressure metamorphic belts), a two-stage distillation process is designed: the first stage uses only normal scenario data to train the basic parameters of the student model; the second stage mixes in extreme samples (such as coesite + diamond combination) proportionally, and adjusts the loss contribution through a gradient weighting strategy. For example, the loss of extreme samples is given a 3x weight to ensure that the student model can still retain the ability to identify rare geological events after compression. The model compression ratio was controlled by adjusting the number of channels in the student model (e.g., reducing the 256-channel convolutional kernel of the teacher model to 64 channels) and the number of layers (e.g., compressing 12-layer Transformer blocks to 4 layers), ultimately resulting in a lightweight model with only 15% of the parameters of the teacher model. The validation phase employed multi-scale evaluation metrics: spatiotemporal feature extraction accuracy was quantified by calculating the F1 score of the model output against real geological labels (e.g., the macro-average F1 for mineral composition classification) and the structural similarity index (SSIM, used to evaluate the matching degree between spatial feature maps and real geological profiles); robustness evaluation introduced noise injection tests (e.g., adding Gaussian noise to the input data to simulate observation errors) and cross-scene transfer tests (e.g., applying a model trained in a tectonically stable region to an active fault zone), verifying its generalization ability by calculating the model's accuracy decrease under noisy data (e.g., from 92% to 88%) and the accuracy retention rate across scenes (e.g., from 85% to 89%).The resulting lightweight adaptive mineral phase recognition model can run in real time on mobile devices (such as handheld geological field terminals), reducing the processing time for a single geological image from 2.3 seconds for the teacher model to 0.4 seconds, while maintaining over 91% spatiotemporal feature extraction accuracy.

[0083] As an optional embodiment of the present invention, optionally, in step S5, the adaptive mineral phase identification model and the digital twin model are deployed to the blockchain-IoT dual-chain traceability system, and the mineral phase identification results and dynamic optimization instructions are obtained based on smart contracts, including:

[0084] S501. Deploy an adaptive mineral phase identification model and a digital twin model on the distributed nodes of the blockchain network, and access the multimodal data stream of rock and mineral samples in real time through IoT devices;

[0085] In step S501, it is important to explain in detail that the distributed nodes of the blockchain network possess characteristics such as decentralization and immutability, ensuring the security and reliability of model deployment. Specifically, the adaptive mineral phase identification model and the digital twin model are deployed to different blockchain nodes. For example, the mineral phase identification model is deployed on the core computing node, which has powerful computing capabilities and can quickly process large amounts of rock and mineral sample data; the digital twin model is deployed on the data storage and management node, which is responsible for storing and managing various types of data related to rocks and minerals. Simultaneously, multimodal data streams of rock and mineral samples are accessed in real time through IoT devices, including but not limited to sensors and scanners. Sensors can collect physical parameters of rocks and minerals in real time, such as temperature, pressure, and humidity; scanners can acquire multimodal data such as images and spectra of rocks and minerals. For example, at a mining site, sensors installed on mining equipment can collect temperature and pressure data of the ore in real time, while scanners can scan the surface features of the ore to acquire image data. These multimodal data streams are transmitted to the blockchain nodes in real time through the IoT network.

[0086] S502. Write contract code based on a predefined smart contract template. The code includes mineral phase identification request processing logic, dynamic optimization instruction generation rules, and exception handling mechanism.

[0087] In step S502, it is necessary to explain in detail that the predefined smart contract template provides a standardized framework for writing contract code, ensuring the consistency of the mineral phase identification and model optimization process in different scenarios. Specifically, the contract code contains three modules: First, the mineral phase identification request processing logic is implemented by calling the adaptive mineral phase identification model deployed on the blockchain node. When an IoT device uploads multimodal data streams (such as ore images and temperature sensor data) to the blockchain, the smart contract automatically triggers the identification process. For example, the image data is input into the mineral phase identification model, and the model outputs the mineral composition classification result (such as "granite with 65% quartz content"). At the same time, the temperature data is compared with the preset diagenetic temperature range in the digital twin model to generate a comprehensive identification report (such as "granite under high-temperature metamorphic environment"). Second, the dynamic optimization instruction generation rules are designed based on the model performance feedback mechanism. The contract continuously monitors the accuracy of mineral phase identification (e.g., calculating F1 scores through cross-validation) and feature extraction efficiency (e.g., single-sample processing time). When the identification accuracy for a specific geological scenario (e.g., ultra-high pressure metamorphic belt) falls below a threshold (e.g., 85%), it automatically generates optimization instructions, such as adjusting the temperature coefficient in comparative learning or increasing the gradient weights of extreme samples, and writes these instructions to the blockchain for synchronous execution by all nodes. Finally, the anomaly handling mechanism covers both data quality and model security: For abnormal data uploaded by IoT devices (e.g., sensor readings exceeding physically reasonable ranges), the contract verifies the geological rationality of the data through knowledge graph embedding vectors (e.g., comparing the current temperature with the average of historical data in the same region). If the deviation exceeds three times the standard deviation, a data isolation process is triggered. For adversarial attacks on the model (e.g., noisy images of the input structure attempting to mislead identification), the contract detects output anomalies by introducing geological consistency constraints (e.g., contradictions between the identification result and the PT trajectory features of the input data) and suspends model services until a security audit is completed. For example, when processing ore data uploaded from a mine, if the sensor reports a temperature of 2000℃ (far exceeding the natural conditions on the Earth's surface), the contract will automatically mark the data as abnormal and refuse to process it, while notifying the administrator to check the equipment status; if the model outputs "blueschist facies" but the spectral characteristics of the input image are consistent with eclogite, the contract will freeze the identification result and start the model rollback mechanism to restore the parameters of the previous version.

[0088] S503. Based on the multimodal data stream of rock and mineral samples accessed in real time, when a recognition trigger signal is received from an IoT device, the smart contract automatically calls the deployed adaptive mineral phase recognition model, inputs real-time multimodal data, executes the mineral phase recognition algorithm, and outputs the mineral phase recognition result.

[0089] In step S503, it is necessary to explain in detail that when the blockchain node receives the multimodal data stream of the rock and mineral sample through the IoT device, the smart contract enters the pending trigger state. Once the IoT device sends an identification trigger signal (e.g., an on-site operator clicks the "Start Identification" button on a handheld terminal), the smart contract immediately initiates the call process: First, it verifies the data integrity, ensuring that the multimodal data (such as images, spectra, and sensor readings) has not been tampered with through hash verification; then, it automatically matches the input interface of the pre-trained model according to the data type, for example, converting RGB images into tensor format for input into the visual branch, and standardizing temperature and pressure data for input into the geological parameter branch. When performing mineral facies identification, the model adopts a multi-branch fusion strategy: the visual branch extracts mineral texture features (such as the wavy extinction of quartz crystals) through a convolutional neural network, and the geological parameter branch uses a long short-term memory network to analyze the temperature and pressure evolution trajectory (such as the PT path in the diagenetic process). Finally, the features of the two branches are fused through an attention mechanism to generate a comprehensive identification result (such as "amphibolite facies granite in a high-temperature metamorphic environment"). The output includes three parts: basic mineral composition (e.g., volume percentage of quartz, feldspar, and amphibole), metamorphic facies type (e.g., greenschist, amphibolite, and eclogite), and geological process interpretation (e.g., "This sample underwent medium-pressure metamorphism with peak temperature and pressure conditions of 650℃ / 0.8GPa"). It also includes a model confidence score (a value between 0 and 1) and a feature visualization heatmap (e.g., marking key mineral identification areas). For example, when processing a gold deposit exploration sample, the model not only identifies pyrite-bearing granitic rocks but also infers from temperature and pressure data that they formed during a retrograde metamorphic stage in the orogenic uplift process.

[0090] S504. Combining the real-time status of the digital twin model and the geological knowledge graph, the smart contract generates dynamic optimization instructions, including adjustments to sample preparation parameters, strategies for removing unqualified samples, and maintenance suggestions.

[0091] In step S504, it is necessary to explain in detail that when the smart contract generates dynamic optimization instructions, it first calls the real-time state data of the digital twin model. This data covers various parameters of the model's current operation (such as processing speed, memory usage, and the range of accuracy fluctuations) as well as historical performance records (such as the average recognition time in the past 24 hours and the accuracy distribution under different geological scenarios). At the same time, the smart contract accesses a geological knowledge graph, which integrates knowledge from multiple fields such as petrology, geochemistry, and structural geology through ontology modeling. For example, it establishes semantic associations between concepts such as "blueschist facies" and "high-pressure low-temperature metamorphic environment" and "sodium-bearing metamorphic minerals," and marks typical PT conditions (such as 500-600℃ / 1.0-1.5GPa). Based on this data, the generation of dynamic optimization instructions is divided into three dimensions: First, the sample preparation parameter adjustment optimizes the data quality collected by IoT devices. For example, when the digital twin model reports that the image clarity of a batch of samples is below a threshold (e.g., resolution less than 512×512 pixels), the contract queries the knowledge graph for the optimal imaging conditions for that type of mineral (e.g., compensation angle settings under a polarizing microscope), generates adjustment instructions (e.g., "increase the scanner light source intensity to 80% and enable differential interference contrast mode"), and synchronizes them to the IoT device for execution. Secondly, the unqualified sample removal strategy is based on a dual judgment of model performance and data distribution. If the digital twin model detects that the recognition confidence of 10 consecutive samples is below 0.7 (e.g., a metamorphic sandstone sample has mineral composition confusion due to bedding development), the contract will verify the geological rationality of the sample through the knowledge graph (e.g., comparing the mineral combination frequency in historical data of the area). If it is determined to be abnormal data (e.g., the rare coesite + garnet combination in this area appears), a removal instruction is generated (e.g., "mark the sample ID as invalid and remove it from the training set"), and the anomaly type (e.g., "possible sampling contamination") is recorded for subsequent analysis. Thirdly, maintenance suggestions are optimized for the long-term stability of the model. For example, when a digital twin model shows that a node's memory usage consistently exceeds 90% (e.g., the model loads too many extreme features when processing samples from ultra-high pressure metamorphic belts), the contract will combine model optimization cases in the knowledge graph (e.g., empirical values ​​for adjusting batch size in similar scenarios) to generate maintenance instructions (e.g., "reduce the batch size of this node from 32 to 16 and restart the service"), and trigger an early warning mechanism to notify operations personnel. Taking a real-world scenario as an example: when a blockchain node receives sample data from a metamorphic belt in the Qinghai-Tibet Plateau, the digital twin model reports that the current sample's temperature and pressure data (680℃ / 1.2GPa) matches the PT range (550-700℃ / 0.6-1.4GPa) of a typical metamorphic facies (amphibolite facies) in that region in the knowledge graph, but the model's confidence level is only 0.65 (below the threshold of 0.7).The smart contract then initiated an optimization process: First, it confirmed through the knowledge graph that the temperature and pressure conditions likely corresponded to a "high amphibolite-eclogite transition zone," and that the current model had not adequately learned the characteristics of such boundary samples. It then generated three instructions: first, to adjust the temperature coefficient in the comparative learning (reducing it from 0.1 to 0.05 to enhance the distinguishability of boundary samples); second, to increase the gradient weight of extreme samples (such as coesite eclogite) (from 1.0 to 2.0); and third, to suggest that maintenance personnel check the calibration status of the temperature sensors on IoT devices (because historical data shows that the peak temperature in this area typically does not exceed 650℃). After these instructions were synchronized to the blockchain, each node automatically executed the optimization in the next training cycle, ultimately improving the model's accuracy in identifying such transition zone samples.

[0092] As an optional embodiment of the present invention, optionally, in step S6, a modular robot is used to perform the preparation process on the rock and mineral samples based on the mineral phase identification results and dynamic optimization instructions, and unqualified rock and mineral samples are automatically rejected, including:

[0093] S601. Based on mineral phase identification results and dynamic optimization instructions, the multi-axis robotic arm system of the modular robot is used to perform positioning and clamping operations on rock mineral samples.

[0094] In step S601, the multi-axis robotic arm system of the modular robot, relying on visual positioning technology and force feedback control technology, first uses an industrial camera to perform three-dimensional reconstruction of the rock and mineral sample, generating a digital model containing spatial coordinates and surface texture. Then, based on the key mineral distribution areas marked in the mineral phase identification results (such as the polycrystalline location of pyrite), it plans the optimal clamping path (avoiding fragile foliation or cleavage planes), and adjusts the clamping force in real time using a six-dimensional force sensor (e.g., controlling the clamping force within the range of 5-10N to prevent sample breakage), ensuring the sample maintains morphological stability during preparation. For example, when processing metamorphic rock samples containing garnet, the robotic arm will prioritize clamping the quartz and feldspar matrix areas to avoid direct contact with the harder garnet particles, which could lead to localized sample damage.

[0095] S602. Based on the rock and mineral sample preparation parameter adjustment information in the dynamic optimization instruction, automatically configure the cutting module, grinding module and polishing module of the modular robot to perform a standardized physical preparation process on the rock and mineral sample.

[0096] In step S602, each preparation module of the modular robot adaptively adjusts its parameters according to dynamic optimization instructions: the cutting module drives a diamond saw blade via a stepper motor, and its rotation speed (e.g., dynamically adjusted from 3000 rpm to 5000 rpm) and feed speed (e.g., adjusted from 0.5 mm / s to 0.2 mm / s) are optimized in real time according to the sample hardness (e.g., quartzite with a Mohs hardness of 7 requires a higher rotation speed); the grinding module uses a variable pressure pneumatic system, and its grinding disc pressure (e.g., increased from 50 N to 80 N) and grinding time (e.g., extended from 3 minutes to 5 minutes) are automatically matched according to the mineral particle size distribution (e.g., coarse-grained minerals require a longer grinding time); the polishing module adjusts the polishing fluid flow rate (e.g., increased from 10 ml / min to 15 ml / min) and polishing cloth rotation speed (e.g., increased from 150 rpm to 200 rpm) through a PID controller to ensure that the sample surface roughness (Ra value) meets the requirements for geological microscopy observation (usually ≤0.1 μm). For example, when preparing blueschist samples containing glaucophane, the system reduces the cutting feed rate to prevent the fibrous structure of glaucophane from breaking, while increasing the grinding pressure to eliminate secondary cracks on its surface.

[0097] S603. During the preparation process, visual and mechanical sensor data of rock and mineral samples are collected in real time. The morphology and structural integrity of the rock and mineral samples are analyzed through an adaptive mineral phase recognition model to detect unqualified features.

[0098] In step S603, the multimodal data acquisition and analysis system during the preparation process is implemented through a sensor array integrated at the end of the robotic arm: a vision sensor (such as a high-resolution line scan camera) acquires sample surface images at a frequency of 50 frames per second, and uses a convolutional neural network to detect morphological defects such as cracks (width > 0.05 mm) and exposed cleavage surfaces (area ratio > 10%) in real time; a mechanical sensor (such as a piezoelectric force sensor) synchronously records mechanical characteristics such as cutting force (triggers an early warning when the peak value > 20 N) and grinding resistance (adjusts parameters when the fluctuation range > 5 N), and combines the preset mechanical-mineral phase mapping relationship in the digital twin model (such as the quartz cutting force fluctuation range of 8-12 N) to determine the integrity of the sample's internal structure. For example, when the grinding module detects a sudden drop in the resistance of a metamorphic sandstone sample (from 15 N to 8 N), the system will immediately pause the preparation and verify it through the mineral phase recognition model. It will find that the structure instability in this area is caused by the detachment of feldspar particles, and at this time, the sample will be marked as a defective product.

[0099] S604. When a sample is detected to have non-compliant characteristics, the rejection mechanism is automatically triggered, driving the modular robot to reject the non-compliant sample and update the sample status record in the digital twin model.

[0100] In step S604, the non-conforming sample rejection mechanism adopts a "graded response" strategy: when a minor defect is detected (such as a surface microcrack length < 2 mm), the system first attempts to repair it by adjusting the preparation parameters (such as reducing the grinding pressure); if the defect persists (such as the crack extending to 5 mm) or serious non-conforming features appear (such as the loss of key minerals (such as the typological mineral zircon), the rejection process is immediately initiated: the robotic arm transfers the sample to the waste box through a vacuum suction cup, and at the same time updates the sample status in the digital twin model (changing the sample ID from "Preparing" to "Rejected"), and generates a quality inspection report containing the defect type (such as "overexposed cleavage surface"), location coordinates (such as "sample coordinates (25,40)") and possible causes (such as "caused by improper cutting parameters"). For example, when processing a gold mine exploration sample, the system detected that the sample edge was cracked due to excessive clamping force (the cracked area accounted for 8% of the total sample area). The system then triggered the rejection mechanism and removed the sample. At the same time, the clamping force parameters of subsequent samples were adjusted (from 10N to 7N) to avoid similar problems.

[0101] Example 2

[0102] A rock and mineral analysis and testing management system, comprising:

[0103] processor;

[0104] Memory used to store processor-executable instructions;

[0105] The processor is configured to implement a rock and mineral analysis test management method when executing executable instructions.

[0106] It should be noted that the computer device includes a processor, a memory, and may also include one or more of a multimedia component, an input / output (I / O) interface, and a communication component.

[0107] The processor controls the overall operation of the computer device to complete all or part of the steps in the above-mentioned rock and mineral analysis and testing management method.

[0108] Memory is used to store various types of data to support the operation of the computer device. This data may include, for example, instructions for any application or method used to operate on the computer device, as well as application-related data. Memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0109] The multimedia component may include a screen and an audio component, wherein the screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals; for example, the audio component may include a microphone for receiving external audio signals, the received audio signals may be further stored in memory or transmitted via a communication component; the audio component may also include at least one speaker for outputting audio signals.

[0110] I / O interfaces provide interfaces between the processor and other interface modules, such as keyboards, mice, buttons, etc.; these buttons can be virtual buttons or physical buttons.

[0111] The communication component is used for wired or wireless communication between the computer device and other devices; wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G or 5G, or one or more combinations thereof, and the corresponding communication component may include: Wi-Fi module, Bluetooth module, NFC module, mobile communication module.

[0112] As a preferred embodiment, the computer device may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the aforementioned rock and mineral analysis and testing management method.

[0113] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for managing rock and mineral analysis and testing, characterized in that, The method includes: S1. Collect multimodal data of rock and mineral samples, and construct digital twin models of rock and mineral samples based on the multimodal data using a dynamic adaptive multimodal fusion analysis engine; S2. Constructing a geological knowledge graph based on geological knowledge; S3. The geological knowledge graph and digital twin model are fused with knowledge injection, and a virtual test dataset covering normal geological scenarios and extreme abnormal scenarios is generated through conditional generative adversarial network and diffusion model. S4. Use the virtual test dataset to perform self-supervised pre-training to obtain an adaptive mineral phase recognition model with spatiotemporal feature extraction capabilities; S5. Deploy the adaptive mineral phase identification model and digital twin model to the blockchain-IoT dual-chain traceability system, and obtain mineral phase identification results and dynamic optimization instructions based on smart contracts; S6. Based on the mineral phase identification results and dynamic optimization instructions, a modular robot is used to perform the preparation process on the rock and mineral samples, and unqualified rock and mineral samples are automatically rejected. In step S3, the virtual test dataset covering both normal geological scenarios and extreme anomaly scenarios is generated, including: S301. Align and fuse the entity embedding vector of the geological knowledge graph with the sample feature vector of the digital twin model, and inject knowledge through a multi-head cross attention mechanism to obtain the fused features. During the fusion process, the entity embedding vector of the geological knowledge graph is used as the query vector, and the sample feature vector of the digital twin model is used as both the key vector and the value vector. The weighted feature representation is obtained by scaling dot product attention calculation. S302. Using the fused features as conditional input, construct a conditional generative adversarial network to generate a subset of virtual test data covering normal geological scenarios. This subset includes mineral composition distribution, structural features, and environmental parameters. The authenticity of the data is verified by a multi-scale discriminator. S303. Construct a diffusion model based on the fused features, add multi-scale Gaussian noise to the latent space using the diffusion model and gradually denoise it, and dynamically adjust the diffusion steps through an adaptive noise scheduling algorithm to generate a subset of virtual test data covering extreme and abnormal geological scenarios. S304. Integrate virtual test data subsets of normal geological scenarios and extreme abnormal scenarios through a spatiotemporal alignment algorithm to form a spatiotemporally continuous and fully labeled virtual test dataset.

2. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, The construction of a digital twin model of the rock mineral sample in step S1 includes: S101. Collect multimodal data including XRD, SEM-EDS, Raman spectroscopy, XRF, ambient temperature and humidity, and equipment status; S102. Preprocess the multimodal data; S103. Perform feature extraction on the preprocessed multimodal data to obtain the feature vector of each modality; S104. The feature vectors of each modality data are fused using a dynamic adaptive multimodal fusion analysis engine to construct a digital twin model of the rock and mineral samples.

3. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, In step S2, constructing a geological knowledge map based on geological knowledge includes: S201. Extract geological entities and relationships from geological domain knowledge, including geological literature databases, geological exploration reports, and historical mineral analysis data; S202. The extracted geological entities and relationships are semantically labeled and normalized. Conflicting fields are resolved through an expert voting mechanism to form structured knowledge units. S203. Based on the structured knowledge units, an initial framework for a geological knowledge graph is constructed using a graph neural network, and entity links and relationship completion are performed through a geological expert knowledge base to obtain the initial knowledge graph. S204. Based on the geological evolution model and spatial distribution pattern, the initial knowledge graph is enhanced in spatiotemporal dimension to obtain the enhanced initial knowledge graph; S205. The entity representation in the initial knowledge graph is optimized and enhanced through knowledge graph embedding technology, and the graph is verified and iteratively updated based on geological consistency constraints to finally obtain the knowledge graph.

4. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, The expression for the adaptive noise scheduling algorithm is: in, Indicates the current diffusion step number noise intensity, This represents the Sigmoid activation function. This represents a trainable weight matrix. Indicates the total number of diffusion steps. This represents the fused feature vector. This represents the embedding vector of a geological knowledge graph. Indicates a bias scalar. Indicates the maximum noise intensity. This represents the step enhancement function.

5. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, The expression for the spatiotemporal alignment algorithm is: in, This represents the spatiotemporally aligned dataset. This represents the time alignment function for normal scenarios. This indicates the number of time slices in a normal scene. Indicates the time weight in a normal scenario. Indicates the normal scenario A time slice This represents the spatiotemporal concatenation operator. This represents the time alignment function for extreme scenarios. This indicates the number of time slices in extreme scenarios. Indicates time weights for extreme scenarios. Indicates the extreme scenario A time slice.

6. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, The adaptive mineral phase identification model with spatiotemporal feature extraction capability obtained in step S4 includes: S401. Construct a self-supervised pre-trained model based on spatiotemporal Transformer. This model includes a multi-head self-attention mechanism and a three-dimensional convolution module, which are used to extract spatiotemporal feature vectors of mineral composition, structural features and environmental parameters from the virtual test dataset. S402. The self-supervised pre-trained model is optimized using the contrastive learning loss function. By maximizing the similarity of positive sample pairs and minimizing the similarity of negative sample pairs, the feature space is aligned and enhanced. S403. The self-supervised pre-trained model, optimized by collaborative training on distributed nodes based on the federated learning framework, updates the model parameters through gradient aggregation algorithm and introduces geological consistency constraints for regularization. S404. During the pre-training process, a dynamic learning rate scheduling strategy is adopted to adaptively adjust the learning rate based on the convergence of the loss function. S405. After pre-training, the self-supervised pre-trained model is compressed into a lightweight adaptive mineral phase recognition model using knowledge distillation technology, and its spatiotemporal feature extraction accuracy and robustness are evaluated using a validation dataset to obtain the final adaptive mineral phase recognition model.

7. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, In step S5, obtaining the mineral phase identification results and dynamic optimization instructions includes: S501. Deploy the adaptive mineral phase identification model and digital twin model on the distributed nodes of the blockchain network, and access the multimodal data stream of rock and mineral samples in real time through IoT devices; S502. Write contract code based on a predefined smart contract template. The code includes mineral phase identification request processing logic, dynamic optimization instruction generation rules, and exception handling mechanism. S503. Based on the multimodal data stream of rock and mineral samples accessed in real time, when a recognition trigger signal is received from an IoT device, the smart contract automatically calls the deployed adaptive mineral phase recognition model, inputs real-time multimodal data, executes the mineral phase recognition algorithm, and outputs the mineral phase recognition result. S504. Combining the real-time status of the digital twin model and the geological knowledge graph, the smart contract generates dynamic optimization instructions, including adjustments to sample preparation parameters, strategies for removing unqualified samples, and maintenance suggestions.

8. The rock and mineral analysis and testing management method as described in claim 1, characterized in that, In step S6, based on the mineral phase identification results and dynamic optimization instructions, a modular robot is used to perform the preparation process on the rock and mineral samples, and unqualified rock and mineral samples are automatically removed, including: S601. Based on the mineral phase identification results and dynamic optimization instructions, the multi-axis robotic arm system of the modular robot is used to perform positioning and clamping operations on the rock mineral sample. S602. Based on the rock and mineral sample preparation parameter adjustment information in the dynamic optimization instruction, automatically configure the cutting module, grinding module and polishing module of the modular robot to perform a standardized physical preparation process on the rock and mineral sample. S603. During the preparation process, visual and mechanical sensor data of rock and mineral samples are collected in real time. The morphology and structural integrity of the rock and mineral samples are analyzed through an adaptive mineral phase recognition model to detect unqualified features. S604. When a sample is detected to have non-compliant characteristics, the rejection mechanism is automatically triggered, driving the modular robot to reject the non-compliant sample and update the sample status record in the digital twin model.

9. A rock and mineral analysis and testing management system, characterized in that, The system includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement the rock and mineral analysis and testing management method according to any one of claims 1 to 8 when executing the executable instructions.

Citation Information

Patent Citations

  • Field electrical prospecting data anomaly identification method based on big data analysis

    CN120781266A

  • Deep concealed deposit detection method based on multi-source geological data fusion

    CN120974408A