A geological text translation method based on large language model and retrieval enhancement
By creating a named entity annotation corpus for geological texts and using a syntax-aware data augmentation method, combined with a large language model and retrieval augmentation techniques, the problem of insufficient training data in geological text translation is solved, the accuracy of named entity recognition and translation is improved, and costs and data dependence are reduced.
Patent Information
- Application Number
- CN202510867309.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-06-26
AI Technical Summary
Existing technologies for geological text translation suffer from the illusion problem caused by a lack of specialized domain knowledge in training data, and Chinese named entity recognition models have high costs for nested entity recognition and annotation, as well as poor support for cross-language named entity recognition.
We created a Chinese-English geological text named entity annotation corpus, used a syntax-aware entity pruning data augmentation method to enhance the corpus, fine-tuned a large language model through instructions, constructed a geological dictionary database with category label information, and combined retrieval-enhanced translation techniques for translation.
It improves the accuracy of named entity recognition and translation, reduces the computational cost and data dependency of the model, and enhances its support for specialized fields.
Smart Images

Figure CN120409502B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text translation technology, and more specifically, to a method for translating geological texts based on a large language model and retrieval enhancement. Background Technology
[0002] Common methods in text translation include translation software (such as Google Translate, DeepL, and Baidu Translate) and general-purpose large language models (such as Deepseek, ChatGPT, Kimi, and Wenxin Yiyan). Currently, these translation software programs and large language models are based on deep learning neural networks with a Transformer architecture, employing attention mechanisms to better capture context and more accurately understand and generate translations. However, due to the scarcity of training corpora in specialized domains, translation software and large language models exhibit comprehension biases and factual deviations in the recognition of domain-specific terms, expressions, or task logic (e.g., the model's inability to capture common-sense rules within the domain), a phenomenon known as the "illusion" problem. System-wise, the lack of a structured knowledge guidance mechanism integrating geological ontology leads to semantic representations deviating from domain common sense; at the data level, training samples lack information label alignment, making it difficult to establish an accurate terminology mapping system. The current workflow for geological text translation involves using translation software or large language models for translation, followed by review by professionals who consult specialized geological dictionaries or official terminology standards to obtain high-quality translations. Currently, there is no mature Earth science domain model specifically designed for geological text translation.
[0003] Named Entity Recognition (NER) is a fundamental and crucial technology in Natural Language Processing (NLP). Its main task is to automatically detect and accurately classify semantically meaningful entities such as names of people, places, organizations, and proper nouns from text. This technology not only forms the cornerstone of text processing but also plays an indispensable role in various applications such as information extraction, document classification, knowledge graph construction, machine translation, and question answering systems. The task of NER typically includes two parts: entity boundary recognition (determining the start and end positions of entities) and entity category recognition (assigning specific category labels to entities). Currently, Chinese named entity recognition, especially in the geological field, mainly employs the deep learning model BERT-BiLSTM-Attention-CRF, which incorporates an attention mechanism. While it can achieve basic entity extraction and has made some progress in handling complex contexts and long-distance dependencies, the wide variety of neural networks and their highly dependent parameter settings result in high computational costs and poor interpretability. In particular, the model is highly data-dependent, relying on large-scale labeled data, and has poor support for less commonly spoken languages or specialized fields (such as paleontological named entities); it is particularly sensitive to labeled noise; it has difficulty identifying nested entities in the processing of complex entity structures; and its transferability to vertical domains is limited by the time constraints of the corpus. Furthermore, the fact that Chinese and English require different processing methods due to the inherent characteristics of each language is also a factor that needs to be considered.
[0004] Existing technologies face several technical constraints when processing Chinese geological texts: First, the problem of nested geological entities. Stratigraphic units commonly exhibit hierarchical nesting of "tectonic unit-stratigraphic group-lithological combination" (e.g., "Yangtze Block / Dengying Formation / siliceous banded dolomite"). Traditional sequence annotation methods employ a single-layer BIO annotation system, resulting in insufficient recall for identifying cross-nested entities. Second, high annotation costs. Existing solutions rely on supervised training using fully annotated corpora, while the professional entity category system in the geological field is complex and costly to annotate. This is particularly true for cross-language named entity recognition, which requires different technical architectures. Summary of the Invention
[0005] This invention provides a geological text translation method based on a large language model and retrieval enhancement, which solves the illusion problem caused by the lack of domain knowledge in the training data of general large language models during geological text translation.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0007] This invention provides a geological text translation method based on a large language model and retrieval enhancement, comprising:
[0008] Create a Chinese and English geological text named entity annotation corpus, which includes annotations of named entities, entity location boundaries, and entity types in Chinese and English geological texts;
[0009] The Chinese and English geological text named entity annotation corpus is augmented using a syntax-aware entity pruning data augmentation method to obtain the augmented Chinese and English geological text named entity annotation corpus.
[0010] Based on the Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, the first preset large language model is fine-tuned using the instruction fine-tuning method to obtain the geological named entity recognition model.
[0011] Based on the geological named entity recognition model, a Chinese-English geological dictionary database with category label information is constructed.
[0012] The geological named entity recognition model is used to identify the geological text to be processed, and the geological entity information and classification of the geological text to be processed are obtained.
[0013] Based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database;
[0014] Based on the translated reference and the geological text to be processed, the second preset large language model is invoked to perform enhanced translation, resulting in the translated geological text.
[0015] Furthermore, the entity types include minerals, rocks, ore deposits, strata, geological ages, geological structures, fossils and paleontology, place names, rock structures, geological processes, and sedimentary facies.
[0016] Furthermore, the creation of the Chinese and English geological text named entity annotation corpus includes:
[0017] Based on the characteristics of geological text information, the geological text is divided according to entity type. Then, named entities, entity location boundaries and entity types are marked in LabelStudio and saved in JSON format.
[0018] Furthermore, the data augmentation of the Chinese and English geological text named entity annotation corpus based on the syntax-aware entity pruning data augmentation method includes:
[0019] Input the Chinese and English geological text named entity annotation corpus, and use a word segmentation tool in conjunction with a preset geological vocabulary to segment the Chinese and English geological texts into words;
[0020] Syntactic dependency analysis is performed on the segmented Chinese and English geological texts to generate a dependency tree and extract the root node of the dependency tree;
[0021] Based on the annotation information of the Chinese and English geological text named entity annotation corpus, locate the corresponding token in the dependency tree, retain all target entities, direct child nodes of the target entities, root nodes and direct child nodes, and obtain the token set;
[0022] Complete entity words are extracted from the token set, and the remaining tokens that do not contain entities are concatenated to generate pruned text, resulting in a data-enhanced Chinese and English geological text named entity annotation corpus.
[0023] Furthermore, after generating the pruned text, it also includes:
[0024] The BERT-score method was used to evaluate the semantic similarity between the pruned text and the original Chinese and English geological texts. Pruned texts with a similarity F1 score greater than 85% were retained to obtain the data-enhanced Chinese and English geological text named entity annotation corpus.
[0025] Furthermore, based on the Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, the first preset large language model is fine-tuned using an instruction-based fine-tuning method, including:
[0026] A dynamic hybrid approach is employed, sampling from both the original Chinese and English geological text named entity annotation corpus and the data-augmented Chinese and English geological text named entity annotation corpus in each training epoch. The proportion of the data-augmented Chinese and English geological text named entity annotation corpus is gradually increased according to the epoch. In the early stage of training (the first 20%), the original annotated data is used as the main component, with the augmented corpus accounting for 10%, ensuring that the model grasps the core features of the geological data. In the middle stage of training (20%-80%), the proportion of the augmented corpus is increased from 10% to 40% as training progresses, to improve the robustness and diversity of the model. In the later stage of training (80%-100%), the proportion of the augmented corpus is increased from 40% to 50% as training progresses, to enhance the model's generalization ability.
[0027] Furthermore, based on the geological named entity recognition model, a Chinese-English geological dictionary database with category label information is constructed, including:
[0028] Collect professional geological dictionaries or official standard terminology;
[0029] The geological named entity recognition model is used to identify and classify the professional geological dictionary or official terminology standard vocabulary to obtain geological terms and their classifications;
[0030] The BERT model is used to extract word vectors of the geological terms, and the classification of the geological terms is used as coordinates and stored together with the word vectors in a vector database to obtain a Chinese-English geological dictionary database with category label information.
[0031] Furthermore, based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database, including:
[0032] The geological entity information and classification of the geological text to be processed are used as keywords and tags for text translation. The Chinese-English geological dictionary database is queried according to the vector query index to obtain a translation reference.
[0033] Furthermore, the Chinese-English geological dictionary database was queried, including:
[0034] A hybrid retrieval strategy is adopted, prioritizing text matching and then performing vector retrieval.
[0035] Furthermore, the obtained translation reference includes:
[0036] Among keywords with vector similarity greater than a preset threshold, the keyword with the highest vector similarity is selected as the translation reference.
[0037] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0038] This invention presents a geological text translation method based on a large language model and retrieval enhancement. It identifies named entities in geological text as keywords and uses a specialized dictionary database for enhanced translation. When fine-tuning the large language model for entity recognition, a Syntax-Aware Entity Pruning (SAEP) method is proposed to introduce controllable noise for data augmentation, improving the named entity recognition performance of the large language model. During the construction and retrieval of the vector database, geological classification labels are added to the data information at the data level, and a data similarity query threshold is set to improve the accuracy of retrieved information and effectively reduce the illusion problem caused by the lack of domain knowledge in the training data of general-purpose large language models. This provides a reference for large language models in the geoscience vertical field, especially for text processing and translation. Attached Figure Description
[0039] Figure 1 A flowchart illustrating a geological text translation method based on a large language model and retrieval enhancement provided in this embodiment of the invention;
[0040] Figure 2 This is a schematic diagram illustrating the location boundaries and entity type annotations of geological text named entities provided in an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of the perceptual syntactic analysis process for Chinese text provided in an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of the perceptual syntactic analysis process for English text provided in an embodiment of the present invention;
[0043] Figure 5 This is a schematic diagram illustrating the LoRA (Local Named Entity) input data format fine-tuning provided in an embodiment of the present invention.
[0044] Figure 6 A diagram illustrating the parameters of the Chinese named entity model for fine-tuning geological text provided in this embodiment of the invention;
[0045] Figure 7 A diagram illustrating the parameters of the LoRA-tuned geological text named entity model provided in this embodiment of the invention;
[0046] Figure 8 This is a parameter diagram of the Chinese named entity model for geological text using SAEP data augmentation for LoRA fine-tuning, as provided in an embodiment of the present invention.
[0047] Figure 9 This is a diagram illustrating the parameters of a LoRA-tuned geological text named entity model using SAEP data augmentation, provided in an embodiment of the present invention.
[0048] Figure 10 This is a diagram illustrating the analysis results of the Chinese geological text named entity model provided in this embodiment of the invention.
[0049] Figure 11 This is a diagram illustrating the analysis results of the named entity model for English geological text provided in this embodiment of the invention.
[0050] Figure 12 A schematic diagram illustrating the architecture of a geological text translation method based on a large language model and retrieval enhancement provided in this embodiment of the invention;
[0051] Figure 13 A graph showing the evaluation parameters for the English-Chinese translation results provided in this embodiment of the invention;
[0052] Figure 14 The graph shows the evaluation parameters for the English-to-Chinese translation results of the model provided in this embodiment of the invention. Detailed Implementation
[0053] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.
[0054] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;
[0055] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.
[0056] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0057] Example 1
[0058] This invention provides a geological text translation method based on a large language model and retrieval enhancement, such as... Figure 1 As shown, it includes:
[0059] Create a Chinese and English geological text named entity annotation corpus, which includes annotations of named entities, entity location boundaries, and entity types in Chinese and English geological texts;
[0060] The Chinese and English geological text named entity annotation corpus is augmented using a syntax-aware entity pruning data augmentation method to obtain the augmented Chinese and English geological text named entity annotation corpus.
[0061] Based on the Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, the first preset large language model is fine-tuned using the instruction fine-tuning method to obtain the geological named entity recognition model.
[0062] Based on the geological named entity recognition model, a Chinese-English geological dictionary database with category label information is constructed.
[0063] The geological named entity recognition model is used to identify the geological text to be processed, and the geological entity information and classification of the geological text to be processed are obtained.
[0064] Based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database;
[0065] Based on the translated reference and the geological text to be processed, the second preset large language model is invoked to perform enhanced translation, resulting in the translated geological text.
[0066] Example 2
[0067] This embodiment further describes the syntax-aware entity pruning data augmentation method based on embodiment 1.
[0068] Named entity recognition (NER) is considered a sequence labeling task. From early dictionary and rule-based methods to traditional machine learning methods and then to deep learning-based methods, it has gradually overcome difficulties such as the inability to transfer knowledge to other domains, the need for extensive manual feature engineering, and reliance on model performance. Currently, relatively mature NER methods are based on the pre-trained BERT model, which converts each word (token) into a low-dimensional dense vector representation (embedding). It then utilizes neural networks (such as RNNs, BiLSTMs, or Transformers) to automatically extract features and learn contextual information, subsequently incorporating an attention mechanism to assign weights to the feature vectors, and finally introducing a Conditional Random Field (CRF) to generate the globally optimal label sequence. However, the wide variety of neural networks and their highly dependent parameter settings lead to high computational costs and poor interpretability. In particular, these models are highly data-dependent, relying on large-scale labeled data, resulting in poor support for less common languages or specialized domains (such as paleontological named entities); they are particularly sensitive to labeled noise; they struggle to identify nested entities in complex entity structures; and their transferability to vertical domains is limited by the time constraints of the corpus. At the same time, the fact that Chinese and English require different processing methods due to the characteristics of the languages themselves is also a factor that needs to be considered when performing natural language processing.
[0069] In this embodiment, the data augmentation of the Chinese and English geological text named entity annotation corpus based on the syntax-aware entity pruning data augmentation method includes:
[0070] Input the Chinese and English geological text named entity annotation corpus, and use a word segmentation tool in conjunction with a preset geological vocabulary to segment the Chinese and English geological texts into words;
[0071] Syntactic dependency analysis is performed on the segmented Chinese and English geological texts to generate a dependency tree and extract the root node of the dependency tree;
[0072] Based on the annotation information of the Chinese and English geological text named entity annotation corpus, locate the corresponding token in the dependency tree, retain all target entities, direct child nodes of the target entities, root nodes and direct child nodes, and obtain the token set;
[0073] Complete entity words are extracted from the token set, and the remaining tokens that do not contain entities are concatenated to generate pruned text, resulting in a data-enhanced Chinese and English geological text named entity annotation corpus.
[0074] This embodiment proposes a Syntax-Aware Entity Pruning (SAEP) method, which is a data augmentation method designed specifically to improve the model performance of the Named Entity Recognition (NER) task. By analyzing the syntactic structure of sentences, this method uses a dependency tree to perceive syntactic relationships, identify and prune syntactic nodes irrelevant to the target entity, thereby generating training data that retains entity information and introduces controlled noise. In syntactic analysis, a custom geological vocabulary is used to perform word segmentation based on a word segmentation tool (the custom geological vocabulary prevents word segmentation errors, such as "magmatic zircon" being incorrectly segmented into "magma" and "zircon"). Specifically, the syntactic structure analysis is based on the spaCy tool to generate a dependency tree. The pruning strategy is designed according to the dependency tree nodes. The pruning strategy is to retain the direct children of the root node and the direct children of the target entity in the dependency tree, forming a simplified syntactic subtree. The spaCy tool has pre-trained models for Chinese and English. Among them, the English model supports custom vocabulary-assisted word segmentation, while the Chinese model does not. Therefore, when performing syntactic analysis on Chinese texts, the jieba word segmentation tool is used to customize the vocabulary for word segmentation to assist the syntactic analysis based on the spaCy tool.
[0075] For the sentence "The detrital zircons in the granite in this area mainly come from the Triassic. They all show some characteristics of magmatic zircons. These phenomena indicate that the provenance of the sediment is mainly the magmatic rocks of the Triassic." First, input JSONL data containing the original text and target entity information, use the jieba word segmentation tool with a custom geological vocabulary to segment the text, and then use the spaCy tool for syntactic dependency analysis to generate a dependency tree and extract the root node (such as "come from"); locate the corresponding tokens in the dependency tree according to the entity position information, and retain all target entities (such as "granite", "detrital zircons", "Triassic", "magmatic zircons", "magmatic rocks"), the direct children of the target entity, the root node and its direct children (such as "detrital zircons", "Triassic", "indicate", "show", etc.); then, preferentially extract complete entity words from the retained token set, splice the retained tokens of the non-entity part, and generate the pruned text, as Figure 3 shown. Among them, "come from" is the root node. The solid line with an arrow starting from the root node points to the direct children of the root node. The dotted border is the named entity. The solid line with an arrow starting from the entity indicates the direct children of the entity. The dotted line with an arrow indicates the path from the entity to the root node. Prune the part other than the direct children of the root node and the direct children of the target entity in the dependency tree. The retained text is "The detrital zircons in the granite in the area mainly come from the Triassic, showing those of magmatic zircons, indicating that the provenance is mainly the magmatic rocks of the Triassic." The same structure of processing is performed on English sentences. The difference is that the spaCy tool is directly used for word segmentation of English texts, and the syntactic dependency analysis is shown in Figure 4 The preserved text is semantically less complete than the original text and contains some grammatical errors, but it retains key entities and basic syntactic information. These missing parts will be fed into the model as controlled noise along with the augmented data during training. The final training data format is shown below. Figure 5 .
[0076] In a further embodiment, after generating the pruned text, the process further includes:
[0077] The BERT-score method was used to evaluate the semantic similarity between the pruned text and the original Chinese and English geological texts. Pruned texts with a similarity F1 score greater than 85% were retained to obtain the data-enhanced Chinese and English geological text named entity annotation corpus.
[0078] The BERT-score method is used to evaluate the semantic similarity between the pruned text and the original text, retaining only sentences with an F1 similarity score greater than 85% to ensure the semantic consistency of the augmented data. SAEP uses a syntax-aware pruning mechanism to preserve contextual information directly or indirectly related to entities while introducing controllable noise, thereby improving the model's robustness and understanding of entity boundaries and semantics. Compared to traditional augmentation methods involving random perturbations or word-level substitutions, SAEP demonstrates higher data quality and model training efficiency in complex sentence structures and long sentence scenarios, providing an efficient structured data augmentation solution for the field of natural language processing.
[0079] Example 3
[0080] This embodiment further describes the naming and recognition of geological entities based on a large language model, building upon Embodiments 1 and 2.
[0081] Named entity recognition typically involves two parts: entity boundary recognition and entity category recognition.
[0082] In this embodiment, based on the characteristics of geological text information, the entity types are first categorized into minerals, rocks, ore deposits, strata, geological ages, geological structures, fossils and paleontology, place names, rock structures, geological processes, and sedimentary facies. Specific classifications are shown in Table 1. Named entity recognition annotations are performed in Label Studio, annotating the entity's location boundaries and entity type, and saved in JSON format. Annotation display is shown below. Figure 2 .
[0083] Table 1. Classification Information of Named Entities in Geological Texts
[0084]
[0085] In a further embodiment, the first preset large language model is fine-tuned using an instruction-based fine-tuning method based on the Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, including:
[0086] A dynamic hybrid approach is employed, sampling from both the original Chinese and English geological text named entity annotation corpus and the data-augmented Chinese and English geological text named entity annotation corpus in each training epoch. The proportion of the data-augmented Chinese and English geological text named entity annotation corpus is gradually increased according to the epoch. In the early stage of training (the first 20%), the original annotated data is used as the main component, with the augmented corpus accounting for 10%, ensuring that the model grasps the core features of the geological data. In the middle stage of training (20%-80%), the proportion of the augmented corpus is increased from 10% to 40% as training progresses, to improve the robustness and diversity of the model. In the later stage of training (80%-100%), the proportion of the augmented corpus is increased from 40% to 50% as training progresses, to enhance the model's generalization ability.
[0087] In a specific implementation, 5000 named entity tags each were created for Chinese and English. Domain-specific fine-tuning was performed on the general large language model (Qwen2), injecting domain knowledge into the large language model through LoRa (Local Instruction Refinement) to achieve named entity recognition of geological texts. Qwen2 is a large language model based on the Transformer architecture, whose structure mainly includes a text input layer, embedding layer, decoder layer, output layer, and loss function. The Qwen2 model uses a Byte-Pair Encoding (BPE) tokenizer, which can efficiently handle unknown words, reduce vocabulary size, and is applicable to multiple languages and text types. The LoRa-tuned model achieved an accuracy of 95.7% and an F1 score of 93.6% for named entity recognition on Chinese geological texts; and an accuracy of 94.0% and an F1 score of 92.5% for named entity recognition on English geological texts. Its model parameters are as follows: Figure 6 and Figure 7 As shown, data augmented using SAEP and unaugmented data were used together to fine-tune a large language model using LoRA. A dynamic mixing approach was employed, sampling from both raw and augmented data in each training epoch, gradually increasing the proportion of augmented data based on the epoch. The accuracy of named entity recognition results on Chinese geological texts reached 97.4%, with an F1 score of 96.3%, representing a 1.7 percentage point improvement in accuracy. The accuracy of named entity recognition results on English geological texts reached 95.8%, with an F1 score of 95.0%, representing a 1.8 percentage point improvement in accuracy. Figure 8 and Figure 9As shown in the figure. The results indicate that adding SAEP-based data augmented with training data through dynamic mixing can effectively improve named entity recognition performance. The results of geological text named entity recognition are visualized, as shown below. Figure 10 and Figure 11 As shown.
[0088] Example 4
[0089] This embodiment, based on embodiments 1 to 3, further describes the construction of a Chinese-English geological dictionary database with category label information.
[0090] Building vertical domain vector knowledge bases requires data collection, cleaning, and effective storage. Current technologies lack automated frameworks for domain knowledge purification, relying heavily on manual annotation and rule design, particularly in areas like terminology recognition and entity relation extraction, which incur significant human costs. Current storage solutions include heterogeneous data storage systems such as graph databases (Neo4j), relational databases (MySQL), and vector databases (Milvus), lacking unified data modeling standards. General-purpose databases (like Milvus) do not provide dedicated data preprocessing interfaces for vertical domains, hindering dynamic optimization of storage strategies based on subject characteristics. Furthermore, they suffer from limitations in knowledge structuring and representation efficiency. Direct vector embedding of raw text fails to enhance semantic representation with domain knowledge (e.g., failing to distinguish the specific meanings of polysemous words in specialized contexts). For example, the geological term "joint" might be confused with "joint" in general corpora. Insufficient vector space distance introduces noise during retrieval, leading to biased similarity calculations and inaccurate query results, impacting the judgment of large language models.
[0091] In this embodiment, a Chinese-English geological dictionary database with category label information is constructed based on the geological named entity recognition model, including:
[0092] Collect professional geological dictionaries or official standard terminology;
[0093] The geological named entity recognition model is used to identify and classify the professional geological dictionary or official terminology standard vocabulary to obtain geological terms and their classifications;
[0094] The BERT model is used to extract word vectors of the geological terms, and the classification of the geological terms is used as coordinates and stored together with the word vectors in a vector database to obtain a Chinese-English geological dictionary database with category label information.
[0095] In this embodiment, Milvus relies on external text vectorization models (such as BERT and Sentence-BERT) to encode text into vectors. However, general pre-trained models are not optimized for vertical domains, resulting in ambiguous semantic representations of core domain terms. A geological text named entity recognition model is used to identify and classify collected professional geological dictionaries or official terminology standard vocabulary. In the vector database (Milvus), word vectors are extracted using the BERT model, and their classification information (such as minerals and geological ages) is stored as labels along with the word vectors in the vector database, constructing a bilingual (Chinese and English) geological dictionary database with category labels. This reduces entity matching errors caused by high similarity but different types during retrieval through type filtering. When the dictionary database contains complex and numerous categories, multiple databases can be constructed based on word categories, allowing for later queries based on category.
[0096] Example 5
[0097] This embodiment, based on embodiments 1 to 4, further describes the technique of enhancing retrieval generation using large language models and named entity recognition as keywords.
[0098] When performing enhanced retrieval generation based on vertical domain knowledge bases, the matching accuracy between user questions and the domain knowledge base directly affects the reliability of the content generated by the large language model. Existing retrieval methods mainly rely on the following technical paths: First, word vector similarity matching: using pre-trained language models (such as BERT) to map text into semantic vectors, achieving coarse-grained matching based on cosine similarity, but lacking sensitivity to fine-grained labels within the domain (such as terminology classification levels); Second, deep learning re-ranking: using cross-encoders to refine the initial retrieval results, but limited by the lack of structured label constraints due to the original text features; Third, graph relation retrieval: entity relation path reasoning based on knowledge graphs (such as Neo4j graph traversal), requiring predefined schema layers to achieve logical queries, unable to dynamically adapt to the implicit semantic associations of unlabeled text. Especially in the geological field, although official terminology standard dictionaries have natural classification labels (such as "rock → feldspathic sandstone", "mineral → zircon"), existing retrieval systems do not effectively utilize such endogenous label attributes.
[0099] In this embodiment, based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database, including:
[0100] The geological entity information and classification of the geological text to be processed are used as keywords and tags for text translation. The Chinese-English geological dictionary database is queried according to the vector query index to obtain a translation reference.
[0101] In a further embodiment, querying the Chinese-English geological dictionary database includes:
[0102] A hybrid retrieval strategy is adopted, prioritizing text matching and then performing vector retrieval.
[0103] In a further embodiment, obtaining the translation reference includes:
[0104] Among keywords with vector similarity greater than a preset threshold, the keyword with the highest vector similarity is selected as the translation reference.
[0105] In the specific implementation process, when a user inputs geological text to be processed, the geological named entity recognition model identifies geological entity information and its classification, which are then used as keywords and tags for text translation. A vector query index is used to search a professional dictionary database, employing a hybrid retrieval strategy that prioritizes text matching followed by vector retrieval. To reduce data interference, the vector similarity of keywords selected based on semantic retrieval is set to 98%. Keywords with vector similarities all below a preset threshold are discarded, while those above the preset threshold are selected with the highest value as the translation reference. After retrieving the entity keyword comparison dictionary, a multilingual inference language model is invoked to enhance the translation of the geological text. The specific workflow is as follows: Figure 12 .
[0106] Finally, this embodiment also provides a method for evaluating the generated translation, specifically:
[0107] BERT-score is a text generation quality assessment metric based on the pre-trained language model BERT, used to measure the semantic similarity between generated text (such as machine translation, text summarization, etc.) and reference text. Compared to traditional metrics based on word overlap (such as BLEU, ROUGE), BERT-score better captures the degree of semantic matching. Geological text was fed into a geological text translation assistant built based on a large language model and retrieval enhancement, which generated translations and answers. The results were compared with those of representative large language models such as Deepseek, ChatGPT, Kimi, and Wenxin Yiyan. To ensure the fairness of the validation results, 100 geological texts were selected. Using expert-guided translations as the standard, the same prompt words (except for the part in RAG technology where reference keywords were used for retrieval translation) were used to prompt the large language model for translation. The BERT-score metric was mainly used to evaluate the translation accuracy. The results are as follows: Figure 13 and Figure 14 As shown in the figure. Comparison reveals that the method of this invention for constructing a geological text translation assistant outperforms other models, achieving enhanced translation through retrieval.
[0108] The same or similar labels correspond to the same or similar parts;
[0109] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.
[0110] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A geological text translation method based on a large language model and retrieval enhancement, characterized in that, include: Create a Chinese and English geological text named entity annotation corpus, which includes annotations of named entities, entity location boundaries, and entity types in Chinese and English geological texts; The Chinese and English geological text named entity annotation corpus is augmented using a syntax-aware entity pruning data augmentation method to obtain the augmented Chinese and English geological text named entity annotation corpus. Based on the Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, the first preset large language model is fine-tuned using the instruction fine-tuning method to obtain the geological named entity recognition model. Based on the geological named entity recognition model, a Chinese-English geological dictionary database with category label information is constructed. The geological named entity recognition model is used to identify the geological text to be processed, and the geological entity information and classification of the geological text to be processed are obtained. Based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database; Based on the translation reference and the geological text to be processed, the second preset large language model is invoked to perform enhanced translation, resulting in the translated geological text. The Chinese and English geological text named entity annotation corpus is augmented using the syntax-aware entity pruning data augmentation method, including: Input the Chinese and English geological text named entity annotation corpus, and use a word segmentation tool in conjunction with a preset geological vocabulary to segment the Chinese and English geological texts into words; Syntactic dependency analysis is performed on the segmented Chinese and English geological texts to generate a dependency tree and extract the root node of the dependency tree; Based on the annotation information of the Chinese and English geological text named entity annotation corpus, locate the corresponding token in the dependency tree, retain all target entities, direct child nodes of the target entities, root nodes and direct child nodes, and obtain the token set; Complete entity words are extracted from the token set, and the remaining tokens that do not contain entities are concatenated to generate pruned text, resulting in a data-enhanced Chinese and English geological text named entity annotation corpus.
2. The geological text translation method based on a large language model and retrieval enhancement as described in claim 1, characterized in that, The entity types include minerals, rocks, ore deposits, strata, geological ages, geological structures, fossils and paleontology, place names, rock structures, geological processes, and sedimentary facies.
3. The geological text translation method based on a large language model and retrieval enhancement as described in claim 1, characterized in that, The creation of the Chinese and English geological text named entity annotation corpus includes: Based on the characteristics of geological text information, the geological text is divided according to entity type. Then, named entities, entity location boundaries and entity types are marked in Label Studio and saved in JSON format.
4. The geological text translation method based on a large language model and retrieval enhancement as described in claim 3, characterized in that, After generating the pruned text, it also includes: The BERT-score method was used to evaluate the semantic similarity between the pruned text and the original Chinese and English geological texts. Pruned texts with a similarity F1 score greater than 85% were retained to obtain the data-enhanced Chinese and English geological text named entity annotation corpus.
5. The geological text translation method based on a large language model and retrieval enhancement as described in claim 1, characterized in that, Based on the aforementioned Chinese and English geological text named entity annotation corpus and the data-enhanced Chinese and English geological text named entity annotation corpus, the first preset large language model is fine-tuned using an instruction-based fine-tuning method, including: A dynamic hybrid approach is adopted to sample from the Chinese and English geological text named entity annotation corpus and the data-augmented Chinese and English geological text named entity annotation corpus in each training epoch, and the proportion of the data-augmented Chinese and English geological text named entity annotation corpus is gradually increased according to the epoch.
6. The geological text translation method based on a large language model and retrieval enhancement as described in claim 1, characterized in that, Based on the geological named entity recognition model, a Chinese-English geological dictionary database with category label information is constructed, including: Collect professional geological dictionaries or official standard terminology; The geological named entity recognition model is used to identify and classify the professional geological dictionary or official terminology standard vocabulary to obtain geological terms and their classifications; The BERT model is used to extract word vectors of the geological terms, and the classification of the geological terms is used as coordinates and stored together with the word vectors in a vector database to obtain a Chinese-English geological dictionary database with category label information.
7. The geological text translation method based on a large language model and retrieval enhancement as described in claim 1, characterized in that, Based on the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English geological dictionary database, including: The geological entity information and classification of the geological text to be processed are used as keywords and tags for text translation. The Chinese-English geological dictionary database is queried according to the vector query index to obtain a translation reference.
8. The geological text translation method based on a large language model and retrieval enhancement as described in claim 7, characterized in that, The Chinese-English geological dictionary database includes: A hybrid retrieval strategy is adopted, prioritizing text matching and then performing vector retrieval.
9. The geological text translation method based on a large language model and retrieval enhancement as described in any one of claims 1 to 8, characterized in that, The obtained translation references include: Among keywords with vector similarity greater than a preset threshold, the keyword with the highest vector similarity is selected as the translation reference.
Citation Information
Patent Citations
Professional intelligent question-answering system and method for oil and gas geological survey and system thereof
CN119719277A
Framework for integration of geo-information extraction, geo-reasoning and geologist-responsive inquiries
US20230176242A1