Domain large model geological survey report generation method based on knowledge graph

By constructing a knowledge graph for engineering exploration and jointly extracting and reasoning from a large language model, the problems of missing professional semantics and insufficient utilization of structured data in the generation of geological exploration reports are solved, thus achieving efficient and professional generation of geological exploration reports.

CN121145871APending Publication Date: 2025-12-16JIANGSU PROVINCIAL GEOLOGICAL BUREAU BIG DATA CENTER
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511233656.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-29
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing technologies for generating geological exploration reports suffer from problems such as lack of professional semantics, weak model generalization, insufficient utilization of structured data, inability to perform explicit knowledge reasoning and terminology unification, resulting in unprofessional and structurally disordered generated results that are difficult to handle complex geological scenarios.

Method used

By constructing an engineering exploration knowledge graph, a joint extraction model of bidirectional encoder representation layer-bidirectional long short-term memory network-conditional random field is adopted for entity-relation joint extraction. Knowledge reasoning is performed by combining rule engine and graph neural network. A large language model for geological knowledge base enhancement is designed, and accurate knowledge retrieval is achieved through LoRA fine-tuning and Langchain framework.

Benefits of technology

It enhances the professionalism and structural integrity of geological exploration reports, strengthens the mastery of professional terminology and text style, avoids problems such as illusionary generation and untimely knowledge updates, and achieves efficient and automated report generation in complex geological scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145871A_ABST
    Figure CN121145871A_ABST
Patent Text Reader

Abstract

The invention discloses a field large model geological survey report generation method based on a knowledge graph, and the method comprises the following steps: S1, building an engineering survey field data set through multi-source heterogeneous data collection and structured preprocessing, and the engineering survey field data set comprises five text dimension tags divided according to engineering survey specifications; s2, constructing an engineering investigation knowledge graph; and S2A, knowledge extraction, wherein a bidirectional encoder presentation layer-bidirectional long short-term memory network-conditional random field joint extraction model is adopted. According to the method, a bidirectional encoder presentation layer-bidirectional long short-term memory network-conditional random field joint extraction model is improved on knowledge modeling to perform high-precision entity-relation joint extraction, a geological knowledge map with consistent semantics and clear structure is constructed based on RDF, rule reasoning and graph neural network reasoning mechanisms are fused, and the method has the advantages of high-precision entity-relation joint extraction and high-precision entity-relation joint extraction. Deep mining and complementation of explicit and implicit knowledge are realized, and the ability of the prior art in knowledge expression granularity and reasoning breadth is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic generation technology of geological engineering exploration reports, and in particular to a method for generating geological exploration reports based on a knowledge graph-based domain large model. Background Technology

[0002] Currently, in the field of automatic generation of geological engineering exploration reports, there are several main technical approaches. The first is template matching and rule-driven automated report generation methods. These methods use predefined, fixed report structure templates to embed geological exploration data into specified formats, quickly generating standardized content. This method is efficient in scenarios with clear rules and uniform data formats, but its overall adaptability is poor, making it difficult to handle complex content, diverse terminology, or highly contextualized geological scenarios. The second is report generation technology based on general pre-trained language models. Representative technologies include using large language models such as GPT and QWen to learn from original text and generate geological text. These models have strong language expression capabilities, but due to their lack of understanding of geological semantics and the low proportion of professional text in the training data, their generated results still have significant shortcomings in terms of professionalism, terminology accuracy, and structural completeness. The third is semantically enhanced generation methods based on entity recognition and knowledge extraction. These methods attempt to combine named entity recognition, relation extraction, and other information extraction techniques to identify key entities and relationships from geological literature or exploration data, thereby constructing a domain knowledge base. However, most existing solutions remain at the stage of simple relationship extraction and concept induction, lacking systematic knowledge modeling and high-level reasoning capabilities, making it difficult to support automated content generation tasks in complex engineering scenarios.

[0003] In summary, existing technologies have made initial explorations in knowledge graph construction and large language model applications. However, when dealing with the complex task of automatically generating geological exploration reports, the following problems exist: First, there is a lack of professional semantics and weak model generalization. The proportion of geological corpora in the training data of existing large models is relatively small, leading to semantic drift when the models understand terms such as "Quaternary," "silty clay layer," and "excavation." The generated results often have problems such as unprofessional content and disordered structure. Second, there is a lack of structured data expression and integration mechanisms. Geological engineering reports rely on a large amount of structured data (such as borehole tables, lithological descriptions, coordinate data, etc.). Traditional language models cannot directly use this information for logical organization, resulting in the generated report content being detached from actual data. Finally, explicit knowledge reasoning and terminology unification are not possible. The report writing process requires causal analysis of complex geological relationships (such as "fault-cause-subsidence"), and existing methods are difficult to achieve multi-hop knowledge connections and rule-driven explanatory reasoning. In addition, the lack of unified standards for terminology naming makes it difficult to resolve ambiguities. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for generating geological exploration reports for large-scale domain models based on knowledge graphs, so as to solve the problems mentioned in the background art.

[0005] A method for generating geological exploration reports for large-scale domain models based on knowledge graphs includes the following steps:

[0006] S1. A dataset for the field of engineering survey is constructed through multi-source heterogeneous data collection and structured preprocessing, including five text dimension labels divided according to engineering survey specifications;

[0007] S2. Construct an engineering survey knowledge graph;

[0008] S2A, knowledge extraction, adopts a joint extraction model of bidirectional encoder representation layer-bidirectional long short-term memory network-conditional random field, and synchronously identifies geological entities and semantic relationships based on multi-task learning;

[0009] S2B, knowledge representation, transforms the extraction results into resource description framework triples;

[0010] S2C and knowledge fusion are used to resolve entity coreference through rule matching and cosine similarity calculation.

[0011] S2D and knowledge reasoning, combined with rule engine and graph neural network for explicit reasoning and implicit relation completion;

[0012] S2E, knowledge storage, import triples into the Neo4j graph database;

[0013] S3. Design a large language model to enhance the geological knowledge base;

[0014] S3A, the fine-tuning module, uses conditional low-rank adaptive fine-tuning technology with dimension label control to fine-tune the QWen basic model in stages, and dynamically adjusts the weight fusion of the geological general path and the engineering professional path through label embedding vectors.

[0015] S3B, the knowledge integration module, uses the Langchain framework to vectorize and store the knowledge graph for semantic retrieval during queries;

[0016] S4. Receive user structured queries and call the Geological Survey-QWen7B model to generate a report that conforms to the five-dimensional framework of the "General Specifications for Engineering Survey".

[0017] Preferably, the structured preprocessing in S1 includes:

[0018] The text is cleaned using regular expressions and domain knowledge, and five-dimensional labels are assigned: basic engineering information, geological environment, soil and rock properties and groundwater characteristics, material corrosivity and adverse geological effects, site stability and engineering evaluation.

[0019] Natural language processing techniques are used for word segmentation, part-of-speech tagging, and terminology standardization.

[0020] Preferably, the joint extraction model in S2A includes:

[0021] Shared BERT-BiLSTM coding layer;

[0022] The entity recognition branch uses CRF decoding to output the BIO labeled sequence;

[0023] The relation extraction branch fuses entity pair representation vectors with context window features, and outputs relation categories through multilayer perceptron classification.

[0024] The relationship classification uses a weighted cross-entropy loss function to handle the class imbalance problem.

[0025] Preferably, in knowledge reasoning in S2D:

[0026] The rules engine executes predefined geological ontology rules;

[0027] Graph neural networks predict implicit geological relationships by learning from multi-hop neighboring entities.

[0028] Preferably, the dimension label control in S3A satisfies:

[0029] Weight update item Where m is the output dimension of the previous layer and n is the input dimension of the next layer, the update is represented using low-rank decomposition.

[0030]

[0031] in, It refers to the control vector c i The fine-tuning parameter update item; This is a fine-tuning item to activate common features in the geological field; To activate the fine-tuning items in the engineering survey professional expression; c i ∈{0,1,2,3,4} represents the structural dimension label to which the current text fragment belongs; It is the embedding vector that controls the tag; and It is a learnable conditional low-rank mapping matrix; and The weight fusion coefficients are dynamically determined based on the dimension labels.

[0032] Preferably, the knowledge integration module includes:

[0033] The text2vec-large-chinese model is used to convert knowledge text into vectors.

[0034] Retrieve Top-K related text fragments from a vector database based on similarity matching;

[0035] The search results are input into the large model using Langchain suggestion templates.

[0036] Preferably, the S4 user structured query includes:

[0037] At least three of the following should be included: exploration stage, exploration level, geographical location, and stratigraphic information, and supplemented with geotechnical indicators and groundwater parameters.

[0038] Preferably, the report generated by S4 that conforms to the five-dimensional framework of the "General Specification for Engineering Survey" includes:

[0039] The project is divided into five dimensions: basic project information, geological environment, soil and rock properties and groundwater characteristics, material corrosivity and adverse geological effects, site stability and project evaluation.

[0040] An electronic device, comprising:

[0041] At least one processor; and

[0042] A memory communicatively connected to the at least one processor; wherein,

[0043] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-8.

[0044] The beneficial effects of this invention are as follows:

[0045] 1. This invention improves the bidirectional encoder representation layer-bidirectional long short-term memory network-conditional random field joint extraction model in knowledge modeling to achieve high-precision entity-relation joint extraction, and constructs a semantically consistent and structurally clear geological knowledge graph based on RDF. It integrates rule-based reasoning and graph neural network reasoning mechanisms to achieve deep mining and completion of explicit and implicit knowledge, thereby improving the ability of existing technologies in terms of knowledge expression granularity and reasoning breadth.

[0046] 2. Based on the LoRA algorithm, this invention introduces a "semantic dimension control" mechanism to complete the adaptation of general geological corpus and engineering exploration subdomain corpus, realize fine-grained fine-tuning of texts with different semantic dimensions, and significantly enhance the ability of large language models to master professional terminology, text style and industry standards.

[0047] 3. This invention combines Langchain and QWen large models to construct a closed-loop mechanism of "semantic vector + prompting engineering + knowledge retrieval". It achieves accurate knowledge retrieval through text2vec embedding and vector database, effectively avoiding the problems of "illusionary generation" and untimely knowledge updates in existing large models. Attached Figure Description

[0048] Figure 1 This is a flowchart of the overall method of the present invention.

[0049] Figure 2 This is a flowchart of the entity-relationship joint extraction model based on deep learning in this invention.

[0050] Figure 3 This is a schematic diagram of the LoRA fine-tuning algorithm based on conditional control according to the present invention.

[0051] Figure 4 This is a schematic diagram of the geological survey-QWen7B model structure of the present invention. Detailed Implementation

[0052] like Figures 1-4 As shown, a method for generating geological exploration reports based on knowledge graphs for large-scale domain models includes the following steps:

[0053] S1. A dataset for the engineering survey field is constructed through multi-source heterogeneous data acquisition and structured preprocessing, including five text dimension labels divided according to engineering survey specifications:

[0054] S1A, Data Sources: A diversified data source selection strategy is adopted to obtain effective text data. First, practical application data in the field of engineering survey is obtained through collaborative projects. Second, professional literature data related to the field of engineering survey is obtained through various means such as API interface docking, direct database access, document scanning and optical character recognition technology, including academic journals, conference papers, technical reports and historical geological survey reports. Through multi-source fusion, the data is ensured to have broad coverage and representativeness.

[0055] S1B, data preprocessing, begins with cleaning. For unstructured text data, regular expressions are used to clean up noisy data, filter out missing samples and irrelevant information. To improve the targeting and accuracy of subsequent information extraction, the text information is divided into five core dimensions based on the knowledge framework of engineering geology and the requirements of engineering survey specifications: basic engineering conditions, geological environment, soil and rock properties and groundwater characteristics, material corrosivity and adverse geological effects, site stability and engineering evaluation. On this basis, with the assistance of a large language model, corresponding control labels are assigned to each descriptive text segment to identify its dimension, serving as structural guidance signals in the subsequent LoRA fine-tuning process. Subsequently, natural language processing techniques are used to perform basic processing such as word segmentation, part-of-speech tagging, and named entity recognition, and professional terms are identified and standardized. Finally, the processed data is transformed into a structured form.

[0056] Secondly, standardization is crucial. Data conversion tools are used to convert data from different sources into a unified format. Finally, data quality control measures are necessary. To ensure high data quality, on the one hand, a data source tracking mechanism is established to record the source, collection method, and processing history of each piece of data. On the other hand, the cleaned data is verified using a manual verification mechanism.

[0057] S2. Construct an engineering survey knowledge graph;

[0058] S2A, Knowledge Extraction:

[0059] (1) Dataset preparation

[0060] By referencing datasets and literature in similar fields, the entity and relation types in this dataset were identified, and the data were manually labeled to complete the dataset processing. The training and test sets were split in a 7:3 ratio. Entity types include relevant geological structure names, rock strata units, exploration projects, geographic coordinates, geological ages, etc.; relations include verbs related to geological structure analysis and engineering measures, such as "reveal," "cut," "impact," "cause," "suggest," and "contain."

[0061] (2) Joint extraction model based on deep learning

[0062] Based on a deep learning model combining a bidirectional encoder representation layer, a bidirectional long short-term memory network, and a conditional random field, this study employs a multi-task learning strategy and introduces a structured relation determination branch to construct a joint extraction system for entity recognition and relation extraction. This effectively solves the problem of complex semantic structures and diverse terminology in geological exploration texts, which are difficult to identify using traditional methods. Figure 2As shown, the overall structure comprises four core modules: a bidirectional encoder representation layer, a bidirectional long short-term memory network, a named entity recognition branch, and a relation extraction branch. Specifically, BERT, as a pre-trained word vector generation module, encodes the input text based on contextual semantic information, generating word vector representations with rich semantic expression capabilities, thus providing a semantic foundation for subsequent feature extraction. BiLSTM, as a bidirectional feature extraction module, consists of two long short-term memory networks, forward and backward, which can simultaneously capture forward and backward contextual dependencies in the text, enhancing the model's ability to model long-distance information and achieving comprehensive representation of entity contextual features. In the named entity recognition task, a conditional random field (CRF) serves as a sequence labeling module, used to decode the label distribution results output by BiLSTM. By modeling the transition relationships between labels, it obtains the globally optimal label sequence, improving the accuracy and consistency of entity recognition results. In the relation extraction task, a structured relation classification module is designed. Combining the contextual semantic representation of entity pairs, it models the interaction features between entities using a multilayer perceptron and introduces a weighted loss function to handle class imbalance, improving the model's ability to discriminate multiple semantic relations.

[0063] When the text data X = {x1, x2, ..., x...} n The input BERT-BiLSTM-CRF model first extracts features from the input vector using the bidirectional Transformer encoder in the BERT layer, generating word vector representations.

[0064] C = BERT(X)

[0065] Where, x i Let represent the i-th character in the input, and d be the dimension of the vector corresponding to each character (determined by the size of the hidden layers in BERT). This word vector sequence is then fed into a BiLSTM module to capture bidirectional contextual features. The BiLSTM network consists of two parts: a forward LSTM and a backward LSTM. The forward LSTM unit performs forward processing:

[0066]

[0067] The inverted LSTM unit performs inverse processing:

[0068]

[0069] The output of BiLSTM is composed of the results of forward and backward LSTM processing, i.e. The named entity recognition and relation extraction branches share the underlying semantic features of BERT and BiLSTM. On one hand, the named entity recognition branch uses the CRF module to process the feature sequence {h1,h2,…,h...}n Decode the code. Generate the optimal label sequence Y using the BIO (Begin-Inside-Outside) annotation system. * This allows for the identification of entity boundaries and categories.

[0070] o i =Wh i

[0071]

[0072] in Let Y be the emission matrix, k be the number of tags, T be the transition matrix, and Y = {y1, y2, ..., y3}. n} represents the candidate label sequence, o i [y i ] represents the label y at the i-th position. i The launch score, T[y i-1 ,y i ] is from the label y i-1 Transfer to y i The transition score is S(Y), where S(Y) is the total score of the label sequence Y, and γ represents the set of all possible label sequences. During training, the cross-entropy loss function is used:

[0073]

[0074] Where P(Y|X) represents the conditional probability, It is the actual label sequence of the input text.

[0075] On the other hand, the relation extraction branch first constructs an entity set for relation modeling based on the entity recognition results output by the CRF:

[0076] S={e i =(s i ,t i )|s i ,t i ∈[1,n]}

[0077] Among them, s i and t i These represent the start and end positions of the i-th entity, respectively. Next, based on the entity's position information in the text, entity e is extracted from the shared BERT-BiLSTM encoding result. i The corresponding representation vector v i Furthermore, by concatenating the word vectors at the beginning and end positions, the complete semantic features of the entity are preserved to the greatest extent possible.

[0078]

[0079] Where [;] indicates concatenation. Considering the implicit contextual semantic information between entity pairs, further selection of entity pairs (e i ,e j The context window where ) is located [δ start ;δ end Word vectors within [ ] are used as auxiliary features:

[0080] δ start =max(1,min(s) i ,s j )-l)

[0081] δ end =min(n,max(t) i ,t j )+l)

[0082]

[0083] Where l represents the window size, n represents the length of the input sentence, and the linear transformation matrix is... b v This is the bias term. It is then fused with the concatenated vector to construct entity pairs (e). i ,e j ) represents vector r ij .

[0084] r ij =[v i ;v j ;v ij ]

[0085] The data is then input into a relation classifier, which is a multilayer perceptron supplemented with a non-linear activation function (such as ReLU):

[0086] Z ij =RELU(W1r ij +b1)

[0087] u ij =W2Z ij +b2

[0088] Where W1 and W2 are the weight matrices of the linear transformation, and b1 and b2 are the bias terms. Finally, the predefined set of relations is classified through a Softmax layer, outputting the relationship category between entity pairs, i.e.

[0089]

[0090] Considering that many entity pairs in real-world corpora do not have explicit semantic relationships (i.e., belong to the "NA" category), this will result in a much larger number of negative samples than positive samples in the training set. Therefore, a weighted cross-entropy loss function is used during training:

[0091]

[0092] Among them, y ij For entity pairs, label the actual relationship. For relation category y ij The weight, M is the number of entity pairs, For training, the central relation is y ij The total number of samples. Compared to traditional pipelined entity recognition and relation extraction methods, this joint extraction model achieves underlying semantic sharing and task-coordinated training for entity recognition and relation classification, effectively alleviating problems such as error propagation, semantic fragmentation, and upstream-downstream disconnect. By sharing the BERT-BiLSTM encoder, the model achieves semantic consistency while maintaining task independence and decoupling, improving overall extraction performance and generalization ability.

[0093] S2B, knowledge representation, uses the Resource Description Framework (RDF) for data modeling. RDF is a standard Semantic Web model for describing resources and their relationships. Its core idea is to structurally represent knowledge in the form of triples, that is, to construct a set of triples. For example, "earthquake fault - located in - a certain geological zone" can be modeled as a triple, which clarifies the semantic relationship between resources. RDF has good scalability and flexibility, supports the unified expression of multi-source heterogeneous data, and can effectively describe complex geological entities and their attributes and relationships. At the same time, RDF makes knowledge have good scalability and interoperability, which is convenient for integration with other data sources.

[0094] S2B and knowledge fusion: After obtaining triples through knowledge extraction, information redundancy often occurs due to the presence of many duplicate relation types during entity recognition and relation extraction. Furthermore, when data sources are inconsistent, the same entity may have multiple representations. For example, different documents may use "Quaternary silty clay layer" or "Q4 silt interbedded with clay layer" to refer to the same stratigraphic unit. To ensure data consistency in the knowledge graph, knowledge fusion is necessary. Its core objective is to eliminate ambiguity, conflict, and semantic inconsistency in entity naming, and to construct a unified, high-quality knowledge representation system. Specifically, this invention employs a coreference resolution mechanism based on rule matching and cosine similarity: First, entities are matched using predefined rules. If the rule match is successful, they are considered the same entity; if the match fails, the cosine similarity between their vector representations is further calculated, as shown in the following formula:

[0095]

[0096] Here, S represents the similarity between two words, and A and B are the vector representations of the two words, respectively. The larger the value of S, the more similar the two words are semantically.

[0097] S2D, Knowledge Reasoning:

[0098] Knowledge reasoning employs a hybrid reasoning mechanism of "rule engine + graph neural network (GNN)," combining symbolic logic and representation learning to achieve in-depth knowledge mining and completion.

[0099] First, a rule base based on geological ontology is constructed, defining inference rules between entity types (such as strata, lithology, and structure), for example:

[0100] Rule 1: If "stratum X" has "high water content" and "loose pore structure", then it can be inferred that "stratum X is prone to subsidence".

[0101] Rule 2: If “Region Y” contains “Stratum X”, then “Region Y is at risk of subsidence”.

[0102] The above rules are matched and executed by rule engines such as Drools to complete explicit reasoning.

[0103] Secondly, for parts of the knowledge graph with missing or uncertain relationships, graph neural networks (GNNs) are introduced to perform implicit knowledge completion. Based on the multi-hop information propagation mechanism of graph structures, GNNs can learn the semantic representations of entities in complex contexts, enabling tasks such as "predicting geological disaster risk areas" and "mining implicit stratigraphic relationships." For example, even if the training data does not explicitly label "region Z has a fault structure," GNNs can predict the existence of a "potential active fault" in that region through learning the similarity relationships between adjacent entities over multiple hops.

[0104] Ultimately, by combining deterministic reasoning based on symbolic rules with probabilistic reasoning based on neural networks, the completeness and reasoning ability of the knowledge graph were effectively improved.

[0105] For S2E (System-to-Employ) and knowledge storage, graph databases based on graph structures offer advantages such as high performance and strong scalability. Therefore, this invention selects Neo4j graph database as the storage platform. The knowledge graph generated by Neo4j can distinguish different entity categories using different colors, and the Cypher query language is used for visualization operations. After data preprocessing, knowledge extraction, knowledge fusion, and knowledge reasoning, the resulting engineering survey-related knowledge triples are finally imported in batches using the Cypher query language and stored in the Neo4j graph database.

[0106] S3. Design a large language model to enhance the geological knowledge base;

[0107] S3A, Large Model Fine-Tuning Based on Conditional Control:

[0108] QWen is currently a relatively good small-to-medium-sized model for Chinese processing, with a good understanding of technical terms and scientific texts. It may have a natural advantage when processing Chinese geological literature. This invention uses QWen as the base model, and through fine-tuning and iterative training, it is adapted to the task of generating geological exploration reports. The LLaMA_Factory framework is adopted as the fine-tuning training framework. It is a framework developed by domestic developers and has the widest adaptability, supporting the algorithm from pre-training to fine-tuning optimization.

[0109] This invention introduces a dimension label control mechanism based on the LoRA fine-tuning algorithm. By explicitly guiding the model to focus on the structural dimensions of the input text during training, it achieves more targeted semantic modeling. This mechanism utilizes the embedding vectors of the control labels. This influences the weight adjustment and update path, thereby providing differentiated low-rank adjustment strategies for different dimensions while sharing the backbone model. Specifically, a phased fine-tuning strategy is adopted: on the one hand, general fine-tuning is performed for the geological field, enabling the model to have general capabilities such as understanding lithological terminology and constructing stratigraphic description logic; on the other hand, specialized fine-tuning is performed for the engineering exploration sub-domain, strengthening the model's mastery of professional expressions such as construction suggestions, standard terminology, and parameter accuracy.

[0110] like Figure 3 As shown, assuming a low intrinsic rank exists during the weight update process, for the pre-trained weight parameter matrix... (where m is the output dimension of the previous layer and n is the input dimension of the next layer), its update is represented using low-rank decomposition:

[0111]

[0112] in, It refers to the control vector c i The fine-tuning parameter update item; This is a fine-tuning item to activate common features in the geological field; To activate the fine-tuning items in the engineering survey professional expression; c i ∈{0,1,2,3,4} represents the structural dimension label to which the current text fragment belongs (0: basic engineering information, 1: geological environment, 2: soil and rock properties and groundwater characteristics, 3: material corrosivity and adverse geological effects, 4: site stability and engineering evaluation); It is the embedding vector that controls the tag; and It is a learnable conditional low-rank mapping matrix; and The weight fusion coefficients are dynamically determined based on the dimension labels. This mechanism can adaptively adjust the fusion ratio of the two fine-tuning paths based on the dimension labels. For example, for dimensions that emphasize basic geological description (such as geological environment), the general geological path is dominant, with weighting coefficients set to α = 0.8 and β = 0.2; for dimensions that lean towards engineering expression and standard references (such as site stability and engineering evaluation), the engineering path is dominant, with α = 0.1 and β = 0.9. Through this method, fine-grained modeling of different paragraph styles, expression structures, and terminology usage habits in reports can be achieved, effectively improving the performance of the model-generated results in terms of structural integrity, terminology accuracy, and semantic consistency. Especially in text generation tasks such as engineering survey reports, which are highly structured, terminologically dense, and have clearly defined information layers, the proposed dimension-aware dual-path fine-tuning method demonstrates stronger stability and professionalism compared to traditional LoRA fine-tuning.

[0113] The S3B knowledge integration module utilizes the Langchain framework to vectorize and store the knowledge graph for semantic retrieval during queries. By combining Langchain and the QWen7B model, the constructed knowledge graph is integrated into the larger model. A large model based on an engineering survey knowledge base, namely Geological Survey-QWen7B, is designed and constructed. Figure 4As shown. Specifically, the overall architecture of the Geological Survey-QWen7B model comprises four core components: a question receiving module, a knowledge base support module, a Langchain intermediate parsing module, and a report generation and output module. The knowledge base support module provides external information resources to the model, enhancing its context awareness. It loads various file formats (such as text documents and web page data) through the Loader tool in the Langchain framework and parses them into standardized text formats. Subsequently, the TextSplitter tool segments the text, ensuring that each segment is semantically relevant and maintains an appropriate length. Next, the segmented text is transformed into semantic vectors using the text2vec-large-chinese vector embedding model, while the original text and its metadata are stored in the vector database. When a user submits a query request in the question receiving module, the input question is first vectorized and then matched with the text vectors in the knowledge base support module for similarity, selecting the Top-K text segments most relevant to the question. These text contents are input into the Geological Survey-QWen7B model after being prompted by Langchain's prompt template. The large model generates a geological survey report based on the prompts, realizing the question-and-answer response function.

[0114] S4. Receive user structured queries, call the Geological Survey-QWen7B model to generate a report conforming to the five-dimensional framework of the "General Specifications for Engineering Survey," and generate an engineering survey report based on the large model:

[0115] The report generation process consists of two parts: the first part is inputting the question, and the second part is generating the report. In the input question section, users can use the following format: "The project is in the XX exploration stage, the exploration level is XX, the area is located in XX, and the stratigraphic level is XX. Please provide a geological exploration report for this project." In addition, users can further supplement relevant information such as soil and rock properties and groundwater information to improve the completeness and relevance of the report content.

[0116] For the output section, in accordance with the requirements of the "General Specification for Engineering Investigation (GB 55017-2021)," the report needs to describe the geological overview of the area from the following five dimensions: First, basic project information, including an overview of the proposed project, investigation objectives, task requirements, technical standards, investigation methods, and work arrangement; second, geological environment, covering site topography, geomorphology, strata, geological structure, soil and rock properties and their homogeneity; third, soil and rock properties and groundwater characteristics, including various soil and rock property indicators, providing suggested values ​​for soil and rock strength and deformation parameters, foundation bearing capacity, groundwater burial conditions, types, water levels, and their changes; fourth, material corrosivity and adverse geological effects, assessing the corrosion of materials by soil and water and the adverse geological effects that may affect project stability, describing special soil and rock characteristics, and evaluating their degree of harm to the project; fifth, site stability and project evaluation, including stability suitability analysis and project analysis and evaluation, and providing corresponding recommendations. After generating the report, users can adjust and optimize it according to actual needs to ensure its accuracy and professionalism. The final generated reports are all uniquely identified, making them easy to view and update later.

[0117] In summary, by constructing a domain knowledge system covering core concepts such as geological structures and strata units, and integrating a deep learning entity-relation joint extraction model with a symbolic logic reasoning mechanism, this invention endows large language models with accurate, controllable, and professional report generation capabilities. It achieves end-to-end collaborative optimization from data collection, knowledge modeling, model training to report output. This invention systematically solves problems such as heterogeneous terminology, insufficient knowledge expression, and broken reasoning chains in the geological field. Furthermore, by combining Low-Rank Adaptation (LoRA) and the Langchain framework (an open-source toolchain for building large language model applications), it significantly improves the large model's responsiveness to professional semantics and its ability to retrieve external knowledge. Compared with existing technologies, this invention achieves a fusion-driven approach of "knowledge + model," breaking through the technical bottlenecks of existing solutions in terms of professional adaptability and practicality.

[0118] It is evident that the method of the present invention can be implemented by a computer program, and the computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer program causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer program can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0119] Therefore, it can be understood that this invention discloses an electronic device, comprising:

[0120] At least one processor; and

[0121] A memory communicatively connected to the at least one processor; wherein,

[0122] The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform the above-described method for generating domain-wide geological exploration reports based on knowledge graphs.

Claims

1. A method for generating geological exploration reports for large-scale domain models based on knowledge graphs, characterized in that, Includes the following steps: S1. A dataset for the field of engineering survey is constructed through multi-source heterogeneous data collection and structured preprocessing, including five text dimension labels divided according to engineering survey specifications; S2. Construct an engineering survey knowledge graph; S2A, knowledge extraction, adopts a joint extraction model of bidirectional encoder representation layer-bidirectional long short-term memory network-conditional random field, and synchronously identifies geological entities and semantic relationships based on multi-task learning; S2B, knowledge representation, transforms the extraction results into resource description framework triples; S2C and knowledge fusion are used to resolve entity coreference through rule matching and cosine similarity calculation. S2D and knowledge reasoning, combined with rule engine and graph neural network for explicit reasoning and implicit relation completion; S2E, knowledge storage, import triples into the Neo4j graph database; S3. Design a large language model to enhance the geological knowledge base; S3A, the fine-tuning module, uses conditional low-rank adaptive fine-tuning technology with dimension label control to fine-tune the QWen basic model in stages, and dynamically adjusts the weight fusion of the geological general path and the engineering professional path through label embedding vectors. S3B, the knowledge integration module, uses the Langchain framework to vectorize and store the knowledge graph for semantic retrieval during queries; S4. Receive user structured queries and call the Geological Survey-QWen7B model to generate a report that conforms to the five-dimensional framework of the "General Specifications for Engineering Survey".

2. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, The structured preprocessing in S1 includes: The text is cleaned using regular expressions and domain knowledge, and five-dimensional labels are assigned: basic engineering information, geological environment, soil and rock properties and groundwater characteristics, material corrosivity and adverse geological effects, site stability and engineering evaluation. Natural language processing techniques are used for word segmentation, part-of-speech tagging, and terminology standardization.

3. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, The joint extraction model in S2A includes: Shared BERT-BiLSTM coding layer; The entity recognition branch uses CRF decoding to output the BIO labeled sequence; The relation extraction branch fuses entity pair representation vectors with context window features, and outputs relation categories through multilayer perceptron classification. The relationship classification uses a weighted cross-entropy loss function to handle the class imbalance problem.

4. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, In knowledge reasoning in S2D: The rules engine executes predefined geological ontology rules; Graph neural networks predict implicit geological relationships by learning from multi-hop neighboring entities.

5. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, Dimension label control in S3A satisfies: Weight update item Where m is the output dimension of the previous layer and n is the input dimension of the next layer, the update is represented using low-rank decomposition. in, It refers to the control vector c i The fine-tuning parameter update item; This is a fine-tuning item to activate common features in the geological field; To activate the fine-tuning items in the engineering survey professional expression; c i ∈{0,1,2,3,4} represents the structural dimension label to which the current text fragment belongs; It is the embedding vector that controls the tag; and It is a learnable conditional low-rank mapping matrix; and The weight fusion coefficients are dynamically determined based on the dimension labels.

6. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, The knowledge integration module includes: The text2vec-large-chinese model is used to convert knowledge text into vectors. Retrieve Top-K related text fragments from a vector database based on similarity matching; The search results are input into the large model using Langchain suggestion templates.

7. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, S4 user structured queries include: At least three of the following should be included: exploration stage, exploration level, geographical location, and stratigraphic information, and supplemented with geotechnical indicators and groundwater parameters.

8. The method for generating a geological exploration report based on a knowledge graph-based domain model according to claim 1, characterized in that, S4 generates reports that conform to the five-dimensional framework of the "General Specifications for Engineering Survey" and include: The project is divided into five dimensions: basic project information, geological environment, soil and rock properties and groundwater characteristics, material corrosivity and adverse geological effects, site stability and project evaluation.

9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-8.

Citation Information

Cited By

  • Long text official document key information extraction agent method based on large model

    CN121542411A

  • Environmental corrosion data storage and management system

    CN121657950A

  • Tunnel geological anomalous body identification method, medium, equipment and product

    CN121660109A

  • Method, device and equipment for complementing interpretable knowledge graph based on path guidance and medium

    CN121981235A