Geological text translation method based on large language model and retrieval enhancement generation

By creating geological text naming entity labeling corpus and syntactic perceptual data enhancement methods, the large language model is fine-tuned, combined with geological dictionary database and search enhancement technology, the lack of professional knowledge in training data in geological text translation is solved, and high-quality geological text translation is achieved.

CN120409502AActive Publication Date: 2025-08-01SUN YAT SEN UNIV

Patent Information

Application Number
CN202510867309.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-08-01
Estimated Expiration
2045-06-26

AI Technical Summary

Technical Problem

The prior art has hallucinations caused by lack of professional domain knowledge in geological text translation, and Chinese named entity recognition performs poorly in complex contexts and long-distance dependencies, especially in nested entity recognition and cross-language processing.

Method used

By creating a physical labeling corpus in Chinese and English geological texts, a syntactic-aware entity pruning data enhancement method is used to fine-tune the large language model, and a geological dictionary database with category label information is constructed, combining search enhancement generation and translation technology to achieve accurate translation of geological text.

Benefits of technology

It improves the accuracy of naming entity recognition and translation accuracy, reduces the hallucination problem of large language models due to lack of professional knowledge due to training data, and improves the quality and reliability of geological text translation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409502A_ABST
    Figure CN120409502A_ABST
Patent Text Reader

Abstract

The invention discloses a geological text translation method based on a large language model and retrieval enhancement generation, and aims to identify a geological text named entity as a keyword and retrieve and query a professional dictionary database to perform enhancement translation. According to the method, when entity recognition is carried out on a fine tuning large language model, a syntax-aware entity pruning (SAEP) method is provided for data enhancement, controllable noise is introduced, and the named entity recognition effect of the large language model is improved. When a vector database is constructed and retrieved, geological classification labels are added to data information based on a data level, and a data similarity query threshold value is set, so that the accuracy of information retrieval is improved, and the illusion problem of a general large language model caused by the lack of professional domain knowledge of training data is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of text translation, and more specifically, to a geological text translation method based on large language models and retrieval-augmented generation. Background Art

[0002] Common methods in text translation work include translation software (such as Google Translate, DeepL, and Baidu Translate, etc.) and general large language models (such as DeepSeek, ChatGPT, Kimi, and Wenxin Yiyan, etc.). Currently, these translation software and large language models are all based on deep learning neural networks with the Transformer architecture, and better capture context through the introduction of the attention mechanism to more accurately understand and generate translations. However, due to the lack of training corpora in professional fields, translation software and large language models may have understanding biases and factual deviations in the recognition of domain-specific terms, expressions, or task logics (such as the model's inability to capture common sense rules within the domain), that is, the "hallucination" problem. In terms of the system, there is a lack of a structured knowledge guidance mechanism integrating geological ontology, resulting in semantic representations deviating from domain common sense; at the data level, the training samples lack information label alignment, making it difficult to establish an accurate term mapping system. The current workflow for geological text translation is to use translation software or large language models for translation, and then professional personnel query and compare with professional geological dictionaries or official term standards for proofreading to obtain a higher-quality translation result. Currently, there is no relatively mature model in the field of earth science for geological text translation.

[0003] Named Entity Recognition (NER) is a fundamental and crucial technology in the field of natural language processing. Its main task is to automatically detect and accurately classify entities with clear semantics such as person names, place names, organization names, and proper nouns from text. This technology not only forms the cornerstone of text processing but also plays an indispensable core role in various applications such as information extraction, document classification, knowledge graph construction, machine translation, and question answering systems. The task of named entity recognition usually includes two parts: entity boundary recognition (determining the start and end positions of the entity) and entity category recognition (assigning specific category labels to the entity). Currently, for Chinese named entity recognition, especially in the geological field, the mainly adopted deep learning model BERT - BiLSTM - Attention - CRF with an attention mechanism can achieve basic entity extraction and has made certain progress in dealing with problems of complex contexts and long - distance dependencies. However, there are a large number of neural network types, and the parameter settings are highly dependent, resulting in high computational costs and poor interpretability of the model. In particular, the model has a high data dependence, relying on large - scale labeled data, with poor support for small languages or professional fields (such as paleontological named entities); it is extremely sensitive to annotation noise; in dealing with complex entity structures, it is difficult to identify nested entities; and it has poor transfer ability in vertical fields due to the time - limit of the corpus. At the same time, different processing methods are required for Chinese and English in natural language processing due to the characteristics of the languages themselves, which is also a factor that needs to be considered.

[0004] The existing technologies face technical bottlenecks in processing Chinese geological texts: First, the geological entity nesting dilemma. There is a common hierarchical nesting phenomenon of "tectonic unit - stratigraphic formation - lithologic combination" in stratigraphic unit entities (such as "Yangtze Block / Dengying Formation / Siliceous banded dolomite"). The traditional sequence labeling method uses the BIO single - layer labeling system, resulting in insufficient recognition recall rate for cross - nested entities. Second, the high annotation cost. The existing solutions need to rely on fully annotated corpora for supervised training, while the professional entity category system in the geological field is complex and the annotation cost is high. Especially in cross - language named entity recognition, different technical architectures are required. Summary of the Invention

[0005] The present invention provides a geological text translation method based on a large - language model and retrieval - enhanced generation, which solves the hallucination problem of general large - language models due to the lack of professional domain knowledge in geological text translation.

[0006] To solve the above - mentioned technical problems, the technical solution of the present invention is as follows: The present invention provides a geological text translation method based on a large - language model and retrieval - enhanced generation, including: Create a Chinese-English geological text named entity annotation corpus, where the Chinese-English geological text named entity annotation corpus includes the annotation of named entities, entity position boundaries, and entity types in Chinese-English geological texts; Perform data augmentation on the Chinese-English geological text named entity annotation corpus according to the entity pruning data augmentation method based on syntactic perception to obtain the augmented Chinese-English geological text named entity annotation corpus; Fine-tune the first pre-set large language model by using instruction fine-tuning based on the Chinese-English geological text named entity annotation corpus and the augmented Chinese-English geological text named entity annotation corpus to obtain a geological named entity recognition model; Construct a Chinese-English parallel geological dictionary database with category label information according to the geological named entity recognition model; Use the geological named entity recognition model to identify the geological text to be processed, and obtain the geological entity information and classification of the geological text to be processed; Query the Chinese-English parallel geological dictionary database according to the geological entity information and classification of the geological text to be processed to obtain a translation reference; According to the translation reference and the geological text to be processed, call the second pre-set large language model to perform enhanced translation to obtain the translated geological text.

[0007] Furthermore, the entity types include minerals, rocks, ore deposits, strata, geological epochs, geological structures, fossils and paleontology, place names, rock textures and structures, geological processes, and sedimentary facies.

[0008] Furthermore, the creation of the Chinese-English geological text named entity annotation corpus includes: Based on the characteristics of geological text information, divide the geological text by entity type, then perform annotation of named entities, entity position boundaries, and entity types on LabelStudio, and save it in jsonl format.

[0009] Furthermore, the data augmentation of the Chinese-English geological text named entity annotation corpus according to the entity pruning data augmentation method based on syntactic perception includes: Input the Chinese-English geological text named entity annotation corpus, and use a word segmentation tool in combination with a pre-set geological vocabulary to segment the Chinese-English geological text; Perform syntactic dependency analysis on the segmented Chinese-English geological text, generate a dependency tree, and extract the root node of the dependency tree; Locate the corresponding tokens in the dependency tree according to the annotation information of the Chinese-English geological text named entity annotation corpus, and retain all target entities, the direct children of the target entities, the root node, and the direct children to obtain a token set; Extract complete entity words from the token set, splice the remaining tokens of the non-entity part, generate pruned text, and obtain a named entity annotated corpus of Chinese-English geological texts after data augmentation.

[0010] Furthermore, after generating the pruned text, it also includes: Use the BERT-score method to evaluate the semantic similarity between the pruned text and the original Chinese-English geological texts, and retain the pruned text with an F1 score of similarity greater than 85% to obtain a named entity annotated corpus of Chinese-English geological texts after data augmentation.

[0011] Furthermore, based on the named entity annotated corpus of Chinese-English geological texts and the named entity annotated corpus of Chinese-English geological texts after data augmentation, fine-tune the first pre-set large language model using the instruction fine-tuning method, including: Adopt a dynamic mixing method to sample from the named entity annotated corpus of Chinese-English geological texts and the named entity annotated corpus of Chinese-English geological texts after data augmentation in each training epoch, and gradually increase the proportion of the named entity annotated corpus of Chinese-English geological texts after data augmentation according to the epoch. In the initial stage of training (the first 20% stage), the original annotated data is mainly used, and the proportion of the augmented corpus is 10% to ensure that the model masters the core features in geological data; in the middle stage of training (20%-80%), the proportion of the augmented corpus is increased with training, from 10% to 40%, 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 with training, from 40% to 50%, to enhance the generalization ability of the model.

[0012] Furthermore, construct a Chinese-English bilingual geological dictionary database with category label information according to the geological entity information and classification of the geological text to be processed, including: Collect professional geological dictionaries or official term standard vocabularies; Use the geological named entity recognition model to identify and classify the professional geological dictionaries or official term standard vocabularies to obtain geological words and their classifications; Use the BERT model to extract the word vectors of the geological words, and store the classifications of the geological words as coordinates together with the word vectors in the vector database to obtain a Chinese-English bilingual geological dictionary database with category label information.

[0013] Furthermore, according to the geological entity information and classification of the geological text to be processed, query the Chinese-English bilingual geological dictionary database to obtain a translation reference, including: Use the geological entity information and classification of the geological text to be processed as keywords and tags for text translation, and query the Chinese-English bilingual geological dictionary database according to the vector query index to obtain a translation reference.

[0014] Further, querying the Chinese-English bilingual geological dictionary database includes: Adopt a hybrid retrieval strategy, prioritize text matching, and then perform vector retrieval.

[0015] Further, obtaining the translation reference includes: Among the keywords with vector similarity greater than the preset threshold, select the keyword with the highest vector similarity as the translation reference.

[0016] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: A geological text translation method based on large language models and retrieval-augmented generation of the present invention realizes identifying geological text named entities as keywords and retrieving and querying a professional 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 effect of the large language model. When constructing and retrieving 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 hallucination problem caused by the lack of professional domain knowledge in the training data of general large language models. It provides a reference for large language models in the geoscience vertical field, especially for text processing and translation work. Description of the Drawings

[0017] Figure 1 It is a schematic flowchart of a geological text translation method based on large language models and retrieval-augmented generation provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of the position boundary and entity type annotation of geological text named entities provided by an embodiment of the present invention; Figure 3 It is a schematic flowchart of the syntactic perception analysis for Chinese text provided by an embodiment of the present invention; Figure 4 It is a schematic flowchart of the syntactic perception analysis for English text provided by an embodiment of the present invention; Figure 5 It is a schematic diagram of the input data format for LoRA fine-tuning of geological text named entities provided by an embodiment of the present invention; Figure 6 It is a diagram of the model parameters of the LoRA fine-tuned geological text Chinese named entities provided by an embodiment of the present invention; Figure 7 This is the parameter diagram of the LoRA fine-tuned geological text English named entity model provided by the embodiment of the present invention; Figure 8 This is the parameter diagram of the LoRA fine-tuned geological text Chinese named entity model using SAEP data augmentation provided by the embodiment of the present invention; Figure 9 This is the parameter diagram of the LoRA fine-tuned geological text English named entity model using SAEP data augmentation provided by the embodiment of the present invention; Figure 10 This is the display diagram of the analysis results of the Chinese geological text named entity model provided by the embodiment of the present invention; Figure 11 This is the display diagram of the analysis results of the English geological text named entity model provided by the embodiment of the present invention; Figure 12 This is the schematic architecture diagram of a geological text translation method based on large language models and retrieval-augmented generation provided by the embodiment of the present invention; Figure 13 This is the parameter diagram for evaluating the Chinese-to-English translation results of the model provided by the embodiment of the present invention; Figure 14 This is the parameter diagram for evaluating the English-to-Chinese translation results of the model provided by the embodiment of the present invention. Detailed implementation manners

[0018] The accompanying drawings are only for illustrative purposes and should not be construed as limitations on this patent; To better illustrate this embodiment, some components in the accompanying drawings are omitted, enlarged, or reduced, and do not represent the dimensions of the actual product; For those skilled in the art, it is understandable that some well-known structures and their descriptions in the accompanying drawings may be omitted.

[0019] The technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0020] Embodiment 1 The embodiment of the present invention provides a geological text translation method based on large language models and retrieval-augmented generation, as Figure 1 shown, including: Create Chinese and English geological text named entity annotated corpora, where the Chinese and English geological text named entity annotated corpora include annotations of named entities, entity position boundaries, and entity types in Chinese and English geological texts; Perform data augmentation on the Chinese and English geological text named entity annotated corpora according to the entity pruning data augmentation method based on syntactic perception to obtain the data-augmented Chinese and English geological text named entity annotated corpora; Fine-tune the first pre-trained large language model using the above-mentioned Chinese-English geological text named entity annotation corpus and the data-augmented Chinese-English geological text named entity annotation corpus together with instruction fine-tuning to obtain a geological named entity recognition model; Construct a Chinese-English bilingual geological dictionary database with category label information according to the geological named entity recognition model; Use the geological named entity recognition model to recognize the geological text to be processed, and obtain the geological entity information and classification of the geological text to be processed; Query the Chinese-English bilingual geological dictionary database according to the geological entity information and classification of the geological text to be processed to obtain a translation reference; According to the translation reference and the geological text to be processed, call the second pre-trained large language model to perform enhanced translation to obtain the translated geological text. <4000105>

[0021] Embodiment 2 On the basis of Embodiment 1, this embodiment further describes the entity pruning data augmentation method based on syntactic perception.

[0022] Named entity recognition is regarded as a sequence labeling task. From the early dictionary and rule methods, to traditional machine learning methods, and then to deep learning-based methods, it has gradually overcome the difficulties of difficult domain transfer, the need for a large amount of manual feature engineering, and dependence on model performance. Currently, the relatively mature named entity recognition methods in the field are to convert each word (token) into a low-dimensional dense vector representation (embedding) based on the pre-trained model BERT, use neural networks (such as RNN, BiLSTM or Transformer) to automatically extract features and learn context information, and then add an attention mechanism to assign weights to the feature vectors. Finally, a conditional random field (CRF) is introduced to generate the globally optimal label sequence. However, there are many types of neural networks and high dependence on parameter settings, resulting in high computational costs and poor interpretability of the model. In particular, the model has a high data dependence, relying on large-scale labeled data, with poor support for small languages or professional fields (such as paleontological named entities); it is particularly sensitive to annotation noise; in the processing of complex entity structures, it is difficult to identify nested entities; and its transfer ability in vertical fields is poor due to the limitation of the time limit of the corpus. At the same time, different processing methods are required for Chinese and English in natural language processing due to the characteristics of the language itself, which is also a factor that needs to be considered.

[0023] In this embodiment, the data augmentation of the Chinese-English geological text named entity annotation corpus according to the entity pruning data augmentation method based on syntactic perception includes: Input the named entity annotation corpus of the Chinese and English geological texts, and use a word segmentation tool in combination with a preset geological vocabulary to segment the Chinese and English geological texts; Perform syntactic dependency analysis on the segmented Chinese and English geological texts, generate a dependency tree, and extract the root node of the dependency tree; Locate the corresponding tokens in the dependency tree according to the annotation information of the named entity annotation corpus of the Chinese and English geological texts, and retain all target entities, the direct children of the target entities, the root node, and the direct children, to obtain a token set; Extract the complete entity words from the token set, splice the retained tokens of the non-entity part, generate a pruned text, and obtain the named entity annotation corpus of the Chinese and English geological texts after data augmentation.

[0024] 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. This method analyzes the syntactic structure of sentences, uses a dependency tree to perceive syntactic relationships, identifies and removes syntactic nodes irrelevant to the target entity, thereby generating training data that retains entity information and introduces controlled noise. In syntactic analysis work, word segmentation is performed based on a word segmentation tool by using a custom geological vocabulary (the custom geological vocabulary prevents word segmentation errors, such as "magmatic zircon" being wrongly segmented into "magma" and "zircon"). The specific 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 to form 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.

[0025] The sentence "The detrital zircons in the granite in this area are mainly from the Triassic, and they all show some characteristics of igneous rock zircons. These phenomena indicate that the source of its sediments is mainly Triassic igneous rocks." First, input JSONL data containing the original text and target entity information, use the jiaba word segmentation tool with a custom geological vocabulary to segment the text, and then use the spaCy tool to perform syntactic dependency analysis, generate a dependency tree and extract the root node (such as "from"); locate the corresponding token in the dependency tree according to the entity position information, retain all target entities (such as "granite", "detrital zircon", "Triassic", "igneous rock zircon", "igneous rock"), the direct child nodes of the target entity, the root node and its direct child nodes (such as "detrital zircon", "Triassic", "indicates", "expresses", etc.); then, preferentially extract the complete entity words from the retained token set, splice the retained tokens of the non-entity part, and generate pruned text, such as Figure 3 As shown. "From" is the root node, the solid line with an arrow from the root node points to the direct child node of the root node, the dotted border is the named entity, the solid line with an arrow from the entity indicates the direct child node of the entity, and the dotted line with an arrow indicates the path from the entity to the root node. The part other than the direct child node of the root node and the direct child node of the target entity in the dependency tree is pruned, and the retained text is "The detrital zircon in the granite in the region mainly comes from the Triassic, and the zircon in igneous rocks indicates that the source is mainly Triassic igneous rocks." The English sentence is processed with the same structure, except that the word segmentation of the English text is directly performed using the spaCy tool, and the syntactic dependency analysis is shown in Figure 4 The retained text is not as semantically complete as the original text and has some grammatical errors, but it retains key entities and basic syntactic information. These missing parts will be fed into the model as controllable noise along with the enhanced data for training. The final training data format is shown in Figure 5 .

[0026] In a further embodiment, after generating the pruned text, the method further includes: The BERT-score method was used to evaluate the semantic similarity between the pruned text and the original Chinese and English geological texts, and the 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.

[0027] The semantic similarity between the pruned text and the original text is evaluated by the BERT-score method, and only the sentences with an F1 score of similarity greater than 85% are retained to ensure the semantic consistency of the enhanced data. SAEP uses a syntax-aware pruning mechanism to retain the context information directly or indirectly related to the entity, and at the same time introduces controllable noise, thereby enhancing the robustness and understanding ability of the model for entity boundaries and semantics. Compared with traditional enhancement methods such as random perturbation or word-level replacement, SAEP shows higher data quality and model training efficiency in complex sentence patterns and long sentence scenarios, providing an efficient structured data enhancement solution for the field of natural language processing.

[0028] Example 3 Based on Example 1 and Example 2, this example further describes the geological entity naming recognition based on the large language model.

[0029] The task of named entity recognition usually includes two parts: entity boundary recognition and entity category recognition.

[0030] In this example, first, based on the characteristics of geological text information, the entity types are divided into minerals, rocks, ore deposits, strata, geological ages, geological structures, fossils and paleontology, place names, rock structures and textures, geological processes, and sedimentary facies. The specific classification is shown in Table 1. Named entity recognition is annotated on Label Studio, annotating the position boundaries and entity types of the entities, and saving them in jsonl format. The annotation display is shown in Figure 2 。

[0031] Table 1. Classification information table of named entities in geological texts

[0032] In a further example, the first preset large language model is fine-tuned by using the instruction fine-tuning method with the combined use of the Chinese-English geological text named entity annotation corpus and the data-enhanced Chinese-English geological text named entity annotation corpus, including: Sampling is performed from the Chinese-English geological text named entity annotation corpus and the data-enhanced Chinese-English geological text named entity annotation corpus in each training epoch in a dynamic mixing manner, and the proportion of the data-enhanced Chinese-English geological text named entity annotation corpus is gradually increased according to the epoch. In the initial stage of training (the first 20% stage), the original annotated data is mainly used, and the proportion of the enhanced corpus is 10% to ensure that the model masters the core features in geological data; in the middle stage of training (20%-80%), the proportion of the enhanced corpus is increased with training, from 10% to 40%, to improve the robustness and diversity of the model; in the later stage of training (80%-100%), the proportion of the enhanced corpus is increased with training, from 40% to 50%, to enhance the generalization ability of the model.

[0033] In a specific embodiment, 5000 Chinese and English named entity annotation corpora were created, and domain fine-tuning was performed based on the general large language model (Qwen2). Domain knowledge was injected into the large language model through instruction fine-tuning (LoRA) to achieve named entity recognition of geological texts. Qwen2 is a large language model based on the Transformer architecture, and its structure mainly includes a text input layer, an embedding layer, a decoder layer, an output layer, and a loss function. The Qwen2 model uses a Byte-Pair Encoding (BPE) tokenizer, which can efficiently handle unknown words, reduce the vocabulary size, and is applicable to multiple languages and text types. The precision rate of the named entity results of the LoRA fine-tuned model on Chinese geological texts reached 95.7%, and the F1 score was 93.6%; the precision rate of the named entity results on English geological texts reached 94.0%, and the F1 score was 92.5%. Its model parameters are as Figure 6 and Figure 7 shown. The data enhanced based on SAEP and the data without data enhancement were used together to fine-tune the large language model using LoRA. A dynamic mixing method was adopted to sample from the original data and the enhanced data in each training epoch, and the proportion of the enhanced data was gradually increased according to the epoch. Among them, the precision rate of the named entity results on Chinese geological texts reached 97.4%, and the F1 score was 96.3%, with the precision improved by 1.7 percentage points; the precision rate of the named entity results on English geological texts reached 95.8%, and the F1 score was 95.0%, with the precision improved by 1.8 percentage points, as Figure 8 and Figure 9 shown. The results show that the data enhanced based on SAEP can effectively improve the named entity recognition effect by adding it to the training data in a dynamic mixing manner. The named entity recognition results of geological texts were visually displayed, as Figure 10 and Figure 11 shown.

[0034] Example 4 Based on Examples 1 to 3, this example further describes the construction of a Chinese-English contrast geological dictionary database with category label information.

[0035] The technology for constructing a vertical domain vector knowledge base requires data collection, data cleaning, and effective data storage. The existing technologies lack an automated domain knowledge purification framework and rely on manual annotation and rule design. In particular, a large amount of labor costs are required in the processes of professional term recognition, entity relationship extraction, etc. The current storage solutions include heterogeneous data storage systems such as graph databases (Neo4j), relational databases (MySQL), and vector databases (Milvus), without a unified data modeling specification. General-purpose databases (such as Milvus) do not provide data preprocessing interfaces dedicated to vertical domains and cannot dynamically optimize storage strategies according to subject characteristics. There are limitations in knowledge structuring and representation efficiency. When directly performing vector embedding on the original text, domain knowledge is not combined to enhance semantic representation (such as not distinguishing the specific meanings of polysemous words in professional scenarios). For example, the geological term "joint" may be confused with "joint" in general corpora, and the vector space distance is too close, introducing noise during retrieval and resulting in deviation in similarity calculation, which will lead to inaccurate query results in the later stage and have a great impact on the judgment of large language models.

[0036] In this embodiment, a Chinese-English bilingual geological dictionary database with category label information is constructed according to the geological named entity recognition model, including: Collect professional geological dictionaries or official term standard vocabularies; Use the geological named entity recognition model to recognize and classify the professional geological dictionaries or official term standard vocabularies to obtain geological words and their classifications; Use the BERT model to extract the word vectors of the geological words, and store the classifications of the geological words as coordinates together with the word vectors in the vector database to obtain a Chinese-English bilingual geological dictionary database with category label information.

[0037] In this embodiment, Milvus relies on external text vectorization models (such as BERT, Sentence-BERT) to encode text into vectors, but the general pre-trained models are not optimized for vertical domains, resulting in fuzzy semantic representations of domain core terms. Use the geological text named entity recognition model to recognize and classify the collected professional geological dictionaries or official term standard vocabularies. In the vector database (Milvus), use the BERT model to extract word vectors, and store its classification information (such as minerals, geological ages) as labels together with the word vectors in the vector database to construct a Chinese-English bilingual geological dictionary database with category label information, so as to reduce entity matching errors caused by high similarity but different types during retrieval. In the case of a large amount of redundant data content and many classifications in the dictionary database, multiple databases can also be constructed according to the vocabulary categories and queried according to the classification later.

[0038] Embodiment 5 Based on Embodiments 1 to 4, this embodiment further describes the technology of retrieval-enhanced generation using a large language model and named entity recognition as keywords.

[0039] When performing retrieval-enhanced generation based on a vertical domain knowledge base, the matching accuracy between the user's question 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: The text is mapped to semantic vectors through a pre-trained language model (such as BERT), and coarse-grained matching is achieved based on cosine similarity, but it is not sensitive enough to fine-grained labels within the domain (such as term classification hierarchies); Second, deep learning re-ranking: A cross-encoder is used to refine the preliminary retrieval results, but it is limited by the lack of structured label constraints in the original text features; Third, graph relationship retrieval: Based on entity relationship path reasoning in a knowledge graph (such as Neo4j graph traversal), it relies on a predefined schema layer to implement logical queries and cannot dynamically adapt to the implicit semantic associations of unlabeled text. Especially in the geological field, although the official term standard dictionary has natural classification labels (such as "rock → arkose", "mineral → zircon"), existing retrieval systems have not effectively utilized such endogenous label attributes.

[0040] In this embodiment, according to the geological entity information and classification of the geological text to be processed, a translation reference is obtained by querying the Chinese-English bilingual geological dictionary database, including: Using the geological entity information and classification of the geological text to be processed as keywords and labels for text translation, query the Chinese-English bilingual geological dictionary database according to the vector query index to obtain a translation reference.

[0041] In a further embodiment, querying the Chinese-English bilingual geological dictionary database includes: Adopting a hybrid retrieval strategy, giving priority to text matching and then performing vector retrieval.

[0042] In a further embodiment, the obtaining of the translation reference includes: Among the keywords with vector similarity greater than the preset threshold, select the keyword with the highest vector similarity as the translation reference.

[0043] In the specific implementation process, when the user inputs the geological text to be processed, the geological named entity recognition model identifies the geological entity information and its classification, and uses the vector query index of the keywords and labels for text translation to query the professional dictionary database, adopting a hybrid retrieval strategy, giving priority to text matching and then performing vector retrieval. To reduce data interference, the vector similarity of the selected keywords based on semantic retrieval is set to 98%. Those with vector similarities of keywords lower than the preset threshold can be directly discarded, and the highest value higher than the preset threshold is selected as the translation reference. After querying the entity keyword comparison dictionary, an inference large language model supporting multilingual translation is called to perform enhanced translation of the geological text. The specific work process is as Figure 12 。

[0044] Finally, this embodiment also provides an evaluation method for the generated translation, specifically as follows: BERT-score is an evaluation metric for text generation quality based on the pre-trained language model BERT, used to measure the semantic similarity between the generated text (such as machine translation, text summarization, etc.) and the reference text. Compared with traditional metrics based on lexical overlap (such as BLEU, ROUGE), BERT-score can better capture the matching degree at the semantic level. The geological text is passed to the geological text translation assistant constructed based on the large language model and retrieval-augmented generation for translation generation and answering, and its answering results are compared with the answers of current representative large language models, such as DeepSeek, ChatGPT, Kimi, and Wenxin Yiyan, etc. To ensure the fairness of the verification results, 100 geological professional texts are selected, and the translation results guided by experts are used as the standard. The large language models are prompted for translation with the same prompt words (except for the part of referring to keyword retrieval translation in the RAG technology), and the BERT-score metric is mainly used to evaluate the translation accuracy. The results are as Figure 13 and Figure 14 shown. Through comparison, it can be found that the translation answers of the geological text translation assistant constructed by the method of the present invention are better than those of other models, realizing retrieval-augmented generation translation.

[0045] The same or similar reference numerals correspond to the same or similar components; The terms describing the positional relationship in the drawings are only for illustrative purposes and should not be construed as a limitation of this patent; Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A geological text translation method based on large language models and retrieval-augmented generation, characterized in that, Including: Create a Chinese-English geological text named entity annotation corpus, where the Chinese-English geological text named entity annotation corpus includes annotations of named entities, entity location boundaries, and entity types in Chinese-English geological texts; Perform data augmentation on the Chinese-English geological text named entity annotation corpus according to the entity pruning data augmentation method based on syntactic perception to obtain the data-augmented Chinese-English geological text named entity annotation corpus; Fine-tune the first pre-set large language model in an instruction fine-tuning manner based on the Chinese-English geological text named entity annotation corpus and the data-augmented Chinese-English geological text named entity annotation corpus to obtain a geological named entity recognition model; Construct a Chinese-English contrast geological dictionary database with category label information according to the geological named entity recognition model; Use the geological named entity recognition model to identify the geological text to be processed, and obtain the geological entity information and classification of the geological text to be processed; Query the Chinese-English contrast geological dictionary database according to the geological entity information and classification of the geological text to be processed to obtain a translation reference; Call the second pre-set large language model for enhanced translation according to the translation reference and the geological text to be processed to obtain the translated geological text.

2. The geological text translation method based on large language model and retrieval-augmented generation according to claim 1, wherein, The entity types include minerals, rocks, ore deposits, strata, geological ages, geological structures, fossils and paleontology, place names, rock structures and textures, geological processes, and sedimentary facies.

3. The geological text translation method based on large language models and retrieval-augmented generation according to claim 1, characterized in that, The creation of the Chinese-English geological text named entity annotation corpus includes: Based on the characteristics of geological text information, divide the geological text by entity type, then perform annotations of named entities, entity location boundaries, and entity types on Label Studio, and save it in jsonl format.

4. The geological text translation method based on large language model and retrieval-augmented generation according to claim 3, wherein The data augmentation of the Chinese-English geological text named entity annotation corpus according to the entity pruning data augmentation method based on syntactic perception includes: Input the Chinese-English geological text named entity annotation corpus, and use a word segmentation tool to segment the Chinese-English geological text with a pre-set geological vocabulary; Perform syntactic dependency analysis on the segmented Chinese-English geological text, generate a dependency tree, and extract the root node of the dependency tree; Locate the corresponding tokens in the dependency tree according to the annotation information of the Chinese-English geological text named entity annotation corpus, and retain all target entities, direct children of the target entities, the root node, and direct children to obtain a token set; Extract complete entity words from the token set, splice the retained tokens of the non-entity part, generate a pruned text, and obtain the data-augmented Chinese-English geological text named entity annotation corpus.

5. The geological text translation method based on large language model and retrieval-augmented generation according to claim 4, wherein After generating the pruned text, it further includes: Use the BERT-score method to evaluate the semantic similarity between the pruned text and the original Chinese-English geological text, and retain the pruned text with an F1 score of similarity greater than 85% to obtain the data-augmented Chinese-English geological text named entity annotation corpus.

6. The geological text translation method based on large language model and retrieval-augmented generation according to claim 1, characterized in that, Fine-tune the first pre-set large language model by using the instruction fine-tuning method with the combined use of the Chinese-English geological text named entity annotation corpus and the data-augmented Chinese-English geological text named entity annotation corpus, including: Adopt a dynamic mixing method to sample from the Chinese-English geological text named entity annotation corpus and the data-augmented Chinese-English geological text named entity annotation corpus in each training epoch, and gradually increase the proportion of the data-augmented Chinese-English geological text named entity annotation corpus according to the epoch.

7. The geological text translation method based on a large language model and retrieval-enhanced generation according to claim 1 is characterized in that: Construct a Chinese-English bilingual geological dictionary database with category label information according to the geological named entity recognition model, including: Collect professional geological dictionaries or official terminology standard vocabularies; Use the geological named entity recognition model to identify and classify the professional geological dictionaries or official terminology standard vocabularies to obtain geological words and their classifications; Use the BERT model to extract the word vectors of the geological words, and store the classifications of the geological words as coordinates together with the word vectors in the vector database to obtain a Chinese-English bilingual geological dictionary database with category label information.

8. The geological text translation method based on a large language model and retrieval-enhanced generation according to claim 1 is characterized in that: Query the Chinese-English bilingual geological dictionary database according to the geological entity information and classification of the geological text to be processed, including: Use the geological entity information and classification of the geological text to be processed as keywords and labels for text translation, and query the Chinese-English bilingual geological dictionary database according to the vector query index to obtain a translation reference.

9. The geological text translation method based on large language model and retrieval augmented generation according to claim 8, wherein, Query the Chinese-English bilingual geological dictionary database, including: Adopt a hybrid retrieval strategy, prioritize text matching, and then perform vector retrieval.

10. The geological text translation method based on large language models and retrieval-augmented generation according to any one of claims 1 to 9, characterized in that, The obtained translation reference includes: Among the keywords with vector similarity greater than the preset threshold, select the keyword with the highest vector similarity 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

Cited By

  • Intelligent place name translation method and system based on Lora fine tuning and knowledge graph

    CN122065853A

  • Intelligent place name translation method and system based on lora fine-tuning and knowledge graph

    CN122065853B