Well engineering intelligent question-answering system and method
Through the intelligent question-and-answer system of well engineering, the semantic representation and intelligent dialogue generation of multimodal data are used using vector databases and graph databases, which solves the problem of insufficient generalization capabilities of model in the existing technology, and realizes efficient matching of well engineering question-and-answer data and Improved accuracy.
Patent Information
- Application Number
- CN202411192270.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When facing multimodal Q&A data of well engineering, the model's generalization ability and adaptability are insufficient, resulting in low accuracy of results and reliance on a large number of high-quality manual annotation data, which increases the data preparation workload and limitations. The training scale of the model.
Provide an intelligent question-and-answer system for well engineering, including data acquisition module, well engineering field knowledge base construction module, multimodal input module and model configuration module. Semantic representation and intelligent dialogue generation are carried out through vector database and graph database, and pre-trained Text embedding models and large models are constructed and retrieved knowledge graphs to achieve efficient matching of multimodal data.
It improves the accuracy of matching the results of well engineering Q&A data and the comprehensiveness and reliability of answers, can effectively integrate professional knowledge and provide comprehensive answers, reduces dependence on manual labeled data, and improves the adaptability and efficiency of the system.
Smart Images

Figure CN119088929A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to an intelligent question-answering system and method for well engineering. Background Art
[0002] In the field of well engineering, with the development of technology and the increasing demand for digital transformation, intelligent question-answering systems have become an important tool for improving work efficiency and reducing decision-making time. These systems can help engineers and technicians quickly obtain the required downhole information, such as geological structure analysis, drilling parameter optimization, fault prediction and diagnosis, etc.
[0003] Among them, natural language processing (NLP) technology is the core component of building an intelligent question-answering system for well engineering. It not only needs to have basic capabilities such as text understanding, semantic analysis, and context perception, but also needs to be able to process unstructured data such as downhole operation reports and geological data; however, when facing multimodal well engineering question-answering data, the existing technology requires the model to have higher generalization ability and adaptability due to the complexity and diversity of multimodal data sets. In addition, the professional knowledge and technical details in the field of well engineering are very specific and complex. Existing methods often rely on a large amount of high-quality manually annotated data for training, which not only increases the workload of data preparation, but also limits the training scale and effect of the model, resulting in insufficient accuracy of the final generated results. Summary of the invention
[0004] In order to realize intelligent question and answer related to well engineering and improve the accuracy of matching of well engineering multimodal well engineering question and answer data results, the present invention provides a well engineering intelligent question and answer system and method, and the technical solutions adopted are as follows:
[0005] The technical solution of the first aspect of the present invention provides a well engineering intelligent question-answering system, the system comprising:
[0006] a data acquisition module configured to acquire well engineering related data;
[0007] A well engineering domain knowledge base construction module is configured to convert and process well engineering related data and construct a vector database and a graph database;
[0008] a multimodal input module configured to input multimodal well engineering question-answering data;
[0009] A model configuration module, configured with a vector model and a dialogue model, for semantic representation and intelligent dialogue generation of multimodal well engineering question-answering data;
[0010] The answer module is configured to match the results with the highest relevance to the multimodal well engineering question and answer data from the vector database and the graph database according to the semantic representation of the multimodal well engineering question and answer data.
[0011] Furthermore, the data acquisition module includes a real-time data source docking module and an expert experience collection module:
[0012] The real-time data source docking module is configured to dock with the well engineering real-time data source through a custom plug-in and process the well engineering real-time data stream using a message queue;
[0013] The expert experience collection module is configured to allow users to ask questions related to well engineering, and classify the questions related to well engineering through a large model and then match relevant results.
[0014] Furthermore, the well engineering domain knowledge base construction module includes a file processing module, an image processing module and a semantic perception block module:
[0015] The file processing module is configured to convert unstructured data in the well engineering related data into structured data;
[0016] The image processing module is configured to extract key information from the image data of the well engineering related data;
[0017] A semantic-aware chunking module configured to chunk structured data and key information into well engineering knowledge chunks.
[0018] Furthermore, the well engineering domain knowledge base construction module also includes a question-answer pair construction module, and the question-answer pair construction module is configured to generate well engineering question-answer pairs.
[0019] Furthermore, the vector database is configured to convert knowledge chunks and question-answer pairs into vector representations using a pre-trained text embedding model.
[0020] Furthermore, the graph database is configured to extract structured knowledge from well engineering related data and generate a well engineering related knowledge graph.
[0021] Furthermore, structured knowledge is extracted from well engineering related data to generate well engineering related knowledge graphs including:
[0022] The triple data of well engineering entities, well engineering attributes and relationships are extracted from the well engineering related data and a knowledge graph is obtained.
[0023] Furthermore, the question-answering module includes:
[0024] a question-answer pair matching module configured to match well engineering question-answer pairs in a vector database based on semantic representations of multimodal well engineering question-answer data;
[0025] The knowledge block screening module is configured to perform similarity calculation based on the semantic representation of the multimodal well engineering question and answer data using a vector retriever and the well engineering knowledge blocks stored in the vector database, and screen the well engineering knowledge blocks based on the similarity.
[0026] Furthermore, the question-answering module further includes:
[0027] The knowledge graph matching module is configured to retrieve relevant subgraphs in the graph database according to the semantic representation of the multimodal well engineering question and answer data, and convert the relevant subgraphs into a natural language form.
[0028] The technical solution of the second aspect of the present invention provides a well engineering intelligent dialogue method, including the well engineering intelligent question-answering system according to the technical solution of the first aspect of the present invention, and the method includes:
[0029] Acquire well engineering related data and perform preprocessing;
[0030] Build a knowledge base in the field of well engineering;
[0031] Input multimodal well engineering question-answering data and perform semantic representation and intelligent dialogue generation;
[0032] Based on the semantic representation of multimodal well engineering question and answer data, the results with the highest relevance to the multimodal well engineering question and answer data are matched from the vector database and the graph database.
[0033] The present invention has the following beneficial effects:
[0034] The well engineering intelligent question-answering system and method provided by the present invention collects extensive knowledge in the field of well engineering through a data acquisition module; by constructing a knowledge base in the field of well engineering and constructing a vector database and a graph database, the system can quickly find the answers most relevant to user questions; the well engineering intelligent question-answering system can effectively integrate professional knowledge in the field of well engineering, provide comprehensive answers based on multiple sources, and improve the comprehensiveness and reliability of the answers. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A schematic diagram of the system structure of a well engineering intelligent question-answering system provided by one embodiment of the present invention;
[0037] Figure 2A schematic flow chart of a well engineering intelligent question-answering method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the well engineering intelligent question-answering system and method proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0039] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0040] The specific scheme of a well engineering intelligent question-answering system and method provided by the present invention is described in detail below with reference to the accompanying drawings.
[0041] See also Figure 1 , which shows a structural flow chart of a well engineering intelligent question-answering system provided by an embodiment of the present invention,
[0042] A well engineering intelligent question-answering system, characterized in that the system comprises:
[0043] A data acquisition module is configured to obtain well engineering related data; specifically, the well engineering related data at least includes information in documents such as well engineering reports, geological maps, drilling logs, papers, and websites publicly available in the field of well engineering; considering the data sensitivity of the application scenario, the pre-trained model is selected such as the offline deployable model of the Qwen series;
[0044] A well engineering domain knowledge base construction module is configured to convert and process well engineering related data and construct a vector database and a graph database;
[0045] The multimodal input module is configured to input multimodal well engineering question and answer data; specifically, the multimodal input module includes: a voice receiving module, which is configured so that the user can obtain answers by inputting voice. Different from the traditional voice input module, the large model whisper is introduced here to directly process the input voice. It receives a voice input and can convert it into corresponding text by configuring prompt words; the text receiving module is configured with a text input box, where users can edit and enter the questions they want to ask; the image / video receiving module is configured to support users to upload pictures / videos, and extract and parse their contents through a multimodal large model (such as GPT4-Vision, etc.). Different from the traditional image / video recognition method, the traditional image / video processing generally uses OCR technology or deep learning methods to only identify and extract the text content in the picture / video, while the multimodal large model can not only recognize the text content, but also understand the picture / video, and directly communicate with the user to improve the user's interactive experience;
[0046] The model configuration module is configured with a vector model and a dialogue model, which are used to perform semantic representation and intelligent dialogue generation on multimodal well engineering question and answer data; wherein, the vector model includes an online model and an offline model: the online model is configured to convert text into a 1536-dimensional vector; the offline model is configured to convert text into a 1024-dimensional vector; the vector model can effectively capture the semantic information in the text and provide more accurate feature representation for subsequent tasks; at the same time, it can be properly fine-tuned in the field to better complete vertical scene tasks; the vector model should have semantic representation capabilities, and the dialogue model should have dialogue generation capabilities, and the vector model and the dialogue model can be trained based on general data; since there will be certain limitations in completing vertical field tasks, such as not understanding industry terms and business descriptions, therefore, by collecting public data in the well engineering field and constructing a fine-tuning data set, the model's expression ability in this field is further enhanced;
[0047] The answer module is configured to match the results with the highest correlation with the multimodal well engineering question and answer data from the vector database and the graph database according to the semantic representation of the multimodal well engineering question and answer data; specifically, the vector model will convert the user input into a set of vectors, and calculate the similarity between them and the vectors in the vector database, and finally obtain a similarity value. The higher the value, the more similar the set of vectors in the vector library is to the user input, and vice versa. In actual application, it is necessary to select multiple vectors in the vector library (sorted from high to low by similarity value, and the first multiple are selected); for the graph database, the big model will extract the entity in the user input, and search for the entity in the graph database, and input the searched information and the aforementioned information obtained in the vector knowledge base into the big model at the same time as the support for answering the user's question.
[0048] Preferably, the data acquisition module includes a real-time data source docking module and an expert experience collection module:
[0049] The real-time data source docking module is configured to dock with the real-time data source of the well engineering through a custom plug-in and use a message queue to process the real-time data stream of the well engineering; specifically, the real-time data source is docked through APIs or Webhooks, and a message queue (such as Kafka, RabbitMQ) is used to process asynchronous writing of data to reduce database pressure;
[0050] The expert experience collection module is configured to allow users to ask questions related to well engineering, and to match relevant results after classifying the questions related to well engineering through a large model; specifically, the matching results can be ensured by inviting experts in the field and ensuring the quality of the results through review;
[0051] Preferably, the well engineering domain knowledge base construction module includes a file processing module, an image processing module and a semantic perception block module:
[0052] The file processing module is configured to convert the unstructured data in the well engineering related data into structured data; specifically, the file types include but are not limited to docx, doc, txt, pdf, xlsx, xls, html, etc., and the unstructured data is converted into structured data through document processing tools such as OCR recognition and PDF to markdown; wherein the well engineering related file data all need to be converted into HTML format, and for the table data, after conversion into HTML format, it is directly structured and stored, which is convenient for subsequent information extraction and processing;
[0053] The image processing module is configured to extract key information from the image data of the well engineering related data; for the image data, whether to perform OCR recognition is selected according to the needs. If the content in the image does not need to be recognized, it is directly stored together with the context in the form of a URL and displayed to the user when needed, so that the answer is more intuitive; if the content in the image needs to be extracted, the OCR method is used for content extraction; for the image data in the well engineering (such as geological profiles, equipment photos, etc.), the module is responsible for identifying which images contain key information and need further processing;
[0054] The semantic-aware segmentation module is configured to segment structured data and key information into well engineering knowledge blocks; specifically, the font size information is identified by parsing tags or attributes in HTML files; thereby, the affiliation of each block of content can be derived, and the title of a paragraph can be associated with the parent title of the previous level, making the information more complete. All knowledge can be segmented into knowledge blocks for storage using the semantic-aware segmentation strategy; the layout structure of the document can also be identified using layout recognition tools, such as determining the text part and the chart part, and the semantic context is retained to the greatest extent for segmentation, such as segmentation by paragraph. Semantic association can be achieved by adding metadata to each knowledge block (such as adding chapters, document names, etc.);
[0055] Preferably, the well engineering domain knowledge base construction module also includes a question-answer pair construction module, which is configured to generate well engineering question-answer pairs; the large model can be used to generate question-answer pairs according to the original document content, and then the domain experts or business personnel will review and screen them, remove low-quality question-answer pairs, and leave the question-answer pairs that meet the requirements; high-quality prompt words can also be written to guide the model to better complete the task requirements. The writing of high-quality prompt words follows various prompt word frameworks, is combined with writing skills, and is combined with business logic for writing, and after multiple iterations, until the large model can meet the task requirements;
[0056] Preferably, the vector database is configured to convert knowledge blocks and question-answer pairs into vector representations using a pre-trained text embedding model; specifically, the above-mentioned vector model can be used to convert the acquired knowledge blocks and question-answer pairs into low-dimensional dense vectors, which serves to make texts with similar meanings closer in the vector space.
[0057] Preferably, the graph database is configured to extract structured knowledge from well engineering related data and generate a well engineering related knowledge graph; specifically, triple data of well engineering entities, well engineering attributes and relationships are extracted from well engineering related data and a knowledge graph is obtained; in this embodiment, graph-based retrieval enhancement generation (GraphRAG) is used as a generation framework for the graph database, which combines graph database technology and natural language processing technology to enhance the ability of the question-answering system, namely, graph-based retrieval enhancement generation; it is configured with an indexing stage, a retrieval stage and a generation stage:
[0058] In the indexing stage, we use the LLM service to extract triples from documents. We load the collected documents into the big model and let the big model extract the entity, attribute, and relationship triples contained therein. After manual review, qualified triples will be stored in the graph database; for example, we extract triples such as "well-drilling-equipment" from a document about well engineering.
[0059] In the retrieval stage, LLM is used to extract and generalize keywords input by the user, including handling issues such as case, aliases and synonyms. Based on these keywords, the search system uses a depth-first search algorithm or a breadth-first search algorithm to traverse the subgraph to search for local subgraphs within N hops; for example, for a query on "drilling equipment", the system may retrieve all related equipment and their attributes and relationships.
[0060] The generation phase formats the retrieved local subgraph data into text and submits it to the big model as context together with the question for processing. For example, the relevant information of "drilling equipment" is organized into a descriptive text, and then submitted to the big model together with the question raised by the user to generate a more accurate and detailed answer.
[0061] Through these three stages, valuable information can be efficiently extracted, retrieved and generated from documents, providing users with more accurate and comprehensive results. Compared with traditional retrieval and generation methods, it can better utilize domain knowledge and provide more accurate and rich answers.
[0062] Preferably, the question-answering module includes:
[0063] The question-answer pair matching module is configured to match well engineering question-answer pairs in the vector database according to the semantic representation of the multimodal well engineering question-answer data; specifically, after receiving the user's input, the vector model is used to convert it into a vector, and the user input is matched with the vector database. If there is a question in the vector database that matches the content of the user's question, that is, a question-answer pair that is higher than the similarity threshold will be input into the big model, and the big model will determine whether the question-answer pair matches the user's question, select a consistent question-answer pair, output the answer in the question-answer pair, and return the result corresponding to the question in the vector database directly to the user.
[0064] The knowledge block screening module is configured to use a vector retriever to perform similarity calculation with the well engineering knowledge blocks stored in the vector database according to the semantic representation of the multimodal well engineering question and answer data, and screen the well engineering knowledge blocks according to the similarity; specifically, if no relevant information is matched in the question and answer database, a search for a match in the knowledge blocks in the vector database is added; this embodiment uses the PG Vector plug-in as a vector retriever to perform similarity calculation with the knowledge blocks stored in the vector database, and retains the knowledge blocks with the highest ranking;
[0065] The knowledge graph matching module is configured to retrieve relevant subgraphs in the graph database according to the semantic representation of the multimodal well engineering question and answer data, and convert the relevant subgraphs into natural language form; specifically, the large model extracts keywords from the user input and performs full-text search in the knowledge base; based on understanding the user input, the large model generates Cypher statements to search in the graph database, matches the information most relevant to the user input, and formats the most relevant data into text, which is input into the dialogue model together with the retrieved knowledge blocks and user questions; specifically, the query statement generates a cypher statement, the evaluation of the most relevant subgraph is selected by the large model, and each subgraph obtained by the query is organized into structured data and input into the large model, from which the large model selects the subgraph most relevant to the user question.
[0066] See also Figure 2 The second technical solution of the present invention provides a well engineering intelligent dialogue method, including the well engineering intelligent question-answering system described in the first technical solution of the present invention, and the method includes:
[0067] Step S100: Acquire well engineering related data and perform preprocessing;
[0068] Step S200: constructing a well engineering domain knowledge base;
[0069] Step S300: input multimodal well engineering question-answering data and perform semantic representation and intelligent dialogue generation;
[0070] Step S400: matching the result with the highest correlation with the multimodal well engineering question and answer data from the vector database and the graph database based on the semantic representation of the multimodal well engineering question and answer data.
[0071] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0072] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A well engineering intelligent question-answering system, characterized in that: The system comprises: a data acquisition module configured to acquire well engineering related data; A well engineering domain knowledge base construction module is configured to convert and process well engineering related data and construct a vector database and a graph database; a multimodal input module configured to input multimodal well engineering question-answering data; A model configuration module, configured with a vector model and a dialogue model, for semantic representation and intelligent dialogue generation of multimodal well engineering question-answering data; The answer module is configured to match the results with the highest relevance to the multimodal well engineering question and answer data from the vector database and the graph database according to the semantic representation of the multimodal well engineering question and answer data.
2. The well engineering intelligent question-answering system according to claim 1, characterized in that: The data acquisition module includes a real-time data source docking module and an expert experience collection module: The real-time data source docking module is configured to dock with the well engineering real-time data source through a custom plug-in and process the well engineering real-time data stream using a message queue; The expert experience collection module is configured to allow users to ask questions related to well engineering, and classify the questions related to well engineering through a large model and then match relevant results.
3. The intelligent question-answering system for well engineering according to claim 1, characterized in that: The well engineering domain knowledge base construction module includes a file processing module, an image processing module and a semantic perception block module: The file processing module is configured to convert unstructured data in the well engineering related data into structured data; The image processing module is configured to extract key information from the image data of the well engineering related data; A semantic-aware chunking module configured to chunk structured data and key information into well engineering knowledge chunks.
4. The well engineering intelligent question-answering system according to claim 3, characterized in that: The well engineering domain knowledge base construction module further includes a question-answer pair construction module, and the question-answer pair construction module is configured to generate well engineering question-answer pairs.
5. The well engineering intelligent question-answering system according to claim 4, characterized in that: The vector database is configured to convert knowledge chunks and question-answer pairs into vector representations using a pre-trained text embedding model.
6. The well engineering intelligent question-answering system according to claim 5, characterized in that: The graph database is configured to extract structured knowledge from well engineering related data and generate a well engineering related knowledge graph.
7. The well engineering intelligent question-answering system according to claim 6, characterized in that: Extract structured knowledge from well engineering related data and generate well engineering related knowledge graph including: The triple data of well engineering entities, well engineering attributes and relationships are extracted from the well engineering related data and a knowledge graph is obtained.
8. The well engineering intelligent question-answering system according to any one of claims 1 to 7, characterized in that: The question-answering module includes: a question-answer pair matching module configured to match well engineering question-answer pairs in a vector database based on semantic representations of multimodal well engineering question-answer data; The knowledge block screening module is configured to perform similarity calculation based on the semantic representation of the multimodal well engineering question and answer data using a vector retriever and the well engineering knowledge blocks stored in the vector database, and screen the well engineering knowledge blocks based on the similarity.
9. The well engineering intelligent question-answering system according to claim 8, characterized in that: The question-answering module also includes: The knowledge graph matching module is configured to retrieve relevant subgraphs in the graph database according to the semantic representation of the multimodal well engineering question and answer data, and convert the relevant subgraphs into a natural language form.
10. A well engineering intelligent dialogue method, characterized in that: The intelligent question-answering system for well engineering according to any one of claims 1 to 9, wherein the method comprises: Acquire well engineering related data and perform preprocessing; Build a knowledge base in the field of well engineering; Input multimodal well engineering question-answering data and perform semantic representation and intelligent dialogue generation; Based on the semantic representation of multimodal well engineering question and answer data, the results with the highest relevance to the multimodal well engineering question and answer data are matched from the vector database and the graph database.
Citation Information
Patent Citations
Intelligent question and answer implementation method and system based on large model and semantic map
CN117271724A
Agricultural intelligent question and answer method and system supporting multi-mode and multi-round dialogues
CN117370506A
Geotechnical engineering knowledge question-answering system based on large language model
CN118193704A
Cited By
Meteorological corpus construction method, system and related device
CN119476448A
APT organization attack portrait generation reasoning method and device and electronic equipment
CN120069066A
Well drilling risk processing method and device based on large language model
CN120931065A
