Knowledge graph construction method, system, equipment and medium in oil and gas pipeline field
By extracting keywords in the oil and gas pipeline field and building standard knowledge graph structure and knowledge graph, the problem of inconsistent data structures in different standards is solved, and detailed and structured descriptions and automated processing of standards in the oil and gas pipeline field are achieved.
Patent Information
- Application Number
- CN202411692678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-11
AI Technical Summary
The data structure of technical elements in the different standards in the oil and gas pipeline field lacks unified rules, which leads to inconvenience in data exchange, release and maintenance, and it is difficult to unify the structure of the indicators described in the full text structure.
By extracting multiple keywords from each established standard in the oil and gas pipeline field, counting and determining the target keywords based on the frequency of occurrence, a standard knowledge graph structure is constructed, and a knowledge graph is constructed based on this.
It has achieved a comprehensive and detailed description of standards in the oil and gas pipeline field, and can automatically read nearly 10,000 standards and process data, improving the uniformity and structure of data.
Smart Images

Figure CN119599115A_ABST
Abstract
Description
Background Art
[0002] The data structures of different established standards in the field of oil and gas pipelines are different. When it is necessary to build technical element databases in batches according to different established standards, the technical element data structures in different established standards lack unified rules and are complex in structure, making them inconvenient to exchange, publish, and maintain, and even more inconvenient to unify them into the structuring of the indicators described in the full text structuring. Summary of the invention
[0003] The technical problem to be solved by the present invention is to address the deficiencies of the prior art and specifically provide a knowledge graph construction method, system, device and medium in the field of oil and gas pipelines, as follows:
[0004] 1) In the first aspect, the present invention provides a knowledge graph construction method in the field of oil and gas pipelines, and the specific technical solution is as follows:
[0005] Extract multiple keywords from the titles of each level of each established standard in the field of oil and gas pipelines;
[0006] Count and determine n target keywords from all keywords based on the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, where the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer;
[0007] Build a knowledge graph based on the standard knowledge graph structure.
[0008] The beneficial effects of the knowledge graph construction method in the field of oil and gas pipelines provided by the present invention are as follows:
[0009] Multiple keywords are extracted from the titles of each level of each established standard in the field of oil and gas pipelines. After keyword screening, a standard knowledge graph structure is constructed, and the knowledge graph is further constructed. The constructed knowledge graph can comprehensively and detailedly describe the data structure in the field of oil and gas pipelines. The constructed knowledge graph can be used to automatically read nearly 10,000 established standards in the field of oil and gas pipelines and process the read data.
[0010] Based on the above scheme, the knowledge graph construction method in the field of oil and gas pipelines of the present invention can also be improved as follows.
[0011] Furthermore, a standard knowledge graph structure is constructed, including:
[0012] Count the occurrence frequency of each extracted keyword, determine n target keywords from all keywords, and build an initial standard unified hierarchical architecture;
[0013] Based on the initial standard unified hierarchical architecture, a standard knowledge graph structure is constructed.
[0014] Furthermore, it also includes:
[0015] Determine the keywords in the extracted information;
[0016] Based on the knowledge graph, obtain the standard information associated with the keywords in the extracted information.
[0017] Furthermore, based on the knowledge graph, standard information associated with the keywords in the extracted information is obtained, including:
[0018] In the knowledge graph, locate the keywords in the extracted information, determine the target nodes including the keywords in the extracted information, and determine the search path of each target node in the knowledge graph;
[0019] The standard information associated with the keywords in the extracted information includes:
[0020] The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
[0021] 2) In the second aspect, the present invention also provides a knowledge graph construction system in the field of oil and gas pipelines, and the specific technical solution is as follows:
[0022] It includes a first keyword extraction module, a standard knowledge graph structure construction module and a knowledge graph construction module;
[0023] The first keyword extraction module is used to: extract multiple keywords from the titles of each level of each established standard in the field of oil and gas pipelines;
[0024] The standard knowledge graph structure construction module is used to: count and determine n target keywords from all keywords according to the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, where the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer;
[0025] The knowledge graph construction module is used to build a knowledge graph based on the standard knowledge graph structure.
[0026] Based on the above scheme, the knowledge graph construction system in the field of oil and gas pipelines of the present invention can also be improved as follows.
[0027] Furthermore, the standard knowledge graph structure building module is specifically used for:
[0028] Count the occurrence frequency of each extracted keyword, determine n target keywords from all keywords, and build an initial standard unified hierarchical architecture;
[0029] Based on the initial standard unified hierarchical architecture, a standard knowledge graph structure is constructed.
[0030] Furthermore, it also includes a second keyword extraction module and a standard information acquisition module;
[0031] The second keyword extraction module is used to: determine the keywords in the extracted information;
[0032] The standard information acquisition module is used to obtain standard information associated with keywords in the extracted information based on the knowledge graph.
[0033] Furthermore, the standard information acquisition module is specifically used for:
[0034] In the knowledge graph, locate the keywords in the extracted information, determine the target nodes including the keywords in the extracted information, and determine the search path of each target node in the knowledge graph;
[0035] The standard information associated with the keywords in the extracted information includes:
[0036] The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
[0037] 3) In a third aspect, the present invention further provides an electronic device, comprising a processor, the processor being coupled to a memory, the memory storing at least one computer program, and the at least one computer program being loaded and executed by the processor, so that the electronic device can implement any of the above-mentioned knowledge graph construction methods in the field of oil and gas pipelines.
[0038] 4) In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, it implements any of the above-mentioned knowledge graph construction methods in the field of oil and gas pipelines.
[0039] It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments of the present invention:
[0041] Figure 1 A schematic diagram of a flow chart of a method for constructing a knowledge graph in the field of oil and gas pipelines according to an embodiment of the present invention;
[0042] Figure 2A schematic diagram of the structure of a knowledge graph construction system in the field of oil and gas pipelines according to an embodiment of the present invention;
[0043] Figure 3 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0045] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0046] like Figure 1 As shown, a knowledge graph construction method in the field of oil and gas pipelines according to an embodiment of the present invention includes the following steps:
[0047] S1. Extract multiple keywords from the titles of each level in each established standard in the field of oil and gas pipelines;
[0048] Among them, the standard text files generated according to the established standards in the crude oil pipeline network, the refined oil pipeline network, and the natural gas pipeline network are processed into xml format, and then the titles of each level in each established standard and the contents contained in the titles are parsed using crawler methods such as python crawler method or Java crawler method, and the titles of each level in each established standard and the contents contained in the titles are stored in SQL or csv format files and stored in the database.
[0049] Among them, natural language processing methods are used to extract keywords from all titles and store them in the database.
[0050] The database can adopt neo4j graph database, or it can be set according to actual conditions.
[0051] S2. Count and determine n target keywords from all keywords based on the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, where the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer;
[0052] The keywords counted include keywords related to equipment systems, business scenarios, organizations, personnel, and documents, as follows:
[0053] 1) Keywords for equipment systems include: “pipeline lines,” “station equipment and facilities,” “liquefied natural gas receiving station,” and “special equipment”;
[0054] 2) Keywords in business scenarios include: "design", "construction", "acceptance", "operation", "maintenance", "safety" and "health". It should be noted that the keywords in business scenarios cover the entire life cycle of the pipeline;
[0055] 3) Keywords in terms of institutions include “safety institutions” and “user units”;
[0056] 4) Keywords for personnel include “management personnel”, “operation personnel” and “technical personnel”;
[0057] 5) Keywords for documents include “registration certificate”, “registration form” and “maintenance record”.
[0058] The non-target keywords refer to the keywords other than the target keywords among all the extracted keywords.
[0059] S3. Build a knowledge graph based on the standard knowledge graph structure.
[0060] Optionally, in S1, a standard knowledge graph structure is constructed, including:
[0061] S10, counting the occurrence frequency of each extracted keyword, determining n target keywords from all keywords, and constructing an initial standard unified hierarchical architecture;
[0062] S11. On the basis of the initial standard unified hierarchical architecture, a standard knowledge graph structure is constructed. Specifically:
[0063] S110. According to different levels, the target keywords on the initial unified hierarchical architecture are defined as different categories of knowledge graph entities, the name of each entity is the corresponding target keyword, and the triples of the standard architecture (initial standard unified hierarchical architecture) in the oil and gas pipeline field are determined.
[0064] Among them, the triples include entities and relations, as well as the attributes of entities and relations.
[0065] S111. On the basis of the initial unified hierarchical architecture, further expand and refine the items contained in each entity, define the items added to each entity as new entities, and re-create relationships between the new entities and other entities according to the hierarchy on the standard architecture (initial standard unified hierarchical architecture), further expanding the standard knowledge graph structure.
[0066] Each entity is a node on the standard knowledge graph structure, and each node corresponds to a relationship list.
[0067] Among them, the new entities include two entities, namely stations and pipelines. The station entities include crude oil stations, refined oil stations, pumping stations and natural gas stations. The pipeline entities include crude oil pipelines, refined oil pipelines and natural gas pipelines.
[0068] Among them, "each node corresponds to a relationship list" is explained as follows:
[0069] 1) Crude oil stations, refined oil stations, pumping stations, natural gas stations, crude oil pipelines, refined oil pipelines, natural gas and other entities can establish relationships with the control center, main control center, SCADA control center, and backup control center.
[0070] 2) Entities such as crude oil stations, refined oil stations and pump stations can establish relationships with entities such as pressure gauges, oil transfer pumps, pump units, check valves, pump station PLCs, ball receiving and sending indicators, pig ball receiving devices, pigs, pressure relief valves, storage tanks, metering equipment, safety relief valves, pressure regulating valves, heating stations, station ESD, trunk RTU systems, electro-hydraulic linkage valves, gas-liquid linkage valves and electric valves.
[0071] 3) Crude oil stations, refined oil stations, pumping stations, crude oil pipelines, refined oil pipelines and other entities can establish connections with security warning systems, heating furnaces, heating systems, pumping station ESD, pumping station control systems, pumping station fire protection systems and pumping station pressure regulating systems.
[0072] 4) Natural gas stations and natural gas pipelines can establish relationships with entities named pressure gauge, check valve, pressure relief valve, safety relief valve, pressure regulating valve, station ESD system, trunk RTU system, electric linkage valve, gas-liquid linkage valve, electric valve, etc.
[0073] 5) Entities such as natural gas stations and natural gas pipelines establish relationships with entities such as pressure gauges, check valves, pressure relief valves, safety relief valves, pressure regulating valves, station ESD systems, trunk RTU systems, electric linkage valves, gas-liquid linkage valves and electric valves.
[0074] 6) Entities such as natural gas stations and natural gas pipelines can establish relationships with security warning system entities.
[0075] Through the relationships between different entities constructed above, the relationship list corresponding to each node can be determined. The relationship list corresponding to any node at least includes: the name of the node and the name of each entity having a relationship with the node.
[0076] In S3, a knowledge graph is constructed based on the standard knowledge graph structure. The specific implementation process is as follows:
[0077] According to the constructed standard knowledge graph structure and the node information in the standard knowledge graph structure (node information includes the name of the node, the attributes of the node, and the relationship list corresponding to the node, etc.), the neo4j graph database is controlled by the python program to construct the knowledge graph.
[0078] It should be noted that a method for constructing a knowledge graph was given this morning, and a knowledge graph can also be constructed in this way, which will not be elaborated here.
[0079] Optionally, in the above technical solution, it also includes:
[0080] S4, determining keywords in the extracted information;
[0081] Input text information into the Python program as the extracted information, and obtain the keywords in the extracted information based on the Python natural language processing program.
[0082] S5. Based on the knowledge graph, obtain standard information associated with the keywords in the extracted information.
[0083] Optionally, in S5, based on the knowledge graph, standard information associated with the keywords in the extracted information is obtained, including:
[0084] S50, in the knowledge graph, locate the keywords in the extracted information, determine the target nodes including the keywords in the extracted information, and determine the search path of each target node in the knowledge graph;
[0085] In the neo4j graph database, cypher statements are used to locate the keywords in the extracted information, and target nodes including the keywords in the extracted information are determined.
[0086] Among them, in the neo4j graph database, all search paths containing keywords in the extracted information can be found in the order of search paths from short to long.
[0087] The standard information associated with the keywords in the extracted information includes:
[0088] The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
[0089] In another embodiment, comprising:
[0090] Step 1: Use Python or Java to program a crawler method to parse the XML format standard document, collect the titles of various levels in different field standards, and use natural language processing to extract the keywords in each title, store them in the database, and count the number of each keyword.
[0091] Step 2: Count the top ten keywords with the highest frequency of occurrence and build an initial standard unified hierarchical structure;
[0092] Step 3: Based on the constructed initial standard unified hierarchical architecture, construct a standard knowledge graph;
[0093] Step 4: Determine the keywords for extracting information and locate the keywords based on the knowledge graph;
[0094] Step 5: Sort the searched standard information according to the length of the search path;
[0095] Step 6: Extract relevant standard information.
[0096] The step 1 specifically includes:
[0097] Step 1.1: Process all standard text files of crude oil pipeline network, refined oil pipeline network and natural gas pipeline network into xml format, and use python, Java and other crawler methods to parse out all the titles and the contents contained in the titles in the standards. And use SQL or csv format files to store the parsed information.
[0098] Step 1.2: Use natural language processing methods to extract keywords from all titles.
[0099] The step 2 specifically includes:
[0100] Step 2.1: The keywords counted in terms of equipment systems include pipeline lines, station equipment and facilities, liquefied natural gas receiving stations, and special equipment.
[0101] In terms of business scenarios, they include design, construction, acceptance, operation, maintenance, safety, and health; all business scenarios cover the entire life cycle of the pipeline.
[0102] In terms of institutions, it includes security agencies and user units.
[0103] Personnel includes managers, operators and technicians.
[0104] The documents include the registration certificate, registration form and maintenance records.
[0105] Step 2.2: Based on the above selected keywords, construct a preliminary unified hierarchical architecture of oil and gas pipeline standards.
[0106] The step 3 specifically includes:
[0107] Step 3.1: Define different categories of knowledge graph entities according to different levels using the keywords on the initial unified hierarchical architecture. The name of each entity is the keyword, and determine the triples of the standard architecture in the oil and gas pipeline field.
[0108] Among them, the triples include entities, relations, and attributes of entities and relations.
[0109] Step 3.2: Based on the initial unified hierarchical architecture, further expand and refine the items contained in each entity, define the items added to each entity as a new entity, and re-create relationships between the new entity and other entities according to the hierarchy in the standard architecture to further expand the knowledge graph structure.
[0110] Among them, the new entities include stations and pipelines. Each entity is a node on the knowledge graph, and each node corresponds to a relationship list.
[0111] Furthermore, the station entity includes crude oil station, refined oil station, pump station and natural gas station. The pipeline entity includes crude oil pipeline, refined oil pipeline and natural gas pipeline.
[0112] Step 3.3, crude oil stations, refined oil stations, pumping stations, natural gas stations, crude oil pipelines, refined oil pipelines and natural gas entities can establish relationships with the control center, main control center, SCADA control center and backup control center.
[0113] Step 3.4, crude oil station, refined oil station, and pump station can establish relationships with entities named pressure gauge, oil transfer pump, pump unit, check valve, pump station PLC, ball receiving and sending indicator, pig receiving device, pig, pressure relief valve, storage tank, metering equipment, safety relief valve, pressure regulating valve, heating station, station ESD, trunk RTU system, electro-hydraulic linkage valve, gas-liquid linkage valve, and electric valve.
[0114] Furthermore, the crude oil station, refined oil station, pump station, crude oil pipeline, and refined oil pipeline entities may establish connections with entities named security warning system, heating furnace, heating system, pump station ESD, pump station control system, pump station fire protection system, and pump station pressure regulating system.
[0115] Step 3.5, natural gas station and natural gas pipeline can establish relationships with entities named pressure gauge, check valve, pressure relief valve, safety relief valve, pressure regulating valve, station ESD system, trunk RTU system, electric linkage valve, gas-liquid linkage valve and electric valve.
[0116] Furthermore, a natural gas station and a natural gas pipeline may establish a relationship with an entity named a security warning system.
[0117] The step 4 specifically includes:
[0118] Step 4.1: Based on the knowledge graph structure and node information in step 3, use the python program to manipulate the neo4j graph database and build a knowledge graph.
[0119] Step 4.2: Input text information into the Python program, and extract keywords based on the Python natural language processing program. Substitute the extracted keywords into the cypher statement in the neo4j graph database to find the nodes corresponding to the keywords and their corresponding relationships.
[0120] The step 5 specifically includes:
[0121] Step 5.1: In the neo4j graph database, use cypher statements to find the node where the keyword is located;
[0122] Step 5.2: In the neo4j graph database, find all search paths containing keywords from short to long.
[0123] The step 6 specifically includes:
[0124] Extract the names of the nodes in the path and all the attributes in the nodes, as well as the corresponding relationships of all the nodes in the path.
[0125] The present invention can fill the gap in the method of constructing the oil and gas pipeline standard ontology, and is used to comprehensively and detailedly describe the data structure of the oil and gas pipeline field standards, and construct a unified technical element database of the oil and gas pipeline field standards. It can be applied to machine-readable processing of nearly 10,000 oil and gas pipeline field standards, and comprehensively and quickly upgrade the machine-readable level of the oil and gas pipeline field standards from level 1 to level 2.
[0126] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.
[0127] like Figure 2 As shown, a knowledge graph construction system 200 in the field of oil and gas pipelines according to an embodiment of the present invention includes a first keyword extraction module 201, a standard knowledge graph structure construction module 202 and a knowledge graph construction module 203;
[0128] The first keyword extraction module 201 is used to: extract multiple keywords from the titles of each level in each established standard in the field of oil and gas pipelines;
[0129] The standard knowledge graph structure construction module 202 is used to: count and determine n target keywords from all keywords according to the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, wherein the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer;
[0130] The knowledge graph construction module 203 is used to construct a knowledge graph based on a standard knowledge graph structure.
[0131] Optionally, in the above technical solution, the standard knowledge graph structure building module 202 is specifically used for:
[0132] Count the occurrence frequency of each extracted keyword, determine n target keywords from all keywords, and build an initial standard unified hierarchical architecture;
[0133] Based on the initial standard unified hierarchical architecture, a standard knowledge graph structure is constructed.
[0134] Optionally, in the above technical solution, a second keyword extraction module and a standard information acquisition module are further included;
[0135] The second keyword extraction module is used to: determine the keywords in the extracted information;
[0136] The standard information acquisition module is used to obtain standard information associated with keywords in the extracted information based on the knowledge graph.
[0137] Optionally, in the above technical solution, the standard information acquisition module is specifically used to:
[0138] In the knowledge graph, locate the keywords in the extracted information, determine the target nodes including the keywords in the extracted information, and determine the search path of each target node in the knowledge graph;
[0139] The standard information associated with the keywords in the extracted information includes:
[0140] The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
[0141] In another embodiment, the following modules are included:
[0142] Machine-readable file conversion module: used to convert standard text documents into machine-readable XML format documents in batches.
[0143] Machine-readable file parsing and storage module: used to parse, extract and store titles of different levels in XML machine-readable standard documents in the database.
[0144] Keyword extraction module: It is used to extract keywords from the parsed titles of different levels using natural language processing methods, store them in the database, and count the frequency of occurrence of all keywords.
[0145] Knowledge graph construction module: It is used to identify the triples of entities and relationships from the keywords extracted from the title, and to construct the knowledge graph of the standard basic framework in the field of oil and gas pipelines. On this basis, the structure of the knowledge graph is further expanded based on the various units contained in the field of oil and gas pipelines.
[0146] The search module is used to receive the input information, extract keywords from it, match the nodes and relationship information in the knowledge graph, and return the queried information to the search interface. The priority of the retrieved information is arranged from short to long according to the search path on the knowledge graph.
[0147] It should be noted that the beneficial effects of the knowledge graph construction system 200 in the field of oil and gas pipelines provided by the above embodiment are the same as the beneficial effects of the knowledge graph construction method in the field of oil and gas pipelines, which will not be repeated here. In addition, when the system provided by the above embodiment realizes its functions, it only takes the division of the above-mentioned functional modules as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0148] Among them, the knowledge graph construction system in the field of oil and gas pipelines of the present invention can be a computer program (including program code) running in a computer device. For example, the knowledge graph construction system in the field of oil and gas pipelines of the present invention is an application software that can be used to execute the corresponding steps in the knowledge graph construction method in the field of oil and gas pipelines of the present invention.
[0149] In some embodiments, the knowledge graph construction system in the field of oil and gas pipelines of the present invention can be implemented in a combination of software and hardware. As an example, the knowledge graph construction system in the field of oil and gas pipelines of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the knowledge graph construction method in the field of oil and gas pipelines of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs) or other electronic components.
[0150] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The name of a module does not limit the module itself in some cases.
[0151] An electronic device according to an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned knowledge graph construction methods in the field of oil and gas pipelines is implemented. That is to say, an electronic device according to an embodiment of the present invention may include but is not limited to: a processor and a memory; a memory for storing a computer program; a processor for executing a knowledge graph construction method in the field of oil and gas pipelines shown in any embodiment of the present invention by calling a computer program.
[0152] In an alternative embodiment, an electronic device is provided, such as Figure 3 As shown, Figure 3 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.
[0153] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present invention. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0154] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 In the figure, only one thick line is used to represent the bus 4002, but this does not mean that there is only one bus or one type of bus.
[0155] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0156] The memory 4003 is used to store the application code (computer program) for executing the solution of the present invention, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in the above method embodiment.
[0157] Among them, the electronic device can also be a terminal device, and the terminal device can be any terminal device that can install applications and access web pages through applications, including at least one of a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a smart TV, and a smart car device.
[0158] It should be noted that Figure 3 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0159] A computer-readable storage medium according to an embodiment of the present invention stores a computer program, which, when executed by a processor, implements any of the above-mentioned knowledge graph construction methods in the field of oil and gas pipelines.
[0160] Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
[0161] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes any of the above-mentioned knowledge graph construction methods in the field of oil and gas pipelines.
[0162] Computer program code for performing the operations of the present invention may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0163] It should be understood that the flow charts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0164] The computer-readable storage medium provided by the embodiment of the present invention may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or component.
[0165] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0166] The above description is only a preferred embodiment of the present invention and an explanation of the technical principles used. Those skilled in the art should understand that the disclosure scope involved in the present invention is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present invention (but not limited to) by each other.
[0167] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.
[0168] Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.
[0169] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A knowledge graph construction method in the field of oil and gas pipelines, characterized in that: include: Extract multiple keywords from the titles of each level of each established standard in the field of oil and gas pipelines; Count and determine n target keywords from all keywords based on the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, where the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer; Based on the standard knowledge graph structure, a knowledge graph is constructed.
2. The method for constructing a knowledge graph in the field of oil and gas pipelines according to claim 1, characterized in that: Construct a standard knowledge graph structure, including: Count the occurrence frequency of each extracted keyword, determine n target keywords from all keywords, and build an initial standard unified hierarchical architecture; On the basis of the initial standard unified hierarchical architecture, the standard knowledge graph structure is constructed.
3. A knowledge graph construction method in the field of oil and gas pipelines according to claim 1 or 2, characterized in that: Also includes: Determine the keywords in the extracted information; Based on the knowledge graph, standard information associated with the keywords in the extracted information is obtained.
4. The method for constructing a knowledge graph in the field of oil and gas pipelines according to claim 3 is characterized in that: Based on the knowledge graph, obtaining standard information associated with the keywords in the extracted information includes: In the knowledge graph, the keywords in the extracted information are located, target nodes including the keywords in the extracted information are determined, and a search path for each target node in the knowledge graph is determined; The standard information associated with the keywords in the extracted information includes: The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
5. A knowledge graph construction system in the field of oil and gas pipelines, characterized in that: It includes a first keyword extraction module, a standard knowledge graph structure construction module and a knowledge graph construction module; The first keyword extraction module is used to: extract multiple keywords from the titles of each level in each established standard in the field of oil and gas pipelines; The standard knowledge graph structure construction module is used to: determine n target keywords from all keywords based on the occurrence frequency of each extracted keyword, and construct a standard knowledge graph structure, wherein the occurrence frequency of each target keyword is higher than the occurrence frequency of each non-target keyword, and n is a positive integer; The knowledge graph construction module is used to construct a knowledge graph based on the standard knowledge graph structure.
6. A knowledge graph construction system in the field of oil and gas pipelines according to claim 5, characterized in that: The standard knowledge graph structure building module is specifically used for: Count the occurrence frequency of each extracted keyword, determine n target keywords from all keywords, and build an initial standard unified hierarchical architecture; On the basis of the initial standard unified hierarchical architecture, the standard knowledge graph structure is constructed.
7. A knowledge graph construction system in the field of oil and gas pipelines according to claim 5 or 6, characterized in that: It also includes a second keyword extraction module and a standard information acquisition module; The second keyword extraction module is used to: determine keywords in the extracted information; The standard information acquisition module is used to obtain standard information associated with keywords in the extracted information based on the knowledge graph.
8. A knowledge graph construction system in the field of oil and gas pipelines according to claim 7, characterized in that: The standard information acquisition module is specifically used for: In the knowledge graph, the keywords in the extracted information are located, target nodes including the keywords in the extracted information are determined, and a search path for each target node in the knowledge graph is determined; The standard information associated with the keywords in the extracted information includes: The name of each node in each search path, the attributes of the name of each node in each search path, and the list of relationships corresponding to each node in each search path.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a knowledge graph construction method in the field of oil and gas pipelines as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for constructing a knowledge graph in the field of oil and gas pipelines as described in any one of claims 1 to 4 is implemented.