A structure-enhanced process knowledge base retrieval method for retrieval-enhanced generation

CN123030704APending Publication Date: 2026-11-03XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611094645.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing technologies, process knowledge resources are stored in a scattered manner and lack a unified structured organization, resulting in low retrieval efficiency, poor contextual integrity, low retrieval accuracy, and poor traceability of knowledge sources.

Method used

Multi-source heterogeneous process data is preprocessed to construct an attribute graph model oriented towards document structure. By combining graph databases and vector databases, collaborative retrieval of semantic matching and exact matching is achieved, and the context is restored through graph relationship expansion.

Benefits of technology

It improves the efficiency of organizing process knowledge, the accuracy of retrieval, and the completeness of context, and enables the traceability of knowledge sources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123030704A_ABST
    Figure CN123030704A_ABST
Patent Text Reader

Abstract

The application provides a structure-enhanced process knowledge base retrieval method for retrieval-enhanced generation, comprising: preprocessing and structurally analyzing multi-source heterogeneous process data to obtain block-level knowledge units and restore document structure information; constructing an attribute graph model containing hierarchical relationship and sequential relationship and storing in a graph database, converting the block-level knowledge units into semantic vectors and storing in a vector database, and establishing keyword and full-text retrieval indexes; receiving a user query, performing vector retrieval and keyword retrieval, fusing and reordering to obtain an initial candidate evidence set; according to the node identification of the knowledge fragments in the graph database, expanding adjacent knowledge fragments along the hierarchical relationship and the sequential relationship to obtain a traceable retrieval context and input a generation model, outputting process knowledge answers and corresponding knowledge sources and reference positions. The application improves the organization efficiency and retrieval accuracy of process knowledge, guarantees the completeness of the context, and realizes the traceability of the knowledge sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of technology, and more particularly to a method for retrieving a knowledge base of structure-enhanced processes based on retrieval enhancement. Background Technology

[0002] In the fields of intelligent manufacturing and industrial knowledge management, the processing of key components such as diesel engine cylinder heads, connecting rods, and engine blocks is typically characterized by long process chains, diverse types of process data, and dispersed knowledge sources. Enterprises have accumulated massive amounts of process knowledge resources over long-term production processes, including process specifications, process cards, historical processing cases, equipment data, tooling data, fixture data, process parameter ledgers, quality inspection records, and standards and specifications. These resources play a crucial supporting role in process design, process retrieval, and the reuse of process knowledge. However, these process knowledge resources are usually stored in various heterogeneous formats such as PDF, Word, Excel, PPT, scanned documents, image files, or mixed text and image documents, lacking a unified structured organization and efficient retrieval methods, which hinders the effective reuse and intelligent application of process knowledge.

[0003] In existing applications for enhancing the generation of process knowledge bases, text segmentation, vectorized embedding, and semantic similarity retrieval are commonly used. Relevant content from external knowledge bases is retrieved and input into a large language model to enhance the generated results. However, existing methods primarily rely on fixed-length or paragraph-boundary-based text segmentation strategies, failing to adequately utilize layout structure information such as heading levels, table structures, text-image relationships, and reading order in process documents. Due to the lack of a unified representation of document structure, multi-source heterogeneous process documents struggle to achieve a unified structured expression, resulting in low efficiency in organizing process knowledge. Ordinary text segmentation easily severs chapter hierarchical relationships and disrupts the connection between tables and explanatory text, leaving retrieved knowledge fragments lacking complete contextual information, leading to poor contextual integrity. Vector semantic retrieval struggles to accurately match proper nouns such as process terms and equipment models, while keyword retrieval tends to overlook semantically similar expressions. A single retrieval method cannot simultaneously address semantic matching and precise matching, resulting in low retrieval accuracy. Furthermore, the hierarchical and sequential relationships between knowledge fragments and source documents are not effectively recorded, making it difficult to trace retrieval results back to specific source documents, page numbers, and chapter positions, thus affecting the traceability of knowledge sources. Summary of the Invention

[0004] The purpose of this invention is to provide a structure-enhanced process knowledge base retrieval method for retrieval enhancement generation, which solves the problems of low organization efficiency, poor contextual integrity, low retrieval accuracy, and impact on the traceability of knowledge sources in existing technologies.

[0005] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions: The first aspect of this invention provides a method for retrieving a knowledge base of structural enhancement processes oriented towards retrieval enhancement generation, the method comprising: Preprocessing of multi-source heterogeneous process data yields readable document data in a unified format; The readable document data is subjected to structured parsing and knowledge unit extraction to obtain textualized tabular representations and block-level knowledge units; Restore document structure information based on the spatial location, reading order, and heading level of block-level knowledge units; Based on document structure information, an attribute graph model oriented towards document structure is constructed. The attribute graph model is stored in a graph database. The text content in block-level knowledge units is converted into semantic vectors and stored in a vector database. Keyword and full-text search indexes are established to form a structure-enhanced process knowledge base. The attribute graph model includes hierarchical relationships and sequential relationships. The system receives user queries, performs vector retrieval using a vector database and keyword retrieval using keywords and full-text search indexes, merges the retrieval results and reorders them to obtain an initial set of candidate evidence. Based on the node identifiers of each knowledge fragment in the graph database in the initial candidate evidence set, adjacent knowledge fragments are expanded along hierarchical and sequential relationships to obtain a traceable retrieval context; The traceable retrieval context and user query are input into the generative model to generate process knowledge answers and output the corresponding knowledge sources and reference locations.

[0006] Compared to existing technologies, this invention provides a structure-enhanced process knowledge base retrieval method oriented towards enhanced retrieval generation. This method preprocesses multi-source heterogeneous process data to obtain readable document data in a unified format; it performs structured parsing and knowledge unit extraction on the readable document data to obtain textualized table representations and block-level knowledge units; it recovers document structure information based on the spatial location, reading order, and title level of the block-level knowledge units; it constructs an attribute graph model oriented towards document structure based on the document structure information, stores the attribute graph model in a graph database, converts the text content in the block-level knowledge units into semantic vectors and stores them in a vector database, and establishes relationships... This invention utilizes keyword and full-text search indexes to form a structured, enhanced process knowledge base. An attribute graph model includes hierarchical and sequential relationships. User queries are received, and vector retrieval is performed using a vector database, while keyword retrieval is performed using keywords and a full-text search index. The search results are merged and reordered to obtain an initial set of candidate evidence. Based on the node identifiers of each knowledge fragment in the graph database within the initial candidate evidence set, adjacent knowledge fragments are expanded along hierarchical and sequential relationships to obtain a traceable retrieval context. This traceable retrieval context and the user query are input into a generation model to generate a process knowledge answer, outputting the corresponding knowledge source and citation location. This invention transforms multi-source heterogeneous process documents into unified structured knowledge units through document structured parsing and attribute graph modeling, improving the efficiency of process knowledge organization. The collaborative storage and hybrid retrieval of graph databases, vector databases, and keyword indexes balances semantic matching and precise matching, improving retrieval accuracy. The restoration of complete chapter context and adjacent content along hierarchical and sequential relationships through graph relationship expansion improves contextual integrity. Tracing upwards along hierarchical relationships to the source document, page, and chapter, and outputting the citation location, achieves traceability of knowledge sources. Attached Figure Description

[0007] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, with the same or corresponding reference numerals denoteing the same or corresponding parts, wherein: Figure 1 The flowchart of a knowledge base retrieval method for structure-enhanced technology based on retrieval enhancement is illustrated schematically. Figure 1 ; Figure 2 The flowchart of a knowledge base retrieval method for structure-enhanced technology based on retrieval enhancement is illustrated schematically. Figure 2 ; Figure 3 A flowchart illustrating the construction process of the structural reinforcement technology knowledge base is shown. Figure 4The diagram illustrates a framework for structure-enhanced retrieval and enhanced generative process knowledge retrieval. Detailed Implementation

[0008] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.

[0009] It should be noted that, unless otherwise stated, the technical or scientific terms used in this invention should have the ordinary meaning as understood by one of ordinary skill in the art.

[0010] The methods described in the embodiments of the present invention will be explained in detail below.

[0011] Figure 1 The flowchart of a knowledge base retrieval method for structure-enhanced technology based on retrieval enhancement is illustrated schematically. Figure 1 , Figure 2 The flowchart of a knowledge base retrieval method for structure-enhanced technology based on retrieval enhancement is illustrated schematically. Figure 2 See Figure 1 and Figure 2 As shown, this method addresses the need for organizing and retrieving process knowledge from process documents of key components such as diesel engine cylinder heads, connecting rods, and engine blocks. It sequentially performs multi-source heterogeneous process data acquisition, data preprocessing, structured and semi-structured data processing, unstructured process document parsing, block-level knowledge unit construction, document reading order restoration, hierarchical structure reconstruction, document structure attribute graph modeling, structure-enhanced process knowledge base storage, structure-enhanced retrieval, context restoration, and retrieval enhancement generation. Finally, it outputs the process knowledge answer, knowledge source, and reference location. This method may include: S101. Preprocess the multi-source heterogeneous process data to obtain readable document data in a unified format.

[0012] Among them, multi-source heterogeneous process data includes process specifications, process cards, historical processing cases, equipment information, tool information, fixture information, process parameter ledgers, quality inspection records, and standards and specifications.

[0013] Specifically, multi-source heterogeneous process data is preprocessed to obtain readable document data in a unified format, including: Step A1: Recognize the file format and text searchability of the multi-source heterogeneous process data. Based on the recognized file format and text searchability, determine the corresponding document loading method.

[0014] Step A2: Load each file according to the document loading method to obtain the loaded file.

[0015] Step A3: For documents with inconsistent formats, file corruption, or font abnormalities in the loaded files, perform format conversion, damaged file repair, and font abnormality processing to obtain readable document data with a unified format.

[0016] The system collects multi-source heterogeneous process data and performs format recognition, document loading, and preprocessing on this data. Preprocessing includes file format recognition, searchable text identification, format conversion, corrupted file repair, and font anomaly handling. Data files include searchable PDF documents, scanned PDF documents, image files, Word documents, Excel documents, PPT documents, and web page documents. The system first identifies the file format and text searchability, and loads files from different sources uniformly. For files with inconsistent formats, corruption, or font anomalies, it performs format conversion, corrupted file repair, and font anomaly handling to create a unified input for subsequent document parsing and reading.

[0017] S102. Perform structured parsing and knowledge unit extraction on the readable document data to obtain a textualized table representation and block-level knowledge units.

[0018] Specifically, structured parsing and knowledge unit extraction are performed on readable document data to obtain textualized tabular representations and block-level knowledge units, including: Step B1: Clean the structured table data in the readable document data to obtain the cleaned table data.

[0019] Step B2: Convert the cleaned tabular data into a text-based tabular representation.

[0020] Text-based tables are used to indicate the preservation of table row and column structure and field correspondences. Text-based tables can be represented in HTML or Markdown format.

[0021] For structured or semi-structured tabular data, the process involves field parsing, redundant field deletion, missing value handling, outlier handling, duplicate data deletion, and format correction. The processed tabular data is then converted into a textual representation in HTML or Markdown format, preserving the table's row and column structure, field correspondences, and cell alignment in the textual representation.

[0022] For field-based data such as Excel spreadsheets, parameter ledgers, and process element tables, the system first reads the table content and performs field parsing, deletion of irrelevant and redundant fields, handling of missing values, handling of outliers, deletion of duplicate data, and format correction. For missing numerical items, they can be filled in based on statistical distribution or business rules; for missing character items, they can be filled in by referring to adjacent cells when there is a clear contextual relationship; for data items with incorrect formatting, inconsistent types, or invalid values, they are deleted or corrected. After cleaning, the table is converted into a text representation in HTML or Markdown format, ensuring that the table's row and column structure, field correspondences, and cell alignment are preserved in the text carrier.

[0023] In one embodiment, for a processing element table, the system stores the processing object and its technological attributes row by row. Technological attributes include the processing element's purpose or characteristics, element type, associated process, geometric parameters, and quality requirements. For tables with composite semantic fields, the system uses the processing element type as the context condition for field semantic parsing, ensuring that the physical meaning of fields with the same name can be consistently interpreted across different element types. For example, if the same column name represents hole diameter or hole depth in hole-type elements, and area range or feature height in area-type elements, the system constrains the interpretation of the field meaning based on the currently recorded element type to reduce the impact of semantic confusion on subsequent retrieval and retrieval.

[0024] Step B3: Perform layout analysis and element identification on the unstructured process documents in the readable document data to identify each layout element and its corresponding element type.

[0025] Unstructured process documents include PDF documents, scanned copies, image files, Word documents, Excel documents, PPT documents, and web page documents. The system identifies page elements such as titles, body text, tables, images, figure captions, table footers, headers, footers, references, and formulas through layout analysis. Based on the different page element types, it performs OCR recognition, table structure restoration, image classification and caption association, or formula recognition processing.

[0026] Step B4: Perform structural reconstruction on each page element to generate block-level knowledge units that include element type, spatial boundaries, and reading order.

[0027] For unstructured documents, the system performs document loading, auxiliary processing, layout analysis, element recognition, and structural reconstruction. For document pages, the system identifies layout elements such as titles, body text, tables, images, figure captions, table footers, headers, footers, references, and formulas, mapping fine-grained tags from different sources or templates to a unified type set. This unified type set includes titles, body text, tables, images, explanatory areas, headers and footers, references, and formulas. For text and title areas, OCR recognition is performed to obtain editable and searchable text; for table areas, table structure is restored and converted to HTML or Markdown text; for image areas, image classification and explanatory association are performed; and for formula areas, formula recognition is performed or its layout position and explanatory information are preserved.

[0028] Using page layout areas as block-level knowledge units, a block-level structured list is constructed. Each block-level knowledge unit includes at least text content, element type, source document, page number, spatial boundary, block identifier, and reading order. The text content represents the semantic information of the block-level knowledge unit; the element type represents its role within the document's layout; the source document and page number support backtracking of search results; the spatial boundary records the block-level knowledge unit's position on the page; the block identifier establishes the correspondence between the same knowledge unit in different databases; and the reading order represents the relative order of the block-level knowledge unit within the document's reading path. For body text blocks and title blocks, the text content directly stores the OCR recognition results; for table blocks, the text content stores the textual representation of the structured table; and for image blocks, it stores the image type, explanatory text, and its relationship with adjacent explanatory areas.

[0029] S103. Restore the document structure information based on the spatial location, reading order, and heading level of the block-level knowledge units.

[0030] Specifically, based on the spatial location, reading order, and heading level of block-level knowledge units, document structure information is restored, including: Step C1: Sort the block-level knowledge units according to their spatial location and reading order to generate a document reading path.

[0031] Step C2: Determine the chapter level corresponding to each heading block based on the heading level.

[0032] Step C3: Based on the document reading path and chapter hierarchy, merge each text block, table block, image block, and explanatory text into its respective chapter to obtain the document structure information.

[0033] Specifically, step C3 includes: Step C31: Use each heading block in the heading level as a chapter boundary signal.

[0034] Step C32: Based on the chapter boundary signals and the document reading path, merge the body text blocks, table blocks, image blocks, and explanatory texts located after the same title block into the chapter to which the corresponding title block belongs, in order to obtain the document structure information.

[0035] The system reconstructs the document reading path and chapter hierarchy based on the spatial location, reading order, and heading level of block-level knowledge units. For process documents containing multi-column layouts, mixed text and images, and tables, the system reconstructs a reading path that conforms to natural reading habits based on the spatial boundaries and reading order fields of block-level knowledge units. The system also reconstructs the chapter structure based on the hierarchical markers of heading blocks, using heading blocks as chapter boundary signals and merging subsequent text blocks, table blocks, image blocks, and explanatory text under the corresponding chapters. For table titles, image descriptions, and adjacent elements, the system establishes local semantic associations based on spatial proximity and reading order. For auxiliary areas such as headers, footers, and page numbers, the system performs weight reduction or filtering during the data entry stage to minimize their interference with semantic retrieval of the main text.

[0036] S104. Construct a document-structure-oriented attribute graph model based on document structure information, store the attribute graph model in a graph database, convert the text content in block-level knowledge units into semantic vectors and store them in a vector database, and establish keyword and full-text search indexes to form a structure-enhanced process knowledge base.

[0037] The attribute graph model includes hierarchical relationships and sequential relationships.

[0038] The attribute graph model includes root nodes, document nodes, page nodes, directory nodes, overall partition nodes, logical partition nodes, text block nodes, table nodes, table block nodes, and image nodes. Root nodes represent the overall entity of a knowledge base or corpus; document nodes represent a single process document and record the document name, document type, and file path; page nodes represent document pages and record page numbers, page text content, and page-level metadata; directory nodes and overall partition nodes represent the overall document structure; logical partition nodes represent chapters or logical paragraphs; text block nodes represent fine-grained text units within chapters; table nodes and table block nodes represent tables and their local content; and image nodes represent diagrams, illustrations, or other visual elements.

[0039] Specifically, step S104 includes: Step D1: Based on the document structure information, construct the nodes, hierarchical relationships, and order relationships between nodes in the attribute graph model.

[0040] Hierarchical relationships describe the hierarchical relationships between structural units in a document, including pages belonging to the document, chapters belonging to pages, text blocks belonging to chapters, tables belonging to chapters, and images belonging to chapters. Sequential relationships describe the sequential relationships of document content in the reading order, including the sequential relationships between adjacent chapters, adjacent text blocks, and adjacency relationships between tables or images and explanatory text. By combining hierarchical and sequential relationships, the system can explicitly preserve the structural semantics, reading paths, and contextual continuity of process documents in the database.

[0041] Step D2: Store the nodes, hierarchical relationships, order relationships, and node attributes of the attribute graph model in the graph database.

[0042] Step D3: Convert the text content in the block-level knowledge unit into semantic vectors through an embedding model, and store the semantic vectors in a vector database.

[0043] The semantic vector is a high-dimensional semantic vector.

[0044] Step D4: Establish keyword and full-text search indexes for process terms, equipment names, tool models, material grades, parameter names and parameter values ​​in multi-source heterogeneous process data to form a structure reinforcement process knowledge base.

[0045] A structure-enhanced process knowledge base is formed by collaboratively storing document structure attribute graphs, semantic vectors, and keyword / full-text search indexes. Specifically, nodes, relationships, and node attributes from the attribute graph model are stored in a graph database; text blocks, table blocks, and chapter content are converted into high-dimensional semantic vectors through an embedding model, and these high-dimensional semantic vectors, original text content, and metadata are stored together in a vector database; simultaneously, keyword / full-text search indexes are established for process terms, equipment names, tool models, material grades, parameter names, and parameter values. Thus, the graph database supports structural relationship queries and contextual expansion, the vector database supports semantic similarity retrieval, and the keyword / full-text search indexes support precise matching of terms, models, values, and parameters.

[0046] Figure 3 A flowchart illustrating the construction process of the structural reinforcement technology knowledge base is shown below. Figure 3As shown, firstly, multi-source heterogeneous process data is collected and preprocessed. This multi-source heterogeneous process data includes process specifications, process cards, historical processing cases, equipment information, tool information, fixture information, process parameter ledgers, quality inspection records, and standard specifications. Then, document parsing and structural reconstruction are performed on the collected process data, including document loading and format conversion, layout analysis, element recognition, OCR recognition, and table structure restoration and image classification description association, generating block-level knowledge units. These block-level knowledge units include text content, element type, source document, page number, spatial boundary, block identifier, and reading order fields. Next, based on... The reading order and hierarchical structure are restored based on block-level knowledge units, and a document structure attribute graph is constructed. Finally, a structure-enhanced knowledge base is stored. The attribute graph model, which includes root nodes, document nodes, page nodes, chapter partition nodes, text block nodes, table block nodes, and image nodes, is stored in a graph database. Text block vectors, table block vectors, and chapter vectors are stored in a vector database. Keyword indexes for terms, equipment, tools, parameters, and materials are also established. Through collaborative storage of these three databases, a structure-enhanced process knowledge base is formed to support hierarchical relationship expression, order relationship restoration, graph-text association, semantic retrieval, context restoration, and traceable knowledge sources.

[0047] S105. Receive user queries, perform vector retrieval using the vector database and keyword retrieval using keywords and full-text search indexes respectively, merge the retrieval results and obtain an initial candidate evidence set through reordering.

[0048] Specifically, step S105 includes: Step E1: Convert the user query into a query vector, and use the query vector to perform semantic similarity retrieval in the vector database to obtain semantic candidate knowledge fragments.

[0049] Step E2: Using keywords and full-text search indexes, perform precise matching and retrieval of process terms, equipment names, tool models, material grades, parameter names, and parameter values ​​in the user's query to obtain keyword candidate knowledge fragments.

[0050] Step E3: Merge the semantic candidate knowledge fragments with the keyword candidate knowledge fragments to obtain a set of candidate knowledge fragments.

[0051] Step E4: Sort the candidate knowledge fragment set by relevance using the reordering model to obtain the initial candidate evidence set.

[0052] The system receives user-input process knowledge queries and performs structure-enhanced retrieval. First, it uses an embedding model consistent with the data entry stage to convert the user query into a query vector, and then performs semantic similarity retrieval in the vector database to obtain semantic candidate knowledge fragments. Simultaneously, it utilizes a keyword / full-text search index to perform precise matching on process terms, equipment names, tool models, material grades, parameter names, and parameter values ​​to obtain keyword candidate knowledge fragments. Subsequently, the semantic candidate knowledge fragments and keyword candidate knowledge fragments are fused to obtain a candidate knowledge fragment set. Finally, a re-ranking model is used to rank the candidate knowledge fragments by relevance to obtain an initial candidate evidence set.

[0053] S106. Based on the node identifiers of each knowledge fragment in the graph database in the initial candidate evidence set, extend adjacent knowledge fragments along the hierarchical and sequential relationships to obtain a traceable retrieval context.

[0054] Based on the node identifiers of text blocks, table blocks, or chapter nodes in the graph database in the initial candidate evidence set, the chapters, pages, and documents to which they belong are found along the hierarchical relationship, the adjacent blocks before and after them are expanded along the sequential relationship, and the traceable retrieval context is restored by combining the association relationships between tables, images, and explanatory text.

[0055] Specifically, step S106 includes: Step F1: Determine the starting node to be expanded based on the node identifiers of each knowledge fragment in the graph database in the initial candidate evidence set.

[0056] Step F2: Search upwards along the hierarchical relationship in the graph database based on the starting node to be expanded to obtain the chapter, page, and document to which the starting node to be expanded belongs.

[0057] Specifically, step F2 includes: Step F21: Set the starting node to be expanded as the text block node.

[0058] Step F22: Search upwards along the hierarchy in the graph database based on the text block node to obtain the logical partition node to which the text block node belongs.

[0059] Logical partition nodes are used to represent chapters.

[0060] Step F23: Search upwards along the hierarchy in the graph database based on the logical partition node to obtain the page node and document node to which the logical partition node belongs.

[0061] Page nodes represent pages, and document nodes represent documents.

[0062] Step F3: Based on the starting node to be expanded, expand forward and backward along the sequential relationship in the graph database to obtain the adjacent knowledge fragments of the starting node to be expanded.

[0063] Specifically, step F3 includes: Step F31: Determine the position of the starting node to be expanded in the document reading order based on the node identifier of the starting node in the graph database.

[0064] Step F32: Based on the position of the starting node to be expanded in the document reading order, search forward along the order relationship in the graph database to obtain the preceding adjacent text block node of the starting node to be expanded.

[0065] Step F33: Based on the position of the starting node to be expanded in the document reading order, search backward along the order relationship in the graph database to obtain the next adjacent text block node of the starting node to be expanded.

[0066] Step F34: Treat the previous adjacent text block node and the next adjacent text block node as adjacent knowledge fragments.

[0067] For text blocks, table blocks, or chapter nodes in the initial candidate evidence set, the system performs graph relation expansion based on their node identifiers in the graph database. The expansion process includes: searching upwards along the hierarchical relationship to find the chapter, page, and document to which the node belongs; searching along the sequential relationship to find the text blocks or chapters adjacent to the node; and recovering local semantic units based on the relationships between tables, images, and explanatory text. Through this graph relation expansion, the system can recover a more complete chapter context and adjacent content based on the initially hit fragments.

[0068] Step F4: Organize the starting node to be expanded, the chapter, page, document, and adjacent knowledge fragments into a traceable retrieval context.

[0069] The traceable retrieval context includes process knowledge fragments expanded with graph relationships, table content, chapter content, and source information.

[0070] The process knowledge fragments, table content, chapter content, and source information, after being expanded by graph relationships, are organized into a traceable retrieval context, and their source documents, page numbers, chapters, block identifiers, and relevance scores are retained.

[0071] S107. Input the traceable retrieval context and user query into the generation model to generate a process knowledge answer and output the corresponding knowledge source and reference location.

[0072] The model is generated by inputting traceable retrieval context and user-inputted process knowledge query. Based on the retrieval context, the model produces process knowledge answers or enhanced retrieval results. Output includes the process knowledge answer, the matched knowledge fragment, the source document, page number, chapter, block identifier, and citation location, allowing users to verify the generated results.

[0073] Figure 4 The diagram schematically illustrates the framework for structure-enhanced retrieval and enhanced generative process knowledge retrieval. (See attached image) Figure 4 As shown, the framework first receives the user's input of a process knowledge query, converts the user query into a query vector, and generates query content and constraints. Then, it performs hybrid retrieval and structural expansion, using a vector database to perform semantic similarity matching retrieval to obtain semantic candidate knowledge fragments, and using a keyword index to perform precise term matching retrieval to obtain keyword candidate knowledge fragments. The two types of retrieval results are then fused. Next, based on the hierarchical and sequential relationships stored in the graph database, structural context recovery is performed. Contextual information such as chapters, adjacent blocks, and tables is obtained through relation expansion and organized into a traceable retrieval context. Then, Top-k evidence is filtered through relevance reordering to obtain a candidate evidence set. Finally, the traceable retrieval context and the user query are input into a large language model to generate process knowledge answers or enhanced retrieval results, simultaneously outputting the source document, page number, and block identifier, etc., indicating the knowledge source and citation location, and returning verifiable process knowledge results. This framework achieves structure-enhanced process knowledge retrieval and generation through the collaborative work of semantic matching, precise matching, relation expansion, context recovery, and evidence tracing.

[0074] In one specific embodiment, firstly, publicly available mechanical and process-related data are collected to construct a test-use process fundamentals knowledge base. The data includes publicly available materials such as engineering graphics, engineering mechanics, fundamentals of mechanical design, principles of machinery, and mechanical process design manuals. After processing, the original text contains over one million characters, which are then processed into over 20,000 text blocks. Further, the machining element files for diesel engine cylinder heads, engine blocks, connecting rods, typical cylinder head machining processes, typical engine block machining processes, and typical connecting rod machining processes are stored in the database as process knowledge files to verify the applicability of the method to actual process documents.

[0075] In the above embodiments, taking a typical connecting rod machining process document as an example, this document is in PDF format, and a single typical connecting rod machining process document contains 58 pages of process document information. This type of document undergoes layout parsing, text recognition, table processing, and structural reconstruction, extracting information such as page numbers, process names, equipment names, process equipment names, process equipment numbers, process equipment specifications, workshop numbers, section numbers, process numbers, precautions, and key process identifiers. After processing, the key process information in the original PDF document is organized into field-based and item-based structured process data, and stored in a structure-enhanced process knowledge base in the form of text blocks, table blocks, and structural metadata.

[0076] In the retrieval experiment, the system employs a fixed text block partitioning strategy, with a text block size of 512 tokens and a 50-token overlap region between adjacent text blocks. The experiment compares BM25, BM25+Reranker, Embedding, Embedding+Reranker, and the structure-enhanced retrieval method of this invention. During the retrieval process, candidate document sets are obtained using the BM25 and Embedding methods respectively, and the top 10 candidate documents are selected. Subsequently, the Reranker model is used to calculate the relevance between the query and the documents, and the 5 documents with the highest similarity are selected as the input context for the generative model.

[0077] To evaluate the performance of the retrieval system, this embodiment uses recall, mean reciprocal rank (MRR), and mean average precision (mAP) as evaluation metrics. Recall represents the proportion of relevant documents retrieved by the system out of all relevant documents, and its calculation formula is as follows: Recall=Relevant retrieved instances / All relevant instances; Here, Relevant retrieved instances represent the number of relevant instances retrieved by the system, and Allrelevant instances represent the total number of all relevant instances.

[0078] The Mean Reciprocal Rank (MRR) is used to evaluate the position of a correct result in the sorted list. Let the first query set be... ,in Indicates the first The MRR is defined as the rank of the first relevant document in the sorted results of the first query. ; in, This represents the total number of queries. The higher the ranking of a relevant document, the larger the MRR value.

[0079] Mean Precision (mAP) is used to evaluate the overall quality of all relevant documents in the ranking results. It is obtained by calculating the mean precision of each query and then averaging it across all queries. The calculation formula is as follows: ; in, For the first The average precision value of the second query. This is the second query set.

[0080] In the comparative experiment of retrieval strategies, Table 1 shows the results of the comparative experiment of different retrieval strategies. It is necessary to compare TF-IDF, TF-IDF+Reranker, BM25, BM25+Reranker, Embedding, Embedding+Reranker, and the method of this invention, and evaluate them on three indicators: Recall, MRR, and mAP. See also Figure 1 As shown, on this test dataset, the method of this invention achieves a recall of 0.85, an MRR of 0.88, and a mAP of 0.75. These results demonstrate that, in the embodiments, the collaborative processing of vector retrieval, keyword / full-text retrieval, graph relation expansion, and re-ranking can improve the ranking position of relevant results while maintaining a high recall rate.

[0081] Table 1 Comparison of experimental results for different retrieval strategies

[0082] In the retrieval-enhanced generation experiment, Qwen2.5-7B-Instruct, DeepSeek-R1-8B, ChatGLM3-6B, Baichuan2-7B, and InternLM3-8B-Instruct were selected as comparative generation models and tested under the same knowledge base, retrieval process, and unified prompt template. During the generation phase, the maximum input context length was uniformly limited to 4096 tokens, the maximum generation length was set to 512 tokens, the temperature coefficient was set to 0.1, and a top-p sampling method of 0.9 was adopted. The experiment compared the generation results of the baseline method without retrieval enhancement with those after retrieval enhancement, and the evaluation metrics included semantic similarity, ROUGE-1, ROUGE-2, and ROUGE-3. The experimental results show that, in the examples, after introducing retrieval enhancement, each model showed improvement in semantic similarity and the Recall-Oriented Understudy for Gisting Evaluation (ROUGE) metric, indicating that the external knowledge base retrieval results can provide more sufficient professional knowledge basis for the generation model.

[0083] This invention can transform text, tables, image descriptions, and layout structures from multi-source heterogeneous process documents into a searchable, scalable, and traceable structured enhanced process knowledge base. It achieves collaborative processing of semantic matching, exact matching, and context recovery through vector retrieval, keyword / full-text retrieval, graph relationship expansion, and reordering mechanisms. Therefore, the method of this invention can improve the efficiency of process knowledge organization, retrieval accuracy, contextual completeness, and traceability of knowledge sources, providing data and knowledge support for subsequent process knowledge question answering and process knowledge retrieval.

[0084] In the experimental embodiment of retrieval augmented generation, to verify the applicability of the structurally enhanced retrieval augmented generation method of the present invention on different generation models, five generation models—Qwen2.5-7B-Instruct, DeepSeek-R1-8B, ChatGLM3-6B, Baichuan2-7B, and InternLM3-8B-Instruct—were selected as comparison objects, and tests were conducted under both the baseline method without retrieval augmentation and the retrieval augmented generation method of the present invention. The experiment used SemanticSimilarity, ROUGE-1, ROUGE-2, and ROUGE-3 as evaluation metrics. Semantic Similarity was used to evaluate the semantic similarity between the generated answer and the reference answer, while ROUGE-1, ROUGE-2, and ROUGE-3 were used to evaluate the overlap between the generated text and the reference answer at the vocabulary, phrase, and longer continuous segment levels, respectively. The experimental results are shown in Table 2, which presents the experimental results comparing the baseline of different generation models with retrieval augmented generation (RAG).

[0085] Table 2. Experimental results comparing different generative models Baseline and RAG.

[0086] As shown in Table 2, after introducing retrieval enhancement, all five generative models showed varying degrees of improvement across the four evaluation metrics. In terms of Semantic Similarity, Qwen2.5-7B-Instruct improved from 0.70 to approximately 0.76, DeepSeek-R1-8B from 0.68 to approximately 0.74, ChatGLM3-6B from 0.69 to approximately 0.73, Baichuan2-7B from 0.67 to approximately 0.72, and InternLM3-8B-Instruct from 0.68 to approximately 0.71. For the ROUGE-1 metric, the values ​​of the five models mentioned above were increased from 0.10, 0.11, 0.08, 0.13, and 0.10 to approximately 0.30, 0.32, 0.40, 0.35, and 0.33, respectively; for the ROUGE-2 metric, they were increased from 0.07, 0.06, 0.05, 0.06, and 0.03 to approximately 0.13, 0.14, 0.12, 0.15, and 0.12, respectively; and for the ROUGE-3 metric, they were increased from 0.03, 0.035, 0.028, 0.02, and 0.03 to approximately 0.05, 0.057, 0.08, 0.06, and 0.05, respectively.

[0087] The experimental results above demonstrate that, under the conditions of this embodiment, the retrieval context obtained based on the structure-enhanced process knowledge base can provide external process knowledge support for the generative model, thereby improving the generation results in terms of semantic consistency, word matching, phrase matching, and matching of longer continuous segments. This verifies the applicability of the method of the present invention in process knowledge question answering and process knowledge retrieval scenarios.

[0088] The method of this invention converts process knowledge scattered in various file formats into a block-level structured representation containing content, location, type, and sequence information through document loading, format conversion, layout analysis, element recognition, and structure reconstruction. This can reduce the loss of chapter hierarchy, reading order, and text-image relationships caused by ordinary text segmentation and improve the ability to maintain the structure during the process of storing process documents.

[0089] The method of this invention constructs an attribute graph model oriented towards document structure, and explicitly expresses the organizational relationships between documents, pages, chapters, text blocks, tables and images through hierarchical and sequential relationships. This enables the system to achieve structural navigation, contextual expansion and source tracing based on the graph structure, thereby improving the contextual completeness and interpretability of process knowledge retrieval results.

[0090] The method of this invention stores process knowledge collaboratively through graph databases, vector databases, and keyword / full-text search indexes. It combines vector search, keyword / full-text search, graph relation expansion, and reordering mechanisms to achieve collaborative retrieval of semantic matching, exact matching, and structural relation expansion, thereby improving the accuracy, recall, and traceability of process knowledge retrieval.

[0091] Based on the above Figure 1As can be seen from the implementation method, the embodiments of the present invention preprocess multi-source heterogeneous process data to obtain readable document data in a unified format; perform structured parsing and knowledge unit extraction on the readable document data to obtain textualized table representations and block-level knowledge units; restore document structure information based on the spatial location, reading order, and title level of the block-level knowledge units; construct a document-oriented attribute graph model based on the document structure information, store the attribute graph model in a graph database, convert the text content in the block-level knowledge units into semantic vectors and store them in a vector database, and establish keyword and full-text search indexes to form a structure-enhanced process knowledge base; the attribute graph model includes hierarchical relationships and sequential relationships; receive user queries, perform vector retrieval using the vector database and keyword retrieval using the keyword and full-text search indexes respectively, fuse the retrieval results and obtain an initial candidate evidence set through reordering; based on the node identifiers of each knowledge fragment in the initial candidate evidence set in the graph database, extend adjacent knowledge fragments along hierarchical and sequential relationships to obtain a traceable retrieval context; input the traceable retrieval context and user queries into the generation model to generate process knowledge answers and output the corresponding knowledge source and reference position. This invention transforms multi-source heterogeneous process documents into unified structured knowledge units through document structured parsing and attribute graph modeling, improving the efficiency of process knowledge organization. It also improves retrieval accuracy by using collaborative storage and hybrid retrieval of graph databases, vector databases, and keyword indexes, balancing semantic matching and precise matching. Furthermore, it enhances contextual integrity by restoring complete chapter contexts and adjacent content along hierarchical and sequential relationships through graph relation extension. Finally, it achieves traceability of knowledge sources by tracing upwards along hierarchical relationships to the source document, page, and chapter, and outputting the reference location.

[0092] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for retrieving a knowledge base of structural enhancement processes based on enhanced retrieval, characterized in that, include: Preprocessing of multi-source heterogeneous process data yields readable document data in a unified format; The readable document data is subjected to structured parsing and knowledge unit extraction to obtain a textualized table representation and block-level knowledge units; Based on the spatial location, reading order, and heading level of the block-level knowledge units, the document structure information is restored; Based on the document structure information, a document-oriented attribute graph model is constructed, and the attribute graph model is stored in a graph database. The text content in the block-level knowledge units is converted into semantic vectors and stored in a vector database. Keyword and full-text search indexes are established to form a structure-enhanced process knowledge base. The attribute graph model includes hierarchical relationships and sequential relationships. Upon receiving a user query, vector retrieval is performed using the vector database and keyword retrieval is performed using the keywords and full-text search index. The retrieval results are then merged and reordered to obtain an initial set of candidate evidence. Based on the node identifiers of each knowledge fragment in the initial candidate evidence set in the graph database, adjacent knowledge fragments are extended along the hierarchical relationship and the sequential relationship to obtain a traceable retrieval context. The traceable retrieval context and the user query are input into the generation model to generate a process knowledge answer and output the corresponding knowledge source and reference location.

2. The retrieval method for a structure-enhanced process knowledge base based on retrieval enhancement generation according to claim 1, characterized in that, The preprocessing of multi-source heterogeneous process data to obtain readable document data in a unified format includes: The multi-source heterogeneous process data is subjected to file format identification and text searchability identification. Based on the identified file format and text searchability, the corresponding document loading method is determined. The multi-source heterogeneous process data includes process specifications, process cards, historical processing cases, equipment information, tool information, fixture information, process parameter ledgers, quality inspection records, and standard specifications. Load each file according to the document loading method described above to obtain the loaded file; For documents with inconsistent formats, file corruption, or font abnormalities in the loaded files, perform format conversion, corrupt file repair, and font abnormality processing to obtain readable document data in a unified format.

3. The retrieval method for a structure-enhanced process knowledge base based on retrieval enhancement generation according to claim 1, characterized in that, The process of performing structured parsing and knowledge unit extraction on the readable document data to obtain a textualized tabular representation and block-level knowledge units includes: Data cleaning is performed on the structured table data in the readable document data to obtain cleaned table data; The cleaned table data is converted into a text-based table representation, which is used to indicate the preservation of the table's row and column structure and field correspondence. The text-based table representation can be in HTML or Markdown format. The layout analysis and element identification are performed on the unstructured process documents in the readable document data to identify each layout element and its corresponding element type; The structure of each page element is restructured to generate block-level knowledge units that include the element type, spatial boundaries, and reading order.

4. The method for retrieving a knowledge base of structure-enhanced processes based on retrieval enhancement as described in claim 1, characterized in that, The step of restoring document structure information based on the spatial location, reading order, and heading level of the block-level knowledge units includes: Based on the spatial location and the reading order, the block-level knowledge units are sorted to generate a document reading path; Based on the title hierarchy, determine the chapter level corresponding to each title block; Based on the document reading path and the chapter hierarchy, each text block, table block, image block, and explanatory text is merged into its respective chapter to obtain the document structure information.

5. The retrieval method for a structure-enhanced process knowledge base based on retrieval enhancement generation according to claim 4, characterized in that, The document structure information is obtained by merging each text block, table block, image block, and explanatory text into its respective chapter according to the document reading path and the chapter hierarchy, including: Each heading block in the heading level is used as a chapter boundary signal; Based on the chapter boundary signal and the document reading path, body blocks, table blocks, image blocks, and explanatory texts located after the same title block are merged into the chapter to which the corresponding title block belongs, so as to obtain the document structure information.

6. The method for retrieving a knowledge base of structure-enhanced processes based on retrieval enhancement as described in claim 1, characterized in that, The step of constructing a document-structure-oriented attribute graph model based on the document structure information, storing the attribute graph model in a graph database, converting the text content in the block-level knowledge units into semantic vectors and storing them in a vector database, and establishing keyword and full-text search indexes to form a structure-enhanced process knowledge base includes: Based on the document structure information, construct the nodes, hierarchical relationships, and order relationships between the nodes in the attribute graph model; The nodes, hierarchical relationships, order relationships, and node attributes of the attribute graph model are stored in the graph database; The text content in the block-level knowledge unit is converted into the semantic vector through an embedding model, and the semantic vector is stored in the vector database; For the process terms, equipment names, tool models, material grades, parameter names and parameter values ​​in the multi-source heterogeneous process data, establish the keyword and full-text search index to form the structure reinforcement process knowledge base.

7. The retrieval method for a structure-enhanced process knowledge base based on retrieval enhancement generation according to claim 1, characterized in that, The process of receiving user queries involves performing vector retrieval using the vector database and keyword retrieval using the keywords and full-text search index. The retrieval results are then merged and reordered to obtain an initial candidate evidence set, including: The user query is converted into a query vector, and the query vector is used to perform semantic similarity retrieval in the vector database to obtain semantic candidate knowledge fragments. Using the keywords and full-text search index, the process terms, equipment names, tool models, material grades, parameter names and parameter values ​​in the user query are precisely matched and retrieved to obtain keyword candidate knowledge fragments; The semantic candidate knowledge fragments are fused with the keyword candidate knowledge fragments to obtain a set of candidate knowledge fragments; The candidate knowledge fragment set is relevance-ranked using a re-ranking model to obtain the initial candidate evidence set.

8. The method for retrieving a knowledge base of structure-enhanced processes based on retrieval enhancement generation according to claim 1, characterized in that, The step of expanding adjacent knowledge fragments along the hierarchical and sequential relationships based on the node identifiers of each knowledge fragment in the initial candidate evidence set in the graph database to obtain a traceable retrieval context includes: Based on the node identifiers of each knowledge fragment in the initial candidate evidence set in the graph database, determine the starting node to be expanded; Based on the starting node to be expanded, search upwards along the hierarchical relationship in the graph database to obtain the chapter, page, and document to which the starting node to be expanded belongs; Based on the starting node to be expanded, the graph database is expanded forward and backward along the order relationship to obtain the adjacent knowledge fragments of the starting node to be expanded. The starting node to be expanded, the chapter, page, document to which it belongs, and the adjacent knowledge fragments are organized into the traceable retrieval context.

9. The retrieval method for a structure-enhanced process knowledge base based on retrieval enhancement generation according to claim 8, characterized in that, The step of searching upwards along the hierarchical relationship in the graph database based on the starting node to be expanded, to obtain the chapter, page, and document to which the starting node to be expanded belongs, includes: The starting node to be expanded is taken as the text block node; Based on the text block node, the logical partition node to which the text block node belongs is obtained by searching upwards along the hierarchical relationship in the graph database. The logical partition node is used to represent the chapter. Based on the logical partition node, the graph database is searched upwards along the hierarchical relationship to obtain the page node and document node to which the logical partition node belongs. The page node is used to represent the page, and the document node is used to represent the document.

10. The method for retrieving a knowledge base of structural enhancement technology based on retrieval enhancement generation according to claim 8, characterized in that, The step of expanding the graph database along the order relationship based on the starting node to be expanded to obtain adjacent knowledge fragments of the starting node to be expanded includes: Based on the node identifier of the starting node to be expanded in the graph database, determine the position of the starting node to be expanded in the document reading order; Based on the position of the starting node to be expanded in the document reading order, the preceding adjacent text block node of the starting node to be expanded is obtained by searching forward along the order relationship in the graph database. Based on the position of the starting node to be expanded in the document reading order, the graph database is searched backward along the order relationship to obtain the next adjacent text block node of the starting node to be expanded. The preceding adjacent text block node and the following adjacent text block node are taken as the adjacent knowledge fragments.