A geological constraint-based tunnel concealed gas structure intelligent identification method and system
By constructing a geological expert knowledge base and processing multi-source data, and combining a logical constraint loss function optimization model, the problems of multiple solutions and difficulty in quantifying geological knowledge in the identification of hidden gas structures in tunnels were solved, and more accurate identification results that conform to geological laws were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA RAILWAY NO 2 ENG GROUP CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies are insufficient to effectively identify hidden gas structures in tunnels, resulting in high rates of missed detections and false alarms. Furthermore, deep learning models cannot effectively integrate qualitative geological knowledge, leading to a lack of geological basis in the identification results.
By constructing a geological expert knowledge base, geological qualitative rules are transformed into formal logical rules. Feature extraction and logical reasoning are performed by combining multi-source detection data to generate a probability map of hidden gas structures. The model parameters are then optimized through a logical constraint loss function, achieving the co-evolution of geological qualitative knowledge and deep learning models.
It significantly improves the accuracy and geological interpretability of identifying concealed gas structures, reduces the false alarm and missed detection rates, and enhances the model's identification ability and geological rationality.
Smart Images

Figure CN122432818A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of geological exploration and artificial intelligence, and in particular relates to an intelligent identification method and system for concealed gas structures in tunnels based on geological constraints. Background Technology
[0002] In tunnel construction projects traversing coal-bearing or hydrocarbon-generating strata, accurate identification of concealed gas structures is crucial for ensuring construction safety. Concealed structures such as faults, folds, and densely fractured zones serve as both gas transport channels and gas accumulation zones, their presence often indicating a significant risk of gas outbursts. However, limited by current detection technologies, the identification of concealed gas structures primarily relies on single geophysical methods such as ground-penetrating radar, inferring their location by analyzing electromagnetic wave reflection characteristics. But single geophysical data suffers from significant limitations in ambiguity; the same radar reflection characteristics may correspond to drastically different geological meanings. Furthermore, the development of concealed gas structures is controlled by the complex coupling of multiple geological parameters, making it difficult for current methods to establish implicit correlation rules between structures and multiple parameters from single data sources. This results in structure identification heavily relying on the personal experience of geological engineers, leading to persistently high rates of missed detections and false alarms.
[0003] A more fundamental technical obstacle lies in the challenge of deep coupling between qualitative geological knowledge and data-driven models. Geology has accumulated centuries of theories on tectonic gas control, forming a wealth of qualitative and descriptive professional knowledge and empirical rules, such as "the core of an anticline is a favorable structural location for gas accumulation" and "high-pressure gas pockets often form on the hanging wall of faults." These geological rules are symbolic and logical, serving as the core basis for geological engineers to identify geological structures. However, existing deep learning models are essentially numerical computation systems; their loss functions can only constrain the numerical error between the predicted results and the labeled data, completely failing to understand and apply these symbolic geological principles. Even when expert knowledge is introduced, only quantifiable information such as fault locations can be used as input features, while qualitative reasoning rules in the form of "if-then" remain outside the core mechanism of model optimization. This results in predictions trained by the model that may completely violate basic geological laws, lack geological basis, and be difficult to promote and apply in practical engineering.
[0004] Therefore, how to transform qualitative geological knowledge into computable constraints, enabling it to be deeply integrated into the training and inference process of deep learning models, and achieving the synergistic evolution of data-driven and knowledge-driven approaches, is a technical challenge that urgently needs to be overcome in the field of tunnel concealed gas structure identification. Summary of the Invention
[0005] Therefore, it is necessary to provide a method and system for intelligent identification of hidden gas structures in tunnels based on geological constraints to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for intelligent identification of concealed gas structures in tunnels based on geological constraints, including:
[0007] S1. Based on the pre-set geological expert knowledge, a knowledge base is constructed that includes logical predicates related to tunnel geology and gas characteristics by transforming qualitative geological rules into formal logical rules.
[0008] S2. Register the collected multi-source tunnel detection data to the tunnel coordinate system to generate a multi-source data tensor;
[0009] S3. Through a multi-source attention feature network, feature extraction, feature fusion and spatial resolution restoration are performed on the multi-source data tensor to generate a probability map of hidden gas structure in the tunnel.
[0010] S4. Combining the probability map of hidden gas formation in tunnels, symbolic predicate truth transformation is performed on the multi-source data tensor to generate a symbolic fact truth tensor.
[0011] S5. Input the symbolic fact truth tensor into the neural symbolic verifier with geological logic constraints. Perform logical reasoning on the symbolic fact truth tensor in the neural symbolic verifier according to the logical rules in the knowledge base to calculate the logical consistency score of each spatial location and obtain the logical consistency tensor; where the spatial location represents each discrete coordinate point in the multi-source data tensor.
[0012] S6. Construct a logical constraint loss based on the logical consistency tensor, and construct a total loss function by combining the logical constraint loss; based on the total loss function, update the parameters of the multi-source attention feature network and the neural symbol validator through the backpropagation algorithm;
[0013] S7. Replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested to execute S2 to S5, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
[0014] Secondly, this application also provides an intelligent identification system for concealed gas structures in tunnels based on geological constraints, used to implement the method described in the first aspect, the system comprising:
[0015] The geological rule knowledge base construction module is used to construct a knowledge base including logical predicates related to tunnel geology and gas characteristics by transforming qualitative geological rules into formal logical rules based on preset geological expert knowledge.
[0016] The multi-source data registration module is used to uniformly register the collected multi-source tunnel detection data to the tunnel coordinate system and generate a multi-source data tensor.
[0017] The feature fusion processing module is used to perform feature extraction, feature fusion and spatial resolution restoration on multi-source data tensors through a multi-source attention feature network to generate a probability map of hidden gas structures in tunnels.
[0018] The symbolic fact transformation module is used to combine the probability map of hidden gas structure in tunnels to perform symbolic predicate truth transformation on multi-source data tensors and generate symbolic fact truth tensors.
[0019] The logical consistency verification module is used to input the symbolic fact truth tensor into the neural symbolic verifier with geological logical constraints. According to the logical rules in the knowledge base, the neural symbolic verifier performs logical reasoning on the symbolic fact truth tensor to calculate the logical consistency score for each spatial location, and obtains the logical consistency tensor; where the spatial location represents each discrete coordinate point in the multi-source data tensor.
[0020] The model co-optimization module is used to construct a logical constraint loss based on the logical consistency tensor, and to construct a total loss function by combining the logical constraint loss; based on the total loss function, the parameters of the multi-source attention feature network and the neural symbol validator are updated through the backpropagation algorithm.
[0021] The real-time identification output module is used to replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested in order to perform the operations of the multi-source data registration module, feature fusion processing module, symbolic fact conversion module, and logical consistency verification module, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
[0022] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a method for intelligent identification of hidden gas structures in tunnels based on geological constraints, as described in the first aspect.
[0023] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for intelligent identification of concealed gas structures in tunnels based on geological constraints, as described in the first aspect.
[0024] The aforementioned intelligent identification method and system for concealed gas structures in tunnels based on geological constraints constructs a knowledge base containing geological qualitative rules. Collected multi-source tunnel detection data is uniformly registered and input into a multi-source attention feature network to generate a probability map of concealed gas structures. This probability map is then used to perform symbolic predicate truth transformation on the multi-source data tensor to obtain a symbolic fact truth tensor. This symbolic fact truth tensor is then input into a neural symbolic verifier with geological logical constraints. Logical reasoning is performed on the symbolic fact truth tensor according to the logical rules in the knowledge base to calculate the logical consistency score for each spatial location, resulting in a logical consistency tensor. A logical constraint loss is constructed based on the logical consistency tensor, and a joint construction is performed. The total loss function updates the parameters of the multi-source attention feature network and the neural symbol validator simultaneously through the backpropagation algorithm. Finally, the multi-source detection data of the test section are processed in the same way, and the output logical consistency tensor of the test section is used as the evaluation result to correct the generated probability map of the hidden gas structure of the test section. This realizes the integration of geological qualitative knowledge into the training and inference process of the deep learning model in a computable form, so that the model prediction results not only fit the multi-source detection data, but also conform to the basic geological principles. It solves the technical problems of strong ambiguity of single geophysical data and difficulty in quantifying and coupling geological qualitative knowledge, and significantly improves the accuracy, geological interpretability and substitution ability of hidden gas structure identification. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 A flowchart illustrating an intelligent identification method for concealed gas structures in tunnels based on geological constraints, provided by this invention.
[0027] Figure 2 This is a schematic diagram of the process of calculating the logical consistency score of each spatial location to obtain the logical consistency tensor in an optional embodiment of the present invention.
[0028] Figure 3 This is a schematic diagram of a tunnel concealed gas structure intelligent identification system based on geological constraints, provided by the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0030] refer to Figure 1 The document presents a flowchart illustrating a method for intelligent identification of concealed gas structures in tunnels based on geological constraints, as provided in this application. The method includes the following steps:
[0031] S1. Based on the pre-set geological expert knowledge, a knowledge base is constructed by transforming the qualitative geological rules into formal logical rules, including logical predicates related to tunnel geology and gas characteristics.
[0032] Specifically, the pre-defined geological expert knowledge originates from the practical experience of senior geological engineers who have long been engaged in tunnel geological exploration and gas disaster prevention, as well as mature tectonic gas control theories in coalfield geology and structural geology. Its core includes qualitative knowledge such as the correlation rules between tectonics and gas enrichment, and the relationship between stratigraphic lithology and gas migration. To address the technical challenge of deep learning models being unable to understand and utilize qualitative geological knowledge, these qualitative rules need to be transformed into formal logical rules. Specifically, first-order predicate logic is used as the formal expression tool. Through clearly defined logical predicates, quantifiers, and logical connectives, descriptive geological rules are transformed into computable and inferable symbolic rules.
[0033] The design of logical predicates revolves around the tunnel's geology and gas characteristics, and is mainly divided into three categories: geological structure predicates, gas characteristic predicates, and spatial relationship predicates. Each type of predicate has clearly defined parameters and semantic interpretations to ensure that the predicates can accurately correspond to the feature information in the multi-source detection data. Geological structure predicates are used to describe the geological structure morphology and distribution around the tunnel, and to characterize the spatial location as an anticline core, fault hanging wall, or a zone with dense fractures. Gas characteristic predicates are used to describe the gas enrichment-related characteristics of the spatial location, and to characterize the spatial location as a gas-rich area, the presence of high-pressure gas pockets, and other gas-related characteristics. Their semantics correspond to the gas content, gas pressure, and other feature parameters in the multi-source detection data. Spatial relationship predicates are used to describe the geological connections between different spatial locations, and to characterize the adjacency relationships and tectonic unit relationships between spatial locations, providing spatial logical support for multi-rule joint reasoning.
[0034] After the predicates are defined, the geological qualitative rules are transformed into formal logic rules. The transformation process strictly follows geological laws to ensure the accuracy and effectiveness of the rules. The formal logic rules are represented using first-order predicate logic, with the core logical expression being: ,in It is a universal quantifier, indicating that it applies to all spatial locations. , As a premise predicate, it represents spatial location. Geological or gas characteristics, The concluding predicate represents the spatial location derived from the premise predicate. The associated features, As an implicative conjunction, it indicates that a conclusion can be derived from the premises.
[0035] For qualitative rules that require joint judgment based on multiple conditions, their formal logical expression is: ,in , For multiple premise predicates, The AND connector indicates that multiple preconditions must be met simultaneously to arrive at a conclusion. For constraint-type logical rules, their formal logical expression is: ,in The logical OR conjunction indicates a conclusion predicate. For a statement to be valid, it must have at least one premise predicate. , , Established.
[0036] All formal logic rules were reviewed and verified by geological engineers and revised based on historical geological survey data of the tunnel to ensure that the rules matched the actual geological conditions. Finally, the defined logical predicates and formal logic rules were organized into a knowledge base, stored in a standardized format, and supported for adding, modifying, and calling rules. The knowledge base structure includes a predicate dictionary, a rule base, and an interpreter. The predicate dictionary stores the definitions, parameters, and semantics of all predicates, the rule base stores all formal logic rules, and the interpreter is used to parse the logical relationships of the rules, providing support for subsequent logical reasoning.
[0037] S2. Register the collected multi-source tunnel detection data to the tunnel coordinate system to generate a multi-source data tensor.
[0038] Specifically, the collected multi-source tunnel detection data covers multiple types of core data, with significant differences in the acquisition methods and raw formats of each type: one type is waveform detection data, which uses specialized detection instruments to continuously detect along the tunnel face and surrounding rock. The raw data is a two-dimensional or three-dimensional waveform matrix, and the data value is the waveform reflection amplitude, reflecting the differences in the physical properties of the surrounding rock and thus characterizing the distribution of geological structures; another type is borehole data, which comes from exploratory boreholes during tunnel construction. The collected parameters include rock resistivity, porosity, gas content, and gas pressure, and the raw data is a one-dimensional depth-parameter curve; the third type is measured data, which uses direct measurement methods to set up measuring points at the tunnel face and surrounding area. The measured data is a single-point feature value used to verify the accuracy of subsequent identification results.
[0039] Due to the different acquisition methods used for various types of detection data, their original coordinate systems, spatial resolutions, and data formats vary significantly. Directly using these data for model training and feature extraction can lead to problems such as feature misalignment and fusion failure. Therefore, unified registration is necessary to map all data to a unified tunnel coordinate system. First, a tunnel coordinate system is defined, with a suitable location at the tunnel entrance as the origin, the tunnel axis as the X-axis, the horizontal direction perpendicular to the tunnel axis as the Y-axis, and the direction perpendicular to the ground as the Z-axis. A unified spatial resolution is set so that each discrete spatial coordinate point corresponds to a fixed-volume cubic unit, ensuring that all data are aligned in spatial dimensions.
[0040] Coordinate transformation and registration are performed for different types of data: For waveform-type detection data, the original coordinates are mapped to the corresponding axes of the tunnel coordinate system, and the sampling interval is adjusted using interpolation methods to ensure that the spatial resolution is consistent with the tunnel coordinate system; For borehole-type data, the one-dimensional depth-parameter curve is interpolated into the discrete grid of the tunnel coordinate system based on the borehole's tunnel coordinate system coordinates. For areas not covered by the borehole, interpolation methods are used to supplement the data to ensure data integrity, and each type of parameter is treated as an independent feature channel; For measured data, the coordinates of each measuring point are mapped to the tunnel coordinate system, and the measured values are assigned to the corresponding discrete spatial coordinate points. Interpolation methods are used to supplement the surrounding areas to ensure the spatial continuity of the data.
[0041] After all data has been registered in coordinates and unified in resolution, a multi-source data tensor is generated. The multi-source data tensor has the following dimensions: ,in , , These represent the number of discrete points in the three dimensions of the tunnel coordinate system, determined based on the tunnel detection range. This represents the number of feature channels, corresponding to the feature parameters of various types of detection data.
[0042] To eliminate the influence of different data units and ensure the stability of model training, the multi-source data tensors are normalized using a min-max normalization method, mapping the value of each feature channel to the [0,1] interval. The specific calculation formula is as follows: .in For any original value of a certain feature channel, This is the normalized value of the numerical value. The minimum value of all original data for this feature channel. The maximum value of all original data for this feature channel can be calculated by iterating through all discrete coordinate points of this channel. and .
[0043] Meanwhile, the 3σ criterion is used to remove outliers from each feature channel. The calculation process first determines the mean of all data in a certain feature channel. and standard deviation The calculation formulas are as follows: , .in This represents the total number of discrete data points in this feature channel. For the first feature channel Individual discrete data values. This will exceed... Values outside the specified range are identified as outliers and replaced with the mean of discrete points surrounding the outlier to avoid interference from outliers in subsequent feature extraction and model training. The resulting multi-source data tensor has each element representing the normalized probe value of the corresponding spatial coordinate point and feature channel, providing a unified data foundation for subsequent feature extraction and symbolic transformation.
[0044] S3. Through a multi-source attention feature network, feature extraction, feature fusion and spatial resolution restoration are performed on the multi-source data tensor to generate a probability map of hidden gas structures in tunnels.
[0045] Specifically, the multi-source attention feature network is built based on convolutional neural networks combined with attention mechanisms. Its overall architecture consists of a feature extraction module, a multi-source attention fusion module, and a spatial resolution restoration module. These three modules work together to achieve effective feature mining and fusion of multi-source data, ultimately outputting a hidden gas construction probability map consistent with the tensor space dimension of the multi-source data. The core function of the feature extraction module is to extract discriminative local and global features based on the characteristics of different feature channels, addressing the problem of insufficient representational power of single data features. The multi-source attention fusion module adaptively allocates weights to different feature channels, highlighting effective features and suppressing redundant features to achieve deep fusion of multi-source features. The spatial resolution restoration module restores the fused low-resolution feature map to the spatial resolution of the original multi-source data tensor, ensuring that the probability map accurately corresponds to the actual spatial location.
[0046] The feature extraction module employs a multi-branch convolutional structure, designing dedicated convolutional layers for different types of feature channels to ensure the specificity and effectiveness of feature extraction. For waveform-type data feature channels, convolutional layers with small kernel sizes are used, with a stride of 1 and a "same" padding mode to ensure that the spatial dimension of the feature map remains unchanged after convolution. Each convolutional layer is followed by a batch normalization layer and a ReLU activation function. The batch normalization layer accelerates model training and alleviates the vanishing gradient problem. Its specific calculation process involves first standardizing the feature map output by the convolution, adjusting the mean of each feature channel to 0 and the variance to 1, and then inversely adjusting it using a scaling factor and offset to ensure the expressive power of the features. The ReLU activation function is calculated as follows: ,in The input value is the activation function, which can effectively alleviate gradient vanishing and enhance the nonlinear expressive power of the model.
[0047] For numerical feature channels, convolutional layers with large kernels are used with a stride of 1 and a "same" padding mode to extract global features and capture the correlation between numerical distribution and geological structure. The feature extraction module uses multiple convolutional layers, divided into multiple convolutional groups, each containing multiple convolutional layers. Each convolutional group extracts shallow, mid, and deep features respectively, with the number of output feature map channels gradually increasing in each convolutional group to ensure rich feature representation.
[0048] The multi-source attention fusion module is built on a channel attention mechanism. Its core is to achieve accurate fusion of multi-source features by adaptively calculating the weights of each feature channel, thus solving the redundancy and complementarity issues inherent in multi-source data. Specifically, the feature maps output by the feature extraction module are first unified in dimensionality by using a 1×1×1 convolutional layer to adjust the number of channels in all feature maps to the same value, ensuring consistency in subsequent weight calculations.
[0049] Then, global average pooling is performed on the unified-dimensional feature maps, compressing the 3D feature map of each feature channel into a 1D global feature vector. The calculation method for global average pooling is as follows: .in For the first Global feature vectors of each feature channel , , These are the height, width, and depth of the feature map, respectively. For the first Each feature channel is located at The eigenvalue at that location.
[0050] Next, the global feature vectors of all feature channels are input into a two-layer fully connected network. The first fully connected layer compresses the feature vector dimension from a uniform number of channels to a specified dimension, and the second fully connected layer restores the dimension to a uniform number of channels, outputting the initial values of the attention weights for each feature channel. Finally, the initial values of the attention weights are normalized using the Softmax function to ensure that the sum of the weights of all feature channels is 1. The normalization formula is as follows: .in For the first Attention weights for each feature channel, For the first The output value of the global feature vector of each feature channel after passing through a fully connected layer. This represents the total number of feature channels. After obtaining the attention weights for each feature channel, the feature map of each feature channel is multiplied by its corresponding weight, and then element-wise summed to obtain the fused feature map.
[0051] The spatial resolution restoration module employs a transposed convolutional layer combined with residual connections. Its core function is to restore the fused low-resolution feature map to a spatial resolution consistent with the original multi-source data tensor. The transposed convolutional layer gradually improves the spatial resolution of the feature map to its original level through multiple transposed convolution operations, while simultaneously adjusting the number of channels in the feature map to 1, corresponding to the probability of gas structure presence. To mitigate gradient vanishing and feature distortion issues during transposed convolution, residual connections are introduced. These connections element-wise add the shallow, high-resolution feature map output from the feature extraction module to the transposed convolutional feature map, allowing shallow features to be directly passed to the output, thus improving the accuracy of feature restoration.
[0052] Finally, the feature map with restored spatial resolution is input into the Sigmoid activation function, mapping the feature values to the [0,1] interval. The formula for calculating the Sigmoid activation function is as follows: ,in The input value is the activation function, and the output value at each spatial location is the probability of a hidden gas structure existing at that location. The generated tunnel hidden gas structure probability map has the same spatial dimension as the original multi-source data tensor. The closer the probability value is to 1, the greater the possibility of a hidden gas structure existing at that location, and the closer it is to 0, the smaller the possibility.
[0053] S4. Combining the probability map of hidden gas formation in tunnels, symbolic predicate truth transformation is performed on the multi-source data tensor to generate symbolic fact truth tensors.
[0054] Specifically, the core purpose of symbolic predicate truth transformation is to convert numerical multi-source data tensors into symbolic factual truths, enabling geological logic rules to reason and judge them. This bridges the gap between data-driven and knowledge-driven approaches. Essentially, it associates numerical features from multi-source data with logical predicates in a knowledge base. By setting reasonable judgment criteria, numerical features are converted into Boolean values or fuzzy truth values, ultimately generating symbolic factual truth tensors. The implementation process of symbolic predicate truth transformation strictly adheres to the logical predicates in the knowledge base. For each logical predicate, its corresponding multi-source data feature channels and judgment criteria are determined. These criteria are established through statistical analysis combined with the experience of geological experts, ensuring that the transformation results accurately reflect geological facts.
[0055] For each type of logical predicate, its corresponding feature channel and judgment criteria are determined: Geological structure predicates correspond to waveform-type detection data channels and fracture-related feature channels. The judgment criteria are determined by the numerical characteristics and spatial correlation characteristics of the feature channels. The truth value of the predicate is 1 when the judgment criteria are met, and 0 otherwise. Gas feature predicates correspond to gas-related feature channels. The judgment criteria are determined by the numerical threshold of gas-related parameters. The truth value of the predicate is 1 when the judgment criteria are met, and 0 otherwise. Spatial relationship predicates determine the truth value by calculating spatial coordinates. The judgment criteria are determined based on the distance or range between spatial locations. The truth value of the predicate is 1 when the judgment criteria are met, and 0 otherwise.
[0056] After determining the judgment criteria for each predicate, the truth value transformation is optimized by combining the probability map of hidden gas structures in tunnels to avoid errors caused by single numerical judgments. Specifically, for gas feature predicates, if the probability of hidden gas structures at a certain spatial location reaches a set threshold and its corresponding numerical features are close to the judgment criteria, the truth value of the predicate is adjusted. In this way, the synergy between data-driven probability prediction and symbolic truth value transformation is achieved, improving the accuracy of truth value transformation.
[0057] For some predicates with strong fuzziness, fuzzy logic is used instead of Boolean logic, and the truth value is a continuous value in the interval [0,1]. The specific calculation method is as follows: .in This is the fuzzy truth value of the predicate. This represents the number of conditions that satisfy the predicate judgment criterion for this spatial location. This represents the total number of conditions for the predicate judgment criteria, enabling the truth value to more accurately reflect the ambiguity of geological facts.
[0058] Finally, a symbolic fact truth tensor is generated. The spatial dimension of the symbolic fact truth tensor is consistent with that of the multi-source data tensor, the number of channels equals the number of logical predicates in the knowledge base, and each element of the tensor represents the truth value of the corresponding spatial location and predicate. The generated symbolic fact truth tensor transforms the numerical multi-source probe data into symbolic facts that the model can understand, providing direct input for the logical reasoning of the subsequent neural symbolic verifier.
[0059] S5. Input the symbolic fact truth tensor into the neural symbolic verifier with geological logic constraints. Perform logical reasoning on the symbolic fact truth tensor in the neural symbolic verifier according to the logical rules in the knowledge base to calculate the logical consistency score of each spatial location and obtain the logical consistency tensor; where the spatial location represents each discrete coordinate point in the multi-source data tensor.
[0060] Specifically, the neural symbolic verifier is the core module of this invention, enabling deep coupling between geological logical constraints and deep learning models. Built upon a neural symbolic computation framework, it transforms formal logical rules in the knowledge base into computable neural network modules, achieving a fusion of logical reasoning and numerical computation. It receives symbolic fact truth tensors as input, judges the consistency between the symbolic facts and geological logical rules at each spatial location through logical reasoning, and outputs a logical consistency score, thus providing a basis for subsequent loss function construction. The neural symbolic verifier consists of three sub-modules: a rule encoding module, a truth reasoning module, and a consistency score calculation module. These sub-modules work collaboratively to complete logical reasoning and consistency score calculation.
[0061] The core function of the rule encoding module is to transform the formal logical rules in the knowledge base into a computational graph of a neural network, enabling the logical rules to be numerically computed. Specifically, for each first-order logical rule in the knowledge base, a corresponding logical computation unit is constructed based on its logical structure. This unit consists of multiple basic logical operation nodes, including AND, OR, implication, and NOT operations. Each node is implemented numerically to ensure it can receive truth tensor inputs and output numerical computation results.
[0062] The numerical implementation formula of the implied operation is as follows ,in The truth value of the premise predicate, For the truth value of the conclusion predicate, when That is, when the premise is true, That is, the truth value of the conclusion predicate determines the result of the operation; when That is, when the premise is false, That is, the implication is always true, which is completely consistent with the semantics of the first-order logic rule.
[0063] The numerical implementation formula for AND operation is as follows: ,in , The result of the operation is the joint truth value of the two premise predicates, reflecting the degree to which both premise conditions are simultaneously satisfied. The numerical implementation formula for the OR operation is: ,in , Let be the truth value of the two premise predicates, and the result of the operation reflects the degree to which at least one of the two premise conditions is satisfied. The numerical implementation formula for the non-operational method is as follows: ,in The result of the operation is the negation of the truth value of a predicate. The computational units corresponding to all logical rules are integrated to form a rule encoding network. The input of the rule encoding network is a symbolic fact truth tensor, and the output is the degree to which each rule is satisfied at each spatial location.
[0064] The truth reasoning module applies all logical rules from the knowledge base to each spatial location within the symbolic truth tensor to complete the logical reasoning process and calculate the degree to which each rule is satisfied at each spatial location. Since both the symbolic truth tensor and the rule encoding network support parallel computation, GPU-accelerated reasoning is employed. The symbolic truth tensor is divided into multiple batches according to spatial dimensions, and each batch is input into the rule encoding network. Simultaneously, parallel reasoning is performed on all spatial locations within each batch, significantly improving reasoning efficiency and meeting real-time engineering requirements.
[0065] During the reasoning process, for each spatial location, the truth values of all predicates corresponding to it are input into the rule encoding network. Each logical computation unit in the network calculates the degree of satisfaction of the corresponding rule at that location, obtaining the degree of satisfaction value of each rule at that location, with a value range of [0,1]. The closer the degree of satisfaction value is to 1, the more the symbolic fact at that location conforms to the logical rule; the closer it is to 0, the less it conforms to the rule.
[0066] The consistency score calculation module is used to integrate the degree of satisfaction of all rules for each spatial location and calculate the logical consistency score for that location, reflecting the overall consistency between the symbolic facts at that location and the logical rules of the entire knowledge base. The specific calculation process first assigns a corresponding weight coefficient based on the importance of each logical rule. These weight coefficients are determined by geological experts using the analytic hierarchy process (AHP). Core rules have higher weight coefficients, while auxiliary rules have lower weight coefficients, and the sum of the weight coefficients for all rules is 1.
[0067] Then, for each spatial location, the weighted sum of the degree to which all rules are satisfied at that location and their corresponding weight coefficients is calculated, which is the logical consistency score for that location. The calculation formula is as follows: .in Spatial location Logical consistency score, This represents the total number of logical rules in the knowledge base. For the first The weight coefficient of each rule, For the first Rule in spatial location The degree of satisfaction. The value range is [0,1]. The closer it is to 1, the more consistent the symbolic facts at that location are with the logical rules in the knowledge base, and the more they conform to geological laws; The closer it is to 0, the more serious the contradiction between the symbolic facts of that location and the rules of geological logic, and the more likely there is a misjudgment.
[0068] Finally, the logical consistency scores of each spatial location are arranged according to spatial coordinates to generate a logical consistency tensor. The spatial dimension of this tensor is consistent with that of the multi-source data tensor and the symbolic fact truth tensor. Each element is the logical consistency score of the corresponding spatial location, providing the core input for the construction of the subsequent loss function.
[0069] S6. Construct a logical constraint loss based on the logical consistency tensor, and construct a total loss function by combining the logical constraint loss; based on the total loss function, update the parameters of the multi-source attention feature network and the neural symbol validator through the backpropagation algorithm.
[0070] Specifically, the core objective of this step is to integrate geological logic constraints into the model training process. By using a loss function to constrain the model's predictions, it ensures that the predictions conform to both the characteristics of multi-source exploration data and geological logic rules, thus addressing the technical challenge that existing models' predictions may violate geological laws. Simultaneously, the parameters of the multi-source attention feature network and the neural symbol validator are updated using a backpropagation algorithm, achieving synergistic optimization of the two modules and improving the model's recognition accuracy and geological plausibility.
[0071] First, the logical constraint loss is constructed. The core design of the logical constraint loss is to penalize spatial locations with low logical consistency scores, forcing the model to adjust its parameters to ensure that the symbolic facts corresponding to the prediction results are consistent with geological logical rules. The logical constraint loss uses a variant of the cross-entropy loss, combined with the logical consistency tensor and the probability map of concealed gas formation, for calculation. The specific formula is as follows:
[0072]
[0073] in, For logical constraint loss value, This represents the total number of discrete spatial locations in a multi-source data tensor. Spatial location Logical consistency score, Spatial location The probability of latent gas formation is calculated. The core logic of this loss function is that when the logical consistency score of a spatial location is high, it indicates that the symbolic facts of that location conform to geological logic rules. In this case, the predicted probability is brought closer to the true label by several constraints, ensuring the accuracy of the predicted probability. When the logical consistency score is low, it indicates that there is a contradiction between the symbolic facts of that location and geological logic rules. In this case, the penalty for that location is increased by the weight terms, forcing the model to adjust the predicted probability to conform to geological logic rules. When the logical consistency score is in the middle range, a moderate penalty is used to balance prediction accuracy and logical consistency.
[0074] Secondly, the total loss function is constructed. The total loss function consists of logistic constraint loss and basic prediction loss. The basic prediction loss constrains the deviation between the model's predictions and the true labels, ensuring the model's basic recognition accuracy. The logistic constraint loss constrains the model's predictions to conform to geological logic rules, improving the model's geological rationality. The basic prediction loss uses binary cross-entropy loss, suitable for binary classification problems involving the presence / absence of gas structures. The specific formula is as follows:
[0075]
[0076] in, Based on the predicted loss value, This represents the total number of discrete spatial locations in a multi-source data tensor. Spatial location The true label, This indicates the presence of a hidden gas structure at that location. This indicates that it does not exist. Spatial location The probability of hidden gas formation.
[0077] The total loss function is a weighted sum of the basic prediction loss and the logical constraint loss, and the specific formula is as follows: .in This is the total loss function value. and The weighting coefficient is used to balance the accuracy of basic predictions and the consistency of geological logic. Its specific value is determined through cross-validation to ensure that the model can accurately fit multi-source detection data and that the prediction results conform to geological laws.
[0078] To prevent overfitting, an L2 regularization term is added to the total loss function, with the specific formula as follows: .in The regularization coefficient is . The sum of squares of all trainable parameters for the multi-source attention feature network and the neural symbol validator is used to suppress excessively large parameters through regularization terms, thereby improving the model's generalization ability.
[0079] Finally, based on the total loss function, the parameters of the multi-source attention feature network and the neural symbol validator are updated using the backpropagation algorithm. The parameter update process employs mini-batch gradient descent combined with the Adam optimizer. Specifically, the multi-source data tensor, the symbolic fact tensor, and the true labels are first divided into batches. One batch of data is selected and input into the model at a time. The multi-source attention feature network generates a hidden gas construction probability map, and the neural symbol validator generates a logical consistency tensor. The total loss function value for that batch is then calculated.
[0080] Then, the backpropagation algorithm is used to calculate the partial derivatives of the total loss function with respect to all trainable parameters of the model, i.e., the gradients. The gradient calculation uses the chain rule, starting from the total loss function and gradually backpropagating to the input layer of the model to obtain the gradient value of each parameter. The formula for calculating the gradient is as follows: ,in For any trainable parameters of the model, The gradient of the total loss function with respect to this parameter. The gradient of the prediction loss with respect to this parameter is used as the basis. The gradient of the logical constraint loss with respect to that parameter.
[0081] Next, the Adam optimizer is used to update the parameters. The Adam optimizer combines the advantages of momentum gradient descent and adaptive learning rate, which can accelerate model convergence. Its parameter update formula is as follows: .in For parameters to be updated, For learning rate, For the first-order momentum estimate of the parameters, For the second-order momentum estimate of the parameters, To prevent tiny constants with a denominator of zero.
[0082] Finally, the above process is repeated, iterating through all batches of data to complete one training epoch. An early stopping strategy is employed, using the total loss function of the validation set as an indicator. Training is stopped when the validation set loss fails to decrease for several consecutive training epochs to prevent overfitting. During parameter updates, the mean change of the logical consistency tensor is monitored in real time to ensure that the logical consistency score gradually improves during training, indicating that the model is gradually learning the logical constraints and achieving co-evolution driven by data and knowledge.
[0083] S7. Replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested to execute S2 to S5, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
[0084] Specifically, this step is the practical application stage of the model. The core is to use the trained multi-source attention feature network and neural symbol validator to process the multi-source detection data of the tunnel section to be measured, and to correct the prediction results through logical consistency evaluation, thereby improving the recognition accuracy and reliability and providing accurate basis for tunnel construction safety decisions.
[0085] First, multi-source detection data of the section to be measured is acquired using the same acquisition method as the training data to ensure consistency in data type, format, and resolution, thus avoiding prediction errors due to data differences. The acquired multi-source data of the section to be measured includes waveform detection data, borehole data, and measured data. The acquisition methods for each type of data are consistent with those used in the training phase to ensure data consistency and comparability.
[0086] The multi-source detection data of the cross-section to be tested replaces the multi-source detection data of the tunnel during the training process. Operations S2 to S5 are performed sequentially: the multi-source detection data is uniformly registered to generate a multi-source data tensor of the cross-section to be tested; the tensor is processed by feature extraction, feature fusion and spatial resolution restoration through a multi-source attention feature network to output a probability map of the hidden gas structure of the cross-section to be tested; combined with the probability map, the multi-source data tensor is transformed into a symbolic predicate truth value to generate a symbolic fact truth value tensor of the cross-section to be tested; the truth value tensor is input into a neural symbolic validator for logical reasoning calculation to obtain the logical consistency tensor of the cross-section to be tested.
[0087] Then, using the logical consistency tensor of the section under test as the logical consistency evaluation result, the probability map of the hidden gas structure of the section under test is corrected. The correction formula can be: .in Spatial location The corrected final probability of concealed gas formation. The probability of concealed gas structures in the cross section before correction. Spatial location The logical consistency score of the section under test. This is the mean of the probabilities of all spatial locations of the cross section to be measured before correction.
[0088] This modified formula retains the original predicted probability for spatial locations with high logical consistency scores, ensuring the accuracy of the prediction. For spatial locations with low logical consistency scores, the predicted probability is adjusted towards the overall mean, reducing the probability of misjudgment caused by violating geological logic rules. Finally, the final probability map of the hidden gas structure of the section to be tested is generated, providing accurate technical support for tunnel construction safety decisions.
[0089] The aforementioned intelligent identification method for concealed gas structures in tunnels based on geological constraints constructs a knowledge base containing geological qualitative rules. Collected multi-source tunnel detection data is uniformly registered and input into a multi-source attention feature network to generate a probability map of concealed gas structures. This probability map is then used to perform symbolic predicate truth transformation on the multi-source data tensor to obtain a symbolic fact truth tensor. This symbolic fact truth tensor is then input into a neural symbolic verifier with geological logical constraints. Logical reasoning is performed on the symbolic fact truth tensor according to the logical rules in the knowledge base to calculate the logical consistency score for each spatial location, resulting in a logical consistency tensor. Based on this logical consistency tensor, a logical constraint loss is constructed, and a total loss is jointly constructed. The loss function is used to simultaneously update the parameters of the multi-source attention feature network and the neural symbol validator through backpropagation algorithm. Finally, the multi-source detection data of the test section is processed in the same way, and the output logical consistency tensor of the test section is used as the evaluation result to correct the generated probability map of hidden gas structures in the test section. This realizes the integration of geological qualitative knowledge into the training and inference process of deep learning model in a computable form. The model prediction results not only fit the multi-source detection data, but also conform to the basic geological principles. It solves the technical problems of strong multiple solutions of single geophysical data and difficulty in quantifying and coupling geological qualitative knowledge. It significantly improves the accuracy, geological interpretability and substitution ability of hidden gas structure identification.
[0090] In one optional embodiment, a symbolic predicate truth transformation is performed on the multi-source data tensor in conjunction with the tunnel concealed gas structure probability map to generate a symbolic fact truth tensor, including the following steps:
[0091] S11. For each spatial location in the multi-source data tensor, extract the reflection wave group morphology features, transient electromagnetic apparent resistivity gradient features, and structural location features from the ground-penetrating radar profile; input the reflection wave group morphology features, transient electromagnetic apparent resistivity gradient features, and structural location features into the fault predicate generation network, and process them through the convolutional layer and fully connected layer in the fault predicate generation network to obtain the fault probability.
[0092] Specifically, the extraction of the morphological characteristics of the reflected wave group is based on the waveform signal analysis of the ground-penetrating radar profile. The reflected wave group is decomposed using wavelet transform, and three core characteristic parameters of the wave group—amplitude, frequency, and continuity—are extracted. The specific calculations are performed using the wavelet transform formula. ,in These are wavelet transform coefficients, corresponding to the morphological characteristic values of the reflected wave group. This is the scaling factor, used to control the scaling of the wavelet. This is the translation factor, used to control the translation of the wavelet. This is the time-domain signal of the ground-penetrating radar reflected wave. The db4 wavelet is chosen as the basis function to balance decomposition accuracy and computational efficiency. The transient electromagnetic apparent resistivity gradient characteristics are obtained by spatial gradient calculation of the transient electromagnetic apparent resistivity data; the calculation formula is as follows: ,in This represents the transient electromagnetic apparent resistivity gradient. This represents the transient electromagnetic apparent resistivity value. , , These are the partial derivatives of the apparent resistivity in the X, Y, and Z directions of the tunnel coordinate system, calculated using the central difference method. The structural location characteristics are derived by matching the spatial location coordinates with known geological structural boundary data, transforming them into quantitative feature values to characterize the spatial correlation between the location and known structures.
[0093] The tomographic predicate generation network employs a concatenated structure of convolutional layers and fully connected layers. The convolutional layers are used for local feature fusion of the extracted 3D features, employing 3×3×3 kernels with a stride of 1 and "same" padding. The output feature map of each convolutional layer has 64 channels. Each convolutional layer is followed by a batch normalization layer and a ReLU activation function. The ReLU activation function is calculated using the following formula: ,in The feature values output by the convolutional layers are used to enhance the non-linear expressive power of the network. Fully connected layers map the feature maps output by the convolutional layers to single probability values. Two fully connected layers are used: the first fully connected layer compresses the feature dimension from 64×X×Y×Z to 128 dimensions, and the second fully connected layer maps the 128-dimensional features to 1 dimension, outputting the tomography probability. The network output uses the Sigmoid activation function, mapping the output value to the [0,1] interval. The Sigmoid activation function is calculated using the following formula: ,in This is the output value of the second fully connected layer, the final output. This represents the fault probability at that spatial location. The closer the probability value is to 1, the greater the likelihood that a fault structure exists at that location.
[0094] S12. For each spatial location in the multi-source data tensor, extract the bending direction and radius of curvature features of the reflection phase axis in the ground-penetrating radar profile. Input the bending direction and radius of curvature features into the folded predicate generation network, and process them through the convolutional layer and fully connected layer in the folded predicate generation network to obtain the anticline core probability.
[0095] Specifically, the bending direction of the reflection phase axis is determined by curve fitting of the phase axis in the ground-penetrating radar profile. First, the least squares method is used to perform a quadratic curve fitting of the reflection phase axis, and the fitting formula is as follows: ,in The depth coordinates are for the same phase axis. The horizontal coordinate is... , , The fitting coefficients are obtained by minimizing the fitting error. The solution is obtained, where This represents the number of sampling points on the same phase axis. , For the first The coordinates of each sampling point. Based on the fitting coefficients. The sign indicates the direction of bending. This indicates that the axis of the same phase bends upwards, which is a characteristic of an anticlinal structure. This indicates that the in-phase axis is bent downwards, corresponding to the characteristics of a syncline structure. The bending direction is then converted into a quantified characteristic value. , hour , hour .
[0096] The radius of curvature characteristic is calculated using the curvature formula for a conic section. The curvature calculation formula is as follows: ,in To reflect the curvature of the in-phase axis at that spatial location, , These are the quadratic fitting coefficients. Let be the horizontal coordinate of this spatial location, and be the radius of curvature. It is the reciprocal of the curvature, that is The radius of curvature is used to characterize the smoothness of the bending of the phase axis. A smaller radius of curvature indicates a more severe bending of the phase axis, and a closer resemblance to the characteristics of the anticline core. The radius of curvature is then normalized using the following formula: ,in The normalized radius of curvature eigenvalue. , These are the minimum and maximum radii of curvature for all spatial locations, respectively.
[0097] The structure of the wrinkled predicate generation network is consistent with that of the tortuous predicate generation network, both consisting of convolutional layers and fully connected layers. The convolutional layers use 3×3×3 kernels to fuse feature information of bending direction and radius of curvature. The output feature map has 64 channels and is fed into the fully connected layer after batch normalization and ReLU activation. The fully connected layer consists of two layers: the first layer compresses the feature dimension to 64 dimensions, and the second layer maps it to 1 dimension. The output is converted into a backslope kernel probability by the Sigmoid activation function. The probability value ranges from [0,1] and is used to characterize the possibility that the spatial location is a backslope kernel. The higher the probability value, the more significant the feature of the corresponding backslope kernel.
[0098] S13. For each spatial location in the multi-source data tensor, extract the transient electromagnetic apparent resistivity value from the ground-penetrating radar profile, input the transient electromagnetic apparent resistivity value into the lithology predicate generation network, and process it through the convolutional layer and fully connected layer in the lithology predicate generation network to obtain the sandstone probability and mudstone probability.
[0099] Specifically, the transient electromagnetic apparent resistivity value is directly extracted from the transient electromagnetic feature channel of the multi-source data tensor. After extraction, the min-max normalization method is used to eliminate the influence of dimensions. The normalization formula is as follows: ,in This is the normalized transient electromagnetic apparent resistivity value. This is the original apparent resistivity value. , These represent the minimum and maximum values of the original apparent resistivity for all spatial locations. Since there is a significant difference in apparent resistivity between sandstone and mudstone (sandstone has a significantly higher apparent resistivity than mudstone), the two lithologies can be effectively distinguished by their apparent resistivity values. Therefore, the normalized apparent resistivity values are used as the input features for the lithology predicate generation network.
[0100] The lithology predicate generation network adopts a dual-output structure, consisting of convolutional layers and fully connected layers. The convolutional layers extract the spatial distribution features of apparent resistivity values, using 5×5×5 kernels with a stride of 1 and "same" padding. The output feature map has 32 channels and is fed into the fully connected layers after batch normalization and ReLU activation. The fully connected layers consist of three layers: the first layer compresses the feature dimension of the convolutional layer output to 64 dimensions, the second layer further compresses it to 32 dimensions, and the third layer has two output branches, outputting sandstone and mudstone probabilities respectively. Each output branch uses the Sigmoid activation function to map the output values to the [0,1] interval. The outputs of the two branches satisfy... ,in For sandstone probability, The probability of mudstone represents the likelihood of the spatial location being sandstone or mudstone, respectively. The closer the probability value is to 1, the greater the likelihood of the corresponding lithology.
[0101] S14. For each spatial location in the multi-source data tensor, obtain the mudstone thickness field through borehole interpolation, extract the mudstone thickness value at the corresponding location from the mudstone thickness field, input the mudstone thickness value into the thickness predicate generation network, process it through the fully connected layer in the thickness predicate generation network, and obtain the thick mudstone probability.
[0102] Specifically, the mudstone thickness field is calculated through interpolation of borehole logging data using the Kriging interpolation method. The core formula for Kriging interpolation is: ,in Spatial location mudstone thickness value, For the number of holes, For the first Interpolation weighting coefficients for each borehole. For the first Measured mudstone thickness at each borehole location. Interpolation weighting coefficients. By solving the Kriging equations Received, among which Spatial location and The variogram values between Spatial location and The variogram values between To ensure the smoothness and accuracy of the interpolation results, a Gaussian model was chosen as the Lagrange multiplier and the variogram function. This interpolation method expands the discrete borehole-measured mudstone thickness values into a continuous mudstone thickness field. The spatial dimension of the mudstone thickness field is consistent with the multi-source data tensor, and each spatial location corresponds to a unique mudstone thickness value.
[0103] After extracting the mudstone thickness value at each spatial location from the mudstone thickness field, normalization is performed. The normalization formula is as follows: ,in This represents the normalized mudstone thickness value. This represents the original mudstone thickness. , These represent the minimum and maximum values of the original mudstone thickness at all spatial locations. The thickness predicate generation network adopts a fully connected layer structure, eliminating the need for convolutional layers. Since the mudstone thickness value is a single numerical feature, there is no need to extract spatial features. The fully connected layer consists of two layers: the first layer maps the input 1D thickness feature to 32D, and the second layer maps it to 1D. The output is converted into a thick mudstone probability using a Sigmoid activation function. The probability value ranges from [0,1], representing the likelihood that the spatial location contains thick mudstone. The higher the probability value, the greater the mudstone thickness, and the more it conforms to the characteristics of thick mudstone.
[0104] S15. The probability values of the fault probability, anticline core probability, sandstone probability, mudstone probability, thick mudstone probability, and tunnel hidden gas structure probability map at the corresponding locations are spliced together to generate a symbolic factual truth tensor.
[0105] Specifically, the splicing process uses a channel-dimensional splicing method, where all probability values are continuous values in the interval [0,1], corresponding to different predicate truth values in the symbolic fact truth tensor. The splicing formula is as follows: ,in To symbolize the truth tensor, `concat` is the channel concatenation function. Let f be the fault probability tensor. Let be the probability tensor of the anticline core. For sandstone probability tensor, Let be the mudstone probability tensor. For thick mudstone, the probability tensor is... This is the probability tensor of the hidden gas structure in the tunnel.
[0106] All probability tensors have the same spatial dimension as the multi-source data tensor. ,in , , These represent the number of discrete points in the three dimensions of the tunnel coordinate system. The dimension of the symbolic fact tensor generated after splicing is... The system has 6 channels, each corresponding to a probability value. Each channel's element represents the probability value of its corresponding spatial location, i.e., the truth value of the predicate. This symbolic fact truth tensor transforms geological and gas features from multi-source data into symbolic facts that the model can understand, providing direct input for the logical reasoning of the subsequent neural symbolic validator and achieving an effective connection between data-driven and knowledge-driven approaches.
[0107] refer to Figure 2 In one optional embodiment, the symbolic fact truth tensor is input into a neural symbolic verifier with geological logic constraints. Logical reasoning is performed on the symbolic fact truth tensor in the neural symbolic verifier based on logical rules in the knowledge base to calculate the logical consistency score for each spatial location, resulting in a logical consistency tensor. This includes the following steps:
[0108] S21. Based on the premises and conclusion forms of each logical rule in the knowledge base, index the truth values of the corresponding premise atomic formulas and conclusion atomic formulas from the symbolic fact truth tensor; wherein, the premise atomic formula represents the basic logical unit constituting the premises of the logical rule, and each premise atomic formula corresponds to the value of a geological predicate at a specific spatial location; the conclusion atomic formula represents the basic logical unit of the conclusion part of the logical rule, corresponding to the value of the geological predicate as the reasoning result in the knowledge base at a specific spatial location.
[0109] Specifically, each logical rule in the knowledge base consists of two parts: a premise and a conclusion. The premise is composed of one or more premise atomic formulas combined through logical connectors, while the conclusion consists of one or more conclusion atomic formulas. The premise atomic formula is the basic logical unit constituting the premise of the logical rule. Each premise atomic formula corresponds to the value of a geological predicate at a specific spatial location, and its truth value directly corresponds to the probability value of the corresponding channel and spatial location in the symbolic fact truth tensor. The conclusion atomic formula is the basic logical unit of the conclusion of the logical rule, corresponding to the value of the geological predicate as the reasoning result at a specific spatial location in the knowledge base. Its truth value is also obtained from the corresponding channel index in the symbolic fact truth tensor. The indexing process matches the spatial location coordinates with the channel index of the symbolic fact truth tensor, ensuring that the premise atomic formula and conclusion atomic formula of each logical rule can accurately index the truth value of the corresponding spatial location, providing basic data support for subsequent logical operations.
[0110] S22. Based on the truth values of the premise atomic formulas indexed from the symbolic fact truth tensor, calculate the truth values of the premises of the logical rule at their corresponding spatial locations using the Lucasiwitz conjunction formula; wherein, the formula for calculating the truth values of the premises of the logical rule at their corresponding spatial locations is:
[0111]
[0112] in, The preconditions for representing logical rules are in spatial location. Truth value; spatial location Indicates vertical index and circular index Determined discrete coordinate points; The number of atomic formulas in the preconditions of a logical rule; Indicates the first The premise atomic formula in spatial position The truth value of; This is the function for finding the maximum value.
[0113] Specifically, the Lucasiwitz conjunction operation is suitable for handling multi-premise joint judgments in fuzzy logic. It can effectively fuse the truth values of multiple premise atomic formulas to obtain the overall truth value of the premise conditions. Its calculation formula includes... The preconditions for representing logical rules are in spatial location. The truth value of takes a value in the range [0,1]. The closer the truth value is to 1, the more the preconditions for the spatial location are met; spatial location Indicates vertical index and circular index The defined discrete coordinate points correspond to the specific spatial locations of the tunnel cross-section. Discrete index representing the longitudinal depth direction of a tunnel. Discrete indices representing the circumferential direction of the tunnel, together with the discrete indexes, uniquely determine a discrete coordinate point within the tunnel cross-section. The number of atomic formulas in the premises of a logical rule, that is, the number of geological predicates that constitute the premises of the rule; Indicates the first The premise atomic formula in spatial position The truth value is obtained directly from the symbolic truth tensor, and its value range is [0,1]. This is a function for maximizing the value of a condition, used to ensure that the truth value of the preconditions is not less than 0. It is defined as the sum of the truth values of multiple precondition atomic formulas minus... When the result is less than 0, 0 is taken as the truth value of the premise condition, which conforms to the semantics of conjunction operation in fuzzy logic.
[0114] S23. Based on the truth values of the premises and conclusions of the logical rule in their corresponding spatial locations, calculate the rule satisfaction degree of the logical rule in the corresponding spatial location using the Lucasiewicz implication formula; wherein, the formula for calculating the rule satisfaction degree is:
[0115]
[0116] in, Representing the spatial location of logical rules Rule satisfaction The preconditions for representing logical rules are in spatial location. The truth value of , The spatial location of the conclusion part of a logical rule. The truth value of , This is a function that takes the minimum value.
[0117] Specifically, rule satisfaction is used to characterize the degree of fit between a symbolic fact at a specific spatial location and a single logical rule. It achieves the correlation calculation between the truth values of the premises and the truth values of the conclusion through the Lucasiewicz implication operation. Its calculation formula includes... Representing the spatial location of logical rules The rule satisfaction degree, with a value range of [0,1], indicates that the symbolic facts of the spatial location are more consistent with the logical rule and more in line with geological laws. Consistent with the definition in S22, the preconditions for logical rules are in spatial location. The truth value of; The spatial location of the conclusion part of a logical rule. The truth value is obtained from the channel index of the corresponding conclusion atom formula in the symbolic fact truth tensor, and the value range is [0,1]. The minimum value function is used to ensure that the rule satisfaction degree is no greater than 1, which conforms to the semantics of implied operations in fuzzy logic. When the value is greater than 1, 1 is taken as the rule satisfaction, that is, the spatial location completely satisfies the logical rule at this time.
[0118] S24. Based on the confidence weights of the logical rules pre-defined in the knowledge base, the rule satisfaction is weighted to obtain the weighted rule satisfaction of the logical rule at the corresponding spatial location; wherein, the formula for calculating the weighted rule satisfaction is:
[0119]
[0120] in, Representation of logical rules In spatial location The weighted rule satisfaction For logical rules The confidence weights, and ; Representation of logical rules In spatial location Rule satisfaction; This refers to the index number of the logical rule in the knowledge base.
[0121] Specifically, due to the varying geological importance of different logical rules in the knowledge base, core geological rules (such as the core rule of tectonic gas control) have higher confidence weights and require weighted processing to highlight their impact on logical consistency assessment. The formula for calculating the weighted rule satisfaction is as follows: Representation of logical rules In spatial location The weighted rule satisfaction degree has a value range of [0,1]. For logical rules The confidence weights, and The weight values are pre-set by geological experts based on geological laws and engineering experience, and the core rules... Values close to 1, auxiliary rules The value is close to 0; Representation of logical rules In spatial location The rule satisfaction degree, i.e., the degree calculated in S23 ; This is the index number of the logical rule in the knowledge base, used to distinguish different logical rules and ensure that the weighted processing accurately corresponds to each rule. This formula, by weighting and fusing the rule satisfaction level with a benchmark value of 1, retains the core information of rule satisfaction while reflecting the differences in importance between different rules through confidence weights.
[0122] S25. For all logical rules in the knowledge base, calculate the average weighted rule satisfaction as the logical consistency score for the corresponding spatial location; wherein, the formula for calculating the logical consistency score is:
[0123]
[0124] in, Indicates spatial location Logical consistency score, This represents the total number of logical rules in the knowledge base.
[0125] Specifically, the logical consistency score is used to characterize the overall fit between symbolic facts at a specific spatial location and all logical rules in the knowledge base. It is obtained by averaging the weighted rule satisfaction scores of all rules. The calculation formula is as follows: Indicates spatial location The logical consistency score ranges from [0,1]. The closer the score is to 1, the higher the degree of fit between the symbolic facts of the spatial location and all geological logical rules, and the more it conforms to geological laws. This represents the total number of logical rules in the knowledge base, that is, the number of all logical rules involved in the reasoning. Consistent with the definition in S24, this is a logical rule. In spatial location The weighted rule satisfaction; for all The weighted rule satisfaction scores of each logical rule are summed and then divided by the total number of rules. The average degree of fit of the spatial location is obtained, which is the logical consistency score.
[0126] S26. Arrange the logical consistency scores of all positions according to their spatial indices and generate a logical consistency tensor.
[0127] Specifically, spatial index is spatial location. Vertical index and circular index Arrange each spatial location in index order Corresponding logical consistency score The elements are arranged to form a logically consistent tensor. This tensor maintains the same spatial dimension as the symbolic fact truth tensor and the multi-source data tensor, with each element corresponding to a spatial location. The logical consistency score fully preserves the logical consistency information of all discrete coordinate points within the tunnel cross-section, providing core input for the subsequent construction of logical constraint loss and the updating of model parameters, thus realizing the effective constraint of geological logical rules on the model prediction results.
[0128] In an optional embodiment, the probability map of concealed gas formation on the cross-section under test is modified by using the logical consistency tensor of the cross-section under test as the result of the logical consistency evaluation, thereby generating the final probability map of concealed gas formation on the cross-section under test. This includes the following steps:
[0129] S31. Based on the probability map of the concealed gas structure of the section to be measured and the logical consistency tensor of the section to be measured, a rule-guided probability correction is performed using the iterative fixed-point method to generate the corrected probability map of the concealed gas structure of the section to be measured; wherein, the iterative correction formula of the corrected probability map of the concealed gas structure of the section to be measured is:
[0130]
[0131] in, The number of iterations. For the first The probability map of hidden gas structures in the cross section under test after each iteration step. , This is the probability diagram of hidden gas structures in the cross section before correction. These are the weighting coefficients; Indicates the first In each iteration step, the symbolic factual truth tensor of the cross section to be tested is generated based on the modified probability map of the hidden gas structure of the cross section to be tested; A set of logical rules in a knowledge base; This is the logical reasoning function for the neural symbolic verifier, used to construct a probability map of the hidden gas in the cross-section under test after modification, the symbolic fact truth tensor of the cross-section under test, and the set of logical rules to output the logical consistency tensor of the cross-section under test.
[0132] Specifically, the iterative fixed-point method optimizes the probability graph through multiple iterations. Each iteration is based on the current corrected probability graph and guided by logical rules, causing the probability graph to gradually converge to an optimal state that conforms to geological logic. Its iterative correction formula includes... The iteration number represents the round of iterative optimization, and the initial iteration number. As the number of iterations increases, the corrected probability map gradually approaches the optimal solution; For the first The probability map of concealed gas structures in the cross-section under test after each iteration step, its spatial dimension is related to the probability of concealed gas structures in the cross-section under test. Figure 1 To give the corrected gas formation probability for each element at a specific spatial location; The initial conditions for iteration are as follows: the corrected probability map for the 0th iteration is the uncorrected probability map of the hidden gas structure of the cross section to be measured. This ensures that the iteration starts from the original prediction results and retains the effective features of the original prediction.
[0133] This is a weighting coefficient used to balance the original predicted probability with the correction amount guided by logical reasoning; its value range is [range missing]. Its value is determined by geological experts in combination with engineering experience and model performance, which ensures that the original prediction information is not overly weakened and that the logical rules can effectively guide the probability correction. Indicates the first In each iteration step, the symbolic fact truth tensor of the test section is generated based on the probability map of the hidden gas in the test section after the correction. Its generation method is consistent with the symbolic predicate truth value transformation logic of the previous S4. That is, based on the corrected probability map of the current iteration, the predicate truth value of the corresponding spatial location is generated in combination with the features of multi-source data to provide input for logical reasoning. It is a set of logical rules in the knowledge base, containing all formal logical rules used to constrain geological laws, and is the core basis for logical reasoning.
[0134] This is the logical inference function of the neural symbolic verifier. Its core function is to determine the probability map of the latent gas structure of the test section after correction based on the input, and the first... The symbolic truth tensor of the cross section to be tested and the set of logical rules in the round of iteration Through the logical reasoning process in S5 above, the logical consistency tensor of the cross-section to be measured in the corresponding iteration step is output. This tensor provides a logical constraint basis for the probability correction of the current iteration step, ensuring that the correction direction conforms to geological laws. During the iteration process, each round of correction incorporates the constraint of logical rules into the probability graph through this function, gradually correcting deviations in the original prediction that violate geological logic.
[0135] S32. The corrected probability map of the hidden gas structure of the cross section to be tested is used as the correction result of the corresponding iteration step. When the L2 norm of the correction results of two adjacent iteration steps is less than the preset threshold, the iteration is terminated, and the correction result of the final iteration step is used as the final probability map of the hidden gas structure of the cross section to be tested.
[0136] Specifically, during the iteration process, after each iteration is completed, the current iteration's... As the correction result of the current iteration step, the convergence of the iteration is determined by calculating the L2 norm of the correction results of two adjacent iteration steps. The L2 norm is used to quantify the difference between the correction results of two iteration steps, and its calculation formula is as follows:
[0137]
[0138] in, , The first Wheel, First Spatial position in round iteration The corrected probability values are summed to cover all spatial locations. The smaller the L2 norm, the smaller the difference between the results of two adjacent rounds of correction, and the closer the iteration is to the convergence state.
[0139] The preset threshold is a pre-defined convergence criterion determined by engineering practice and model training experience. Its value must balance convergence speed and correction accuracy. When the L2 norm of the correction results of two adjacent iterations is less than the preset threshold, it indicates that the iteration has converged, and further iterations cannot significantly improve the correction effect; at this point, the iteration is terminated. After termination, the corrected probability map of the concealed gas structure of the cross-section obtained from the final iteration is the final probability map of the concealed gas structure of the cross-section. This final probability map retains the effective information from the original multi-source data detection and, through iterative guidance of logical rules, corrects prediction deviations that violate geological laws, possessing higher identification accuracy and geological rationality. It can provide accurate gas structure distribution data for tunnel construction safety decisions.
[0140] In one optional embodiment, the multi-source attention feature network includes an encoder, a cross-modal attention fusion module, and a decoder; the multi-source attention feature network performs feature extraction, feature fusion, and spatial resolution restoration processing on multi-source data tensors to generate a tunnel hidden gas structure probability map, including the following steps:
[0141] S41. Multi-scale feature extraction is performed on the multi-source data tensor by the encoder to obtain a multi-scale geological feature map.
[0142] Specifically, the encoder employs a multi-branch, multi-scale convolutional structure. Its core function is to perform hierarchical, multi-scale feature mining on features of different modalities and dimensions in multi-source data tensors, capturing various geologically relevant features from shallow to deep layers. Its structure consists of multiple convolutional groups, each corresponding to a different feature scale. Each convolutional group contains convolutional layers, batch normalization layers, and activation functions. The kernel size, stride, and number of output channels for each convolutional group can be set as needed to achieve accurate extraction of multi-scale features.
[0143] Specifically, the shallow convolution group uses small-sized convolution kernels to extract shallow local features from multi-source data, such as local amplitude changes in ground-penetrating radar reflected waves and local gradient differences in transient electromagnetic apparent resistivity. These features can reflect local physical property changes in the surrounding rock. The middle-layer convolution group uses medium-sized convolution kernels to extract middle-layer features, such as the boundary contours of geological structures and local anomalies in gas content, thus connecting local and regional features. The deep convolution group uses large-sized convolution kernels to extract deep global features, such as the overall morphology of concealed gas structures and the global correlation patterns of multimodal features, providing comprehensive feature support for subsequent feature fusion.
[0144] Each convolutional layer is followed by a batch normalization layer and a ReLU activation function. The batch normalization layer standardizes the convolutional output features, accelerating network training and mitigating the vanishing gradient problem. The ReLU activation function enhances the network's non-linear expressive power, ensuring the effectiveness of feature extraction. After multi-scale feature extraction by the encoder, a set of geological feature maps at different scales are output. The spatial resolution of each scale feature map gradually decreases with the extraction depth, while the number of feature channels gradually increases, forming a multi-scale, multi-level feature representation system.
[0145] S42. Cross-modal attention fusion is performed on multi-scale geological feature maps through the cross-modal attention fusion module to obtain fused feature maps.
[0146] Specifically, the core function of the cross-modal attention fusion module is to solve the problem of redundancy and complementarity of multi-source and multi-scale features. Through an adaptive attention mechanism, it assigns differentiated weights to geological feature maps of different modalities and scales, highlights features that play a key role in identifying concealed gas structures, suppresses redundant features, and achieves deep fusion of multi-source and multi-scale features.
[0147] The fusion process first unifies the dimensions of geological feature maps at various scales by using 1×1 convolutional layers to adjust the number of channels in feature maps of different scales and modalities to be consistent, ensuring the uniformity of subsequent attention weight calculations. Then, a cross-modal attention mechanism is introduced to extract global features from the unified feature maps and calculate the attention weights for features at each modality and scale. The weights are adaptively generated based on the importance of the features; features that contribute more to gas structure identification are assigned higher weights.
[0148] Specifically, the multi-scale feature maps with unified dimensions are input into the attention computation unit. Global average pooling compresses the three-dimensional feature maps into a one-dimensional global feature vector. A fully connected network then maps the global feature vector, outputting the attention weights for each feature channel. Each feature map is weighted and multiplied by its corresponding attention weight, followed by element-wise summation to obtain a preliminary fused feature map. Subsequently, a convolutional layer further integrates the features of the preliminary fused feature map, eliminating noise interference during the feature fusion process. Finally, a fused feature map with multimodal and multi-scale advantages is output. This fused feature map integrates effective information from various data types, enabling a more accurate representation of the characteristics of concealed gas structures.
[0149] S43. The spatial resolution is restored by progressively upsampling the fused feature map through the decoder, and a probability map of the hidden gas structure in the tunnel is generated.
[0150] Specifically, the core function of the decoder is to progressively upsample the low-resolution fused feature map to restore it to a spatial resolution consistent with the original multi-source data tensor. This ensures that the output hidden gas construction probability map accurately corresponds to the actual spatial location of the tunnel, providing a precise spatial reference for subsequent engineering applications. The decoder employs a structure combining transposed convolutional (deconvolutional) layers and residual connections. The transposed convolutional layers enhance the spatial resolution of the feature map, while the residual connections mitigate feature distortion and gradient vanishing issues during the upsampling process, ensuring the accuracy of resolution restoration.
[0151] The upsampling process employs a progressive approach, using multiple transposed convolutional layers to sequentially increase the spatial resolution of the fused feature map. Each transposed convolutional layer corresponds to one resolution upsampling operation, gradually restoring the resolution of the fused feature map to the level of the original multi-source data tensor. The kernel size, stride, and number of output channels of the transposed convolutional layers are set as needed to ensure that feature information is not lost during the upsampling process. Simultaneously, the number of feature channels is gradually adjusted to 1, corresponding to the probability of the presence of hidden gas structures.
[0152] To further improve the accuracy of resolution restoration, residual connections can be introduced. The shallow high-resolution feature map extracted by the encoder is element-wise added to the upsampled feature map of the corresponding stage in the decoder, allowing shallow local features to be directly transmitted to the decoder output, compensating for feature loss during the upsampling process. Finally, the resolution-restored feature map is input into the Sigmoid activation function, mapping the feature values to the [0,1] interval. The output value at each spatial location represents the probability of a hidden gas structure existing at that location. All probability values at all spatial locations are arranged according to spatial coordinates to generate a probability map of hidden gas structures in the tunnel.
[0153] The aforementioned intelligent identification method for concealed gas structures in tunnels based on geological constraints constructs a knowledge base containing geological qualitative rules. Collected multi-source tunnel detection data is uniformly registered and input into a multi-source attention feature network to generate a probability map of concealed gas structures. This probability map is then used to perform symbolic predicate truth transformation on the multi-source data tensor to obtain a symbolic fact truth tensor. This symbolic fact truth tensor is then input into a neural symbolic verifier with geological logical constraints. Logical reasoning is performed on the symbolic fact truth tensor according to the logical rules in the knowledge base to calculate the logical consistency score for each spatial location, resulting in a logical consistency tensor. Based on this logical consistency tensor, a logical constraint loss is constructed, and a total loss is jointly constructed. The loss function is used to simultaneously update the parameters of the multi-source attention feature network and the neural symbol validator through backpropagation algorithm. Finally, the multi-source detection data of the test section is processed in the same way, and the output logical consistency tensor of the test section is used as the evaluation result to correct the generated probability map of hidden gas structures in the test section. This realizes the integration of geological qualitative knowledge into the training and inference process of deep learning model in a computable form. The model prediction results not only fit the multi-source detection data, but also conform to the basic geological principles. It solves the technical problems of strong multiple solutions of single geophysical data and difficulty in quantifying and coupling geological qualitative knowledge. It significantly improves the accuracy, geological interpretability and substitution ability of hidden gas structure identification.
[0154] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a system for implementing the above-mentioned intelligent identification method for concealed gas structures in tunnels based on geological constraints. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the intelligent identification system for concealed gas structures in tunnels based on geological constraints provided below can be found in the limitations of the intelligent identification method for concealed gas structures in tunnels based on geological constraints described above, and will not be repeated here.
[0156] In one exemplary embodiment, such as Figure 3As shown, a geologically constrained intelligent identification system 30 for concealed gas structures in tunnels is provided to implement the methods described in the above embodiments. The system includes:
[0157] The geological rule knowledge base construction module 31 is used to construct a knowledge base including logical predicates related to tunnel geology and gas characteristics by transforming qualitative geological rules into formal logical rules based on preset geological expert knowledge.
[0158] The multi-source data registration module 32 is used to uniformly register the collected multi-source tunnel detection data to the tunnel coordinate system and generate a multi-source data tensor.
[0159] The feature fusion processing module 33 is used to perform feature extraction, feature fusion and spatial resolution restoration processing on multi-source data tensors through a multi-source attention feature network to generate a probability map of hidden gas structures in tunnels.
[0160] The symbolic fact transformation module 34 is used to combine the tunnel hidden gas structure probability map to perform symbolic predicate truth value transformation on the multi-source data tensor and generate a symbolic fact truth value tensor.
[0161] The logical consistency verification module 35 is used to input the symbolic fact truth tensor into the neural symbolic verifier with geological logical constraints. According to the logical rules in the knowledge base, the neural symbolic verifier performs logical reasoning on the symbolic fact truth tensor to calculate the logical consistency score of each spatial location and obtain the logical consistency tensor. Here, the spatial location represents each discrete coordinate point in the multi-source data tensor.
[0162] The model co-optimization module 36 is used to construct a logical constraint loss based on the logical consistency tensor, and to construct a total loss function by combining the logical constraint loss; based on the total loss function, the parameters of the multi-source attention feature network and the neural symbol validator are updated through the backpropagation algorithm.
[0163] The real-time identification output module 37 is used to replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested in order to perform the operations of the multi-source data registration module 32, the feature fusion processing module 33, the symbolic fact conversion module 34, and the logical consistency verification module 35, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
[0164] Embodiments of this application also provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the aforementioned method embodiments.
[0165] Embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0166] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0167] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A method for intelligent identification of concealed gas structures in tunnels based on geological constraints, characterized in that, The method includes: S1. Based on the pre-set geological expert knowledge, a knowledge base is constructed that includes logical predicates related to tunnel geology and gas characteristics by transforming qualitative geological rules into formal logical rules. S2. Register the collected multi-source tunnel detection data to the tunnel coordinate system to generate a multi-source data tensor; S3. The multi-source data tensor is processed by a multi-source attention feature network to extract features, fuse features, and restore spatial resolution to generate a probability map of hidden gas structures in tunnels. S4. Combining the tunnel hidden gas structure probability map, perform symbolic predicate truth transformation on the multi-source data tensor to generate a symbolic fact truth tensor; S5. Input the symbolic fact truth tensor into the neural symbolic verifier with geological logic constraints, and perform logical reasoning on the symbolic fact truth tensor in the neural symbolic verifier according to the logical rules in the knowledge base to calculate the logical consistency score of each spatial location and obtain a logical consistency tensor; wherein, the spatial location represents each discrete coordinate point in the multi-source data tensor. S6. Construct a logical constraint loss based on the logical consistency tensor, and construct a total loss function based on the logical constraint loss; based on the total loss function, update the parameters of the multi-source attention feature network and the neural symbol validator through the backpropagation algorithm; S7. Replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested to execute S2 to S5, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
2. The method according to claim 1, characterized in that, The step of combining the tunnel concealed gas structure probability map and performing symbolic predicate truth transformation on the multi-source data tensor to generate a symbolic fact truth tensor includes: S11. For each spatial location in the multi-source data tensor, extract the reflection wave group morphology features, transient electromagnetic apparent resistivity gradient features, and structural location features from the ground-penetrating radar profile; input the reflection wave group morphology features, the transient electromagnetic apparent resistivity gradient features, and the structural location features into the fault predicate generation network, and process them through the convolutional layer and fully connected layer in the fault predicate generation network to obtain the fault probability; S12. For each spatial location in the multi-source data tensor, extract the bending direction and radius of curvature features of the reflection phase axis in the ground-penetrating radar profile, input the bending direction and radius of curvature features into the folded predicate generation network, and process them through the convolutional layer and fully connected layer in the folded predicate generation network to obtain the anticline core probability. S13. For each spatial location in the multi-source data tensor, extract the transient electromagnetic apparent resistivity value from the ground-penetrating radar profile, input the transient electromagnetic apparent resistivity value into the lithology predicate generation network, and process it through the convolutional layer and fully connected layer in the lithology predicate generation network to obtain the sandstone probability and mudstone probability. S14. For each spatial location in the multi-source data tensor, obtain the mudstone thickness field through borehole interpolation, extract the mudstone thickness value of the corresponding location from the mudstone thickness field, input the mudstone thickness value into the thickness predicate generation network, process it through the fully connected layer in the thickness predicate generation network, and obtain the thick mudstone probability. S15. The probability values of the fault probability, the anticline core probability, the sandstone probability, the mudstone probability, the thick mudstone probability, and the probability map of the tunnel hidden gas structure at the corresponding positions are spliced together to generate the symbolic factual truth tensor.
3. The method according to claim 1, characterized in that, The process of inputting the symbolic fact truth tensor into a neural symbolic verifier constrained by geological logic, and performing logical reasoning on the symbolic fact truth tensor in the neural symbolic verifier according to the logical rules in the knowledge base to calculate the logical consistency score for each spatial location, thereby obtaining a logical consistency tensor, includes: S21. Based on the premises and conclusion forms of each logical rule in the knowledge base, index the truth values of the corresponding premise atomic formulas and conclusion atomic formulas from the symbolic fact truth tensor; wherein, the premise atomic formula represents the basic logical unit constituting the premise of the logical rule, and each premise atomic formula corresponds to the value of a geological predicate at a specific spatial location; the conclusion atomic formula represents the basic logical unit of the conclusion part of the logical rule, corresponding to the value of the geological predicate as the reasoning result in the knowledge base at a specific spatial location. S22. Based on the truth values of the premise atomic formulas indexed from the symbolic fact truth tensor, calculate the truth values of the premises of the logical rule at their corresponding spatial locations using the Lucasiwitz conjunction operation formula; wherein, the formula for calculating the truth values of the premises of the logical rule at their corresponding spatial locations is: in, The preconditions for representing logical rules are in spatial location. Truth value; spatial location Indicates vertical index and circular index Determined discrete coordinate points; The number of atomic formulas in the preconditions of the logical rule; Indicates the first The aforementioned premise atomic formulas in spatial position The truth value of; This is a function to find the maximum value. S23. Based on the truth values of the premises and conclusions of the logical rule in their corresponding spatial positions, calculate the rule satisfaction degree of the logical rule in the corresponding spatial position using the Lucasiewicz implication formula; wherein, the formula for calculating the rule satisfaction degree is: in, This indicates the spatial location of the logical rule. The degree of satisfaction of the aforementioned rules, The preconditions of the logical rule are in spatial location. The truth value of , This indicates the spatial location of the conclusion portion of the logical rule. The truth value of , The function is for finding the minimum value; S24. Based on the confidence weights of the logical rules pre-set in the knowledge base, the rule satisfaction is weighted to obtain the weighted rule satisfaction of the logical rule at the corresponding spatial location; wherein, the formula for calculating the weighted rule satisfaction is: in, Representation of logical rules In spatial location The degree of satisfaction of the weighted rule, For logical rules The confidence weights, and ; Representation of logical rules In spatial location The degree of satisfaction of the aforementioned rules; The index number of the logical rule in the knowledge base; S25. For all the logical rules in the knowledge base, calculate the average weighted rule satisfaction as the logical consistency score for the corresponding spatial location; wherein, the formula for calculating the logical consistency score is: in, Indicates spatial location Logical consistency score, The total number of logical rules in the knowledge base; S26. Arrange the logical consistency scores of all positions according to the spatial index to generate the logical consistency tensor.
4. The method according to claim 3, characterized in that, The step of modifying the probability map of concealed gas formation in the cross-section under test by using the logical consistency tensor of the cross-section under test as the logical consistency evaluation result, and generating the final probability map of concealed gas formation in the cross-section under test, includes: S31. Based on the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested, a rule-guided probability correction is performed using an iterative fixed-point method to generate a corrected probability map of the hidden gas structure of the section to be tested; wherein, the iterative correction formula of the corrected probability map of the hidden gas structure of the section to be tested is: in, The number of iterations. For the first The probability map of hidden gas structures in the cross section under test after each iteration step. , This is the probability diagram of the concealed gas structure of the cross section to be tested before correction. These are the weighting coefficients; Indicates the first In each iteration step, the symbolic factual truth tensor of the cross section to be tested is generated based on the modified probability map of the hidden gas structure of the cross section to be tested; The set of logical rules in the knowledge base; The logical reasoning function of the neural symbol verifier is used to output the logical consistency tensor of the test section based on the modified probability map of the hidden gas structure of the test section, the symbolic fact truth tensor of the test section, and the set of logical rules. S32. The corrected probability map of the hidden gas structure of the cross section to be tested is used as the correction result of the corresponding iteration step. When the L2 norm of the correction result of two adjacent iteration steps is less than a preset threshold, the iteration is terminated, and the correction result of the final iteration step is used as the final probability map of the hidden gas structure of the cross section to be tested.
5. The method according to any one of claims 1 to 4, characterized in that, The multi-source attention feature network includes an encoder, a cross-modal attention fusion module, and a decoder; the step of performing feature extraction, feature fusion, and spatial resolution restoration processing on the multi-source data tensor through the multi-source attention feature network to generate a tunnel hidden gas structure probability map includes: S41. Multi-scale feature extraction is performed on the multi-source data tensor by the encoder to obtain a multi-scale geological feature map; S42. The multi-scale geological feature map is fused using the cross-modal attention fusion module to obtain a fused feature map; S43. The spatial resolution is restored by progressively upsampling the fused feature map through the decoder, thereby generating the tunnel hidden gas structure probability map.
6. A geologically constrained intelligent identification system for concealed gas structures in tunnels, used to implement the method described in any one of claims 1 to 5, characterized in that, The system includes: The geological rule knowledge base construction module is used to construct a knowledge base including logical predicates related to tunnel geology and gas characteristics by transforming qualitative geological rules into formal logical rules based on preset geological expert knowledge. The multi-source data registration module is used to uniformly register the collected multi-source tunnel detection data to the tunnel coordinate system and generate a multi-source data tensor. The feature fusion processing module is used to perform feature extraction, feature fusion and spatial resolution restoration processing on the multi-source data tensor through a multi-source attention feature network to generate a probability map of hidden gas structures in tunnels. The symbolic fact conversion module is used to combine the tunnel hidden gas structure probability map to perform symbolic predicate truth value conversion on the multi-source data tensor to generate a symbolic fact truth value tensor. The logical consistency verification module is used to input the symbolic fact truth tensor into a neural symbolic verifier with geological logical constraints, and to perform logical reasoning on the symbolic fact truth tensor in the neural symbolic verifier according to the logical rules in the knowledge base to calculate the logical consistency score for each spatial location, thereby obtaining a logical consistency tensor; wherein, the spatial location represents each discrete coordinate point in the multi-source data tensor. The model co-optimization module is used to construct a logical constraint loss based on the logical consistency tensor, and to construct a total loss function in combination with the logical constraint loss; based on the total loss function, the parameters of the multi-source attention feature network and the neural symbol validator are updated through the backpropagation algorithm. The real-time identification output module is used to replace the tunnel multi-source detection data with the multi-source detection data of the section to be tested to perform the operations of the multi-source data registration module, the feature fusion processing module, the symbolic fact conversion module, and the logical consistency verification module, and output the probability map of the hidden gas structure of the section to be tested and the logical consistency tensor of the section to be tested; by using the logical consistency tensor of the section to be tested as the logical consistency evaluation result, the probability map of the hidden gas structure of the section to be tested is corrected to generate the final probability map of the hidden gas structure of the section to be tested.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.