Fracturing document knowledge extraction method and device

CN123014133APending Publication Date: 2026-10-30CHINA UNIV OF PETROLEUM (BEIJING)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611142195.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

所述压裂文档大多以Word、PDF、图片等非结构化形式散落在各个业务系统中,存在格式不统一、存档不规范、版本混乱等问题

Benefits of technology

[0016]本说明书实施例的技术方案,在压裂文档中获取当前批次文档的文本信息作为待处理文本信息,所述待处理文本信息包括当前批次文档的原始文本内容流与光学识别内容流,所述前向约束信息包括Markdown文档中当前批次文档的上一页文档所对应的Markdown格式文本,所述后向约束信息包括压裂文档中当前批次文档的下一页文档的原始文本内容流和光学识别内容流,所述原始文本内容流通过采用第一文本提取方式对当前批次文档进行解析得到,所述光学识别内容流通过采用第二文本提取方式对当前批次文档进行解析得到;可以根据前向约束信息和后向约束信息,将待处理文本信息中的原始文本内容流与光学识别内容流整合并重构为Markdown格式文本;可以将生成的Markdown格式文本写入Markdown文档;可以将压裂文档中当前批次文档的后续N页文档确定为新的当前批次文档;可以在迭代结束后,将Markdown文档切分为多个语义文本块;可以在所述多个语义文本块选择高价值文本块;可以利用大语言模型对高价值文本块进行知识提取,得到压裂知识库。这样,本说明书实施例可以从压裂文档中提取知识,从而将压裂文档中的知识存储至可供计算机读取与理解的压裂知识库。另外,本说明书实施例可以通过迭代获取当前批次文档的文本信息,并结合前向约束(上一页文档的Markdown文本)与后向约束(下一页文档的原始文本内容和光学识别内容),在批量生成Markdown格式文本的过程中,能够自动识别并修复跨页表格的行列断裂、跨页段落的语句中断等问题,确保所生成的Markdown文档结构连贯、语义完整,从而有效克服了传统单页处理方式导致的上下文逻辑断裂缺陷,进而为后续的知识提取提供了高质量的结构化输入。另外,原始文本内容流通过采用第一文本提取方式对当前批次文档进行解析得到,光学识别内容流通过采用第二文本提取方式对当前批次文档进行解析得到。不同文本提取方式的读取解析结果在待处理文本信息中可以形成互补,从而可以避免单个文本提取方式可能会出现的文本内容或者格式方面的遗漏或者错误等,实现文档内容更为完整和正确的识别和读取,从而为重构为标准化的Markdown格式文本提供高质量的基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014133A_ABST
    Figure CN123014133A_ABST
Patent Text Reader

Abstract

The present specification relates to the technical field of oil and gas exploration, and particularly relates to a fracturing document knowledge extraction method and device. The method comprises: iteratively performing the following steps: obtaining an original text content stream and an optical recognition content stream of a current batch of documents, the original text content stream being obtained by parsing the current batch of documents by using a first text extraction method, and the optical recognition content stream being obtained by parsing the current batch of documents by using a second text extraction method; integrating and reconstructing the original text content stream and the optical recognition content stream into a Markdown format text according to forward constraint information and backward constraint information, and writing the Markdown format text into a Markdown document; determining the next N pages of documents of the current batch of documents as new current batch of documents; after the iteration is completed, selecting a high-value text block in the Markdown document and performing knowledge extraction on the high-value text block by using a large language model to obtain a fracturing knowledge base. The embodiments of the present specification can obtain the fracturing knowledge base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual relates to the field of oil and gas exploration technology, and in particular to a method and apparatus for extracting knowledge from fracturing documents. Background Technology

[0002] During the long-term development of oil and gas fields, a massive amount of fracturing documents have been accumulated. These documents can include historical fracturing engineering documents such as design schemes and construction summaries. Most of these documents are scattered across various business systems in unstructured formats such as Word, PDF, and images, resulting in inconsistent formats, non-standard archiving, and version chaos. This loose data management model leaves high-value engineering parameters and expert experience dormant, making them difficult for computers to directly read and understand. This severely hinders the effective reuse of knowledge and fails to provide a high-quality structured data foundation for the current intelligent transformation of oil and gas fields (such as production capacity prediction and parameter optimization). Therefore, there is an urgent need for a fracturing document knowledge extraction method to efficiently manage multi-source, heterogeneous fracturing documents, thereby transforming unstructured information into technical solutions that can be read and understood by computers. Summary of the Invention

[0003] This specification provides a method and apparatus for extracting knowledge from fracturing documents, thereby storing the knowledge in the fracturing documents into a fracturing knowledge base that can be read and understood by a computer.

[0004] This specification provides an embodiment of a method for extracting knowledge from fracturing documents, including: Iteratively execute the following steps until the preset conditions are met: The text information of the current batch of documents is obtained from the fracturing document as the text information to be processed. The fracturing document is a multi-page document. The text information to be processed includes the original text content stream and the optical recognition content stream of the current batch of documents. The original text content stream is obtained by parsing the current batch of documents using a first text extraction method. The optical recognition content stream is obtained by parsing the current batch of documents using a second text extraction method. Obtain the forward constraint information and backward constraint information of the text information to be processed. The forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document. The backward constraint information includes the text content of the next page of the current batch of documents in the fracturing document and the optical recognition content. Based on the forward and backward constraint information, the original text content stream and the optical recognition content stream in the text information to be processed are integrated and reconstructed into Markdown format text; Write Markdown formatted text into a Markdown document; The next N pages of documents in the current batch of fracturing documents are identified as the new current batch of documents; After the iteration is complete, the Markdown document is divided into multiple semantic text blocks; Select the high-value text block from the plurality of semantic text blocks; A fracturing knowledge base is obtained by extracting knowledge from high-value text blocks using a large language model.

[0005] In some embodiments, integrating and reconstructing the original text content stream and optical recognition content stream in the text information to be processed into Markdown format text includes: The text information to be processed, the forward constraint information, and the backward constraint information are input into the large language model, so that the large language model integrates and reconstructs the original text content stream and optical recognition content stream in the text information to be processed into Markdown format text based on the forward constraint information and the backward constraint information.

[0006] In some embodiments, selecting high-value text blocks from the plurality of semantic text blocks includes: Determine the first semantic similarity between the keywords in the knowledge dictionary and each semantic text block, and calculate the second semantic similarity between the knowledge dictionary and the semantic text block based on the first semantic similarity of the keywords; Select the candidate semantic text blocks with the highest second semantic similarity from the plurality of semantic text blocks; Construct query text based on the knowledge dictionary; Calculate the relevance score between the query text and each candidate semantic text block; The text block with the highest relevance score among the multiple candidate semantic text blocks is selected as the high-value text block.

[0007] In some embodiments, the query text includes multiple subquery texts; The step of constructing the query text based on the knowledge dictionary includes: The keywords in the knowledge dictionary are divided into multiple keyword groups; Construct corresponding subquery text based on each keyword group; The calculation of the relevance score between the query text and each candidate semantic text block includes: For each candidate semantic text block, calculate the sub-relevance score between each subquery text and the candidate semantic text block. Aggregate the sub-relevance scores of multiple subquery texts to obtain the relevance score of the candidate semantic text block.

[0008] In some embodiments, selecting the plurality of candidate semantic text blocks with the highest second semantic similarity from the plurality of semantic text blocks includes: The multiple semantic text blocks are sorted in descending order of second semantic similarity; Select the Kth semantic text block and the (K+1)th semantic text block from the sorted semantic text blocks; Calculate the difference between the second semantic similarity of the Kth semantic text block and the (K+1)th semantic text block; If the difference is less than the preset threshold, K is incremented by 1, and the steps of selecting the Kth and K+1th semantic text blocks and calculating the difference are continued until the difference is greater than or equal to the preset threshold or K reaches the preset maximum value. If the difference is greater than or equal to a preset threshold or K reaches a preset maximum value, the top K semantic text blocks are selected as candidate semantic text blocks from the sorted semantic text blocks.

[0009] In some embodiments, the number of high-value text blocks is multiple; The method of extracting knowledge from high-value text blocks using a large language model to obtain a fracturing knowledge base includes: Multiple high-value text blocks are spliced ​​together according to their position order in the fracturing document; The concatenated result is input into a large language model for knowledge extraction to obtain the extraction result; the extraction result includes structured data and unstructured data, and the structured data includes parameter names and parameter values; Save the structured data to a structured database; Extract the feature vectors from the unstructured data and save the feature vectors to a vector database.

[0010] In some embodiments, the segmentation of the Markdown document into multiple semantic text blocks includes: Based on the granularity of segmentation, the Markdown document is segmented into multiple semantic text blocks; The process of inputting the concatenated result into a large language model for knowledge extraction yields the following results: The concatenated result is input into a large language model for knowledge extraction, resulting in the extraction result and its confidence score. If the confidence score is less than or equal to a preset score threshold, the segmentation granularity is reduced. Based on the reduced segmentation granularity, the following steps are repeated: segmenting the Markdown document, determining the first semantic similarity, calculating the second semantic similarity, selecting candidate semantic texts, constructing the query text, calculating the relevance score, selecting high-value text blocks, and extracting knowledge.

[0011] In some embodiments, the method further includes: Select a target prompt template that matches the splicing result from the prompt template set. The prompt template set includes one or more prompt templates, and each prompt template corresponds to multiple extraction examples. Based on the splicing results, select target keywords from the knowledge dictionary; Select the target extraction example that matches the splicing result from the multiple extraction examples corresponding to the target prompt template; Fill the target extraction example and target keywords into the target prompt template to obtain the prompt information; The process of inputting the concatenated result into a large language model for knowledge extraction yields the following results: The concatenated results and prompts are input into a large language model for knowledge extraction, yielding the extraction results.

[0012] This specification also provides an embodiment of a fracturing document knowledge extraction device, including: An iterative unit is used to iteratively execute the following steps until a preset condition is met: Obtaining text information of the current batch of documents from the fracturing document as text information to be processed; the fracturing document is a multi-page document; the text information to be processed includes the original text content stream and the optical recognition content stream of the current batch of documents; the original text content stream is obtained by parsing the current batch of documents using a first text extraction method, and the optical recognition content stream is obtained by parsing the current batch of documents using a second text extraction method; obtaining forward constraint information and backward constraint information of the text information to be processed; the forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document, and the backward constraint information includes the text content and optical recognition content of the next page of the current batch of documents in the fracturing document; integrating and reconstructing the original text content stream and the optical recognition content stream in the text information to be processed into Markdown format text based on the forward and backward constraint information; writing the Markdown format text into a Markdown document; and determining the subsequent N pages of the current batch of documents in the fracturing document as the new current batch of documents. The segmentation unit is used to segment the Markdown document into multiple semantic text blocks after the iteration is complete; A selection unit is used to select high-value text blocks from the plurality of semantic text blocks; The extraction unit is used to extract knowledge from high-value text blocks using a large language model to obtain a fracturing knowledge base.

[0013] This specification also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described fracturing document knowledge extraction method.

[0014] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described fracturing document knowledge extraction method.

[0015] This specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described fracturing document knowledge extraction method.

[0016] The technical solution of this specification embodiment obtains the text information of the current batch document in the fracturing document as the text information to be processed. The text information to be processed includes the original text content stream and the optical recognition content stream of the current batch document. The forward constraint information includes the Markdown format text corresponding to the previous page of the current batch document in the Markdown document. The backward constraint information includes the original text content stream and the optical recognition content stream of the next page of the current batch document in the fracturing document. The original text content stream is obtained by parsing the current batch document using a first text extraction method, and the optical recognition content stream is obtained by using a second text extraction method. The method involves parsing the current batch of documents; integrating and reconstructing the original text content stream and optical recognition content stream from the text information to be processed into Markdown format text based on forward and backward constraint information; writing the generated Markdown format text into a Markdown document; determining the subsequent N pages of documents in the current batch of documents as the new current batch of documents; dividing the Markdown document into multiple semantic text blocks after iteration; selecting high-value text blocks from the multiple semantic text blocks; and using a large language model to extract knowledge from the high-value text blocks to obtain a fracturing knowledge base. Thus, the embodiments of this specification can extract knowledge from fracturing documents and store the knowledge in the fracturing documents in a fracturing knowledge base that can be read and understood by a computer. Furthermore, the embodiments in this specification can iteratively obtain the text information of the current batch of documents and combine forward constraints (Markdown text of the previous page) and backward constraints (original text content and optical recognition content of the next page) to automatically identify and repair problems such as row and column breaks in cross-page tables and sentence interruptions in cross-page paragraphs during the batch generation of Markdown format text. This ensures that the generated Markdown document has a coherent structure and complete semantics, effectively overcoming the contextual logic breakage defects caused by traditional single-page processing methods, and thus providing high-quality structured input for subsequent knowledge extraction. In addition, the original text content stream is obtained by parsing the current batch of documents using the first text extraction method, and the optical recognition content stream is obtained by parsing the current batch of documents using the second text extraction method. The reading and parsing results of different text extraction methods can complement each other in the text information to be processed, thereby avoiding omissions or errors in text content or format that may occur with a single text extraction method. This achieves more complete and accurate recognition and reading of document content, thus providing a high-quality foundation for reconstruction into standardized Markdown format text. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the fracturing document knowledge extraction method in the embodiments of this specification; Figure 2 This is a flowchart illustrating the process of dividing a fracturing document into multiple semantic text blocks in an embodiment of this specification. Figure 3 This is a schematic diagram illustrating the process of selecting high-value text blocks from multiple semantic text blocks in an embodiment of this specification. Figure 4 This is a functional structure diagram of the fracturing document knowledge extraction device in the embodiments of this specification. Detailed Implementation

[0019] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. The specific embodiments described herein are only used to explain this disclosure, and not to limit this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure are within the scope of protection of this disclosure. In addition, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0020] This specification provides a method for extracting knowledge from fracturing documents. The method can be applied to computer devices. These computer devices may include personal computers, smartphones, tablets, laptops, servers, and server clusters comprising multiple servers. Please refer to... Figure 1 The method may include the following steps.

[0021] Step 11: Divide the fracturing document into multiple semantic text blocks.

[0022] In some embodiments, fracturing documentation may include historical documents related to fracturing projects, such as design schemes and construction summaries. Fracturing documentation includes knowledge in the field of fracturing. This knowledge may include structured and unstructured knowledge. Structured knowledge may include key engineering parameters and their values, such as fracturing pressure, sand ratio, displacement, sand injection intensity, and casing pressure. Unstructured knowledge may include unstructured experiential knowledge such as descriptions of construction anomalies, geological features, and wellbore structure.

[0023] In some embodiments, the number of fracturing documents can be one or more. Fracturing documents can be obtained from a data lake. A data lake is a centralized storage system for storing massive amounts of raw data, capable of storing structured, semi-structured, and unstructured data. Fracturing documents include text documents, tabular documents, and layout documents. Text documents can include documents in formats such as doc, wps, rtf, and txt. Tabular documents can include documents in formats such as xls, csv, and et. Layout documents can include documents in formats such as ppt and pptx, and can also include documents in image formats (e.g., jpg, png, tif).

[0024] In some embodiments, the fracturing document can be preprocessed, and the preprocessed fracturing document can be segmented into multiple semantic text blocks. The preprocessing includes format conversion. For fracturing documents originating from a data lake, automatic file type identification and standardization conversion can be performed to uniformly convert the fracturing document into a computer-readable format suitable for subsequent processing workflows. This eliminates edit protection and non-standard character encoding in the fracturing document, ensuring that the document content can be fully read by automated parsing tools. For example, for text documents, formats such as doc, wps, rtf, and txt can be uniformly converted to the standard docx format to eliminate compatibility issues and remove the editing lock. For table documents, formats such as xls, csv, and et can be uniformly converted to the standard xlsx format to ensure the parsability of the table structure. For layout documents, formats such as ppt and pptx, as well as image formats, can be uniformly converted to a high-definition PDF format that can be recognized by OCR.

[0025] In some embodiments, the fracturing document can be a multi-page document. See also Figure 2The following steps can be iteratively executed until preset conditions are met: Obtain the text information of the current batch of documents in the fracturing document as the text information to be processed; obtain the forward constraint information and backward constraint information of the text information to be processed, wherein the forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document, and the backward constraint information includes the text content and optical recognition content of the next page of the current batch of documents in the fracturing document; generate Markdown format text based on the text information to be processed, the forward constraint information, and the backward constraint information; write the generated Markdown format text into the Markdown document; and use the subsequent N pages of documents of the current batch of documents in the fracturing document as the new current batch of documents.

[0026] After the iteration is complete, the Markdown document can be divided into multiple semantic text blocks.

[0027] Therefore, the embodiments of this specification can iteratively obtain the text information of the current batch of documents, and combine forward constraints (Markdown text of the previous page document) and backward constraints (original text of the next page document) to automatically identify and repair problems such as row and column breaks in cross-page tables and sentence breaks in cross-page paragraphs during the batch generation of Markdown format text. This ensures that the generated Markdown document has a coherent structure and complete semantics, thereby effectively overcoming the contextual logic breakage defects caused by traditional single-page processing methods, and thus providing high-quality structured input for subsequent knowledge extraction.

[0028] The current batch of documents can include consecutive multi-page documents from the fracturing document. Therefore, in each iteration, the batch of multi-page documents can be semantically reconstructed using Markdown to obtain the corresponding Markdown format text. For example, the current batch of documents can include pages M to M+N-1 from the fracturing document. M represents the starting page number of the current batch of documents. N represents the number of pages processed in the multi-page batch. The size of N can be determined based on the maximum context window length of the large language model. N can be, for example, 8. A first method can be used to read and parse each page of the current batch of documents to obtain the original text content stream of the current batch of documents. This first method can be a text extraction method based on a document parsing library, such as using a tool library like python-docx to directly extract editable text content from the underlying encoding of the document. A second method can be used to read and parse each page of the current batch of documents to obtain the optical character recognition (OCR) content stream of the current batch of documents. This second method can be a text extraction method based on Optical Character Recognition (OCR), such as converting the document into an image and then performing text recognition to extract the character content. The text information to be processed can include the original text content stream and the optical recognition content stream of the current batch of documents. Each page of the current batch of documents can include original text, tables, and images. The first method performs well in parsing plain text, but poorly in parsing tables and images. The second method performs well in parsing tables and images, but poorly in parsing plain text. The text information to be processed includes the original text content stream and the optical recognition content stream. Therefore, the reading and parsing results of different text extraction methods can complement each other in the text information to be processed, thus avoiding omissions or errors in text content or formatting that might occur with a single text extraction method, achieving more complete and accurate recognition and reading of document content. The large language model can subsequently integrate the reading and parsing results of different text extraction methods to obtain Markdown formatted text, improving the completeness and accuracy of the Markdown formatted text.

[0029] The forward constraint information can include the Markdown formatted text corresponding to the previous page of the current batch of documents in the Markdown document. For example, if the current batch of documents can include pages M to M+N-1 of the fracturing document, then the forward constraint information can include the Markdown formatted text corresponding to page M-1. Therefore, the Markdown semantic reconstruction result of page M-1 can be used as the preceding context constraint. The backward constraint information can include the text content and / or optical recognition content of the next page of documents. The next page of documents can include original text and / or images. The original text of the next page of documents can be extracted to obtain the text content of the next page of documents. OCR recognition can be performed on the images of the next page of documents to obtain the optical recognition content of the next page of documents. For example, if the current batch of documents can include pages M to M+N-1 of the fracturing document, then the backward constraint information can include the optical recognition content of page M+N. Therefore, the OCR recognition result of page M+N can be used as the following context constraint. This achieves bidirectional constraints between the preceding and following contexts of the current batch of documents.

[0030] The text to be processed, forward constraints, and backward constraints can be input into the Large Language Model (LLM). The LLM can then integrate and reconstruct the text into standardized Markdown format based on these constraints. Forward constraints ensure logical continuity with the preceding text, while backward constraints predict whether tables or paragraphs will be truncated at the end of the batch. For example, if the next page content in the backward constraint displays a continuation of the same table, the LLM will merge the table rows from the preceding and following pages and remove duplicate headers, thus resolving the issue of table breaks across pages. The LLM uses contextual constraints to concatenate paragraphs across pages, ensuring semantic coherence and outputting logically complete and structurally continuous Markdown text, thus resolving the problems of table breaks across pages and inconsistent contextual logic.

[0031] As mentioned earlier, the text information to be processed includes the original text content stream and the optical recognition content stream of the current batch of documents. The original text content stream is obtained through the first method, and the optical recognition content stream is obtained through the second method. The reading and parsing results of different text extraction methods can complement each other in the text information to be processed. The large language model can integrate and process the reading and parsing results of different text extraction methods to obtain Markdown format text. For example, the large language model can integrate and process the original text content stream and the optical recognition content stream to obtain the target text information. Based on the forward constraint information and the backward constraint information, the target text information can be integrated and reconstructed into standardized Markdown format text. Specifically, the large language model can compare the original text content stream and the optical recognition content stream. For each position, the large language model compares the text content at that position in the original text content stream with the text content at that position in the optical recognition content stream. If they match, the text content at that position can be used as the text content at that position in the target text information. If they do not match, the model determines the credibility of the text content at that position in the original text content stream and the text content at that position in the optical recognition content stream based on rules such as contextual semantics, character recognition confidence, and format integrity. The model can then select the text content with higher credibility as the text content at that position in the target text information. The aforementioned positions refer to the text sequence positions in the content stream arranged in natural reading order, such as word positions, sentence positions, and paragraph positions. Thus, the large language model can compare and verify two text contents at the same position, using the complementary relationship between the two content streams to compensate for their respective recognition deficiencies or format loss problems in specific formats (such as tables and images). At the same time, it uses multi-dimensional rules such as contextual semantics, recognition confidence, and format integrity to adjudicate inconsistent parts, thereby generating a more complete and more accurately formatted target text information, providing a high-quality foundation for subsequent reconstruction into standardized Markdown format text.

[0032] For example, the structure of Markdown formatted text can be shown in Table 1 below.

[0033] Table 1

[0034] After generating the corresponding Markdown format text based on the current batch of documents, the Markdown format text of the current batch of documents can be written into a Markdown document; the subsequent N pages of documents of the current batch of documents can be obtained from the fracturing document as the new current batch of documents; the next iteration can be performed based on the new current batch of documents.

[0035] The preset conditions can be iteration stopping conditions. For example, the preset conditions may include: the starting page number of the current batch of documents is greater than the total number of pages in the fracturing documents, and there are no subsequent pages in the fracturing documents that have not been reconstructed using Markdown.

[0036] Markdown is a lightweight markup language that allows documents to be written in an easy-to-read and easy-to-write plain text format, and describes document structure through simple markup symbols. Markdown documents have good readability and cross-platform compatibility. The embodiments in this specification can reconstruct fracturing documents into Markdown documents, thereby eliminating format differences between documents from different sources.

[0037] After the iteration, the fracturing document can be reconstructed into a Markdown document. Semantic segmentation can be performed on the Markdown document to obtain multiple semantic text blocks. The Markdown document can be segmented into multiple semantic text blocks based on the segmentation granularity. The segmentation granularity limits the maximum length of the semantic text block. The maximum length of the semantic text block is less than or equal to the segmentation granularity. The segmentation granularity can be represented by the number of characters, tokens, bytes, etc. For example, the segmentation granularity is 512 tokens.

[0038] Optionally, a Markdown document can be segmented into multiple semantic text blocks based on the segmentation granularity and the document's structural boundaries. These structural boundaries can include paragraph boundaries and subheadings (such as Markdown's first-level and second-level headings). These boundaries ensure that the semantic text blocks are relatively complete and independent in content, preventing the content of a complete paragraph or subheading from being split into different text blocks. In practical applications, content can be read backwards from the document's beginning position or the end position of the last segmentation, accumulating the length of the read content. When the accumulated length reaches the segmentation granularity, it is determined whether the current accumulated length position belongs to a structural boundary. If so, segmentation is performed at the position where the accumulated length reaches the segmentation granularity to obtain a semantic text block; otherwise, segmentation can be performed back to the most recent structural boundary. This segmentation process is constrained by the length of the segmentation granularity while also recognizing the document's inherent paragraph and subheading structure, ensuring that each generated semantic text block maintains thematic integrity and logical coherence while having an appropriate length.

[0039] Step 12: Select high-value text blocks from the plurality of semantic text blocks.

[0040] In some embodiments, high-value text blocks can be semantic text blocks that are highly relevant to fracturing domain knowledge. The plurality of semantic text blocks may include semantic text blocks that are unrelated to or have a low degree of relevance to fracturing domain knowledge. Therefore, high-value text blocks can be selected from the plurality of semantic text blocks to improve the accuracy and recall completeness of subsequent large language model knowledge extraction.

[0041] Please see Figure 3 The step of selecting high-value text blocks from the plurality of semantic text blocks may include the following steps.

[0042] Step 121: Determine the first semantic similarity between the keywords in the knowledge dictionary and each semantic text block, and calculate the second semantic similarity between the knowledge dictionary and the semantic text block based on the first semantic similarity of the keywords.

[0043] In some embodiments, the knowledge dictionary is a fracturing domain knowledge dictionary, which may include one or more keywords related to fracturing. The knowledge dictionary may include a key parameter value dictionary, a key parameter knowledge dictionary, and a similar semantic dictionary. The key parameter value dictionary is used to define the engineering numerical parameters to be extracted, their physical units, and numerical range constraints. The key parameter value dictionary includes keywords, which include the standard names of the engineering numerical parameters. Each keyword is associated with a standard physical unit and numerical range constraint to ensure the accuracy of the physical meaning of the extracted data. The key parameter knowledge dictionary is used to define the knowledge of unstructured empirical descriptions to be extracted. The key parameter knowledge dictionary includes keywords, which are thematic keywords used to describe the knowledge. Each keyword indicates the unstructured empirical description to be extracted. The similar semantic dictionary is used to represent keyword parameters with similar semantics. The similar semantic dictionary includes keywords, which include standard terms and their synonyms, aliases, abbreviations, etc., to improve the recall rate of keyword matching.

[0044] Tables 2, 3, and 4 show the dictionary of key parameter values, the dictionary of key parameter knowledge, and the dictionary of similar semantics, respectively.

[0045] Table 2

[0046] In Table 2, keywords may include "target formation", "wellbore structure", "fracture pressure", and "sand ratio".

[0047] Table 3

[0048] In Table 3, keywords may include "abnormality", "sand blockage", "porosity", "diameter", etc.

[0049] Table 4

[0050] In Table 4, keywords may include "displacement", "pumping rate", "sand intensity", "casing pressure", etc.

[0051] In some embodiments, a user's knowledge extraction request can be received; a fracturing domain knowledge dictionary can be constructed for the knowledge extraction request, so as to extract knowledge from fracturing documents according to the fracturing domain knowledge dictionary, thereby storing the knowledge in the fracturing documents into a fracturing knowledge base that can be read and understood by a computer.

[0052] In some embodiments, the fracturing domain knowledge dictionary includes one or more keywords. Each keyword in the fracturing domain knowledge dictionary can be converted into a keyword vector using an embedding model. There are multiple linguistic text blocks. Each semantic text block can be converted into a text block vector using the same embedding model. The cosine similarity between each keyword vector and the text block vector can be calculated as the first semantic similarity between the keyword and the semantic text block. The embedding model is used to convert text into high-dimensional dense vectors. Embedding models include BGE-large-zh, text2vec-large-chinese, OpenAI text-embedding-ada-002, etc. Therefore, for each keyword in each fracturing domain knowledge dictionary, the first semantic similarity between the keyword and each semantic text block can be obtained.

[0053] For each semantic text block, multiple first semantic similarities can be aggregated to obtain a second semantic similarity for that semantic text block. The second semantic similarity represents the semantic similarity between the semantic text block and the knowledge dictionary. Aggregation methods can include adding multiple first semantic similarities, calculating the average of multiple first semantic similarities, selecting the median of multiple first semantic similarities, selecting the maximum among multiple first semantic similarities, etc.

[0054] Step 122: Select multiple candidate semantic text blocks with the highest second semantic similarity from the multiple semantic text blocks.

[0055] In some embodiments, the K candidate semantic text blocks with the highest second semantic similarity can be selected from the plurality of semantic text blocks. K ≥ 1. K is an integer. As an example, K can be a pre-set fixed value. Thus, a preset number of candidate semantic text blocks can be selected from the plurality of semantic text blocks. As another example, K can also be variable. An initial value can be pre-set for K, which can be understood as the minimum number of candidate semantic text blocks. This initial value can be, for example, 2. The multiple semantic text blocks can be sorted in descending order of their second semantic similarity. The Kth and (K+1)th semantic text blocks can be selected from the sorted blocks. The difference between the second semantic similarity of the Kth and (K+1)th semantic text blocks can be calculated. If the difference is less than a preset threshold, K can be incremented by 1, and the steps of selecting the Kth and (K+1)th semantic text blocks and calculating the difference can continue until the difference is greater than or equal to the preset threshold or K reaches a preset maximum value. If the difference is greater than or equal to the preset threshold or K reaches the preset maximum value, the top K semantic text blocks are selected as candidate semantic text blocks from the sorted blocks. Therefore, the number K of candidate semantic text blocks can be dynamically determined based on the distribution characteristics of the second semantic similarity of the semantic text blocks, instead of using a fixed preset value. When the similarity difference between adjacent semantic text blocks K and K+1 is small, it indicates that multiple consecutive semantic text blocks are similarly relevant to the knowledge dictionary. At this point, K is automatically incremented, gradually expanding the range of the selected top K semantic text blocks, including these similar semantic text blocks as candidates, until the similarity between adjacent semantic text blocks significantly decreases (the difference is greater than or equal to a preset threshold) or K reaches the preset maximum number of candidates (e.g., 100, which can be configured according to system resources and accuracy requirements). In this way, the final selected top K semantic text blocks precisely cover all consecutive text blocks that are highly relevant to the knowledge dictionary. This avoids excluding highly relevant semantic text blocks due to a fixed K value that is too small, and also avoids including text blocks with significantly low relevance due to a fixed K value that is too large. This enhances the adaptive capability to fragmented document content and improves the accuracy and recall completeness of knowledge localization.

[0056] Step 123: Construct query text based on the knowledge dictionary.

[0057] In some embodiments, the knowledge dictionary includes multiple keywords, each representing a knowledge point that needs attention. Query text can be constructed based on the keywords in the knowledge dictionary. This query text represents the entire knowledge scope covered by the knowledge dictionary and can represent the overall semantics of the knowledge dictionary.

[0058] In some embodiments, keywords of interest can be extracted from a knowledge dictionary. For example, the knowledge dictionary may include a key parameter value dictionary, a key parameter knowledge dictionary, and a similar semantic dictionary. Standard names of engineering numerical parameters can be extracted from the key parameter value dictionary, topic keywords from the key parameter knowledge dictionary, and standard terms from the similar semantic dictionary. The extracted keywords of interest can be concatenated using delimiters to obtain the query text. Delimiters are used to separate different keywords of interest. Delimiters may include, for example, spaces. Alternatively, the extracted keywords of interest can be input into a large language model, which can then generate a coherent natural language text as the query text. In this way, compared to generating query text by concatenation, the query text generated by the large language model has the coherence and logic of natural language, can more accurately express the inherent connections and semantic structure between keywords in the knowledge dictionary, avoids the semantic fragmentation problem caused by concatenation, and is semantically closer to the overall meaning of the knowledge dictionary.

[0059] Step 124: Calculate the relevance score between the query text and each candidate semantic text block.

[0060] In some embodiments, a reranking model can be used to calculate the relevance score between the query text and each candidate semantic text block. Specifically, the query text and the candidate semantic text block can be input into the reranking model. The reranking model uses a cross-encoder architecture and employs an attention mechanism to enable deep interaction between the query text and the candidate semantic text block, outputting a relevance score between them. A higher relevance score indicates a greater semantic relevance between the candidate semantic text block and the overall semantics of the knowledge dictionary represented by the query text.

[0061] In some embodiments, query text can be directly constructed based on a knowledge dictionary, and then the relevance score between the query text and each candidate semantic text block can be calculated. Alternatively, considering that the length of a single query text may exceed the input length limit of the re-ranking model, or that the keywords in the knowledge dictionary involve multiple different semantic domains, mixing keywords from different domains in the same query text may dilute the semantic features of each domain. Therefore, the keywords in the knowledge dictionary can be divided into multiple keyword groups, and corresponding sub-query texts can be constructed based on each keyword group. For each candidate semantic text block, a sub-relevance score can be calculated between each sub-query text and that candidate semantic text block. The sub-relevance scores of multiple sub-query texts can be aggregated to obtain the relevance score of the candidate semantic text block.

[0062] Keywords of interest can be extracted from a knowledge dictionary. Semantic clustering methods can be used to divide the extracted keywords of interest into multiple keyword groups. For example, an embedding model can be used to convert the extracted keywords of interest into vectors, and then a clustering algorithm can be used to group these vectors into different clusters. Within each cluster, the keywords of interest corresponding to the vectors are semantically similar and can form a keyword group. The method of constructing subquery text based on keyword groups is similar to the method of constructing query text based on extracted keywords of interest; the two can be explained in comparison. The method of calculating the sub-relevance score between the subquery text and candidate semantic text blocks is similar to the method of calculating the relevance score between the query text and candidate semantic text blocks; the two can be explained in comparison. Aggregation methods can include adding multiple sub-relevance scores, calculating the average of multiple sub-relevance scores, selecting the median of multiple sub-relevance scores, etc.

[0063] Step 125: Select the text block with the highest relevance score from the multiple candidate semantic text blocks as the high-value text block.

[0064] In some embodiments, the N high-value text blocks with the highest relevance scores can be selected from a plurality of candidate semantic text blocks. N ≥ 1, where N is an integer. N is a preset value. The number of candidate semantic text blocks can be compared with N; if the number of candidate semantic text blocks is greater than or equal to N, the N high-value text blocks with the highest relevance scores can be selected from the plurality of candidate semantic text blocks; if the number of candidate semantic text blocks is less than N, all candidate semantic text blocks can be used as high-value text blocks.

[0065] Therefore, by calculating the first and second semantic similarities, candidate semantic text blocks with high relevance to the overall knowledge dictionary can be quickly filtered from a large number of semantic text blocks, significantly reducing the scope requiring in-depth processing. Then, by constructing query text and calculating the relevance score between the query text and the candidate semantic text blocks, the most relevant high-value text blocks are further selected from the candidate semantic text blocks. This effectively filters out semantically deviating text blocks, obtaining the most relevant high-value text blocks to the overall knowledge dictionary, thereby improving the accuracy and recall completeness of subsequent knowledge extraction by the large language model. Finally, the high-value text blocks are input into the large language model for knowledge extraction. This avoids the waste of computational resources and processing delays caused by directly feeding the entire semantic text block into the large language model, effectively filters irrelevant or noisy information, significantly improves the accuracy and efficiency of knowledge extraction, and achieves precise positioning and rapid extraction of knowledge from fragmented documents.

[0066] Of course, other methods can also be used to select high-value text blocks from the multiple semantic text blocks.

[0067] For example, a fracturing domain knowledge dictionary includes one or more keywords. Each keyword in the fracturing domain knowledge dictionary can be converted into a keyword vector using an embedding model. The cosine similarity between each keyword vector and the text block vector can be calculated as the first semantic similarity between the keyword and the semantic text block. For each keyword, the cosine similarity between the keyword vector corresponding to the keyword and each text block vector can be calculated as the first semantic similarity between the keyword and the semantic text block. Then, for each keyword, based on the first semantic similarity between the keyword and each semantic text block, several semantic text blocks with the highest similarity to the keyword can be selected from high to low; the semantic text blocks selected for all keywords can be merged and deduplicated to obtain multiple candidate semantic text blocks. A query text can be constructed based on the knowledge dictionary; the relevance score between the query text and each candidate semantic text block can be calculated; the text block with the highest relevance score can be selected from the multiple candidate semantic text blocks as the high-value text block.

[0068] Step 13: Use a large language model to extract knowledge from high-value text blocks to obtain a fracturing knowledge base.

[0069] In some embodiments, the positional order of each high-value text block in the fracturing document can be determined; multiple high-value text blocks can be concatenated according to their positional order in the fracturing document; the concatenation result can be input into a large language model for knowledge extraction to obtain the extraction result; the extraction result includes structured data and unstructured data; the structured data can be saved to a structured database; the feature vector of the unstructured data can be obtained and saved to a vector database.

[0070] After segmenting the fracturing document into multiple semantic text blocks, positional information can be configured for each semantic text block. Positional information indicates the location of the semantic text block within the fracturing document. This information may include, for example, the starting page number and position sequence number of the semantic text block within the document. High-value text blocks are selected from multiple semantic text blocks and therefore possess positional information. The positional order of each high-value text block within the fracturing document can be determined based on its positional information. Multiple high-value text blocks are then concatenated according to their positional order within the fracturing document. This ensures that the concatenation result maintains the logical coherence of the content, preventing the large language model from misunderstanding causal or referential relationships due to disordered order, thus improving the accuracy and consistency of knowledge extraction. The structured data may include parameter names and values ​​in key-value pair format. This structured data can be saved to a structured database (e.g., a MySQL database) for precise querying. The unstructured data may include knowledge description data, such as process descriptions of construction anomalies, qualitative descriptions of geological features, and experience summaries of fracturing design. The unstructured data lacks a fixed field structure and typically exists in the form of natural language paragraphs. It can be vectorized and stored in a vector database for semantic similarity retrieval.

[0071] Large language models can include those with 14 to 72 parameters (such as Qwen3 and DeepSeek-V3) and employ Int8 or Int4 quantization techniques. This approach ensures both extraction accuracy and inference efficiency.

[0072] In some embodiments, the fracturing document can be segmented into multiple semantic text blocks according to the segmentation granularity. After inputting the concatenated result into a large language model for knowledge extraction, the extraction result output by the large language model and the confidence score of the extraction result can be obtained. The confidence score is used to represent the overall credibility or quality level of the extraction result. The confidence score of the extraction result can be compared with a preset score threshold. If the confidence score is greater than the preset score threshold, it indicates that the extraction result is credible or of high quality, and the structured data can be saved to a structure database, and the feature vectors of the unstructured data can be saved to a vector database. If the confidence score is less than or equal to the preset score threshold, it indicates that the extraction result is unreliable or of low quality, and the segmentation granularity can be reduced. By reducing the segmentation granularity, the text range contained in each semantic text block is smaller, and redundant information unrelated to the knowledge dictionary is also reduced. The semantic text block is more focused on the local area that may contain the knowledge to be extracted. In this way, when performing knowledge extraction through the large language model, the large language model needs to process less noise, thereby improving the accuracy of the large language model in identifying key knowledge and the extraction confidence. Specifically, based on the reduced segmentation granularity, the following steps can be repeatedly executed: document segmentation, determination of the first semantic similarity, calculation of the second semantic similarity, selection of candidate semantic text, construction of query text, calculation of relevance score, selection of high-value text blocks, and knowledge extraction. This will yield new extraction results. These new extraction results can include new structured data and new unstructured data. The new structured data can be saved to a structured database, and the feature vectors of the new unstructured data can be saved to a vector database.

[0073] In some embodiments, a set of prompt templates can be provided. The set of prompt templates may include one or more prompt templates, each corresponding to multiple extraction examples. A target prompt template matching the concatenation result can be selected from the prompt template set; target keywords can be selected from the knowledge dictionary based on the concatenation result; a target extraction example matching the concatenation result can be selected from the multiple extraction examples corresponding to the target prompt template; the target extraction example and target keywords can be filled into the target prompt template to obtain prompt information; the concatenation result and prompt information can be input into a large language model for knowledge extraction to obtain extraction results. Thus, the most suitable prompt information can be dynamically assembled based on the content characteristics of different high-value text blocks. By dynamically assembling the most suitable prompt information, the large language model can obtain more accurate guidance during knowledge extraction, reduce interference from instructions unrelated to the content of high-value text blocks, and improve the accuracy and adaptability of knowledge extraction.

[0074] In the set of prompt templates, each prompt template corresponds to one or more index keywords. Index keywords represent the type of knowledge to which the prompt template applies. For example, the set of prompt templates may include fracturing construction parameter templates and geological parameter templates. Index keywords for fracturing construction parameter templates include "displacement," "sand ratio," and "fracture pressure," while index keywords for geological parameter templates include "porosity," "permeability," and "lithology." One or more keywords appearing in the knowledge dictionary can be extracted from the splicing results as target keywords. For each prompt template in the set of prompt templates, the index keywords of that prompt template can be matched with target keywords, and the number of successfully matched index keywords can be counted. The prompt template with the most successfully matched index keywords in the set can be selected as the target prompt template.

[0075] The prompt template is a pre-written text framework used to instruct the large language model to perform knowledge extraction tasks. The prompt template can include: role setting, task description, output format requirements, and sample examples. The role setting indicates the large language model's role in knowledge extraction and can also indicate the overall goal of the knowledge extraction task. For example, the role setting could be "You are a senior fracturing data extraction expert." The task description indicates the information the large language model needs to extract. The task description includes placeholders, which will be dynamically filled with target keywords selected from the knowledge dictionary. The output format requirements indicate the format of the large language model's output. For example, the output format requirements may instruct the large language model to output in JSON format and define the JSON key-name structure. The sample examples represent an example of the input text and standard output. The sample examples include placeholders, which will be dynamically filled with reference examples most similar to the current text block.

[0076] One or more keywords that have appeared in the knowledge dictionary can be extracted from the concatenated results as target keywords. These target keywords can then be used to replace placeholders in the task description section of the target prompt template. This allows the large language model to prioritize target keywords, improving the targeting and accuracy of knowledge extraction.

[0077] Within the set of prompt templates, each prompt template corresponds to one or more extraction examples. A target extraction example matching the concatenated result can be selected from among the multiple extraction examples corresponding to the target prompt template. For example, the concatenated result can be converted into a vector, the extraction example can be converted into a vector, the cosine similarity between the vector corresponding to the concatenated result and the vector corresponding to the extraction example can be calculated, and the extraction example with the highest cosine similarity can be selected as the target extraction example. The target extraction example can be used to replace placeholders in the sample example portion of the target prompt template. This provides the most semantically similar reference example for the concatenated result, enabling the large language model to more accurately understand the extraction format and content requirements, thus improving the accuracy and consistency of knowledge extraction.

[0078] For example, a certain prompt message can be shown in Table 5 below.

[0079] Table 5

[0080] In some scenario examples, the fracturing document might be a "Summary Report of Fracturing Operation in Well XX". The fracturing document can be in doc format. It can be converted to docx format. Then, using a large language model combined with text flow and OCR flow, and introducing contextual constraints from previous and subsequent pages, the fracturing document is reconstructed into continuous and complete Markdown text. Next, the Markdown document can be segmented to obtain multiple semantic text blocks. These semantic text blocks can be coarsely screened using embedding to obtain multiple candidate semantic text blocks; then, a Rerank model is used for fine-tuning to identify the most relevant high-value text blocks. Hints can be built for these high-value text blocks. The high-value text blocks and dynamic hints can be input into the large language model for knowledge extraction. The extraction results can include structured and unstructured data. Structured data can be stored in a structured database. Vectors of unstructured data can be stored in a vector database.

[0081] Please see Figure 4 This specification provides an embodiment of a fracturing document knowledge extraction device, which includes the following units.

[0082] Iteration unit 41 is used to iteratively execute the following steps until a preset condition is met: Obtaining text information of the current batch of documents from the fracturing document as text information to be processed, wherein the fracturing document is a multi-page document, and the text information to be processed includes the original text content stream and optical recognition content stream of the current batch of documents; Obtaining forward constraint information and backward constraint information of the text information to be processed, wherein the forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document, and the backward constraint information includes the text content and optical recognition content of the next page of the current batch of documents in the fracturing document; Generating Markdown format text based on the text information to be processed, the forward constraint information, and the backward constraint information; Writing the generated Markdown format text into the Markdown document; Determining the subsequent N pages of the current batch of documents in the fracturing document as the new current batch of documents; Segmentation unit 42 is used to segment the Markdown document into multiple semantic text blocks after the iteration is completed; Selection unit 43 is used to select high-value text blocks from the plurality of semantic text blocks; Extraction unit 44 is used to extract knowledge from high-value text blocks using a large language model to obtain a fracturing knowledge base.

[0083] This specification also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described fracturing document knowledge extraction method.

[0084] This specification also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described fracturing document knowledge extraction method.

[0085] This specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described fracturing document knowledge extraction method.

[0086] Those skilled in the art will understand that this specification can be provided as a method, system, or computer program product. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may 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.

[0087] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments thereof. It should 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. The computer may be a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0088] The functional units in the embodiments of this specification can be integrated into one processing unit, or each functional unit can exist physically separately, or two or more functional units can be integrated into one processing unit.

[0089] Those skilled in the art will understand that the descriptions of the various embodiments in this specification have different focuses, and parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. Furthermore, it is understood that those skilled in the art, after reading this specification, can conceive of any combination of some or all of the embodiments listed in this specification without creative effort, and such combinations are also within the scope of disclosure and protection of this specification.

[0090] Although this specification has been described through embodiments, those skilled in the art will understand that the above embodiments are merely illustrative of the core ideas of this specification. Those skilled in the art will appreciate that many variations and modifications are possible with this specification. It is intended that the appended claims encompass these variations and modifications without departing from the spirit of this specification.

Claims

1. A method for extracting knowledge from fracturing documents, characterized in that, include: Iteratively execute the following steps until the preset conditions are met: The text information of the current batch of documents is obtained from the fracturing document as the text information to be processed. The fracturing document is a multi-page document. The text information to be processed includes the original text content stream and the optical recognition content stream of the current batch of documents. The original text content stream is obtained by parsing the current batch of documents using a first text extraction method. The optical recognition content stream is obtained by parsing the current batch of documents using a second text extraction method. Obtain the forward constraint information and backward constraint information of the text information to be processed. The forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document. The backward constraint information includes the text content of the next page of the current batch of documents in the fracturing document and the optical recognition content. Based on the forward and backward constraint information, the original text content stream and the optical recognition content stream in the text information to be processed are integrated and reconstructed into Markdown format text; Write Markdown formatted text into a Markdown document; The next N pages of documents in the current batch of fracturing documents are identified as the new current batch of documents; After the iteration is complete, the Markdown document is divided into multiple semantic text blocks; Select the high-value text block from the plurality of semantic text blocks; A fracturing knowledge base is obtained by extracting knowledge from high-value text blocks using a large language model.

2. The method according to claim 1, characterized in that, The process of integrating and reconstructing the original text content stream and optical recognition content stream from the text information to be processed into Markdown format text includes: The text information to be processed, the forward constraint information, and the backward constraint information are input into the large language model, so that the large language model integrates and reconstructs the original text content stream and optical recognition content stream in the text information to be processed into Markdown format text based on the forward constraint information and the backward constraint information.

3. The method according to claim 1, characterized in that, The step of selecting high-value text blocks from the plurality of semantic text blocks includes: Determine the first semantic similarity between the keywords in the knowledge dictionary and each semantic text block, and calculate the second semantic similarity between the knowledge dictionary and the semantic text block based on the first semantic similarity of the keywords; Select the candidate semantic text blocks with the highest second semantic similarity from the plurality of semantic text blocks; Construct query text based on the knowledge dictionary; Calculate the relevance score between the query text and each candidate semantic text block; The text block with the highest relevance score among the multiple candidate semantic text blocks is selected as the high-value text block.

4. The method according to claim 3, characterized in that, The query text includes multiple sub-query texts; The step of constructing the query text based on the knowledge dictionary includes: The keywords in the knowledge dictionary are divided into multiple keyword groups; Construct corresponding subquery text based on each keyword group; The calculation of the relevance score between the query text and each candidate semantic text block includes: For each candidate semantic text block, calculate the sub-relevance score between each subquery text and the candidate semantic text block. Aggregate the sub-relevance scores of multiple subquery texts to obtain the relevance score of the candidate semantic text block.

5. The method according to claim 3, characterized in that, The step of selecting the candidate semantic text blocks with the highest second semantic similarity from the plurality of semantic text blocks includes: The multiple semantic text blocks are sorted in descending order of second semantic similarity; Select the Kth semantic text block and the (K+1)th semantic text block from the sorted semantic text blocks; Calculate the difference between the second semantic similarity of the Kth semantic text block and the (K+1)th semantic text block; If the difference is less than the preset threshold, K is incremented by 1, and the steps of selecting the Kth and K+1th semantic text blocks and calculating the difference are continued until the difference is greater than or equal to the preset threshold or K reaches the preset maximum value. If the difference is greater than or equal to a preset threshold or K reaches a preset maximum value, the top K semantic text blocks are selected as candidate semantic text blocks from the sorted semantic text blocks.

6. The method according to claim 1, characterized in that, The number of high-value text blocks is multiple; The method of extracting knowledge from high-value text blocks using a large language model to obtain a fracturing knowledge base includes: Multiple high-value text blocks are spliced ​​together according to their position order in the fracturing document; The concatenated result is input into a large language model for knowledge extraction to obtain the extraction result; the extraction result includes structured data and unstructured data, and the structured data includes parameter names and parameter values; Save the structured data to a structured database; Extract the feature vectors from the unstructured data and save the feature vectors to a vector database.

7. The method according to claim 6, characterized in that, The process of dividing a Markdown document into multiple semantic text blocks includes: Based on the granularity of segmentation, the Markdown document is segmented into multiple semantic text blocks; The process of inputting the concatenated result into a large language model for knowledge extraction yields the following results: The concatenated result is input into a large language model for knowledge extraction, resulting in the extraction result and its confidence score. If the confidence score is less than or equal to a preset score threshold, the segmentation granularity is reduced. Based on the reduced segmentation granularity, the following steps are repeated: segmenting the Markdown document, determining the first semantic similarity, calculating the second semantic similarity, selecting candidate semantic texts, constructing the query text, calculating the relevance score, selecting high-value text blocks, and extracting knowledge.

8. The method according to claim 6, characterized in that, The method further includes: Select a target prompt template that matches the splicing result from the prompt template set. The prompt template set includes one or more prompt templates, and each prompt template corresponds to multiple extraction examples. Based on the splicing results, select target keywords from the knowledge dictionary; Select the target extraction example that matches the splicing result from the multiple extraction examples corresponding to the target prompt template; Fill the target extraction example and target keywords into the target prompt template to obtain the prompt information; The process of inputting the concatenated result into a large language model for knowledge extraction yields the following results: The splicing results and prompts are input into a large language model for knowledge extraction, and the extraction results are obtained.

9. A fracturing document knowledge extraction device, characterized in that, include: An iterative unit is used to iteratively execute the following steps until a preset condition is met: obtaining the text information of the current batch of documents in the fracturing document as the text information to be processed, wherein the fracturing document is a multi-page document, and the text information to be processed includes the original text content stream and the optical recognition content stream of the current batch of documents, wherein the original text content stream is obtained by parsing the current batch of documents using a first text extraction method, and the optical recognition content stream is obtained by parsing the current batch of documents using a second text extraction method; Obtain the forward and backward constraint information of the text information to be processed. The forward constraint information includes the Markdown format text corresponding to the previous page of the current batch of documents in the Markdown document. The backward constraint information includes the text content and optical recognition content of the next page of the current batch of documents in the fracturing document. Based on the forward and backward constraint information, integrate and reconstruct the original text content stream and optical recognition content stream in the text information to be processed into Markdown format text. Write the Markdown format text into the Markdown document. Determine the next N pages of documents in the current batch of documents in the fracturing document as the new current batch of documents. The segmentation unit is used to segment the Markdown document into multiple semantic text blocks after the iteration is complete; A selection unit is used to select high-value text blocks from the plurality of semantic text blocks; The extraction unit is used to extract knowledge from high-value text blocks using a large language model to obtain a fracturing knowledge base.

10. A computer device, characterized in that, The computer device includes a processor and memory; The memory is used to store a computer program that can run on the processor, which, when executing the computer program, implements the instructions of the method according to any one of claims 1-8.