Data query method and device and storage medium

By constructing a business coordinate system and knowledge graph for oil and gas business models, the semantic understanding and multi-table join problems of natural language to SQL technology in the oil and gas industry were solved, thereby improving the accuracy and flexibility of data queries.

CN121958563APending Publication Date: 2026-05-01WUHAN JURASSIC TECH DEV 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
2025-11-25
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the oil and gas industry, existing natural language to SQL technology has shortcomings in semantic understanding and multi-table joins, and cannot accurately understand business terms. Furthermore, the traditional view creation method is static and fixed, and cannot be dynamically adjusted, resulting in low accuracy and performance of data queries.

Method used

Construct a business coordinate system for the oil and gas business model, including the main domain, subdomains, and knowledge graph. Use the knowledge graph to determine entity relationships, obtain the terminology features, sentence structure, and contextual information of user queries, and use a query vector library to identify key information and convert it into executable SQL statements.

Benefits of technology

It improves the accuracy and flexibility of data queries, can dynamically adjust entity association weights to adapt to different business scenarios, and generate efficient and executable SQL statements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958563A_ABST
    Figure CN121958563A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data query method and device and a storage medium, and the method comprises the steps: building a business coordinate system according to an oil and gas business model, the business coordinate system comprises a main domain, a sub-domain and a knowledge graph, the main domain comprises an object domain and a business domain, the sub-domain comprises a working domain and a professional domain, and the knowledge graph comprises an object domain and a business domain; determining entity association of the main domain and the sub-domain by utilizing the knowledge graph; obtaining term features, sentence pattern structures and context information in a user question statement, and matching the term features, the sentence pattern structures and the context information with the service coordinate system to obtain key information of the user question statement; and identifying the key information through a query vector library to obtain a logical statement, and converting the logical statement into an executable SQL statement for data query. According to the method, the accuracy of data query is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus and storage medium for data querying Technical Field

[0001] This invention relates to the field of data processing technology in the oil and gas industry, and specifically to a method, apparatus and storage medium for data querying. Background Technology

[0002] In the information technology development of the oil and gas industry, there are various specialized data models, such as EPDM (Energy Industry Data Model) and petroleum data models. These models typically contain a large number of data tables with complex structures. Currently, querying this data requires users to have professional SQL writing skills and data structure knowledge, which presents a high barrier to entry.

[0003] While existing Natural Language to SQL (NL2SQL) technologies can convert natural language queries into SQL statements, they suffer from the following problems in specific oil and gas industry scenarios: semantic understanding biases, as general-purpose models lack oil and gas domain expertise and struggle to accurately understand business terms (such as reservoir units and production wells); complex multi-table relationships, as oil and gas data models involve multiple table relationships (such as wells, equipment, and reservoirs), leading to inaccurate or inefficient automatically generated SQL statements. Furthermore, traditional view creation methods are static and fixed, unable to dynamically adjust according to user needs, resulting in poor flexibility. Summary of the Invention

[0004] The purpose of this invention is to provide a method, apparatus, and storage medium for data querying, which improves the accuracy of data querying.

[0005] To achieve the above objectives, embodiments of the present invention provide a data query method, which includes: constructing a business coordinate system based on an oil and gas business model, the business coordinate system including a main domain, subdomains, and a knowledge graph, the main domain including an object domain and a business domain, the subdomains including a work domain and a professional domain, and using the knowledge graph to determine the entity associations of the main domain and subdomains; obtaining terminology features, sentence structure, and context information from user query statements, matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user query statement; identifying the key information through a query vector library to obtain a logical statement, and converting the logical statement into an executable SQL statement for data querying.

[0006] Optionally, the object domain refers to the work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain refers to different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain refers to engineering work, research work, management work, and operation work determined according to the nature of the work; and the professional domain refers to the profession determined according to the technical methods, including geological professions, engineering professions, equipment professions, and safety professions.

[0007] Optionally, the step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

[0008] Optionally, the method further includes: determining the weights of the object domain, work domain, and professional domain based on the frequency of occurrence, coreness, and semantic relevance of relevant business domains in the user's question statement.

[0009] Optionally, to facilitate the determination of entity associations between the main domain and subdomains using the knowledge graph, the following steps are taken: extracting structured data features, text features, and visual features of user query statements through a multimodal entity feature extraction and fusion algorithm; weighting and fusing the structured data features, text features, and visual features through an attention mechanism to obtain entity feature vectors; and determining the semantic similarity and business adaptability between entities based on the entity feature vectors, which are used to determine the entity associations between the main domain and subdomains.

[0010] Optionally, the frequency of production scheduling and the popularity of user query interactions can be used to determine whether an oil and gas field has entered its peak development period, and this can be used to adjust the association weight of the entity association.

[0011] On the other hand, this application also proposes a data query apparatus, comprising: a first processing module, configured to construct a business coordinate system based on an oil and gas business model, the business coordinate system including a main domain, subdomains, and a knowledge graph, the main domain including an object domain and a business domain, the subdomains including a work domain and a professional domain, and using the knowledge graph to determine the entity associations of the main domain and subdomains; a second processing module, configured to acquire terminology features, sentence structure, and context information from user query statements, and match the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user query statement; and a third processing module, configured to identify the key information through a query vector library to obtain logical statements, and convert the logical statements into executable SQL statements for data querying.

[0012] Optionally, the object domain refers to the work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain refers to different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain refers to engineering work, research work, management work, and operation work determined according to the nature of the work; and the professional domain refers to the profession determined according to the technical methods, including geological professions, engineering professions, equipment professions, and safety professions.

[0013] Optionally, the step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

[0014] On the other hand, this application also proposes a machine-readable storage medium storing instructions for causing a machine to execute the data query method described above.

[0015] A data query method of the present invention includes: constructing a business coordinate system based on an oil and gas business model, wherein the business coordinate system includes a main domain, subdomains, and a knowledge graph; the main domain includes an object domain and a business domain, and the subdomains include a work domain and a professional domain; determining the entity associations of the main domain and subdomains using the knowledge graph; acquiring terminology features, sentence structure, and context information from user queries; matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user queries; identifying the key information through a query vector library to obtain logical statements; and converting the logical statements into executable SQL statements for data querying. This method constructs an oil and gas business coordinate system, parses and processes natural language queries input by users, and identifies key information through a query vector library and a knowledge graph, thereby improving the accuracy of data querying.

[0016] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: FIG1 is a schematic flowchart of a data query method according to the present invention; FIG2 is a schematic diagram of an embodiment of the present invention; FIG3 is a schematic diagram of a data query apparatus according to the present invention.

[0018] Explanation of reference numerals in the attached drawings: 100 - Device for data query; 200 - First processing module; 300 - Second processing module; 400 - Third processing module. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0021] Example 1 Figure 1 is a flowchart of a data query method of the present invention. As shown in Figure 1, the method includes: Step S101 is to construct a business coordinate system based on an oil and gas business model. The business coordinate system includes a main domain, subdomains and a knowledge graph. The main domain includes an object domain and a business domain. The subdomains include a work domain and a professional domain. The entity associations of the main domain and subdomains are determined using the knowledge graph.

[0022] According to one specific implementation method, the object domain is a work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain is different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain is engineering work, research work, management work, and operation work determined according to the nature of the work; the professional domain is a profession determined according to the technical method, including geological professions, engineering professions, equipment professions, and safety professions.

[0023] The method of using the knowledge graph to determine the entity associations of the main domain and subdomains includes: extracting structured data features, text features, and visual features of user query statements through a multimodal entity feature extraction and fusion algorithm; weighting and fusing the structured data features, text features, and visual features through an attention mechanism to obtain entity feature vectors; and determining the semantic similarity and business adaptability between entities based on the entity feature vectors, which are used to determine the entity associations of the main domain and subdomains.

[0024] The frequency of production scheduling and the intensity of user queries determine whether an oil and gas field has entered its peak development period, which is then used to adjust the association weights of the entities involved. Specifically, based on the characteristics of business domain-related terms in user queries (frequency of occurrence, coreness, semantic relevance), a business intent strength value (0-100 points) is quantified, and the weights of the three domains are dynamically calibrated in conjunction with this. For example, if a user queries an optimization plan for fracturing operations during the development phase of a shale gas field, and the semantic relevance is high with an intent strength of 85 points, the system automatically strengthens the weight of the corresponding work domain (fracturing operations) by +15% and the professional domain (reservoir engineering) by +10%. If the business domain terminology in the query is ambiguous (e.g., technical support related to a certain well), and the intent strength is 40 points, then the default basic weight of the business domain is applied, while retaining the weight adjustment interface and supplementing calibration with other dimensions to solve the problem of inaccurate weight allocation caused by differences in the clarity of business intent.

[0025] In one specific implementation method, the basic weights corresponding to each business domain are first extracted. Then, based on the semantic proportion of the business domain in the question (e.g., 60% for the development business domain and 40% for the emergency business domain), the final weight is calculated (e.g., object domain weight = 60% × development domain object weight + 40% × emergency domain object weight). At the same time, conflict coordination rules are set (e.g., when the weight difference of two business domains corresponding to the same dimension exceeds 30%, the weight of the business domain with higher semantic relevance is given priority) to solve the weight allocation conflict problem in cross-business domain scenarios and achieve optimal weight adaptation under multiple business objectives.

[0026] Alternatively, the oil and gas business domain can be broken down into secondary subdomains such as exploration, development, storage and transportation, operation and maintenance, and emergency response. A three-domain basic weight matrix can be preset for each secondary subdomain (e.g., the exploration subdomain corresponds to the object domain (geological layer / well location) 40% + the professional domain (geological exploration) 40% + the work domain (exploration operation) 20%; the operation and maintenance subdomain corresponds to the object domain (equipment) 50% + the work domain (maintenance process) 30% + the professional domain (equipment engineering) 20%). When a user asks a question that focuses on a specific business subdomain, the weight is directly transmitted from the secondary subdomain to the three domains, avoiding the problem of ambiguous weight allocation caused by an overly broad business domain scope, and improving the fit between the weight and the specific business scenario.

[0027] Step S102 involves obtaining the terminology features, sentence structure, and context information from the user's question statement, and matching the terminology features, sentence structure, and context information with the business coordinate system to obtain the key information of the user's question statement.

[0028] According to one specific implementation, the step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

[0029] Specifically, NLP models (such as BERT and CRF) are used to extract business terms, proper nouns, and attribute words from the questions. Synonyms / near-synonyms are mapped to standard terms in the business coordinate system, and weights are assigned to terms according to business priority. Sentence structure parsing methods include identifying subject-verb, verb-object, and modifier-head structures, locating core actions and target objects, distinguishing between fact queries, instruction requests, and question inquiries, removing modifying elements, and extracting core information. The conversation history (such as previous questions and user replies) is used to supplement missing information in the current question (e.g., if "order number 123" was mentioned previously, the current "modify its address" can be associated with that order number). The business scenario of the user's question is identified. The business is broken down into four levels of coordinates: domain, module, function, and attribute. Multi-dimensional mapping is achieved through terminology matching (standard terminology alignment), structure matching (alignment of core actions with function coordinates), and context matching (alignment of scenario with domain / module coordinates). This method uses edit distance and semantic similarity calculations to handle spelling errors and non-standard expressions, retaining matches with confidence scores above a threshold, and outputting the final key information (such as business domain, core functions, operational objects, and constraints). This approach enables accurate, efficient, and context-specific extraction of key information from user queries, supporting rapid response from business systems to their needs.

[0030] Step S103 involves identifying the key information by querying the vector library to obtain a logical statement, and then converting the logical statement into an executable SQL statement for data querying.

[0031] In one specific implementation method, extracted key information (such as business domain, core functions, operation objects, and constraints) is transformed into vectors. A structured logic template is then obtained through vector library matching to support subsequent SQL generation. A text embedding model is used to convert the structured information JSON string into a high-dimensional dense vector, preserving semantic relationships. Key fields are vectorized individually and concatenated with the overall vector to improve matching accuracy.

[0032] This software converts structured logic statements into syntactically correct and executable SQL, adapting to different databases (MySQL, PostgreSQL, Oracle, etc.) and supporting scenarios such as single-table queries, multi-table joins, and complex filtering. Specifically, it adopts a hybrid approach driven by a rule engine and a large model: for simple scenarios (single-table queries, basic filtering), it directly converts based on the rule engine, resulting in high efficiency and no performance illusions. For complex scenarios (multi-table joins, aggregation calculations, subqueries), it combines large model generation to improve adaptability.

[0033] Structured key information (domain, actions, objects, constraints, etc.) is converted into vectors using Sentence-BERT and matched against pre-stored business logic templates (including template descriptions, parameters, and logical statements) in the vector library. Semantic similarity is combined with precise matching of key fields to filter Top-K high-confidence templates and remove cross-domain or low-similarity results. Key information parameters are populated using a template rendering engine to generate standardized logical statements. Constraint validity and field relevance are validated, multiple constraints are merged, multi-table join requirements are split, and fuzzy constraints are converted into precise logic. Simple scenarios generate SQL directly using predefined mapping rules, while complex scenarios are generated using a large model combined with a business data dictionary. SQL syntax, semantics, and user permissions are validated, adapting to differences in multi-database syntax, generating parameterized SQL to prevent injection, and automatically optimizing indexes and pagination to improve performance.

[0034] The method further includes: determining the weights of the object domain, work domain, and professional domain based on the frequency of occurrence, coreness, and semantic relevance of relevant business domains in the user's question statement.

[0035] Specifically, the core dimensions of weighting are quantified by counting the number of times business domain terms appear in the question and conversation history, and scoring is assigned according to the frequency percentage (e.g., 3 appearances accounting for 30% of the total score, which is 30 points). Based on the business coordinate system, the relevance between the business domain and the user's core actions is determined (core business domain 50 points, related business domain 30 points, peripheral business domain 10 points). The semantic similarity between the business domain and the core terms of the question is calculated using Word2Vec or BERT.

[0036] This application improves the accuracy of data queries by constructing an oil and gas business coordinate system, parsing and processing natural language queries input by users, and identifying key information through query vector libraries and knowledge graphs.

[0037] Example 2 Figure 2 is a schematic diagram of an embodiment of the present invention. As shown in Figure 2, the overall architecture of the method mainly includes a business coordinate system, an NL2SQL conversion engine, and a dynamic view assembler.

[0038] Specifically, the system is first based on the company's business coordinate system, serving as the cornerstone for data association and semantic understanding. Each piece of business data depends on a business object, which refers to a work organization unit or work object in the petroleum business. Business object types are collections of business objects categorized according to certain standards, such as wells, equipment, and reservoirs. Following the time dimension of petroleum exploration and development, the system is divided into work stages. Each work stage has clear boundaries and relatively fixed deliverables. Different business domains cannot have overlapping work; they can only have a sequential order. The system is divided based on the number of work types at a given time point, for example, mainly into four work domains: engineering, research, management, and operations. Different technical methods (or technical dimensions) can be categorized according to petroleum geology specialties. Examples include engineering technical methods, research technical dimensions, management levels and objectives, and operational aspects (such as human resources, finance, procurement, and planning). Each dimension is managed through a tree structure, supporting automatic encoding and recording parent-child relationships and order. This system provides a unified business context for subsequent semantic understanding and table association.

[0039] The user inputs a natural language query (e.g., "What is the year-on-year comparison of daily oil production of EB-1 in the first quarter of 2024?"). This includes: During business model building, messages are sent to the vector library and graph database via message middleware, writing business coordinate system information into these databases; the system queries the vector library, filtering out keywords such as "EB-1" and "daily oil production"; after finding daily oil production in the vector library, the system further queries and filters the graph database, finding similar data items to form a dropdown list for the user to select; the user selects the correct data item, "Daily oil production of exploration and development department oil well summary daily data table," which determines the dataset. Based on this dataset, other data items can be found in the graph database. All relevant data items and the user's question are then sent to the large model, which generates SQL; the generated SQL calls the data warehouse service interface to query the data; the data queried from the data warehouse service calls the capabilities of the large model and the MCP service, selecting the best visualization tool. The large model generates the necessary parameters for this tool, and sending these parameters to the tool generates the visualization chart configuration.

[0040] At this stage, the system converts the assembled logic into executable SQL statements. Specifically, in SQL generation and optimization, the large model generates syntactically correct and structurally optimized SQL statements based on the logic of the dynamic view. This process considers execution efficiency and avoids complex nested queries. In SQL validation and execution, the generated SQL undergoes a layer of syntax and semantic validation to ensure its executability. Only after successful validation is it executed in the data warehouse, and the final result is returned to the user.

[0041] Query results can be presented in multiple formats to meet the needs of different scenarios: directly returning clear tabular data; automatically summarizing data results into a text report using a large model, such as "Well A's oil production in the past month was XX tons, a month-on-month increase of Y%"; and automatically generating trend charts, bar charts, etc., to intuitively display data insights.

[0042] This application validates the effectiveness of the method through a practical application case. Taking the daily oil production query of well EB-1 as an example, it fully demonstrates the entire process from natural language query to result visualization, proving the practicality and advancement of this method in solving complex data query problems in the oil and gas industry.

[0043] Figure 3 of Embodiment 3 is a schematic diagram of a data query device according to the present invention. As shown in Figure 3, this application also proposes a data query device 100, which includes: a first processing module 200, used to construct a business coordinate system based on an oil and gas business model, the business coordinate system including a main domain, subdomains and a knowledge graph, the main domain including an object domain and a business domain, the subdomains including a work domain and a professional domain, and using the knowledge graph to determine the entity associations of the main domain and subdomains; a second processing module 300, used to obtain terminology features, sentence structure and context information in a user query statement, and match the terminology features, sentence structure and context information with the business coordinate system to obtain key information of the user query statement; a third processing module 400, used to identify the key information through a query vector library to obtain a logical statement, and convert the logical statement into an executable SQL statement for data query.

[0044] According to one specific implementation method, the object domain is a work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain is different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain is engineering work, research work, management work, and operation work determined according to the nature of the work; the professional domain is a profession determined according to the technical method, including geological professions, engineering professions, equipment professions, and safety professions.

[0045] The step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

[0046] A data query method of the present invention includes: constructing a business coordinate system based on an oil and gas business model, wherein the business coordinate system includes a main domain, subdomains, and a knowledge graph; the main domain includes an object domain and a business domain, and the subdomains include a work domain and a professional domain; determining the entity associations of the main domain and subdomains using the knowledge graph; acquiring terminology features, sentence structure, and context information from user queries; matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user queries; identifying the key information through a query vector library to obtain logical statements; and converting the logical statements into executable SQL statements for data querying. This method constructs an oil and gas business coordinate system, parses and processes natural language queries input by users, and identifies key information through a query vector library and a knowledge graph, thereby improving the accuracy of data querying.

[0047] The data query device 100 includes a processor and a memory. The first processing module 200, the second processing module 300, the third processing module 400, etc. are all stored in the memory as program units. The processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0048] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and the accuracy of data retrieval can be improved by adjusting kernel parameters.

[0049] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0050] This invention provides a storage medium storing a program that, when executed by a processor, implements the data query method.

[0051] This invention provides a processor for running a program, wherein the program executes the data query method during runtime.

[0052] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: constructing a business coordinate system based on an oil and gas business model. The business coordinate system includes a main domain, subdomains, and a knowledge graph. The main domain includes an object domain and a business domain, and the subdomains include a work domain and a professional domain. The knowledge graph is used to determine the entity relationships between the main domain and the subdomains. Terminology features, sentence structure, and context information from user queries are obtained. The terminology features, sentence structure, and context information are matched with the business coordinate system to obtain key information from the user queries. A query vector library is used to identify the key information to obtain logical statements. The logical statements are then converted into executable SQL statements for data querying. The device described herein can be a server, PC, PAD, mobile phone, etc.

[0053] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: constructing a business coordinate system based on an oil and gas business model, the business coordinate system including a main domain, subdomains, and a knowledge graph, the main domain including an object domain and a business domain, the subdomains including a work domain and a professional domain, and using the knowledge graph to determine the entity associations of the main domain and subdomains; obtaining terminology features, sentence structure, and context information from user query statements, matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user query statement; identifying the key information through a query vector library to obtain logical statements, and converting the logical statements into executable SQL statements for data querying.

[0054] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application 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, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0055] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. 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, create means for implementing the functions specified in one or more flowchart illustrations and / or one or more block diagrams.

[0056] 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 that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0057] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0058] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0059] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0060] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0061] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0062] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for data querying, characterized in that, The method includes: constructing a business coordinate system based on an oil and gas business model, wherein the business coordinate system includes a main domain, subdomains, and a knowledge graph; the main domain includes an object domain and a business domain; the subdomains include a work domain and a professional domain; determining entity relationships between the main domain and subdomains using the knowledge graph; obtaining terminology features, sentence structure, and context information from user queries; matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user queries; identifying the key information through a query vector library to obtain logical statements; and converting the logical statements into executable SQL statements for data querying.

2. The method according to claim 1, characterized in that, The object domain refers to the work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain refers to different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain refers to engineering work, research work, management work, and operation work determined according to the nature of the work; the professional domain refers to the profession determined according to the technical methods, including geological professions, engineering professions, equipment professions, and safety professions.

3. The method according to claim 1, characterized in that, The step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

4. The method according to claim 1 or 3, characterized in that, The method further includes: determining the weights of the object domain, work domain, and professional domain based on the frequency of occurrence, coreness, and semantic relevance of relevant business domains in the user's question statement.

5. The method according to claim 1, characterized in that, The method of using the knowledge graph to determine the entity associations of the main domain and subdomains includes: extracting structured data features, text features, and visual features of user query statements through a multimodal entity feature extraction and fusion algorithm; weighting and fusing the structured data features, text features, and visual features through an attention mechanism to obtain entity feature vectors; and determining the semantic similarity and business adaptability between entities based on the entity feature vectors, which are used to determine the entity associations of the main domain and subdomains.

6. The method according to claim 5, characterized in that, The frequency of production scheduling and the popularity of user queries and interactions determine whether an oil and gas field has entered its peak development period, and are used to adjust the association weights of the entities.

7. A data query apparatus, characterized in that, The device includes: a first processing module for constructing a business coordinate system based on an oil and gas business model, the business coordinate system including a main domain, subdomains, and a knowledge graph, the main domain including an object domain and a business domain, the subdomains including a work domain and a professional domain, and using the knowledge graph to determine the entity relationships between the main domain and the subdomains; a second processing module for acquiring terminology features, sentence structure, and context information from user queries, matching the terminology features, sentence structure, and context information with the business coordinate system to obtain key information of the user queries; and a third processing module for identifying the key information through a query vector library to obtain logical statements, converting the logical statements into executable SQL statements for data querying.

8. The apparatus according to claim 7, characterized in that, The object domain refers to the work organization unit or work object in the business, including geological resources, equipment and facilities, business objects, and materials; the business domain refers to different work stages divided according to the development time dimension, including upstream business, midstream business, downstream business, and support business; the work domain refers to engineering work, research work, management work, and operation work determined according to the nature of the work; the professional domain refers to the profession determined according to the technical methods, including geological professions, engineering professions, equipment professions, and safety professions.

9. The apparatus according to claim 7, characterized in that, The step of matching the terminology features, sentence structure, and contextual information with the business coordinate system to obtain the key information of the user's question statement includes: locating the business scope of the user's question statement based on the object domain and business domain; and obtaining the key information of the user's question statement based on the work domain and professional domain within the business scope.

10. A machine-readable storage medium storing instructions thereon, characterized in that, This instruction is used to cause the machine to perform the data query method according to any one of claims 1-6 of this application.