Geotechnical engineering semantic embedding retrieval method based on field guidance BERT

By introducing a domain-guided attention mechanism and Siamese architecture into the BERT model, combined with the geotechnical engineering knowledge table, the problems of information dispersion and semantic inconsistency in traditional geotechnical engineering information retrieval are solved, and efficient and accurate semantic embedding retrieval is achieved.

CN119903168AActive Publication Date: 2025-04-29SHANGHAI GEOTECHN INVESTIGATIONS & DESIGN INST

Patent Information

Application Number
CN202411869841.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-29
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Traditional geotechnical engineering information retrieval faces problems such as information dispersion, semantic inconsistency and inefficient search efficiency. The existing BERT models lack targeted optimization in the professional field and cannot make full use of domain-specific knowledge.

Method used

The semantic embedding retrieval method of geotechnical engineering based on domain-guided BERT is adopted, and the attention distribution and semantic embedding of the model are introduced into the attention mechanism of BERT, and combined with the geotechnical engineering knowledge table, the attention distribution and semantic embedding of the model are dynamically optimized.

Benefits of technology

It significantly improves the model's ability to capture key terms and complex semantics in the field of geotechnical engineering, and improves the accuracy and efficiency of semantic similarity evaluation and retrieval tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903168A_ABST
    Figure CN119903168A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of artificial intelligence geotechnical engineering, provides a geotechnical engineering semantic embedding retrieval method based on field guidance BERT, and aims to solve the problems of information dispersion, semantic inconsistency and low retrieval efficiency in geotechnical engineering information retrieval. According to the method, a plurality of text data in the rock-soil field are collected, a structured training data set is constructed, a field guiding attention mechanism is introduced to optimize a BERT model, and dynamic modeling of field key terms is achieved. A Siamese architecture is adopted to realize efficient semantic embedding learning and optimization, and the accuracy of semantic similarity calculation is improved. A total loss function of comparison loss and attention regularization loss is designed, and model training is carried out in combination with an AdamW optimizer. The precision and efficiency of geotechnical engineering information retrieval can be remarkably improved, and powerful support is provided for knowledge management and information retrieval in the field of geotechnical engineering. Meanwhile, the invention also relates to a memory or server configuration for storing and processing related data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence geotechnical engineering technology, and proposes a geotechnical engineering semantic embedding retrieval method based on domain-guided BERT. Background Art

[0002] In traditional geotechnical engineering information retrieval, technicians face challenges such as information dispersion, inconsistent semantics, and low retrieval efficiency. Geotechnical engineering data usually comes from a wide range of sources, including academic papers, engineering reports, experimental data, standard specifications, and other document forms. These text data often lack a unified structure and terminology, making it difficult to effectively integrate information. In addition, the terminology and professional concepts in the field of geotechnical engineering are highly professional and complex. Traditional keyword retrieval methods are difficult to accurately capture the deep semantics in the document, resulting in low relevance and accuracy of the retrieval results.

[0003] Existing text semantic retrieval methods usually use the pre-trained language model BERT (Bidirectional Encoder Representations from Transformers), generate dynamic word embeddings by context encoding sentences, and use the cosine similarity of sentence vectors to measure semantic similarity, thereby improving the effectiveness of semantic retrieval to a certain extent. A Chinese patent (CN114840645A) discloses a method that linearly transforms the output of BERT to unify the text vector and the search keyword vector under a standard orthogonal basis, further standardizes the vector space representation, and improves the relevance of the retrieval results. However, both the existing BERT and CN114840645A are mainly aimed at general texts, lack targeted optimization in professional fields (such as geotechnical engineering), and cannot fully utilize domain-specific knowledge, such as explicit modeling of key terms and semantic weight assignment. In addition, there may be nonlinear and singular problems in vector distribution, resulting in the calculation results of semantic similarity being inconsistent with the actual semantic relevance, limiting its practical application in highly specialized fields (such as geotechnical engineering semantic retrieval). Summary of the invention

[0004] In response to the above problems, the present invention discloses a geotechnical engineering semantic embedding retrieval method based on domain-guided BERT, which uses deep learning technology to process multi-source text data in the field of geotechnical engineering, and can achieve efficient semantic understanding and information extraction.

[0005] The technical solution of the present invention is as follows:

[0006] A domain-guided BERT-based semantic embedding retrieval method for geotechnical engineering includes the following steps:

[0007] Step A: Data source acquisition, collecting various text materials in the geotechnical field, including project reports, engineering case analysis, experimental data, standard specification documents, papers and technical guidelines, and performing knowledge extraction and cleaning;

[0008] Step B: Construct a structured training data set, including segmentation, manual annotation, and sample balancing. Segmentation divides long documents into short text segments according to semantic natural segments or logical segments. Manual annotation generates question-answer pairs for the segmented text segments. Sample balancing uses data augmentation technology to expand the data volume of rare type questions.

[0009] Step C: Data preprocessing, which includes extracting key factors in the field and adjusting the segment length, building a geotechnical engineering knowledge table, using the knowledge table to match terms in the text, generating key factor tags for the field to guide the weight allocation of the attention mechanism, and testing the impact of different text segment lengths on model performance;

[0010] Step D: Construct a geotechnical engineering semantic embedding model based on BERT. The model dynamically models domain key terms by introducing the domain-guided attention mechanism in BERT's attention mechanism, and adopts the Siamese architecture to achieve efficient semantic embedding learning and optimization. The model receives the input sentence pairs, pre-processes them through BERT's word segmenter, and converts natural language into the input format required by BERT, including word index sequence, attention mask and key term tag. Two BERT models with shared weights encode the sentences independently and generate corresponding feature vector representations. The attention scores of key terms are dynamically adjusted through the domain-guided attention mechanism to generate enhanced attention distribution for optimizing the feature representation of sentences. The feature vector of each sentence is processed by average pooling operation to generate a fixed-size sentence embedding vector. The similarity score between the embedding representations of sentence pairs is calculated using cosine similarity.

[0011] Step E: Model training, testing, and prediction. Design a total loss function using contrast loss and attention regularization loss, and train the model using the AdamW optimizer and learning rate scheduler. Evaluate model performance on the test set, using the mean cosine similarity, accuracy and recall of semantic retrieval tasks, and the F1 indicator to measure model performance. Test the performance of the model on datasets with different segmentation lengths, and analyze the impact of the optimal segmentation strategy on model performance.

[0012] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the knowledge extraction and cleaning in step A further includes: performing semantic analysis on the collected text data, removing redundant and erroneous information, and ensuring the accuracy and consistency of the text data.

[0013] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the segmentation processing in step B also includes: using natural language processing technology to semantically segment the document to ensure the semantic integrity and independence of each short text fragment.

[0014] Furthermore, in the above-mentioned geotechnical engineering semantic embedding retrieval method based on domain-guided BERT, the manual annotation in step B also includes: based on the knowledge system in the field of geotechnical engineering, professional review of the question-answer pairs is performed to ensure the accuracy and professionalism of the annotation content.

[0015] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the data preprocessing in step C also includes: weighting the domain key factor tags, and dynamically adjusting the weights of the key terms according to their importance and frequency of occurrence in the geotechnical engineering field to optimize the distribution of the attention mechanism.

[0016] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the model construction in step D also includes: adopting a dual-tower design of the Siamese architecture to ensure the embedding consistency of two sentences in the same semantic space, thereby improving the accuracy and efficiency of semantic similarity calculation.

[0017] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the model training in step E also includes: adjusting the attention distribution using the domain weights generated by the knowledge table, and optimizing the model's semantic understanding and information extraction capabilities through the total loss function of contrast loss and attention regularization loss.

[0018] Furthermore, in the above-mentioned domain-guided BERT-based geotechnical engineering semantic embedding retrieval method, the model testing and prediction in step E also includes: performing performance evaluation on the model for different types of geotechnical engineering problems to verify its effectiveness and reliability in practical applications.

[0019] The present invention also discloses a memory or a server for storing and processing data required by the above method, wherein the memory or the server is configured as:

[0020] Store the geotechnical text data collected and cleaned in step A;

[0021] Store the structured training dataset constructed in step B, including segmented short text fragments, manually annotated question-answer pairs, and the dataset augmented by data augmentation technology;

[0022] Storing the geotechnical engineering knowledge table constructed in step C, domain key factor tags, and test results of different text segment lengths;

[0023] Store the geotechnical engineering semantic embedding model built in step D and its parameters, including the weights of the BERT model, the configuration of the domain-guided attention mechanism, and the details of the Siamese architecture;

[0024] During the model training process in step E, it provides efficient data reading and writing capabilities to support the rapid processing of large-scale data sets;

[0025] In the model testing and prediction phase, it serves as a model deployment platform, receives user input, performs model reasoning, and returns retrieval results.

[0026] Furthermore, the above-mentioned storage device or server for storing and processing data required by the above-mentioned method further comprises:

[0027] Data encryption module, used to encrypt stored sensitive data to ensure data security and privacy;

[0028] Data backup and recovery mechanism, regularly backing up stored data to prevent data loss and quickly restoring data when needed;

[0029] Load balancing and failover functions to ensure that requests can be automatically distributed to other servers in the event of high concurrent access or server failure, ensuring service continuity and stability;

[0030] Performance monitoring and optimization tools monitor the operating status of storage and servers in real time, including CPU usage, memory usage, disk I / O, etc., so as to promptly discover and resolve performance bottlenecks and optimize system performance.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] This method dynamically optimizes the model's attention distribution by innovatively integrating the Domain-Guided Attention (DGA) mechanism into the attention mechanism of the BERT (Bidirectional Encoder Representations from Transformers) model. This mechanism combines the Siamese neural network architecture and the specially constructed Geotechnical Knowledge Base (GKB) to enable the model to focus more accurately on key terms and core concepts in the field of geotechnical engineering, thereby significantly enhancing its ability in professional semantic modeling.

[0033] Specifically, the domain-guided attention mechanism uses the rich information in the geotechnical engineering knowledge table to dynamically adjust the attention weights of the BERT model. In this process, the model not only considers the contextual information of the text itself, but also fully integrates the knowledge and experience of domain experts, so that the model can more accurately capture key information and reduce noise interference when understanding complex and professional geotechnical engineering texts.

[0034] The introduction of the Siamese architecture further improves the performance of the model when processing similar or related texts. By sharing parameters, the Siamese network can learn the similarity measure between text pairs, which is crucial to improving the accuracy of the retrieval system. In the field of geotechnical engineering, many documents may involve similar or related geological conditions, construction methods, etc. The Siamese architecture can more effectively identify these similarities, thereby improving the accuracy of retrieval results.

[0035] In addition, this method makes full use of the professional terms, concept definitions and their relationships in the geotechnical engineering knowledge table to provide rich background knowledge for the model. This knowledge is effectively integrated during the model training process, enabling the model to learn deeper semantic representations from professional texts in the field of geotechnical engineering. This improvement in deep semantic understanding is of great significance for achieving efficient and accurate text retrieval.

[0036] In summary, this method not only optimizes the model's ability to model professional semantics, but also significantly improves the accuracy and efficiency of the retrieval system in the field of geotechnical engineering by combining the domain-guided attention mechanism, Siamese architecture, and geotechnical engineering knowledge table. This innovative method provides a new approach to solving the difficult problems in professional text retrieval, and is of great significance for promoting the informatization and intelligent development of the geotechnical engineering field. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Domain-guided attention mechanism;

[0038] Figure 2 Domain-guided attention mechanism BERT Encoder;

[0039] Figure 3 Diagram of the structure of the BERT semantic embedding model guided by the geotechnical engineering domain. DETAILED DESCRIPTION

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

[0041] Example 1

[0042] A domain-guided BERT-based semantic embedding retrieval method for geotechnical engineering includes the following steps:

[0043] 1. Data source acquisition

[0044] Collect various text materials in the field of geotechnical engineering, including project reports, engineering case analysis, experimental data, standard specification documents, papers and technical guidelines. These materials cover typical terms and application scenarios of geotechnical engineering, with rich professionalism and semantic depth. Since these data have the problems of low structure and scattered semantics, further knowledge extraction and cleaning are required to ensure semantic consistency.

[0045] 2. Dataset Establishment

[0046] Based on the collected text data, a structured training data set is constructed, which includes the following steps:

[0047] 2.1 Segmentation Processing

[0048] Divide long documents into semantic natural paragraphs or logical segments to generate short text fragments to ensure the semantic concentration and logical coherence of the segmented content.

[0049] 2.2 Manual Labeling

[0050] For the segmented text fragments, question-answer pairs are generated. The questions are based on the key semantic points extracted from the paragraph content, and the answers are the concise summaries of the paragraphs.

[0051] Example:

[0052] Text snippet:

[0053] “The influence of soil particle composition on shear strength is mainly reflected in the inter-particle contact force and drainage conditions.”

[0054] question:

[0055] “How does soil particle composition affect shear strength?”

[0056] Answer:

[0057] “Influenced by interparticle contact forces and drainage conditions.”

[0058] 2.3 Sample Balance

[0059] For certain rare types of problems (such as those involving specific soil properties or complex analysis), data augmentation techniques (such as synonymous substitution, semantic restatement, etc.) are used to expand the data volume, balance the sample distribution, and ensure the diversity and comprehensiveness of model training.

[0060] 3. Data Preprocessing

[0061] Based on the labeled data, further normalization processing is performed:

[0062] 3.1 Extraction of key factors in the field

[0063] Construct a geotechnical engineering knowledge table including important terms, concepts and their properties, such as:

[0064] Soil types: sand, clay, silt, gravel.

[0065] Mechanical properties: shear strength, permeability coefficient, compression coefficient, etc.

[0066] Environmental conditions: moisture content, saturation, temperature, pressure, etc.

[0067] The knowledge table is used to match the terms in the text and generate domain key factor tags (Keyword Mask) to guide the weight allocation of the attention mechanism.

[0068] 3.2 Segment length adjustment

[0069] Test the impact of different text segmentation lengths on model performance and generate datasets with short, medium, and long segmentation versions to explore the best segmentation strategy.

[0070] 3.3 Data Partitioning

[0071] The dataset is divided into a training set and a test set in a ratio of 80%:20%, ensuring that the samples in the training and testing phases do not overlap.

[0072] 4. Constructing a semantic embedding model for geotechnical engineering

[0073] The model structure is as follows Figure 1-3 This model is based on BERT. It dynamically models key domain terms by introducing the Domain-Guided Attention mechanism into BERT's attention mechanism, and adopts the Siamese architecture to achieve efficient semantic embedding learning and optimization.

[0074] First, the input sentence pair (S1 and S2) is preprocessed by BERT's tokenizer to convert natural language into the input format required by BERT, including word index sequence (input_ids), attention mask (attention_mask) and key term tag (Keyword Mask). These input vectors are then sent to two shared weight encoders for processing.

[0075] In the encoding layer, two weight-sharing BERT models encode sentences S1 and S2 independently, generating corresponding feature vectors H1 and H2. The shape of each feature vector is n×768, where n is the number of tokens in the sentence and 768 is the dimension of the hidden layer. During the encoding process, the attention scores of key terms are dynamically adjusted through the domain-guided attention mechanism. Specifically, when calculating the attention distribution, the formula is:

[0076]

[0077] Where: w j =1+(Keyword Mask j (γ-1))

[0078] Higher attention weights are assigned to domain key terms, where γ>1 is the weight amplification factor. The generated enhanced attention distribution is used to further optimize the feature representation of the sentence.

[0079] Next, the pooling layer processes the feature vector of each sentence using the mean pooling operation. The pooling process takes the average of the feature vectors of all tokens in each sentence in each dimension to generate fixed-size sentence embedding vectors V1 and V2, each with a shape of 1×768.

[0080] Through the dual-tower architecture with shared weights, the model ensures the consistency of embedding of two sentences in the same semantic space. For the embedding representations V1 and V2 of the sentence pair, cosine similarity is used to perform sentence comparison analysis and calculate the similarity score:

[0081]

[0082] The final output is a similarity score, which is used to evaluate the semantic similarity between two sentences. Through the dual-tower design of the Siamese architecture, the model can efficiently handle similarity tasks and adapt to a variety of semantic retrieval and matching scenarios.

[0083] 5. Model training, testing, and prediction

[0084] 5.1 Training

[0085] Loss function design:

[0086] Using contrastive loss, sentence embedding is optimized to make semantically similar sentence pairs closer and dissimilar sentence pairs farther apart.

[0087] Loss function definition:

[0088] L contrastive =y·d 2 +(1-y)·max(0,margin-d) 2

[0089] Where d represents the Euclidean distance of sentence embeddings and y represents the similarity label.

[0090] Attention Regularization:

[0091] Attention Regularization Loss is introduced to constrain the model to pay more attention to domain terms by the mean square error (MSE) with the target attention distribution.

[0092] The total loss function is: L = L contrastive +α·L attention

[0093] Training strategy:

[0094] Use the AdamW optimizer in combination with a learning rate scheduler (such as linear decay) to achieve stable convergence.

[0095] The attention distribution is adjusted through the domain weights generated by the knowledge table, so that the model can capture the domain semantics more accurately.

[0096] 5.2 Testing

[0097] The model performance is evaluated on the test set using the following metrics:

[0098] Mean cosine similarity: measures the semantic closeness of sentence pair embeddings.

[0099] Precision and recall of semantic retrieval tasks: verify the actual retrieval ability of the model.

[0100] F1 index: a comprehensive measure of the accuracy and coverage of search results.

[0101] The performance of the model is tested on datasets with different segmentation lengths, and the impact of the optimal segmentation strategy on model performance is analyzed.

[0102] The beneficial effect of implementing the above scheme is that, through refined data processing and model design, a semantic embedding model for the field of geotechnical engineering has been successfully constructed. This model not only effectively solves the problems of low structuring and scattered semantics of geotechnical text materials, but also significantly improves the model's ability to capture key terms and complex semantics through the domain-guided attention mechanism. After training and testing, the model performed well in semantic similarity assessment and retrieval tasks, providing strong support for intelligent information processing in geotechnical engineering and greatly promoting the efficient application and sharing of domain knowledge.

[0103] Example 2

[0104] A storage device or server specifically used to store and process the data required by the domain-guided BERT-based geotechnical engineering semantic embedding retrieval method as described in Example 1.

[0105] The storage or server is carefully designed to ensure efficient storage of data, fast processing, and smooth operation of the model training and prediction phases.

[0106] 1. Storage or server configuration

[0107] 1Data storage module

[0108] Text database: used to store the geotechnical text data collected and cleaned in step A, including project reports, engineering case analysis, experimental data, standard specification documents, papers and technical guidelines, etc. These data are organized in a structured way to facilitate subsequent processing and retrieval.

[0109] 2 Training dataset: Stores the structured training dataset constructed in step B, including segmented short text fragments, manually annotated question-answer pairs, and datasets augmented by data augmentation techniques. These datasets provide rich samples for model training.

[0110] 3. Knowledge Table and Tags: Store the geotechnical engineering knowledge table constructed in step C, domain key factor tags, and test results of different text segment lengths. These knowledge tables and tags provide domain-specific knowledge for the model and help optimize the distribution of the attention mechanism.

[0111] 4. Model parameter library: Stores the geotechnical engineering semantic embedding model and its parameters constructed in step D, including the weights of the BERT model, the configuration of the domain-guided attention mechanism, and the details of the Siamese architecture. These parameters are the core of the model operation and ensure the efficiency and accuracy of the model.

[0112] 5Data processing module

[0113] Data reading and writing: In the model training process of step E, efficient data reading and writing capabilities are provided to support the rapid processing of large-scale data sets. By optimizing the data storage structure and access strategy, the real-time and efficient data processing is ensured.

[0114] 6. Data preprocessing: Implement the data preprocessing function in step C, including extraction of key factors in the field, adjustment of segment length, and data division. These preprocessing operations help improve the effect and efficiency of model training.

[0115] 7Model deployment and prediction module

[0116] 8. Model deployment: In the model testing and prediction phase, it serves as a model deployment platform, receives user input, performs model reasoning, and returns search results. By optimizing the model loading and reasoning process, it ensures the real-time and accuracy of the prediction.

[0117] 9. Result display: Provide a friendly user interface to display search results and related information for easy understanding and use by users.

[0118] 2. Additional functions of storage or server

[0119] 1Data encryption and security

[0120] Implement data encryption module to encrypt stored sensitive data to ensure data security and privacy. Use advanced encryption algorithms and key management strategies to protect data from unauthorized access and leakage.

[0121] 2Data backup and recovery

[0122] Back up stored data regularly to prevent data loss. When needed, data can be quickly restored to ensure business continuity and stability.

[0123] 3. Load Balancing and Failover

[0124] Implement load balancing and failover functions to ensure that requests can be automatically distributed to other servers in the event of high concurrent access or server failure. Improve the scalability and reliability of the system through cluster deployment and load balancing strategies.

[0125] 4Performance Monitoring and Optimization

[0126] Monitor the operating status of storage and servers in real time, including CPU usage, memory usage, disk I / O, etc. Use performance monitoring and optimization tools to promptly identify and resolve performance bottlenecks, optimize system performance, and ensure smooth data processing and model operation.

[0127] 3. Implementation Effect

[0128] By adopting the memory or server provided in this embodiment, the data required by the geotechnical engineering semantic embedding retrieval method based on domain-guided BERT can be efficiently stored and processed. The memory or server not only meets the needs of data storage, processing, model training and prediction, but also provides additional functions such as data encryption and security, data backup and recovery, load balancing and failover, and performance monitoring and optimization. The realization of these functions ensures the security, reliability and efficiency of the data, and provides strong support for the practical application of the geotechnical engineering semantic embedding retrieval method.

[0129] In summary, the storage device or server provided in this embodiment 2 is specially designed for the geotechnical engineering semantic embedding retrieval method based on the domain-guided BERT, and has the characteristics of high efficiency, security, reliability and scalability, and can meet the needs of the geotechnical engineering field for semantic retrieval technology.

[0130] The above are only preferred embodiments of the present invention, and the protection scope of the present invention cannot be limited thereto. That is, any simple equivalent changes and modifications made according to the claims and the content of the invention still fall within the protection scope of the patent application of the present invention.

Claims

1. A domain-guided BERT-based semantic embedding retrieval method for geotechnical engineering, characterized by: The following steps are involved: Step A: Data source acquisition, collecting various text materials in the geotechnical field, including project reports, engineering case analysis, experimental data, standard specification documents, papers and technical guidelines, and performing knowledge extraction and cleaning; Step B: Construct a structured training data set, including segmentation, manual annotation, and sample balancing. Segmentation divides long documents into short text segments according to semantic natural segments or logical segments. Manual annotation generates question-answer pairs for the segmented text segments. Sample balancing uses data augmentation technology to expand the data volume of rare type questions. Step C: Data preprocessing, which includes extracting key factors in the field and adjusting the segment length, building a geotechnical engineering knowledge table, using the knowledge table to match terms in the text, generating key factor tags for the field to guide the weight allocation of the attention mechanism, and testing the impact of different text segment lengths on model performance; Step D: Construct a geotechnical engineering semantic embedding model based on BERT. The model dynamically models key domain terms by introducing the domain-guided attention mechanism into BERT’s attention mechanism, and adopts the Siamese architecture to achieve efficient semantic embedding learning and optimization. The model receives the input sentence pairs and preprocesses them through BERT's tokenizer to convert natural language into the input format required by BERT, including word index sequence, attention mask and key term tag; two BERT models with shared weights encode the sentences independently and generate corresponding feature vector representations; the attention scores of key terms are dynamically adjusted through the domain-guided attention mechanism to generate enhanced attention distribution for optimizing the feature representation of sentences; the feature vector of each sentence is processed by average pooling operation to generate a fixed-size sentence embedding vector; the similarity score between the embedding representations of the sentence pairs is calculated using cosine similarity; Step E: Model training, testing, and prediction. Design a total loss function using contrast loss and attention regularization loss, and train the model using the AdamW optimizer and learning rate scheduler. Evaluate model performance on the test set, using the mean cosine similarity, accuracy and recall of semantic retrieval tasks, and the F1 indicator to measure model performance. Test the performance of the model on datasets with different segmentation lengths, and analyze the impact of the optimal segmentation strategy on model performance.

2. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1 is characterized in that: The knowledge extraction and cleaning in step A further includes: performing semantic analysis on the collected text data, removing redundant and erroneous information, and ensuring the accuracy and consistency of the text data.

3. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The segmentation process in step B also includes: using natural language processing technology to perform semantic segmentation on the document to ensure the semantic integrity and independence of each short text segment.

4. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The manual labeling in step B also includes: based on the knowledge system in the field of geotechnical engineering, professional review of the question-answer pairs is performed to ensure the accuracy and professionalism of the labeled content.

5. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The data preprocessing in step C also includes: assigning weights to key field factor tags, and dynamically adjusting the weights of key terms according to their importance and frequency of occurrence in the field of geotechnical engineering to optimize the distribution of the attention mechanism.

6. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The model construction in step D also includes: adopting a dual-tower design of a Siamese architecture to ensure the embedding consistency of two sentences in the same semantic space and improve the accuracy and efficiency of semantic similarity calculation.

7. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The model training in step E also includes: adjusting the attention distribution using the domain weights generated by the knowledge table, and optimizing the semantic understanding and information extraction capabilities of the model through the total loss function of the contrast loss and the attention regularization loss.

8. The domain-guided BERT-based geotechnical engineering semantic embedding retrieval method according to claim 1, characterized in that: The model testing and prediction in step E also includes: evaluating the performance of the model for different types of geotechnical engineering problems to verify its effectiveness and reliability in practical applications.

9. A memory or server for storing and processing data required by the method according to any one of claims 1 to 8, wherein the memory or server is configured as follows: Store the geotechnical text data collected and cleaned in step A; Store the structured training dataset constructed in step B, including segmented short text fragments, manually annotated question-answer pairs, and the dataset augmented by data augmentation technology; Storing the geotechnical engineering knowledge table constructed in step C, domain key factor tags, and test results of different text segment lengths; Store the geotechnical engineering semantic embedding model built in step D and its parameters, including the weights of the BERT model, the configuration of the domain-guided attention mechanism, and the details of the Siamese architecture; During the model training process in step E, it provides efficient data reading and writing capabilities to support the rapid processing of large-scale data sets; In the model testing and prediction phase, it serves as a model deployment platform, receives user input, performs model reasoning, and returns retrieval results.

10. The storage device or server according to claim 9, characterized in that: The memory or server further comprises: Data encryption module, used to encrypt stored sensitive data to ensure data security and privacy; Data backup and recovery mechanism, regularly backing up stored data to prevent data loss and quickly restoring data when needed; Load balancing and failover functions to ensure that requests can be automatically distributed to other servers in the event of high concurrent access or server failure, ensuring service continuity and stability; Performance monitoring and optimization tools monitor the operating status of storage and servers in real time, including CPU usage, memory usage, disk I / O, etc., so as to promptly discover and resolve performance bottlenecks and optimize system performance.

Citation Information

Patent Citations

  • Text semantic retrieval method and device for science and technology resource information of experts and scholars

    CN114840645A

  • Intelligence type retrieval dialogue method based on pre-training and attention interaction network

    CN114817494A

  • Intelligent retrieval method based on large language model and domain ontology

    CN117633159A

  • Word and sentence vector-based online annotation insurance policy term viewing method, device and system

    CN117993393A

  • Automated domain adaptation for semantic search using embedding vectors

    US20240394291A1

Cited By

  • Text duplicate removal method and device, electronic equipment and storage medium

    CN117892714A

  • Deep learning prediction method for rock freeze-thaw damage based on text embedding

    CN120470950A