Intelligent question-answering method and device for oil-gas exploration and development

By establishing a question-and-answer database and knowledge graph for oil and gas exploration and development, and combining entity and keyword retrieval, more accurate and coherent answers are generated, solving the efficiency and accuracy problems of intelligent question answering in oil and gas exploration and development, and improving user experience and the ability to handle complex tasks.

CN121658583APending Publication Date: 2026-03-13PETROCHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In the process of oil and gas exploration and development, existing intelligent question-answering technologies are insufficient in terms of understanding natural language processing capabilities and the accuracy of answering professional questions, resulting in low efficiency.

Method used

Establish a question-and-answer database and an oil and gas knowledge graph for oil and gas exploration and development. By extracting entities and keywords from user queries and combining knowledge graph and question-and-answer database retrieval, a more complete and semantically rich contextual input is generated, and answers are provided using a pre-set knowledge generation model.

Benefits of technology

It significantly improves the accuracy, coherence, and depth of search results, enhances user experience and the ability to handle complex tasks, and provides more comprehensive and interpretable answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658583A_ABST
    Figure CN121658583A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent question and answer method and device for oil and gas exploration and development, and the method comprises the steps: building a question and answer library and an oil and gas knowledge graph based on an obtained oil and gas exploration and development knowledge document; inputting the user query into a preset oil and gas word extraction model, and extracting to obtain a keyword; the keyword comprises an entity; retrieving the oil and gas knowledge graph based on the entity to obtain a query sub-graph; retrieving a question and answer library based on the keywords to obtain query characters; obtaining context input according to the query sub-graph and the query text; and inputting the context input into a preset oil and gas knowledge generation model to generate a retrieval answer. According to the method, question and answer library retrieval and knowledge graph retrieval are combined, information from the two sources is integrated together to form more complete context input with richer semantic information, the accuracy, continuity and depth of retrieval answers are remarkably improved, more comprehensive answers with higher interpretability are provided, and the retrieval efficiency is improved. And the user experience and the complex task processing capability are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an intelligent question-answering method and apparatus for oil and gas exploration and development. Background Technology

[0002] When oil and gas exploration and development workers encounter problems in practice, they often need to consult various data sources such as professional journals, database systems, document repositories, and the internet, and then manually read, analyze, and summarize the information to find the answers. This process is time-consuming, labor-intensive, and inefficient. Therefore, it is necessary to efficiently model and manage various multi-source, heterogeneous oil and gas exploration and development expertise, and to construct an intelligent question-and-answer method and system for exploration and development expertise. This would help oil and gas exploration and development workers quickly and conveniently obtain answers to their professional questions, improve work efficiency, and enhance the effectiveness of existing exploration and development data, knowledge, and results.

[0003] Intelligent question answering is an important application of natural language processing technology, aiming to automatically provide answers to natural language questions posed by users. Common intelligent question answering technologies include the following:

[0004] Retrieval-based question answering: This approach uses accumulated domain-specific question-answering pairs to perform question-answering tasks. Specifically, given an input question, it employs methods such as text similarity calculation and inverted indexing to retrieve the question that is most similar to the input question from a pre-defined question-answering dataset, and uses the corresponding answer of that question as the answer to the user's question.

[0005] Knowledge graph-based question answering: Knowledge graph technology models the relationships between everything in the world, using graph models to describe knowledge. It provides knowledge representation, storage, and reasoning at the semantic level. Users ask questions in natural language, the question answering system performs semantic analysis, retrieves information from unstructured knowledge products and structured knowledge graph databases, and finally provides answers in natural language.

[0006] Question answering based on generative pre-trained large models: Generative pre-trained large models have hundreds of billions or even trillions of parameters. Based on natural language processing technology and deep neural network models, they can learn and understand the syntax and semantics of human language and generate natural language text with coherence and logic. Summary of the Invention

[0007] To generate better search answers, this invention provides an intelligent question-answering method and apparatus for oil and gas exploration and development.

[0008] In a first aspect, embodiments of the present invention provide an intelligent question-answering method for oil and gas exploration and development, which may include:

[0009] Based on the acquired oil and gas exploration and development knowledge documents, a question-and-answer database and an oil and gas knowledge graph were established.

[0010] The obtained user query is input into a preset oil and gas term extraction model to extract keywords; the keywords include entities.

[0011] Based on the entities, the oil and gas knowledge graph is retrieved to obtain a query subgraph;

[0012] The query text is obtained by searching the question-and-answer database based on the keywords.

[0013] The context input is obtained based on the query subgraph and the query text;

[0014] The context input is fed into a preset oil and gas knowledge generation model to generate a search answer.

[0015] In one or more optional embodiments of this application, the step of establishing a question-and-answer base and an oil and gas knowledge graph based on the acquired oil and gas exploration and development knowledge documents includes:

[0016] Acquire oil and gas exploration and development knowledge documents and oil and gas knowledge system construction data; the oil and gas exploration and development knowledge documents include labeled oil and gas exploration and development knowledge documents and oil and gas exploration and development knowledge documents to be processed;

[0017] Based on the oil and gas knowledge system, an oil and gas knowledge graph ontology is constructed.

[0018] Based on the oil and gas knowledge graph ontology, the oil and gas exploration and development knowledge documents used for annotation are annotated to obtain an oil and gas knowledge representation database.

[0019] Based on the oil and gas knowledge representation database, an initial oil and gas knowledge graph is constructed.

[0020] Based on the preset oil and gas knowledge extraction model, multiple triples are extracted from the oil and gas exploration and development knowledge document to be processed.

[0021] The multiple triples are integrated into the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph;

[0022] Question-answer pairs are generated based on the oil and gas exploration and development knowledge documents to obtain a question-answer database.

[0023] In one or more optional embodiments of this application, the preset oil and gas knowledge extraction model is obtained in the following manner:

[0024] A pre-trained language model is selected as the encoder, and an initial oil and gas knowledge extraction model is constructed based on the encoder, relation inference layer and decoder.

[0025] The initial oil and gas knowledge extraction model is trained based on the oil and gas knowledge representation database to obtain the preset oil and gas knowledge extraction model.

[0026] In one or more optional embodiments of this application, the step of fusing the plurality of triples into the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph includes:

[0027] Identify and merge the multiple triples with the duplicate entities in the initial oil and gas knowledge graph to obtain the initial graph data;

[0028] The relationships between the initial graph data and the same entities in the initial oil and gas knowledge graph are identified and merged to obtain the oil and gas knowledge graph.

[0029] In one or more optional embodiments of this application, the step of retrieving the oil and gas knowledge graph based on the entity to obtain a query subgraph includes:

[0030] Generate a graph query statement based on the entity;

[0031] Using the graph query statement, the oil and gas knowledge graph is retrieved, and multiple query results are obtained;

[0032] The results of the multiple queries are integrated to obtain a query subgraph.

[0033] In one or more optional embodiments of this application, obtaining the context input based on the query subgraph and the query text includes:

[0034] The query subgraph is converted into text format to obtain text content, and then concatenated with the query text according to the text content to obtain context input.

[0035] In one or more optional embodiments of this application, after generating the search answer, the method further includes:

[0036] Based on the search results and the user query, intent is discovered to obtain recommended questions;

[0037] The recommended questions and the search answers will be pushed to the user simultaneously.

[0038] Secondly, embodiments of the present invention provide an intelligent question-and-answer device for oil and gas exploration and development, which may include:

[0039] The first module is used to build a question-and-answer database and an oil and gas knowledge graph based on the acquired oil and gas exploration and development knowledge documents.

[0040] The first extraction module is used to input the acquired user query into a preset oil and gas term extraction model to extract keywords; the keywords include entities.

[0041] The first retrieval module is used to retrieve the oil and gas knowledge graph based on the entity and obtain a query subgraph.

[0042] The second retrieval module is used to retrieve the question and answer database based on the keywords to obtain the query text.

[0043] The first integration module is used to obtain context input based on the query subgraph and the query text;

[0044] The first generation module is used to input the context input into a preset oil and gas knowledge generation model to generate a search answer.

[0045] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing a computer program / instruction thereon, which, when executed by a processor, implements the intelligent question-answering method for oil and gas exploration and development as described above.

[0046] Fourthly, embodiments of the present invention provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the intelligent question-answering method for oil and gas exploration and development as described above.

[0047] Fifthly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the intelligent question-answering method for oil and gas exploration and development as described above.

[0048] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:

[0049] This invention provides an intelligent question-answering method for oil and gas exploration and development. The method establishes a question-answering database and an oil and gas knowledge graph for the field, extracts entities and keywords from user queries, and retrieves query subgraphs and query text based on these entities and keywords from the knowledge graph and question-answering database respectively. These are then integrated to obtain contextual input, and a pre-set oil and gas knowledge generation model is used to generate the search answer. This method combines question-answering database retrieval and knowledge graph retrieval, integrating information from both sources to form a more complete and semantically rich contextual input. The contextual input is then used to generate the search answer through the pre-set oil and gas knowledge generation model. This method significantly improves the accuracy, coherence, and depth of the search answer, providing more comprehensive and interpretable responses, further enhancing user experience and the ability to handle complex tasks.

[0050] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0051] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0052] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0053] Figure 1 This is a schematic diagram illustrating the steps of the intelligent question-answering method for oil and gas exploration and development provided in an embodiment of the present invention;

[0054] Figure 2 A flowchart for constructing an oil and gas knowledge graph ontology library provided in an embodiment of the present invention;

[0055] Figure 3 This is a schematic diagram illustrating an example of an oil and gas knowledge graph ontology library provided in an embodiment of the present invention.

[0056] Figure 4 A schematic diagram illustrating a page example for creating a text recognition task for unstructured knowledge documents, provided in an embodiment of the present invention;

[0057] Figure 5 A schematic diagram illustrating a page example for creating a labeling task, provided in an embodiment of the present invention;

[0058] Figure 6 This is a schematic diagram of a task list page for extracting triples provided in an embodiment of the present invention;

[0059] Figure 7 A schematic diagram illustrating a page example of an extended oil and gas knowledge graph provided in an embodiment of the present invention;

[0060] Figure 8 This is a schematic diagram of an example page of an intelligent question-and-answer system for oil and gas exploration and development provided in an embodiment of the present invention;

[0061] Figure 9 This is a schematic diagram illustrating an example of an advanced settings interface in an intelligent question-and-answer system for oil and gas exploration and development provided in an embodiment of the present invention.

[0062] Figure 10 A schematic diagram of the structure of the intelligent question-and-answer device for oil and gas exploration and development provided in the embodiments of this application. Detailed Implementation

[0063] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0064] The inventors discovered that while existing technologies based on retrieval and knowledge graphs offer high accuracy, their natural language processing capabilities in understanding and responding to questions are weak. Intelligent question answering based on pre-trained large models demonstrates strong understanding and generation capabilities, achieving excellent results in general domains. However, its accuracy in answering specialized questions is low without specialized corpora for training, and the training cost of large models is extremely high. Therefore, implementing intelligent question answering for oil and gas exploration and development using only one method has its corresponding drawbacks. Based on this, the inventors conducted further research and development, resulting in this invention, which provides an intelligent question answering method and apparatus for oil and gas exploration and development.

[0065] Example 1

[0066] Embodiment 1 of this invention provides an intelligent question-answering method for oil and gas exploration and development, referring to... Figure 1 As shown, the method may include the following steps S101-S106:

[0067] S101: Based on the acquired oil and gas exploration and development knowledge documents, establish a question-and-answer database and an oil and gas knowledge graph.

[0068] S102: Input the obtained user query into the preset oil and gas keyword extraction model to extract keywords.

[0069] S103: Based on entity retrieval of the oil and gas knowledge graph, obtain the query subgraph.

[0070] S104: Based on keyword retrieval, the question and answer database is searched to obtain the query text.

[0071] S105: Obtain the context input based on the query subgraph and query text.

[0072] S106: Input the context into the preset oil and gas knowledge generation model to generate the search answer.

[0073] This invention provides an intelligent question-answering method for oil and gas exploration and development. The method establishes a question-answering database and an oil and gas knowledge graph for the field, extracts entities and keywords from user queries, and retrieves query subgraphs and query text based on these entities and keywords from the knowledge graph and question-answering database respectively. These are then integrated to obtain contextual input, and a pre-set oil and gas knowledge generation model is used to generate the search answer. This method combines question-answering database retrieval and knowledge graph retrieval, integrating information from both sources to form a more complete and semantically rich contextual input. The contextual input is then used to generate the search answer through the pre-set oil and gas knowledge generation model. This method significantly improves the accuracy, coherence, and depth of the search answer, providing more comprehensive and interpretable responses, further enhancing user experience and the ability to handle complex tasks.

[0074] In step S101 above, a question-and-answer base and an oil and gas knowledge graph are established based on the acquired oil and gas exploration and development knowledge documents. Specifically, this includes the following steps S1011-S1017:

[0075] S1011: Obtain knowledge documents on oil and gas exploration and development and data for the construction of an oil and gas knowledge system.

[0076] Specifically, the oil and gas exploration and development knowledge document can include documents related to oil and gas exploration and development, such as technologies, methods, standards, data, and experimental records, covering all aspects of the exploration and development process. The structured documents within the oil and gas exploration and development knowledge document are divided into labeled oil and gas exploration and development knowledge documents and unprocessed oil and gas exploration and development knowledge documents according to a preset ratio, for subsequent construction of a knowledge graph.

[0077] Data is a fundamental element in building an oil and gas knowledge system, providing the necessary framework, standards, and theoretical support. Specifically, this includes: 1. Enterprise Product Data Management (EPDM), providing a management framework and process standards for the oil and gas knowledge system. 2. Industry and enterprise standards, ensuring the knowledge system conforms to industry and internal enterprise norms. 3. Modeling theories, providing a theoretical foundation for the structuring and classification of the knowledge system. 4. Expert experience, providing best practices and practical business needs for the knowledge system.

[0078] S1012: Construct an oil and gas knowledge graph ontology based on data from the oil and gas knowledge system.

[0079] Specifically, it can be based on the construction of data from the oil and gas knowledge system, to conduct business sorting of various data related to oil and gas exploration and development, to form a business knowledge system for exploration and development, development, and production, thereby constructing a knowledge system, to describe and abstract the concepts of each link in oil and gas exploration, development and production, and to construct an oil and gas professional knowledge graph ontology library.

[0080] In one specific embodiment, the specific implementation process of step S1012 is as follows: Figure 2 As shown, from left to right, business processes are analyzed based on fundamental references to gradually build a knowledge system. These fundamental references refer to the oil and gas knowledge system construction data mentioned above, including EPDM, industry and enterprise standards, modeling theories, and expert experience. The knowledge system construction process can be roughly divided into three parts: feature description, knowledge classification, and knowledge relationships.

[0081] The first part, feature description, is an essential step before constructing the oil and gas professional knowledge graph ontology. It involves a detailed analysis of the business processes, professional fields, and object characteristics of the oil and gas industry. Specifically, it includes: 1. Business Feature Description: Defining key business processes and activities in the oil and gas industry, such as exploration and development, development, and storage and transportation. 2. Professional Feature Description: Identifying the relevant professional fields, such as geology, geophysics, and petroleum engineering. 3. Object Feature Description: Identifying specific objects involved in the oil and gas industry, such as oil wells, oil fields, petroleum equipment, and oil and gas resources. 4. Other Dimensional Feature Description: Including descriptions of multi-dimensional information such as time, geographical location, and environmental factors.

[0082] The second part, knowledge classification, is a crucial component of the oil and gas professional knowledge graph ontology. Specifically, it includes: 1. Business domain classification: categorizing knowledge based on business characteristics to form business domains. 2. Professional domain classification: categorizing knowledge based on professional characteristics to form professional domains. 3. Object domain classification: categorizing knowledge based on object characteristics to form object domains. 4. Other dimensional domain classification: classifying other multi-dimensional information to form additional domains.

[0083] The third part, knowledge relationships, is a component of the oil and gas professional knowledge graph ontology. Together with knowledge classification, it forms the entities and relationships within the ontology. Specifically, it includes: 1. Classification within the same domain: Defining relationships between knowledge entities within the same business domain, professional domain, or object domain. 2. Classification knowledge and attribute association: Associating each classification of knowledge with its attributes, such as business processes with their parameters, equipment with their specifications, etc. 3. Business domain and professional domain association: Defining relationships between business processes and professional fields, such as the association between an exploration and development activity and geology. 4. Business domain and object domain association: Defining relationships between business processes and specific objects, such as the association between the drilling process and specific drilling equipment. 5. Professional domain and object domain association: Defining relationships between professional fields and objects, such as the association between geological features and a specific oilfield. 6. Other dimension domain association: Defining relationships between other dimensions (such as time, space) and business, professional, and object domains.

[0084] Finally, the knowledge system constructed above is instantiated and standardized, specifically including: 1. Business instantiation: mapping key processes and activities in the business domain to specific business instances. 2. Object instantiation: mapping key objects in the object domain (such as oil fields and petroleum equipment) to specific object instances. 3. Knowledge instantiation: mapping theoretical and professional knowledge in the knowledge domain to specific knowledge instances. 4. Classification attribute standardization: establishing unified specifications and standards for all instances and classification attributes.

[0085] These standardization operations ensure consistency and interoperability of all instances in the ontology, enabling the system to perform unified queries and analyses through these standards.

[0086] In one specific embodiment, an example of an oil and gas knowledge graph ontology base is as follows: Figure 3 As shown, circles represent entities, and arrows represent relationships.

[0087] S1013: Based on the oil and gas knowledge graph ontology, annotate the oil and gas exploration and development knowledge documents to obtain an oil and gas knowledge representation database.

[0088] Specifically, this can involve uploading knowledge documents related to oil and gas exploration and development to a selected annotation system, creating annotation tasks, and using knowledge annotation tools to mark entities in the document, such as basins, oil and gas fields, oil and gas reservoirs, wells, blocks, geological units, and wellbores, based on the entities and relationships in the oil and gas knowledge graph ontology. At the same time, based on the annotated entities, the relationships between entities are further annotated to obtain multiple annotated triples, which together form an oil and gas knowledge representation database.

[0089] The knowledge documents used for annotation in oil and gas exploration and development include structured or unstructured formats such as Word, PPT, PDF, Excel, JPG, and PNG, encompassing exploration and development results, development plan designs, engineering designs, construction techniques, and surface engineering documents. For unstructured knowledge documents in PDF or image formats where text cannot be directly obtained, Optical Character Recognition (OCR) can be performed to obtain the text recognition analysis results before annotation. An example page for creating an OCR task is shown below. Figure 4 As shown, the lower left box is the upload area for unstructured knowledge documents in PDF and image formats, and the lower right box is the display area for the analysis results obtained after text recognition.

[0090] In one specific embodiment, an example of a page for creating annotation tasks is as follows: Figure 5 As shown, it includes task type, task name, task description, dependent dataset, dependent tag library, and annotators. The dependent dataset corresponds to the oil and gas exploration and development knowledge document mentioned above, and the dependent tag library represents all the predefined tags used in the annotation process, i.e., the entities and relationships in the oil and gas knowledge graph ontology mentioned above.

[0091] S1014: Construct an initial oil and gas knowledge graph based on an oil and gas knowledge representation database.

[0092] Specifically, it can be done by identifying and merging duplicate entities based on all triples in the oil and gas knowledge representation database, and simultaneously identifying and merging relationships between identical entities, mapping relationships from different data sources to a unified relationship, thus obtaining an initial oil and gas knowledge graph.

[0093] S1015: Based on the preset oil and gas knowledge extraction model, multiple triples are extracted from the oil and gas exploration and development knowledge documents to be processed.

[0094] Specifically, this can be achieved by inputting all the oil and gas exploration and development knowledge documents to be processed into a preset oil and gas knowledge extraction model, and extracting multiple triples.

[0095] In one specific embodiment, an example of a task list page for extracting triples from a knowledge document on oil and gas exploration and development to be processed is shown below. Figure 6 As shown, this includes task records for 5 tasks. The task records include the number of documents, the creator, the creation time, the start time, and the status.

[0096] The preset oil and gas knowledge extraction model is obtained through the following methods, specifically including steps S10151-S10152:

[0097] S10151: Select a pre-trained language model as the encoder, and build an initial oil and gas knowledge extraction model based on the encoder, relation inference layer and decoder.

[0098] Specifically, the encoder can be used to encode the input text. The encoder structure can be selected from appropriate pre-trained language models, such as Bi-LSTM, ELMo, BERT, and XLnet. In one specific embodiment, when the amount of data in the oil and gas knowledge representation database is relatively small, the performance of lightweight models such as Bi-LSTM is significantly different from that of pre-trained models such as BERT, making BERT a better choice as the encoder.

[0099] The relation recommendation layer is used to find candidate relation categories at each character position after encoding. The relation recommendation layer can be composed of a fully connected layer and a Softmax layer connected together.

[0100] The decoder is used to decode and output triples. The decoder structure can adopt a sequence-to-sequence (seq2seq) model with attention to enhance the decoder's generation capability through the attention mechanism.

[0101] The encoder, relation inference layer, and decoder are connected in sequence to obtain the initial oil and gas knowledge extraction model.

[0102] S10152: Train an initial oil and gas knowledge extraction model based on an oil and gas knowledge representation database to obtain a preset oil and gas knowledge extraction model.

[0103] Specifically, the oil and gas knowledge representation dataset can be divided into a training set and a test set. An initial oil and gas knowledge extraction model can be trained based on the training set. Through multiple iterations, the model can learn specific knowledge and relationship patterns in the oil and gas field. Once training is complete, an oil and gas knowledge extraction model that can intelligently identify and extract relevant entities and relationships in the oil and gas field can be obtained.

[0104] S1016: Integrate multiple triples into the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph.

[0105] Specifically, this may include the following steps S10161-S10162:

[0106] S10161: Identify and merge multiple triples with duplicate entities in the initial oil and gas knowledge graph to obtain the initial graph data.

[0107] Specifically, this can involve standardizing all entities in multiple triples to ensure that the same entity has a consistent representation across different triples. Next, in the initial oil and gas knowledge graph, duplicate entities are identified using string similarity, semantic similarity, or other matching techniques. These duplicate entities are then merged to ensure that each entity in the graph has a unique representation, and the relevant relationships and attribute information are integrated into the initial graph data.

[0108] S10162: Identify and merge the relationships between the same entities in the initial graph data and the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph.

[0109] Specifically, it can be done by using a relation matching algorithm to determine whether there are duplicate or similar relations, merging duplicate or similar relations to ensure that relations from different sources in the knowledge graph are managed in a unified manner, while retaining all relation information to maintain the integrity and accuracy of the graph, thus obtaining an oil and gas knowledge graph.

[0110] In one specific embodiment, an example of the page implementation of steps S1015-S1016 above, which integrates the knowledge from the oil and gas exploration and development knowledge document to be processed into the existing oil and gas knowledge graph, is as follows: Figure 7 As shown, this includes the source type, database type, data source name, data source description, data source IP, port, database name, username, and password. The source type indicates the origin of the data source, i.e., the source of the oil and gas exploration and development knowledge documents to be processed. The database type indicates the type of database where the oil and gas exploration and development knowledge documents are stored. The data source name indicates the name corresponding to a portion of the oil and gas exploration and development knowledge documents to be processed. The data source description records a detailed description of the data source. The data source IP indicates the IP address of the server where the data source is located. The port indicates the network port number that the database service listens on. The database name indicates the name of the database to be accessed. The username and password are used to verify the user's identity to ensure connection security.

[0111] In this embodiment, steps S1015-S1016 described above enable the automatic extraction of triples in the oil and gas field and their integration into existing oil and gas knowledge graphs. This method not only ensures the data quality of the oil and gas knowledge graph but also rapidly expands its scale. In practice, manual correction and supplementation can be performed to simultaneously optimize various algorithm models, continuously improving their extraction accuracy and generalization ability, thereby further enhancing the quality of the oil and gas knowledge graph.

[0112] S1017: Generate question-and-answer pairs based on knowledge documents on oil and gas exploration and development to obtain a question-and-answer database.

[0113] Specifically, for complete sentences or paragraphs of knowledge that cannot be precisely expressed using triples, a question-and-answer database format can be used for storage. This database consists of questions, answers, similar questions, keywords, etc. The answers are represented by rich text, which can include various formats, images, and tables.

[0114] The question-and-answer database can be generated by preprocessing and extracting information from oil and gas exploration and development knowledge documents, then automatically generating content-related questions and extracting corresponding answers from the documents. These questions and answers are then paired to form question-and-answer pairs. Simultaneously, similar questions and keywords are added to each pair. All question-and-answer pairs and related information are then organized into a structured question-and-answer database for subsequent intelligent question answering.

[0115] In step S102 above, the obtained user query input is used to extract keywords from a preset oil and gas term extraction model. The keywords contain entities.

[0116] Specifically, this could involve inputting a user query into a pre-defined oil and gas term extraction model, extracting the keywords, and then identifying the entities within the query. For example, if a user query is "Please tell me the latest progress in oilfield exploration.", inputting this query into the pre-defined oil and gas term extraction model would extract the keywords "oilfield," "exploration," and "progress," with the entity being "oilfield."

[0117] The preset oil and gas term extraction model can be obtained as follows: First, a pre-trained language model (such as BERT or GPT) is selected as the initial oil and gas term extraction model. Then, a proprietary dataset in the oil and gas domain is collected and labeled, including example texts containing keywords and entities. Next, this data is used to fine-tune the initial oil and gas term extraction model to adjust its performance in term extraction tasks within the oil and gas domain. During the fine-tuning process, the initial oil and gas term extraction model learns how to identify keywords and entities specific to the domain, ultimately resulting in the preset oil and gas term extraction model.

[0118] In step S103 above, the query subgraph is obtained by retrieving the oil and gas knowledge graph based on entity retrieval.

[0119] Specifically, the following steps S1031-S1033 are included:

[0120] S1031: Generate graph query statement based on entity.

[0121] Specifically, based on the entities extracted in step S102 above, a statement suitable for knowledge graph querying, namely a graph query statement, can be generated. This graph query statement is represented using a graph query language (such as Cypher or SPARQL) and is used to find information related to the entities in the oil and gas knowledge graph.

[0122] S1032: Use graph query statements to retrieve oil and gas knowledge graphs and obtain multiple query results.

[0123] Specifically, this could involve executing graph query statements in a knowledge graph engine to retrieve relevant data from the oil and gas knowledge graph and obtain multiple query results.

[0124] S1033: Integrate multiple query results to obtain a query subgraph.

[0125] Specifically, this could involve integrating multiple query results obtained from the retrieval into a query subgraph to form a knowledge network related to the entity.

[0126] Taking step S103 above as an example, the entity is "oil field A". Based on this entity, a search is performed in the oil and gas knowledge graph, and two query results are obtained:

[0127] Entity: Oilfield A, Relationship: Ownership, Related Entity: Drilling Equipment X;

[0128] Entity: Oilfield A, Relationship: Located in, Related Entity: Geological Zone Y.

[0129] The query subgraph obtained by integrating the results of the two queries can be represented as follows:

[0130] [Oil Field A] — Owns —> [Drilling Equipment X]

[0131] |

[0132] Located in —> [Geological Zone Y]

[0133] In this embodiment, querying the oil and gas knowledge graph can significantly improve the quality and accuracy of the answers. By retrieving entities related to the user's query from the oil and gas knowledge graph, this method, through the query subgraph obtained in step S103, can obtain rich contextual information, ensuring that the generated answers not only rely on the model's pre-trained knowledge but also incorporate the latest and most relevant data. This method helps the model better understand the query context, providing more targeted and accurate answers, while also improving its ability to handle complex queries.

[0134] In step S104 above, the query text is obtained by searching the question and answer database based on keywords.

[0135] Specifically, this could involve retrieving text containing keywords from a question-and-answer database, searching for relevant questions, answers, similar questions, or keyword fields, obtaining matching results, and then extracting the query text based on the matching results.

[0136] To facilitate understanding of this solution by those skilled in the art, step S104 is illustrated below with an example:

[0137] User query: Please tell me the latest progress in oilfield exploration.

[0138] Keywords: oil field, exploration, progress.

[0139] Answer: Recent oilfield exploration progress includes the discovery of new oilfield reserves in area X, and detailed geological exploration and drilling tests are currently underway to determine recoverable oil and gas resources.

[0140] Similar questions include: "What is the latest oilfield exploration report?"

[0141] In step S105 above, the context input is obtained based on the query subgraph and the query text.

[0142] Specifically, this could involve converting the query subgraph into text format to obtain text content, merging and concatenating the text content with the query text, and then performing context enhancement to obtain context input.

[0143] Context enhancement can specifically include: 1. Semantic association: When merging text content and query text, identify and strengthen the semantic association between the two by adding conjunctions or explanatory sentences to make the context more coherent. This can be achieved through pre-trained language models (such as BERT and GPT); 2. Deduplication and optimization: During the merging process, identify and remove duplicate information, and optimize or reorganize it according to the needs of the context. This can be achieved through text processing algorithms, such as analyzing the merged text using text summarization models or syntactic parsers to remove redundant information and optimize expression; 3. Emphasis on key information: Emphasize key information based on the user's query intent. This can be achieved by using pre-trained language models (such as BERT and GPT) to identify the core themes in the merged text and emphasize the information most relevant to the themes.

[0144] To facilitate understanding of this solution by those skilled in the art, step S105 is illustrated below with an example:

[0145] User query: Please tell me the latest exploration progress of oil field A.

[0146] Query subgraph:

[0147]

[0148] The text content obtained by converting the query subgraph to text format is: Oilfield A has drilling equipment X; Oilfield A is located in geological zone Y.

[0149] Search text: Recent exploration progress at Oilfield A includes the discovery of new oilfield reserves in the W area. Currently, detailed geological exploration and drilling tests are underway at Oilfield A. According to the latest report, the exploration team has discovered potential recoverable resources and plans to conduct further drilling in the coming months to assess the commercial value of the resources.

[0150] Contextual Input: The exploration progress of Oilfield A is as follows: Oilfield A has drilling equipment X and is located in geological area Y. Recently, new oilfield reserves were discovered in area W, and detailed geological exploration and drilling tests are underway at Oilfield A. According to the latest report, the exploration team has discovered potential recoverable resources and plans to conduct further drilling work in the coming months to assess the commercial value of the resources.

[0151] In this embodiment, the method combines oil and gas knowledge graph querying and question-and-answer database querying, which can significantly improve the comprehensiveness and accuracy of information retrieval. Oil and gas knowledge graph querying provides rich structured data, helping to understand the query context and obtain relevant background information through entities and relationships within the knowledge graph. Simultaneously, question-and-answer database querying provides specific answers and related content by matching user query keywords with relevant questions. This combination enables the method to perform retrieval within a broader information scope, providing not only in-depth background information based on the knowledge graph but also actual question-and-answer pairs, thereby offering users more accurate and context-sensitive answers.

[0152] In step S106 above, the context input is input into the preset oil and gas knowledge generation model to generate the search answer.

[0153] Specifically, this could involve inputting the contextual information into a pre-defined oil and gas knowledge generation model to generate a search answer. For example, if a user query is "Please tell me the recent exploration progress of oil field A," the corresponding search answer would be: "Recently, significant progress has been made in the exploration work of oil field A. New oil reserves have been discovered in area W, and oil field A is currently undergoing detailed geological exploration and drilling tests. Oil field A is equipped with drilling equipment X and is located in geological area Y. The latest report shows that the exploration team has discovered potential recoverable resources and plans to conduct more drilling work in the coming months to assess the commercial value of these resources."

[0154] The preset oil and gas knowledge generation model can be obtained in the following way: First, select a pre-trained language model (such as BERT or GPT) as the initial oil and gas knowledge generation model. Then, collect specific oil and gas domain datasets for fine-tuning the initial oil and gas knowledge generation model to adjust its performance in text generation in the oil and gas domain, so that the preset oil and gas knowledge generation model can better understand oil and gas related terms, concepts and backgrounds, and finally obtain the preset oil and gas knowledge generation model.

[0155] In this embodiment, an intelligent question-and-answer system for oil and gas exploration and development is constructed based on this method. This system can be deployed on both PC and mobile devices. An example of the system page on the PC is shown below. Figure 8 As shown in the figure, the upper right corner shows an example user query, and the lower part shows the search answer. At the same time, it can be seen from the figure that this method can also return matching results, shared knowledge base search results, and other graph entities while returning the search answer to the user. The matching results correspond to similar questions mentioned above, and the shared knowledge base corresponds to the question and answer library mentioned above. Since some answers in the question and answer library are represented by rich text, returning this rich text information to the user along with the search answer can enhance information delivery and improve the user experience.

[0156] Meanwhile, the intelligent question-and-answer system for oil and gas exploration and development provides users with advanced settings. An example of the settings interface is shown below. Figure 9 As shown, it includes a base model, a retrieval enhancement switch, a shared knowledge base switch, memory, and temperature. Memory refers to the system's ability to store and utilize users' historical interaction information to provide more personalized and context-sensitive answers. Temperature refers to parameters that control the randomness and diversity of generated text, used to adjust the creativity and determinism of the model's generated answers.

[0157] In this embodiment, after determining the intelligent question-answering system for oil and gas exploration and development, the system logs can be continuously used to statistically analyze user questions, usage, naming rates, and recall rates. This allows for continuous optimization of various semantic-related models and semantic understanding algorithms within the intelligent question-answering method, and continuous expansion of the oil and gas knowledge graph and question-answering database. Ultimately, this improves the accuracy and recall of retrieved answers, enabling the method to answer more specialized questions. This method deeply utilizes various data and knowledge from the oil and gas industry to enhance the accuracy of intelligent question-answering in the oil and gas sector. It provides oil and gas workers with quick and accurate answers to various professional oil and gas questions, solving problems such as multiple data sources, large analysis workload, and long response times encountered by oil and gas exploration and development workers in the knowledge retrieval process.

[0158] Example 2

[0159] Based on the same inventive concept, embodiments of the present invention also provide an intelligent question-and-answer device for oil and gas exploration and development, referring to... Figure 10 As shown, the device includes:

[0160] The first module 101 is used to establish a question-and-answer database and an oil and gas knowledge graph based on the acquired oil and gas exploration and development knowledge documents.

[0161] The first extraction module 102 is used to input the acquired user query into a preset oil and gas term extraction model to extract keywords; the keywords include entities.

[0162] The first retrieval module 103 is used to retrieve the oil and gas knowledge graph based on the entity and obtain a query subgraph.

[0163] The second retrieval module 104 is used to retrieve the question and answer database based on the keywords to obtain the query text;

[0164] The first integration module 105 is used to obtain context input based on the query subgraph and the query text;

[0165] The first generation module 106 is used to input the context input into a preset oil and gas knowledge generation model to generate a search answer.

[0166] Example 3

[0167] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing a computer program / instruction thereon, which, when executed by a processor, implements the intelligent question-answering method for oil and gas exploration and development as described in Embodiment 1 above.

[0168] Example 4

[0169] Based on the same inventive concept, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the intelligent question-answering method for oil and gas exploration and development as described in Embodiment 1 above.

[0170] Example 5

[0171] Based on the same inventive concept, this embodiment of the invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory. When the processor executes the computer program, it implements the intelligent question-answering method for oil and gas exploration and development as described in Embodiment 1 above.

[0172] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0173] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0175] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0176] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. An intelligent question-answering method for oil and gas exploration and development, characterized in that, include: Based on the acquired oil and gas exploration and development knowledge documents, a question-and-answer database and an oil and gas knowledge graph were established. The obtained user query is input into a preset oil and gas term extraction model to extract keywords; the keywords include entities. Based on the entities, the oil and gas knowledge graph is retrieved to obtain a query subgraph; The query text is obtained by searching the question-and-answer database based on the keywords. The context input is obtained based on the query subgraph and the query text; The context input is fed into a preset oil and gas knowledge generation model to generate a search answer.

2. The method according to claim 1, characterized in that, The aforementioned question-and-answer base and oil and gas knowledge graph are established based on the acquired oil and gas exploration and development knowledge documents, including: Acquire oil and gas exploration and development knowledge documents and oil and gas knowledge system construction data; the oil and gas exploration and development knowledge documents include labeled oil and gas exploration and development knowledge documents and oil and gas exploration and development knowledge documents to be processed; Based on the oil and gas knowledge system, an oil and gas knowledge graph ontology is constructed. Based on the oil and gas knowledge graph ontology, the oil and gas exploration and development knowledge documents used for annotation are annotated to obtain an oil and gas knowledge representation database. Based on the oil and gas knowledge representation database, an initial oil and gas knowledge graph is constructed. Based on the preset oil and gas knowledge extraction model, multiple triples are extracted from the oil and gas exploration and development knowledge document to be processed. The multiple triples are integrated into the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph; Question-answer pairs are generated based on the oil and gas exploration and development knowledge documents to obtain a question-answer database.

3. The method according to claim 2, characterized in that, The preset oil and gas knowledge extraction model is obtained through the following method: A pre-trained language model is selected as the encoder, and an initial oil and gas knowledge extraction model is constructed based on the encoder, relation inference layer and decoder. The initial oil and gas knowledge extraction model is trained based on the oil and gas knowledge representation database to obtain the preset oil and gas knowledge extraction model.

4. The method according to claim 2, characterized in that, The process of integrating the multiple triples into the initial oil and gas knowledge graph to obtain the oil and gas knowledge graph includes: Identify and merge the multiple triples with the duplicate entities in the initial oil and gas knowledge graph to obtain the initial graph data; The relationships between the initial graph data and the same entities in the initial oil and gas knowledge graph are identified and merged to obtain the oil and gas knowledge graph.

5. The method according to claim 1, characterized in that, The step of retrieving the oil and gas knowledge graph based on the entities to obtain a query subgraph includes: Generate a graph query statement based on the entity; Using the graph query statement, the oil and gas knowledge graph is retrieved, and multiple query results are obtained; The results of the multiple queries are integrated to obtain a query subgraph.

6. The method according to claim 1, characterized in that, The step of obtaining context input based on the query subgraph and the query text includes: The query subgraph is converted into text format to obtain text content, and then concatenated with the query text according to the text content to obtain context input.

7. The method according to claim 1, characterized in that, After generating the search answer, it also includes: Based on the search results and the user query, intent is discovered to obtain recommended questions; The recommended questions and the search answers will be pushed to the user simultaneously.

8. An intelligent question-and-answer device for oil and gas exploration and development, characterized in that, include: The first module is used to build a question-and-answer database and an oil and gas knowledge graph based on the acquired oil and gas exploration and development knowledge documents. The first extraction module is used to input the acquired user query into a preset oil and gas term extraction model to extract keywords; the keywords include entities. The first retrieval module is used to retrieve the oil and gas knowledge graph based on the entity and obtain a query subgraph. The second retrieval module is used to retrieve the question and answer database based on the keywords to obtain the query text. The first integration module is used to obtain context input based on the query subgraph and the query text; The first generation module is used to input the context input into a preset oil and gas knowledge generation model to generate a search answer.

9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instruction is executed by the processor, it implements the intelligent question-answering method for oil and gas exploration and development as described in any one of claims 1-7.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the intelligent question-answering method for oil and gas exploration and development as described in any one of claims 1-7.

11. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the intelligent question-answering method for oil and gas exploration and development as described in any one of claims 1-7.