Method and device for constructing lithofacies paleogeography knowledge graph
By constructing a lithofacies paleogeographic knowledge graph and using semantic coding and large language models to automatically process lithofacies paleogeographic documents, the problems of low efficiency and insufficient accuracy in existing technologies have been solved, and efficient and accurate document management and retrieval have been achieved.
Patent Information
- Application Number
- CN202510769720.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-10-31
AI Technical Summary
Existing lithofacies paleogeographic literature management tools and search engines are inefficient and inaccurate when processing large-scale literature data, making it difficult to achieve automatic classification and key information extraction, thus affecting the efficiency and accuracy of lithofacies paleogeographic research.
A semantic coding model is used to convert lithofacies paleogeographic documents into document vectors, a document vector database is constructed, and a large language model is used to extract key information from target documents to construct a lithofacies paleogeographic knowledge graph. Data is obtained through an asynchronous web crawler system, and relevant documents are quickly filtered using semantic vectors to achieve automatic collection and efficient extraction of key information.
It improves the accuracy and comprehensiveness of classification and searching of lithofacies paleogeographic literature, realizes a clear presentation of the relationships between literature, facilitates rapid querying and analysis, and improves work efficiency.
Smart Images

Figure CN120873237A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, and in particular to a method and apparatus for constructing lithofacies paleogeographic knowledge graphs. Background Technology
[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] Lithofacies paleogeography is a comprehensive discipline that primarily studies sedimentary facies and paleogeographic environments. It integrates research methods and theories from multiple fields, including structural geology, stratigraphy, geochemistry, geophysics, paleontology, hydrodynamics, and geomorphology. Through systematic analysis of research findings from these fields, lithofacies paleogeography aims to classify sedimentary facies and conduct paleogeographic studies, thereby reconstructing ancient sedimentary environments.
[0004] Despite the abundance of available literature, traditional manual methods of collecting and organizing documents are not only time-consuming and labor-intensive, but also struggle to ensure the accuracy and completeness of information. Existing document management tools and search engines also have many limitations in practical applications, such as insufficient search precision and the inability to automatically classify documents and extract key information. Particularly when processing large-scale documents, existing lithofacies paleogeographic knowledge extraction algorithms often exhibit low efficiency and accuracy, severely hindering research and the further development of the discipline. Summary of the Invention
[0005] This invention provides a method for constructing a lithofacies paleogeographic knowledge graph to improve the accuracy and comprehensiveness of lithofacies paleogeographic literature classification and searching, and to increase work efficiency. The method includes:
[0006] Semantic coding models are used to convert lithofacies paleogeographic documents into document vectors, and a document vector database is constructed.
[0007] The semantic coding model is used to convert lithofacies paleogeographic literature query information into query vectors, and the similarity between the query vectors and the literature vectors in the literature vector database is calculated.
[0008] Lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold are identified as target documents; key information of the documents is extracted from the target documents using a large language model; key information of the documents includes: entity description and entity type, entity relationship type;
[0009] Using key information from the target literature, a lithofacies paleogeographic knowledge map is constructed.
[0010] This invention also provides a device for constructing a lithofacies paleogeographic knowledge map, which improves the accuracy and comprehensiveness of lithofacies paleogeographic literature classification and searching, and increases work efficiency. The device includes:
[0011] The document database construction module is used to: convert lithofacies paleogeographic documents into document vectors using a semantic encoding model, and construct a document vector database;
[0012] The literature filtering module is used to: convert lithofacies paleogeographic literature query information into query vectors using a semantic coding model, and calculate the similarity between the query vectors and the literature vectors in the literature vector database;
[0013] The knowledge extraction module is used to: identify lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold as target documents; and extract key information from the target documents using a large language model. The key information includes: entity description and entity type, and entity relationship type.
[0014] The knowledge graph construction module is used to construct a lithofacies paleogeographic knowledge graph using key information from target documents.
[0015] This invention also provides a computer device, including 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 the above-mentioned method for constructing a lithofacies paleogeographic knowledge map.
[0016] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for constructing a lithofacies paleogeographic knowledge map.
[0017] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for constructing a lithofacies paleogeographic knowledge map.
[0018] In this embodiment of the invention, lithofacies paleogeographic documents are converted into document vectors to construct a document vector database; lithofacies paleogeographic document query information is converted into query vectors, and the similarity between the query vectors and document vectors in the document vector database is calculated; wherein, the query vectors and document vectors have the same dimension; lithofacies paleogeographic documents with a similarity higher than a first threshold are identified as target documents; key information of the documents is extracted from the target documents using a large language model; using the key information of the target documents, a lithofacies paleogeographic knowledge graph is constructed. Compared with existing document management tools and search engines that have insufficient search accuracy and low processing efficiency, this invention utilizes semantic vectors to quickly filter lithofacies paleogeographic documents related to the study area, achieving automatic collection of lithofacies paleogeographic documents; using a large language model to extract entities and entity relationships in lithofacies paleogeographic documents, forming lithofacies paleogeographic document triples, the extraction of key information from lithofacies paleogeographic documents has higher accuracy and comprehensiveness; using the key information of lithofacies paleogeographic documents to construct a knowledge graph clearly presents the relationships between documents, facilitating rapid querying and analysis, and improving work efficiency. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0020] Figure 1 This is a flowchart of the method for constructing a lithofacies paleogeographic knowledge graph in an embodiment of the present invention;
[0021] Figure 2 This is a flowchart illustrating the processing of lithofacies paleogeography PDF files in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram illustrating the extraction of key information ternaries from lithofacies paleogeographic literature in an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of the entity fusion process in an embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of the device for constructing a lithofacies paleogeographic knowledge map in an embodiment of the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0026] Figure 1 This is a flowchart illustrating the method for constructing a lithofacies paleogeographic knowledge graph in this embodiment of the invention. To overcome the problems of low efficiency and accuracy in existing lithofacies paleogeographic knowledge extraction algorithms when processing large-scale literature data, this embodiment of the invention proposes a method for constructing a lithofacies paleogeographic knowledge graph, such as... Figure 1 As shown, the method includes the following steps:
[0027] Step 101: Use a semantic coding model to convert lithofacies paleogeographic documents into document vectors and construct a document vector database;
[0028] Step 102: Use a semantic coding model to convert lithofacies paleogeographic literature query information into query vectors, and calculate the similarity between the query vectors and the literature vectors in the literature vector database;
[0029] Step 103: Identify the lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold as target documents; use a large language model to extract key information from the target documents; key information includes: entity description and entity type, entity relationship type;
[0030] Step 104: Use the key information from the target literature to construct a lithofacies paleogeographic knowledge map.
[0031] Compared with existing document management tools and search engines that suffer from insufficient search accuracy and low processing efficiency, this invention utilizes semantic vectors to quickly filter lithofacies paleogeographic documents related to the study area, achieving automatic collection of lithofacies paleogeographic documents; it uses a large language model to extract entities and entity relationships from lithofacies paleogeographic documents, constructing lithofacies paleogeographic document triples, resulting in higher accuracy and comprehensiveness in extracting key information from lithofacies paleogeographic documents; and it uses the key information from lithofacies paleogeographic documents to construct a knowledge graph, clearly presenting the relationships between documents, facilitating rapid querying and analysis, and improving work efficiency.
[0032] In this embodiment of the invention, a semantic coding model is used to convert lithofacies paleogeographic documents into document vectors, and a document vector database is constructed.
[0033] This semantic vector-based target task literature retrieval system pioneered an intelligent process for batch automatic screening and precise retrieval of literature relevant to the research area, outperforming traditional text mining and screening methods. Its core lies in converting unstructured text information into a computable high-dimensional vector space.
[0034] For example, preprocessing is performed on lithofacies paleogeographic literature. Taking literature related to the Permian and Triassic systems of a certain basin as an example, text cleaning, word segmentation, and standardization are performed on literature containing keywords such as "certain basin," "Permian," and "Triassic" to ensure the quality of input data for semantic coding models (e.g., sentence vector models). Subsequently, the processed text is encoded using a sentence vector model, converting it into a 768-dimensional semantic vector representation, i.e., document vectors. Finally, a large number of document vectors are stored in a vector database to provide data support for subsequent queries.
[0035] To construct a lithofacies paleogeographic knowledge graph, the first step, as demonstrated in this example, is to utilize a self-developed adaptive asynchronous crawler system to obtain lithofacies paleogeographic literature data from data source websites such as ScienceDirect, CNKI, and SpringerLink, thus providing a data foundation for the construction of a large-scale knowledge graph.
[0036] In one embodiment, an asynchronous crawler system is used to crawl lithofacies paleogeographic literature from multiple data source websites. For example, an asynchronous crawler system is written to efficiently collect lithofacies paleogeographic literature and write its metadata into a local relational database. The metadata includes: title, author, publication date, abstract, publisher, citation network, etc.
[0037] The asynchronous crawler system automatically adjusts the frequency and number of concurrent network requests based on the response characteristics, blocking policies, and API feedback of each data source website, and automatically switches between IP proxies, user proxies, and API endpoints.
[0038] Specifically, the asynchronous crawler system in this embodiment of the invention has the following advantages:
[0039] 1. Dynamically adjust the concurrency intensity based on the response characteristics, blocking policies, and API feedback of the data source website to achieve optimal coordination of tasks on different platforms;
[0040] 2. The asynchronous crawler system has a built-in multi-channel, highly available IP proxy pool. During the crawling process, it intelligently detects response status, CAPTCHA triggering, and other situations. Using a distributed polling algorithm, it adaptively switches proxies, adjusts network request intervals and UA based on the intelligent detection results, significantly improving the security and continuity of long-term batch collection.
[0041] 3. It can capture various network requests, web page parsing, and anomalies at each network layer, save the breakpoint context, enable resume crawling from breakpoints and batch log tracking, and ensure the integrity of the collected data in large-scale collection tasks.
[0042] 4. The data structures, authentication logic, and anti-crawler strategies of different data source websites are complex and varied. The asynchronous crawler system in this embodiment of the invention sets up an abstract adaptation interface, which can quickly switch data sources and collect data from different data sources in parallel, thereby improving the versatility and scalability of the asynchronous crawler system, rather than simply stacking asynchronous task code.
[0043] It should be noted that the asynchronous crawler system automatically detects the robots.txt file of the target data source website and strictly follows its access specifications to ensure the legality of data acquisition.
[0044] The lithofacies paleogeographic literature data crawled by the asynchronous crawler system is mostly in PDF format, which requires multiple processing stages such as document preprocessing, content decomposition and structure restoration, and standardized data storage. Figure 2 This is a flowchart illustrating the processing of lithofacies paleogeography PDF files in an embodiment of the present invention. Figure 2 As shown, the document preprocessing stage includes operations such as page number checking, file password checking, scanned document checking, and PDF parameter checking; the content parsing stage includes operations such as formula detection, formula recognition, table recognition, and text OCR recognition; the content parsing postprocessing stage includes operations such as handling overlapping boundaries, cropping images and tables, deleting headers and footers, and adjusting reading order; the parsed content is then structurally restored and reconstructed into JSON format data, including parsed document data, document metadata, and document image data; finally, the reconstructed PDF file is converted and output into Markdown format data, thus completing the structuring and preliminary data cleaning of the PDF content.
[0045] In this embodiment of the invention, a semantic coding model is used to convert lithofacies paleogeographic literature query information into query vectors, and the similarity between the query vectors and the literature vectors in the literature vector database is calculated.
[0046] To overcome the limitations of traditional manual keyword-based literature screening, this invention transforms academic literature and descriptive information of the research area to be queried into fixed-dimensional semantic vectors. Then, it calculates the similarity between the semantic vector carrying the literature information and the semantic vector of the task area description information. Based on preset vector similarity screening criteria, it automatically retrieves a list of literature highly relevant to the research topic, achieving automation of the "intelligent screening + batch recall" process, significantly reducing manual processing requirements and improving data quality.
[0047] For example, using a sentence vector model, the complete descriptive information of "Permian and Triassic strata in a certain basin" is converted into a feature vector, i.e., a query vector. The cosine similarity between the query vector and all document vectors stored in the vector database is calculated. Based on the similarity calculation results, all document vectors stored in the vector database are sorted in descending order, and the top 1000 document vectors with a similarity threshold greater than 0.5 are returned. The lithofacies paleogeographic documents corresponding to the returned document vectors are used as the objects for knowledge extraction, and finally, a list of documents most relevant to the study of the Permian and Triassic strata in a certain basin is selected.
[0048] After completing the data cleaning and semantic representation of PDF documents, we enter the core stage of knowledge graph construction. We adopt a knowledge extraction method based on a large language model and transform unstructured target documents into structured knowledge graphs through a systematic processing flow.
[0049] In this embodiment of the invention, lithofacies paleogeographic documents corresponding to document vectors with similarity higher than a first threshold are identified as target documents; key information of the documents is extracted from the target documents using a large language model; the key information of the documents includes: entity description and entity type, entity relationship type.
[0050] In one embodiment, the target document is cleaned and structured to obtain a structured target document. Each structured target document is divided into multiple semantic units. The multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document. The structured input statement of each target document is input into a large language model to obtain the key information of each target document output by the large language model.
[0051] Specifically, in the data preparation stage, the target documents are first standardized. This process includes standardizing technical terms (e.g., unifying "Permian System" as "Permian System" and "Triassic System" as "Triassic System") and special symbols (e.g., "①", "②"). The standardized text is then segmented into blocks of 500 characters each to ensure that each semantic unit contains a complete description of geological concepts, is suitable for large language models, and maintains contextual coherence.
[0052] In actual processing, the large language model employs a concurrent API request mechanism to improve processing efficiency. Simultaneously, constraints from predefined prompt words ensure that the large language model outputs standardized JSON format results, facilitating subsequent processing.
[0053] In one embodiment, multiple semantic units of each target document are filled into a preset entity recognition prompt word template to obtain the entity recognition input statement of each target document; the entity recognition prompt word template includes: entity type description, entity recognition task description, and example description; the entity recognition input statement of each target document is input into a large language model to obtain the entity description and entity type contained in each target document output by the large language model.
[0054] For example, the text input to a large language model is "Measured stratigraphic lithofacies profile of the second (K1d2) to the fourth (K1d4) section of the Lower Cretaceous Dasi Formation from region C to region D in city B of province A, without the top of the fourth (K1d4) section of the Dasi Formation". The entity recognition results output by the large language model include entity names and entity types, as shown in Table 1.
[0055] Table 1
[0056]
[0057] In one embodiment, multiple semantic units, entity descriptions, and entity types of each target document are filled into a preset relation extraction prompt template to obtain the relation extraction input statement for each target document; the relation extraction prompt template includes: entity type description, entity relation type description, entity relation extraction task description, and example description; the relation extraction input statement for each target document is input into a large language model to obtain the entity relation types contained in each target document output by the large language model.
[0058] For example, based on the identified entity list, a relation extraction prompt template is used for the second stage of processing. The relation extraction prompt template defines six core relation types, requires that the head and tail entities of the relation must come from the identified entity list, and specifies a uniform JSON output format. The relation extraction results output by the large language model in the above example are shown in Table 2.
[0059] Table 2
[0060]
[0061] Due to the diverse characteristics of natural language, such as its varied grammatical structures, rich semantic expressions, and complex colloquial expressions, entity type misjudgments may occur due to differences in expression. This invention, based on domain knowledge systems from disciplines such as paleogeography, sedimentology, and petroleum geology, constructs and optimizes specialized entity type ontology. Each entity type has a predefined, strictly defined enumeration and core attribute category. Furthermore, based on the constructed entity type ontology, various domain-specific ontology relationships are clarified, significantly reducing the interference of natural language diversity on extraction accuracy.
[0062] In one embodiment, the entity types include: rock type, chronostratigraphic type, lithostratigraphic type, sedimentary facies type, basin structure type, research area type, and reservoir type type; the entity relationship types include: distribution relationship, composition relationship, spatiotemporal relationship, sedimentary environment relationship, tectonic relationship, and reservoir relationship.
[0063] Specifically, the entity type is defined as follows in this example:
[0064] 1. Rocks: including basic rock types such as carbonate rocks, dolomite, and gypsum-salt rocks;
[0065] 2. Chronostratigraphic category: encompassing all levels of geological chronological stratigraphic units;
[0066] 3. Lithostratigraphy category: includes various types of lithostratigraphic units;
[0067] 4. Sedimentary facies categories: encompassing all types of sedimentary facies;
[0068] 5. Basin tectonic types: including the main tectonic units within the basin;
[0069] 6. Research Area Category: Geographical units covering the research area;
[0070] 7. Reservoir Type Classification: Includes different types of reservoirs.
[0071] Specifically, the entity relationship type is defined as follows in this example:
[0072] 1. Distribution Relationship: Used to describe the spatial distribution characteristics of geological entities;
[0073] 2. Compositional relationships: used to describe the lithological compositional characteristics of rock strata;
[0074] 3. Spatiotemporal relationship: used to determine the stratigraphic age of geological bodies;
[0075] 4. Relationship to sedimentary environment: Used to identify the formation environment of sedimentary facies;
[0076] 5. Structural Relationships: Used to describe the spatial location of structural units;
[0077] 6. Reservoir Relationship: Used to determine the type and characteristics of reservoirs.
[0078] Figure 3 This is a schematic diagram illustrating the extraction of key information ternaries from lithofacies paleogeographic literature in an embodiment of the present invention. For example... Figure 3As shown, after data cleaning and structuring, the PDF file yields multiple text blocks. These text blocks, combined with pre-defined prompts, form the corpus for the large language model. Under the constraints of the prompts, the large language model outputs key information extraction results in JSON format, where each data unit conforms to the triple form {subject, predicate, object}. Finally, a knowledge graph is constructed based on the triple data.
[0079] In this embodiment of the invention, key information from the target literature is used to construct a lithofacies paleogeographic knowledge graph.
[0080] Knowledge fusion can eliminate data heterogeneity and unify knowledge representation. It primarily achieves this through entity alignment and ontology matching, mapping heterogeneous data onto a unified knowledge graph schema, eliminating redundancy and inconsistencies, and forming a unified, structured knowledge system.
[0081] In one embodiment, the similarity between entity descriptions of the same entity type is calculated, and entity descriptions with similarity higher than a second threshold are fused to obtain key information of the literature after knowledge fusion; the key information of the literature after knowledge fusion is used to construct a lithofacies paleogeography knowledge graph.
[0082] For example, we first perform entity clustering on the extracted triplet data to establish candidate entity pairs for subsequent similarity calculations. Using the target document mentioned above as an example, we group it by entity type, and the results are as follows:
[0083] Rock types: "Sandstone", "Quartz Sandstone";
[0084] Regional category (research area category): "E Basin", "E Basin region".
[0085] After obtaining entity candidate pairs, the character similarity and semantic similarity of the entity candidate pairs are calculated using a word embedding model, and the results are as follows:
[0086] The cosine similarity between the strings “sandstone” and “quartz sandstone” is 0.82;
[0087] The cosine similarity between the strings “E Basin” and “E Basin Region” is 0.85.
[0088] Finally, based on the preset fusion threshold (0.8 in this example), entity pairs whose character similarity and semantic similarity both exceed the fusion threshold are fused and written into a JSON record. The content and format of the JSON record are shown in Table 3.
[0089] Table 3
[0090]
[0091] Figure 4 This is a schematic diagram of the entity fusion process in an embodiment of the present invention. Figure 4 As shown, at the graph level, entity fusion is manifested as follows: in the graph constructed by text block A, there is an entity “E Basin Northeast”, and in the graph constructed by text block B, there is an entity “E Basin Northeast Region”. After “E Basin Northeast” and “E Basin Northeast Region” are encoded into word vectors, the character similarity and semantic similarity of the two are both greater than 0.8, so the two entities are merged.
[0092] Finally, the merged and deduplicated triples are batch-written into the graph database. The process is as follows: Each triple dynamically generates nodes, edges, and attributes based on its type, and attaches corresponding literature links (such as dio); batch creation and concurrent batch processing are implemented, with anti-duplicate merging rendering. The UI layer supports entity hierarchy, relation rendering, molecular clustering visualization, and dynamic path query; full-text search, entity reverse search, relation multi-way cross-referencing, and structural topology statistics are provided; supporting indexes and concurrent read / write optimizations, continuous knowledge updates, and video quality inspection are supported to ensure long-term data consistency, reusability, and sustainable addition.
[0093] Following the example above, when processing triplet data such as "Feixianguan Group is located in the northeastern region of Basin E", first create two nodes (representing Feixianguan Group and the northeastern region of Basin E respectively), and then establish the spatial relationship between them. To improve write efficiency, a batch processing method of 100 triplet data entries per batch can be used, and the MERGE statement can be used to avoid creating duplicate nodes.
[0094] The lithofacies paleogeographic knowledge graph constructed in this embodiment of the invention allows for entity-level knowledge querying and searching of documents, providing a more advanced graph search method than traditional retrieval methods to improve the retrieval efficiency of paleogeographic documents. Specifically, the query method includes the following three levels of querying:
[0095] (1) Entity-level knowledge query: Supports searching paleogeographic entity elements such as rock type (e.g., carbonate rock, dolomite), stratigraphic unit (e.g., Feixianguan Formation), sedimentary facies (e.g., oolitic shoal).
[0096] Search objective: To retrieve descriptions and literature related to dolomite;
[0097] Search query: MATCH(n:`rock`) where n.name contains 'dolomite' RETURN n;
[0098] Search results: Residual grainy dolomite, sacchariform dolomite, dolomite-like rocks, coarse-grained dolomite.
[0099] (2) Relationship cascade query: Through the relationship between entities (distribution, composition, age), multiple conditions can be combined to query, such as the lithology-sedimentary facies combination query of a specific stratum, and the comprehensive analysis of reservoir-sedimentary facies.
[0100] Search objective: What rock types make up the Changxing Formation in Basin E?
[0101] Search query: MATCH p = (r:lithological strata {name:'Changxing Formation'}) - [:composition] -> (rock:rock)
[0102] WHEREr-[:distributed in]->(:region{name:'E Basin'})
[0103] RETURN rock.name AS rock type
[0104] Search results: Visual relationship diagram between Changxing Formation entities and entities of multiple rock types.
[0105] (3) Graph-level correlation query: By analyzing the entire graph structure, the correlation between different entities can be identified.
[0106] Search target: The top ten most closely related geological concepts in the paleogeographic knowledge graph;
[0107] Search query: CALL gds.pageRank.stream('project')
[0108] YIELD nodeId,score
[0109] RETURN gds.util.asNode(nodeId).name AS nodeName,score
[0110] ORDER BY score DESC LIMIT 10
[0111] Search results: The top 10 entities are returned from the list of entities sorted in ascending order of entity relationship connectivity.
[0112] Node and relation indexes can also be created to further optimize query performance. Indexes can be created for frequently queried attributes such as stratigraphic names and lithological characteristics to improve the response speed of related queries. Simultaneously, the system optimizes indexing strategies through regular data statistical analysis to ensure query efficiency.
[0113] Furthermore, during the knowledge graph construction process, transaction management ensures the atomicity of data operations, and constraint checks prevent the writing of illegal data, thereby implementing a data consistency check mechanism. For example, the system verifies whether the entity types in the triples match the predefined ontology schema to ensure the standardization of the written data.
[0114] This invention also provides a device for constructing a lithofacies paleogeographic knowledge graph, as described in the following embodiments. Since the principle by which this device solves the problem is similar to the method for constructing a lithofacies paleogeographic knowledge graph, the implementation of this device can refer to the implementation of the method for constructing a lithofacies paleogeographic knowledge graph; repeated details will not be elaborated further.
[0115] Figure 5 This is a schematic diagram of the apparatus for constructing a lithofacies paleogeographic knowledge map in an embodiment of the present invention. Figure 5 As shown, the device includes:
[0116] The document database construction module 501 is used to: convert lithofacies paleogeographic documents into document vectors using a semantic coding model, and construct a document vector database;
[0117] The literature screening module 502 is used to: convert lithofacies paleogeographic literature query information into query vectors using a semantic coding model, and calculate the similarity between the query vectors and the literature vectors in the literature vector database;
[0118] The knowledge extraction module 503 is used to: identify lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold as target documents; and extract key information from the target documents using a large language model. The key information includes: entity description and entity type, and entity relationship type.
[0119] The knowledge graph construction module 504 is used to construct a lithofacies paleogeographic knowledge graph using key information from target documents.
[0120] In one embodiment, the literature database construction module 501 is further configured to:
[0121] An asynchronous crawler system is used to crawl lithofacies paleogeographic literature from multiple data source websites. The asynchronous crawler system automatically adjusts the frequency of network requests and the number of concurrent network requests based on the response characteristics, blocking policies and API feedback of each data source website, and automatically switches IP proxies, user proxies and API endpoints.
[0122] In one embodiment, the knowledge extraction module 503 is specifically used for:
[0123] The target documents are cleaned and structured to obtain structured target documents, and each structured target document is divided into multiple semantic units.
[0124] Multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document;
[0125] The structured input statement of each target document is input into the large language model to obtain the key information of each target document output by the large language model.
[0126] In one embodiment, the knowledge extraction module 503 is specifically used for:
[0127] Multiple semantic units of each target document are filled into a preset entity recognition prompt word template to obtain the entity recognition input statement for each target document; the entity recognition prompt word template includes: entity type description, entity recognition task description, and example description;
[0128] Input the entity recognition input statement of each target document into the large language model to obtain the entity description and entity type contained in each target document output by the large language model.
[0129] In one embodiment, the knowledge extraction module 503 is specifically used for:
[0130] Multiple semantic units, entity descriptions, and entity types of each target document are filled into a preset relation extraction prompt template to obtain the relation extraction input statement for each target document; the relation extraction prompt template includes: entity type description, entity relation type description, entity relation extraction task description, and example description;
[0131] The relation extraction input statement for each target document is fed into the large language model to obtain the entity relation types contained in each target document output by the large language model.
[0132] In one embodiment, the entity types include: rock type, chronostratigraphic type, lithostratigraphic type, sedimentary facies type, basin structure type, research area type, and reservoir type type;
[0133] The types of entity relationships include: distribution relationships, composition relationships, spatiotemporal relationships, sedimentary environment relationships, tectonic relationships, and reservoir relationships.
[0134] In one embodiment, the knowledge graph construction module 504 is specifically used for:
[0135] Calculate the similarity between entity descriptions of the same entity type, merge entity descriptions with similarity higher than the second threshold, and obtain the key information of the document after knowledge fusion.
[0136] Using key information from literature after knowledge fusion, a lithofacies paleogeographic knowledge map is constructed.
[0137] This invention also provides a computer device, including 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 the above-mentioned method for constructing a lithofacies paleogeographic knowledge map.
[0138] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for constructing a lithofacies paleogeographic knowledge map.
[0139] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for constructing a lithofacies paleogeographic knowledge map.
[0140] Compared with existing document management tools and search engines that suffer from insufficient search accuracy and low processing efficiency, this approach improves the efficiency of crawling lithofacies paleogeographic documents by setting up an asynchronous crawling system; it utilizes semantic vectors to quickly filter lithofacies paleogeographic documents related to the study area, achieving automatic collection of lithofacies paleogeographic documents; it uses a large language model to extract entities and entity relationships from lithofacies paleogeographic documents, constructing lithofacies paleogeographic document triples, resulting in higher accuracy and comprehensiveness in extracting key information from lithofacies paleogeographic documents; and it uses key information from lithofacies paleogeographic documents to construct a knowledge graph, clearly presenting the relationships between documents, facilitating rapid querying and analysis, and improving work efficiency.
[0141] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0145] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing a lithofacies paleogeographic knowledge graph, characterized in that, include: Semantic coding models are used to encode lithofacies paleogeographic documents into document vectors, and a document vector database is constructed. The semantic coding model is used to convert lithofacies paleogeographic literature query information into query vectors, and the similarity between the query vectors and the literature vectors in the literature vector database is calculated. Lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold are identified as target documents; Using large language models, key information from target documents is extracted. Key information in the document includes: entity description and entity type, entity relationship type; Using key information from the target literature, a lithofacies paleogeographic knowledge map is constructed.
2. The method as described in claim 1, characterized in that, The method further includes: An asynchronous crawler system is used to crawl lithofacies paleogeographic literature from multiple data source websites. The asynchronous crawler system automatically adjusts the frequency of network requests and the number of concurrent network requests based on the response characteristics, blocking policies and API feedback of each data source website, and automatically switches IP proxies, user proxies and API endpoints.
3. The method as described in claim 1, characterized in that, Using a large language model, key information is extracted from the target document, including: The target documents are cleaned and structured to obtain structured target documents, and each structured target document is divided into multiple semantic units. Multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document; The structured input statement of each target document is input into the large language model to obtain the key information of each target document output by the large language model.
4. The method as described in claim 3, characterized in that, Multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document; The structured input statement of each target document is fed into the large language model to obtain the key document information of each target document output by the large language model, including: Multiple semantic units of each target document are filled into a preset entity recognition prompt word template to obtain the entity recognition input statement for each target document; the entity recognition prompt word template includes: entity type description, entity recognition task description, and example description; Input the entity recognition input statement of each target document into the large language model to obtain the entity description and entity type contained in each target document output by the large language model.
5. The method as described in claim 4, characterized in that, Multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document; The structured input statement of each target document is fed into the large language model to obtain the key document information of each target document output by the large language model, including: Multiple semantic units, entity descriptions, and entity types of each target document are filled into a preset relation extraction prompt template to obtain the relation extraction input statement for each target document; the relation extraction prompt template includes: entity type description, entity relation type description, entity relation extraction task description, and example description; The relation extraction input statement for each target document is fed into the large language model to obtain the entity relation types contained in each target document output by the large language model.
6. The method as described in claim 1, characterized in that, The entity types include: rock type, chronostratigraphic type, lithostratigraphic type, sedimentary facies type, basin structure type, research area type, and reservoir type type; The types of entity relationships include: distribution relationships, composition relationships, spatiotemporal relationships, sedimentary environment relationships, tectonic relationships, and reservoir relationships.
7. The method as described in claim 1, characterized in that, Using key information from the target literature, a lithofacies paleogeographic knowledge map is constructed, including: Calculate the similarity between entity descriptions of the same entity type, merge entity descriptions with similarity higher than the second threshold, and obtain the key information of the document after knowledge fusion. Using key information from literature after knowledge fusion, a lithofacies paleogeographic knowledge map is constructed.
8. A device for constructing a lithofacies paleogeographic knowledge map, characterized in that, include: The document database construction module is used to: convert lithofacies paleogeographic documents into document vectors using a semantic encoding model, and construct a document vector database; The literature filtering module is used to: convert lithofacies paleogeographic literature query information into query vectors using a semantic coding model, and calculate the similarity between the query vectors and the literature vectors in the literature vector database; The knowledge extraction module is used to identify lithofacies paleogeographic documents corresponding to document vectors with similarity higher than the first threshold as target documents. Using large language models, key information from target documents is extracted. Key information in the document includes: entity description and entity type, entity relationship type; The knowledge graph construction module is used to construct a lithofacies paleogeographic knowledge graph using key information from target documents.
9. The apparatus as claimed in claim 8, characterized in that, The literature database construction module is also used for: An asynchronous crawler system is used to crawl lithofacies paleogeographic literature from multiple data source websites. The asynchronous crawler system automatically adjusts the frequency of network requests and the number of concurrent network requests based on the response characteristics, blocking policies and API feedback of each data source website, and automatically switches IP proxies, user proxies and API endpoints.
10. The apparatus as claimed in claim 8, characterized in that, The knowledge extraction module is specifically used for: The target documents are cleaned and structured to obtain structured target documents, and each structured target document is divided into multiple semantic units. Multiple semantic units of each target document are filled into a preset prompt word template to obtain a structured input statement for each target document; The structured input statement of each target document is input into the large language model to obtain the key information of each target document output by the large language model.
11. The apparatus as claimed in claim 10, characterized in that, The knowledge extraction module is specifically used for: Multiple semantic units of each target document are filled into a preset entity recognition prompt word template to obtain the entity recognition input statement for each target document; the entity recognition prompt word template includes: entity type description, entity recognition task description, and example description; Input the entity recognition input statement of each target document into the large language model to obtain the entity description and entity type contained in each target document output by the large language model.
12. The apparatus as claimed in claim 11, characterized in that, The knowledge extraction module is specifically used for: Fill the multiple semantic units, entity descriptions and entity types of each target document into the preset relation extraction prompt template to obtain the relation extraction input statement for each target document. The relation extraction prompt template includes: entity type description, entity relation type description, entity relation extraction task description, and example description; The relation extraction input statement for each target document is fed into the large language model to obtain the entity relation types contained in each target document output by the large language model.
13. The apparatus as claimed in claim 8, characterized in that, The entity types include: rock type, chronostratigraphic type, lithostratigraphic type, sedimentary facies type, basin structure type, research area type, and reservoir type type; The types of entity relationships include: distribution relationships, composition relationships, spatiotemporal relationships, sedimentary environment relationships, tectonic relationships, and reservoir relationships.
14. The apparatus as claimed in claim 8, characterized in that, The knowledge graph construction module is specifically used for: Calculate the similarity between entity descriptions of the same entity type, merge entity descriptions with similarity higher than the second threshold, and obtain the key information of the document after knowledge fusion. Using key information from literature after knowledge fusion, a lithofacies paleogeographic knowledge map is constructed.
15. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.
17. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Knowledge graph construction system and method based on cue words
CN119443253A