Equipment maintenance support question and answer method based on fusion RAG big language model

By deploying an offline knowledge base and RAG large language model in the intelligent maintenance support system, the problems of data confidentiality and lack of professional knowledge in the existing system are solved, and efficient and accurate equipment maintenance support question-and-answer functions in complex fields are realized.

CN120671809APending Publication Date: 2025-09-19NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510658232.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Due to the confidentiality of industrial data and the lack of professional knowledge in large language models, the existing intelligent maintenance support system is unable to accurately understand and solve the troubleshooting and maintenance problems of industrial equipment, resulting in a lack of basis and reasoning errors in maintenance recommendations.

Method used

An equipment maintenance support question-answering method based on the RAG large language model is adopted. By deploying an offline knowledge base and a large language model, and using RAG technology combined with information retrieval and generation capabilities, the performance of the question-answering system in complex fields is improved.

Benefits of technology

It realizes the equipment maintenance and support question-and-answer function in professional fields, improves the accuracy and basis of the question-and-answer system, and ensures that the generated maintenance suggestions and fault diagnosis results are reliable and operational.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671809A_ABST
    Figure CN120671809A_ABST
Patent Text Reader

Abstract

The invention provides an equipment maintenance support question and answer method based on a fusion RAG big language model. The method comprises the following steps: obtaining question information and a corresponding text tag; labels of the corresponding sub-layers are obtained from a local knowledge base through the text labels; retrieving and aggregating K most relevant entities according to the labels of the sub-layers, and generating prompt words; obtaining retrieval information by using a large language model LLM and generating an intermediate reply; and generating a detailed reply in combination with label information of a higher-layer graph in the local knowledge base, and carrying out iterative optimization on the detailed reply until a final reply is generated. According to the method, the offline knowledge base and the large language model are deployed, and the information retrieval capability and the generation capability of the large language model are combined by utilizing the RAG technology, so that the performance of the question-answering system in the complex field is improved, and the question-answering function for equipment maintenance support in the professional field is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and specifically relates to an equipment maintenance support question-answering method based on the fusion of a RAG large language model. Background Art

[0002] Over the long term, industrial equipment inevitably experiences wear, aging, or unexpected failures. To ensure the continuity of industrial production and the reliability of equipment operation, maintenance support is essential to prevent and address the potential risks associated with these issues. Therefore, equipment maintenance support has become a crucial component of industrial equipment operation and maintenance management. Its purpose is to ensure the continued normal operation of industrial equipment, extend its service life, and reduce downtime and maintenance costs caused by equipment failures.

[0003] In traditional industrial production, the maintenance and support of industrial equipment often relies on regular inspections and empirical judgment. Therefore, a team of skilled operators and maintenance engineers is required to carry out maintenance and support work. These engineers conduct timely analysis, resolution, repair, and replacement of these issues to ensure the normal and continuous operation of various industrial equipment in industrial production. With the advancement of industrial sensors, the Internet of Things, and data analysis technologies, the proportion of modern production equipment in industrial equipment has gradually increased. Consequently, a large amount of operational data generated by modern industrial equipment is continuously being collected, leading to a gradual shift in maintenance and support for modern equipment towards predictive and proactive maintenance. Therefore, relying solely on manual maintenance by engineers can no longer meet the growing maintenance and support needs of modern industry.

[0004] With the rapid development of artificial intelligence in recent years, maintenance approaches based on large language models combined with equipment maintenance and support have shown promising application prospects in the field of industrial equipment health management. While large language models possess excellent text comprehension and increasingly sophisticated human communication capabilities, the confidentiality of most industrial data and their lack of specialized domain expertise hinder their ability to accurately understand and resolve maintenance-related issues such as troubleshooting and maintenance of industrial equipment. Consequently, this maintenance approach fails to provide source evidence or relevant information for specialized maintenance issues, and can even lead to logical errors and biased responses within the large language model's reasoning process. Summary of the Invention

[0005] The purpose of the present invention is to solve the shortcomings of the existing technology that the existing intelligent maintenance support cannot be better applied in the field of equipment maintenance due to the confidentiality of industrial data, and to provide an equipment maintenance support question and answer method based on the fusion of RAG large language model. By deploying an offline knowledge base and a large language model, and utilizing RAG technology to combine the information retrieval capability and generation capability of the large language model, the performance of the question and answer system in complex fields is improved, and the question and answer function for equipment maintenance support in professional fields is realized.

[0006] To achieve the above objectives, the technical solutions provided by the present invention are:

[0007] A method for equipment maintenance support question answering based on the RAG large language model, including:

[0008] Step 1: Obtain the question information asked by the corresponding user, perform text segmentation and mark the corresponding text tags;

[0009] Step 2: Based on the U-retrieve bottom-up matching strategy, start from the global graph in the knowledge base through the text label until the label of the sub-layer is matched;

[0010] Step 3: Retrieve and aggregate the corresponding K most relevant entities from the meta-layer based on the labels of the sub-layers, and generate prompt words based on the K most relevant entities using a prompt word template. Specifically, the global graph in the knowledge base first locates the query scope and then continuously matches downward until the data of the K most relevant entities is obtained. Combined with this data, the sub-layers are retrieved from top to bottom to obtain label information, and the prompt word template is used to generate optimized prompt words.

[0011] Step 4: Use the large language model (LLM) to search the local knowledge base to obtain search information and generate an intermediate response corresponding to the question information;

[0012] Step 5: After generating a detailed response based on the label information of a higher-level graph in the knowledge base, iterative optimization is performed based on the detailed response until a final response is generated; wherein the final response includes maintenance suggestions or fault diagnosis results.

[0013] As a further improvement of the present invention, the step 1 further includes:

[0014] A summary description is generated using the text label, and the summary description is used in step 2 to identify the most relevant graph in the local knowledge base; wherein the most relevant graph serves as a bridge connecting the global graph and the sub-layer. In step 2, the most relevant graph is identified during the matching process, and the graph is used as a key node connecting the global knowledge and the specific maintenance knowledge. A similarity calculation based on the text label and the summary description is selected to ensure that the matched layer covers the core issues of the user query.

[0015] As a further improvement of the present invention, the step 2 is specifically as follows:

[0016] Based on the U-retrieve bottom-up matching strategy, starting from the corresponding global graph in the local knowledge base of the corresponding offline dataset, the text label is matched to the label of the sub-layer, and then the label of the sub-layer is matched until the meta-layer is reached; wherein, the offline dataset is an offline equipment maintenance and support dataset constructed by collecting data related to the operation and application of industrial equipment, and the local knowledge base is established based on the offline dataset by constructing a three-layer RAG graph structure.

[0017] As a further improvement of the present invention, the second step specifically includes: (1) constructing an offline data set for equipment maintenance and support; (2) constructing a three-layer RAG graph structure; (3) constructing a local knowledge base; specifically:

[0018] (1) Constructing an offline data set for equipment maintenance support, including: collecting data related to the operation and application of industrial equipment to construct an offline equipment maintenance data set;

[0019] (2) Constructing a three-layer RAG graph structure, including: constructing a three-layer RAG graph structure for the equipment maintenance data set, wherein the constructed three-layer RAG graph structure includes an equipment document layer, a basic knowledge layer, and a domain dictionary layer, wherein the equipment document layer includes equipment maintenance manuals and technical documents provided by users, and the technical documents contain actual operation guidelines and equipment specific information; the basic knowledge layer includes technical specifications, maintenance guidelines, and academic papers related to equipment maintenance; and the domain dictionary layer covers an equipment maintenance term library, a standard failure mode library, and their knowledge relationships;

[0020] (3) Constructing a local knowledge base, including: building a local knowledge base with a three-layer RAG graph structure based on the offline dataset. The global graph in the three-layer RAG graph structure ensures the overall structure of the knowledge base, the sub-layer improves the retrieval efficiency of specific equipment or tasks, and the meta-layer contains entities and manages the relationship between cross-domain knowledge.

[0021] As a further improvement of the present invention, (2) constructing a three-layer RAG graph structure further includes:

[0022] (21) Document semantic segmentation is performed on the device document layer, basic knowledge layer, and domain dictionary layer in the three-layer RAG graph structure; specifically:

[0023] 21a. Preliminarily segment the target document into several paragraphs, and extract the core proposition of each segmented paragraph;

[0024] 21b. Determining whether to merge adjacent propositions or keep them independent based on the determined semantic relationship between the propositions;

[0025] 21c. Applying a sliding window technique to divide the continuous paragraphs into blocks, ensuring semantic consistency of the propositions, and completing the merging or separation of the propositions in the blocks;

[0026] (22) Identify entities in the three-layer RAG graph structure and construct the meta-layer, sub-layer and global graph in sequence; specifically:

[0027] 22a. Identify potential entities based on the segmented document paragraphs, and construct each identified entity into a data structure containing a unique identifier; repeat the identification and construction process to ensure that no information in the offline dataset is missed; wherein the unique identifier is linked to the subsequent generation of prompt words, and each entity in the local knowledge base is assigned a unique identifier;

[0028] 22b. Perform entity hierarchical linking on the entities of the constructed three-layer data structure corresponding to the three-layer RAG graph structure, identify potential relationships between the entities, and weight each identified potential relationship. Based on the obtained weighted results, a basic weighted directed graph is constructed as a metagraph.

[0029] 22c. Utilize the Large Language Model (LLM) to generate labels for each meta-graph in the meta-layer of the three-layer RAG graph structure based on the equipment maintenance category, and perform similarity calculations on all meta-graphs to obtain the sub-layers of the three-layer RAG graph structure. The entities in the three-layer RAG graph structure have multi-level associations, including relationships between the components of the equipment itself, failure modes, maintenance methods, and diagnostic strategies. Each piece of equipment in the equipment document layer is associated with maintenance manuals, technical standards, and maintenance records. The entity information for each piece of equipment is linked to the basic knowledge layer, which stores general maintenance principles, diagnostic methods, and related theories. The domain dictionary layer provides standardized term definitions, industry regulations, and parameter calculation formulas, enabling different pieces of equipment to establish connections through similarity analysis and share similar diagnoses and maintenance recommendations.

[0030] 22d. Merge the meta-graphs with high similarity to form a global graph with a three-layer RAG graph structure. Further merge the sub-layers based on multiple meta-graphs to form a higher-layer graph, and repeat the iterative process to obtain the global graph.

[0031] As a further improvement of the present invention, the step three is specifically as follows:

[0032] Based on the U-retrieve bottom-up matching strategy, a text summary label description of the user question is first generated. Then, the label description is used to identify the most relevant graphs through a top-down matching process. Starting from the global graph, the label description is matched to the sub-layer, and then gradually indexed downward to the smaller graphs contained in it. This matching process is repeated until the meta-layer is reached. At this time, the K most relevant entities are retrieved and aggregated.

[0033] Based on the K most relevant entities, a top-down matching strategy is used, starting from the global graph, and gradually locating the corresponding sub-layer through label matching. The sub-layer consists of K meta-graphs, each of which includes at least one most relevant entity and identifies the relationship between the entity and other entities. Following the matching of the most relevant entities from the sub-layer, the prompt words are optimized based on the label information of the sub-layer, and the prompt words are assembled into standardized input based on the standardized prompt word template.

[0034] As a further improvement of the present invention, the step 4 is specifically as follows:

[0035] Large Language Model (LLM) retrieves structured databases, unstructured text, and graph-enhanced data in the knowledge base, matching query content through semantic search;

[0036] Extract specific information about specific equipment from the device document layer of the offline database. If insufficient information is found, obtain general maintenance knowledge from the basic knowledge layer of the offline database. Perform terminology parsing in the domain dictionary layer of the offline database to obtain search information.

[0037] An intermediate response is generated based on the information of the relevant sub-layers matched by the retrieved information aggregation. The intermediate response includes the causal relationship between entities and the logical sequence of the maintenance process. The intermediate response integrates the original information retrieved from the knowledge base and serves as the basis for the subsequent large language model (LLM) to generate the final response.

[0038] As a further improvement of the present invention, the step five is specifically as follows:

[0039] The global knowledge summary layer is based on the label information of the higher-level graph in the knowledge base. The label information comes from the fusion of multiple sub-layers, which carry equipment maintenance knowledge of different granularities. The global layer in the higher-level graph is formed by multiple sub-layers through entity association and semantic aggregation to form an overall structure, ensuring the coherence, hierarchy and standardization of information during retrieval.

[0040] By combining label information from matching sub-layers and the global graph, repair suggestions are gradually supplemented and optimized, generating detailed and actionable responses that meet industry standards.

[0041] Based on the label information in the global graph that matches the detailed reply, the large language model (LLM) automatically increases the weight of the corresponding reply content by the frequency of occurrence in the corresponding historical maintenance records, and optimizes its expression to generate the final reply.

[0042] The advantages of the present invention are:

[0043] The present invention deploys an offline knowledge base and a large language model, and uses RAG technology to combine the information retrieval and generation capabilities of the large language model, thereby improving the performance of the question-answering system in complex fields and realizing question-answering functions for equipment maintenance and support in professional fields.

[0044] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:

[0046] Figure 1 : A flow chart of an equipment maintenance support question-answering method based on the integration of the RAG large language model provided by the present invention;

[0047] Figure 2 : The workflow diagram of the equipment maintenance support question-answering system based on the RAG large language model provided by the present invention;

[0048] Figure 3 : The three-layer RAG structure provided by the present invention is a metagraph composed of entity links;

[0049] Figure 4 : The global graph formed by the meta-graph label matching provided by the present invention. DETAILED DESCRIPTION

[0050] The following describes in detail embodiments of the present invention. The embodiments are exemplary and intended to explain the present invention, but are not to be construed as limiting the present invention.

[0051] See also Figure 1 The embodiment of the present invention provides an equipment maintenance support question-answering method based on the RAG large language model, including:

[0052] Step 1: Get the question information asked by the corresponding user, perform text segmentation on it, and then mark the text labels of the corresponding segmented text.

[0053] Specifically, the above-mentioned step 1 of the embodiment of the present invention further includes: generating a summary description through text tags, and in step 2, using the summary description to identify the most relevant graph in the local knowledge base through a top-down matching process.

[0054] Step 2: Based on the U-retrieve bottom-up matching strategy, starting from the global graph in the local knowledge base, the sub-layer labels are matched through text labels.

[0055] In this embodiment of the present invention, step 2 specifically involves matching text labels based on a bottom-up U-retrieve matching strategy, starting with the global graph in the local knowledge base corresponding to the offline dataset for equipment maintenance and support, and matching labels across sub-layers until reaching the meta-layer. The offline dataset is constructed by collecting data related to the operation and application of industrial equipment, creating an offline equipment maintenance and support dataset. The local knowledge base is established by constructing a three-layer RAG graph structure based on the offline dataset. Specifically, this embodiment of the present invention constructs a local three-layer RAG knowledge base based on the offline dataset, while the global graph ensures the overall structure of the knowledge base. The construction process includes: a) dividing the offline dataset into a top-level, middle-level, and bottom-level structure based on data source and usage: The equipment document layer (top-level data) includes equipment maintenance manuals, maintenance records, technical reports, and other data, which directly reflect maintenance processes and cases. The basic knowledge layer (middle-level data) covers equipment maintenance technical specifications, industry standards, academic papers, research reports, and other data, providing theoretical and methodological guidance for the maintenance process. The domain dictionary layer (bottom-level data) includes equipment component terminology libraries and standard failure mode libraries, which define the basic knowledge system for maintenance and support. b) Data cleaning and structuring: During entity recognition and normalization, a large language model (LLM) (such as GPT-4 or BERT) is used to extract key entities such as equipment names, components, failure modes, and repair methods, and synonyms are normalized. Data format conversion: Text, tables, images, and other data are converted into a unified format (such as JSON or CSV) to facilitate subsequent knowledge graph construction. c) Knowledge graph construction includes semantic document segmentation and element extraction. d) Knowledge relationship construction includes hierarchical links and relational links.

[0056] The above-mentioned step 2 of the embodiment of the present invention further includes: (1) constructing an offline data set for equipment maintenance and support; (2) constructing a three-layer RAG graph structure; (3) constructing a local knowledge base; specifically:

[0057] (1) Constructing an offline data set for equipment maintenance support, including: collecting data related to the operation and application of industrial equipment to construct an offline equipment maintenance data set;

[0058] (2) Constructing a three-layer RAG graph structure, including: constructing a three-layer RAG graph structure for the equipment maintenance data set, and the constructed three-layer RAG graph structure includes an equipment document layer, a basic knowledge layer, and a domain dictionary layer; specifically: constructing a three-layer RAG graph structure in (2) also includes: (21) performing document semantic segmentation on the equipment document layer, the basic knowledge layer, and the domain dictionary layer in the three-layer RAG graph structure; specifically: 21a, preliminarily segmenting the target document into several paragraphs, and extracting the core propositions of each segmented paragraph; 21b, determining whether to merge adjacent propositions or keep them independent based on the semantic relationship between the judged propositions; 21c, applying sliding window technology to continuous The paragraphs are divided into blocks to ensure that their propositions are semantically consistent and to complete the merging or separation of the propositions in the blocks; (22) Identify the entities in the three-layer RAG graph structure and construct the meta-layer, sub-layer and global graph in sequence; specifically: 22a, identify potential entities based on the segmented document paragraphs, and construct each entity that has been identified into a data structure containing a unique identifier; repeat the identification and construction process to ensure that no information of the offline dataset is missed; among them, the unique identifier is related to the subsequent prompt word generation. Each entity in the knowledge base is given a unique identifier. The functions of the unique identifier include data retrieval and indexing, ambiguity elimination, relationship mapping and version management (for different versions of the same entity (such as new model launch) Maintenance manual of the machine), which can be managed using different UIDs to ensure that historical data is traceable); 22b. Perform entity hierarchical linking on the entities of the three-layer data structure that has been constructed and corresponds to the three-layer RAG graph structure, identify the potential relationships between the entities and weight each identified potential relationship, and construct a basic weighted directed graph as a meta-graph based on the obtained weighted results; 22c. Use the large language model LLM to generate a label for each meta-graph in the meta-layer of the three-layer RAG graph structure based on the equipment maintenance category, and calculate the similarity of all meta-graphs to obtain the sub-layer of the three-layer RAG graph structure; Among them, the prompt words of the large language model LLM usually need to explicitly reference the information of the relevant entities to ensure that the answer The accuracy and consistency of the above-mentioned unique identifier can ensure the accuracy of matching related entities based on keywords or semantics; there are multi-level associations between entities in the three-layer RAG graph structure, including the relationship between the components of the equipment itself, failure modes, maintenance methods, and diagnostic strategies; each piece of equipment in the equipment document layer is associated with a maintenance manual, technical standards, and maintenance records, and the corresponding entity information of each piece of equipment is linked to the basic knowledge layer, which stores general maintenance principles, diagnostic methods, and related theories; the domain dictionary layer provides standardized term definitions, industry regulations, and parameter calculation formulas, enabling different equipment to establish connections through similarity analysis and share similar diagnostic steps and maintenance recommendations;22d. Merge the meta-graphs with high similarity to form a global graph with a three-layer RAG graph structure. Further merge sub-layers based on multiple meta-graphs to form a higher-layer graph, and repeat the iterative process to obtain the global graph.

[0059] In this embodiment of the present invention, the global graph, serving as the highest level of the knowledge base, encompasses comprehensive information on equipment maintenance and support, including equipment structure, failure modes, maintenance methods, and relevant standards and specifications. Using a bottom-up matching strategy called U-retrieve, the system begins its search by using text tags from the global graph, gradually narrowing the query scope and matching to more refined sub-layer tags. The global graph, encompassing all parsed equipment maintenance and support knowledge, is constructed based on a three-layer knowledge graph data structure. The global graph is further divided into multiple sub-layers based on different domains or problem types, such as the "Hydraulic System Maintenance Sub-Graph" and the "Electrical Fault Diagnosis Sub-Graph." Each sub-layer is organized and optimized for a specific type of maintenance problem. Furthermore, a meta-layer is introduced to manage the semantic relationships between different sub-layers, ensuring that the knowledge base's hierarchical structure efficiently supports intelligent retrieval and reasoning. When a user asks a question, the system first performs a top-down matching within the global graph, locating the most relevant sub-layer by analyzing the keywords and semantics of the user's question. Within this sub-layer, the system further retrieves specific equipment maintenance knowledge and generates an intermediate response based on the context of the user's question. This intermediate response not only contains direct repair information but also incorporates label information from sub-layers to provide a more refined overview and explanation. This intermediate response is then combined with label information from higher-level graphs, further invoking data from mid- and bottom-level layers to make the system's response more layered and in-depth.

[0060] For example, when answering the question "Possible causes of engine starting difficulties on a certain model," the system first extracts common fault information for that device from the maintenance manual (top layer), then provides troubleshooting steps based on technical specifications (middle layer), and finally verifies the accuracy of the diagnostic logic by referencing a term library (bottom layer). As the search progresses, the system matches upwards, continuously optimizing the information to ensure that the resulting response is not only accurate and meets user needs, but also has sufficient contextual support.

[0061] (3) Constructing a local knowledge base, including: building a three-layer RAG graph structure based on the offline dataset.

[0062] In actual applications, the embodiment of the present invention collects data files and status detection reports related to industrial equipment and systems, constructs an offline equipment maintenance and support data set based on the collected and classified documents, and divides the equipment maintenance and support data set into a three-layer RAG graph structure: equipment document layer, basic knowledge layer, and domain dictionary layer. Specifically: The equipment document layer includes those responsible for managing and organizing equipment-related documents, operating manuals, and maintenance records. The basic knowledge layer integrates the core knowledge in the field of equipment maintenance, covering common failure modes, maintenance steps, and equipment maintenance points. The domain dictionary layer is based on an authoritative technical dictionary, providing definitions and semantic relationships of equipment-related terms to ensure the accuracy and consistency of the answers.

[0063] The embodiment of the present invention performs document semantic segmentation on the equipment document layer, basic knowledge layer, and domain dictionary layer in the equipment maintenance and support dataset. The specific steps include:

[0064] (1) Paragraph segmentation and equipment hierarchy recognition: First, the document is initially segmented based on the block method, and the document is divided into several independent paragraphs using natural line breaks and paragraph separators. In view of the particularity of equipment maintenance documents, the equipment hierarchy is recognized to ensure that each paragraph can accurately reflect the logical hierarchy of equipment components, maintenance processes, or fault diagnosis. For some complex equipment documents, segmentation rules based on equipment hierarchy relationships are added to avoid mistakenly grouping maintenance content of different equipment or systems into the same paragraph.

[0065] (2) Maintenance scenario semantic optimization of proposition transfer and merging: When extracting core propositions from each paragraph, in addition to applying zero-shot learning to determine the semantic relationship between propositions, specific semantic analysis rules can also be designed based on the scenario requirements of equipment maintenance. For example, based on common scenarios such as maintenance processes, fault diagnosis steps, and maintenance cycles, the judgment criteria for proposition transfer and merging can be optimized. It is preferred to introduce a domain-specific maintenance terminology library and determine whether the propositions in a paragraph belong to the same maintenance task or equipment status by matching key terms and operation steps in the maintenance process.

[0066] (3) Adjustment of paragraph length and context consistency: For the technical details and operating instructions in equipment maintenance and support documents, a hard paragraph length threshold is set to ensure that the content of each paragraph can maintain the integrity of the context while avoiding exceeding the context limit of the large language model. In this process, the sliding window technology is applied to dynamically adjust the paragraph merging and segmentation strategies based on the complexity of the maintenance task and the coherence of the operating instructions. For example, the multi-step operation in the maintenance process ("fault analysis → troubleshooting → maintenance operation") can be maintained in the same paragraph, but the paragraphs that describe each step independently are segmented according to the characteristics of the equipment document. Since large-scale industrial equipment documents contain multiple topics and content, the above method can complete efficient processing and accurately detect the topic and content context of the text.

[0067] (4) Element extraction: Based on the segmented document paragraphs, potential entities are identified. The model prompts the name, type, and description for each entity. For example, the name can be native text in the document, or it can be derived from industrial terms. Appropriate words are selected to map to subsequent professional terms. Each identified entity is then constructed into a data structure containing a unique identifier to track the source document of the entity and facilitate the subsequent generation of a response based on the basis. The above process is repeated iteratively until the large-scale language model is ensured to have not missed any information.

[0068] (5) Hierarchical linking and relational linking: Entity hierarchical linking is performed through the constructed three-layer data structure entities. The following steps are included: (51) Constructing a three-layer RAG data structure; specifically, the first layer is the equipment documents provided by the user, as the top layer data, and the second layer is the core knowledge and academic articles in the field of equipment maintenance, as the middle layer data. The third layer is the professional term definitions and semantic relationships related to equipment and technology, as the bottom layer data. (52) Hierarchical linking: First, the industrial entities in the first layer are linked to the related entities in the second layer, and matched by semantic similarity or definition consistency; then the industrial entities in the second layer are linked to the well-defined industrial field terms and their knowledge relationships in the third layer. (53) Relational linking: First, relationship identification is performed, and the potential relationship between entities is identified based on the name, description and definition of each industrial entity through a large language model, and the relationship between the source entity and the target entity is generated. Then, each identified relationship is weighted, and the weight is determined according to the closeness of the relationship (for example, very relevant, relevant, medium, etc.). Based on the weighted results, a basic weighted directed graph, namely the metagraph, is constructed. The metagraph in this example is as follows Figure 3 As shown, it contains all entities and their identified relationships.

[0069] (6) Label generation and graph merging: After constructing the meta-graph, the distance between each pair of meta-graphs is calculated, and the meta-graphs are integrated into larger entities based on the distance. The content of each meta-graph is summarized using the predefined categories of the large model (equipment status, maintenance records, equipment functions, and maintenance tools). The large model generates a short summary for each category based on the content of the meta-graph, thereby generating a label list based on the summary topic. The similarity is calculated using the labels of all basic meta-graphs, and the meta-graphs with the highest similarity are merged into Figure 4 The larger graph structure shown is as follows:

[0070]

[0071] Here, ν represents the text entity in the local knowledge base, ω represents the query text entity, and L represents the entity length. Summary and label information are then generated for the new graph, and similarity with other graphs is recalculated for further merging until a global graph is obtained. Because the accumulation of label information leads to loss of detailed information as the number of merges increases, the number of iterations is manually set, limiting the process to 24 iterations to prevent excessive loss of detail.

[0072] Step 3: Based on the sub-layer labels, the K most relevant entities are retrieved and aggregated from the meta-layer in the local knowledge base. A prompt word template is then used to generate a prompt word based on these K most relevant entities. Specifically, the global graph in the local knowledge base first locates the query scope and then performs a continuous downward matching process until the K most relevant entities are retrieved. Combined with this data, the sub-layers are retrieved from top to bottom to obtain label information, and the prompt word template is used to generate an optimized prompt word.

[0073] The above-mentioned step three of the embodiment of the present invention is specifically as follows: based on the U-retrieve bottom-up matching strategy, first generate a text summary label description of the user question, and then use the label description to identify the most relevant graph through a top-down matching process; starting from the global graph, match the sub-layer through the label description, and gradually index downward to the smaller graphs it contains, repeat this matching process until reaching the meta-layer, and retrieve and aggregate to obtain K most relevant entities; based on the K most relevant entities, through a top-down matching strategy, starting from the global graph, gradually locate the corresponding sub-layer through label matching, the sub-layer is composed of K meta-graphs, each meta-graph contains one of the K most relevant entities and identifies the relationship between the entity and other entities, follow the matching of the most relevant entities from the sub-layer, optimize the prompt words in combination with the label information of the sub-layer, and assemble the prompt words into standardized input based on the standardized prompt word template.

[0074] Step 4: Use the large language model (LLM) to search the knowledge base to obtain retrieval information, and generate an intermediate response to the corresponding question information based on the retrieval information.

[0075] The above-mentioned step four of the embodiment of the present invention is specifically as follows: the large language model LLM retrieves structured data, unstructured text and graph-enhanced data in the local knowledge base, and matches the query content through semantic search; extracts specific information of specific equipment in the equipment document layer of the offline database. If sufficient information is not matched, obtains general maintenance knowledge in the basic knowledge layer of the offline database, performs terminology parsing in the domain dictionary layer of the offline database, and then obtains retrieval information; generates an intermediate response based on the relevant information of the matched related sub-layers aggregated by the retrieval information; wherein the intermediate response includes the causal relationship between entities and the logical order of the maintenance process.

[0076] Step 5: Combine the intermediate response with the label information of the higher-level graph in the knowledge base to generate a more detailed response, and then generate a final response based on the response; the final response includes maintenance suggestions or fault diagnosis results.

[0077] Step five of the embodiment of the present invention is specifically as follows: combining the label information of a higher-level graph in the knowledge base as a summary of global knowledge, wherein the label information comes from the fusion of multiple sub-layers, each of which carries equipment maintenance knowledge of different granularities. The global layer in the higher-level graph is formed into an overall structure by entity association and semantic aggregation of multiple sub-layers, thereby ensuring the consistency, hierarchy and standardization of information during retrieval; gradually supplementing and optimizing maintenance suggestions by combining the label information of matching sub-layers and the global graph, and generating detailed replies that meet industry standards and are operational; based on the detailed replies matching the label information in the global graph, the large language model LLM automatically increases the weight of the corresponding reply content by the frequency of occurrence in the corresponding historical maintenance records, and generates a final reply by optimizing its expression.

[0078] In practical applications, embodiments of the present invention perform information retrieval and query response from graphs. Specifically, based on the U-retrieve bottom-up matching strategy, a text summary label description of the user's question is first generated. These descriptions are then used in a top-down matching process to identify the most relevant graphs. Starting from the global graph, label matching is performed to the sub-layers, and then indexed downward to the contained smaller graphs. This matching process is repeated until the meta-layer is reached, at which point the K most relevant entities are retrieved and aggregated. In this embodiment, K is an adjustable hyperparameter, and a prompt word template is used to generate the model prompt word. For example, the specific prompt word template is as follows:

[0079] PTOMPT_TEMPLATE="Known Information: {Text1, Text2,..., Text K}”

[0080] Based on the prompt word, this embodiment collects data including the entity's content, related basic industrial knowledge, and correlations and relationships with entities in other professional dictionary domains. The large model generates an intermediate response based on the generated prompt word, then combines this response with label information from a higher-level graph to generate a more detailed response. This process is repeated until the final response is generated, ensuring that the final response of the equipment maintenance support question-and-answer system is accurate and evidence-based.

[0081] Furthermore, in this embodiment, a user query is input into the aforementioned system. The system first uses semantic similarity calculation to match the K most relevant entities from the sub-layer to the user's input equipment maintenance-related question. For example, for the question "How do I diagnose an engine ignition failure?", possible matching entities include: fuel injection system failure, insufficient battery voltage, and starter motor damage. Matching the sub-layer includes extracting relevant knowledge context and combining the K most relevant entities. Further matching related knowledge categories within the sub-layer includes: fuel injection system failure (such as a clogged injector or insufficient fuel pump pressure, or poor fuel supply), abnormal battery voltage (if the battery voltage is lower than the starting requirement, the starter motor may not function properly), and starter motor failure (if the motor is internally damaged or the wiring is aging, it may affect engine starting performance). Label information is extracted from the sub-layer to enrich the prompt word context (for example, a sub-layer may include the following labels: "Diesel Engine Starting Failure," "Fuel System Maintenance," and "Engine Starting System Inspection Steps").

[0082] This embodiment assembles a standardized prompt word template, wherein the prompt word filling variable process:

[0083] (1) Select the appropriate prompt word template and the corresponding maintenance question and answer template according to the question type. The prompt word template example is as follows:

[0084]

[0085] (2) Fill in the variables to generate the final prompt word:

[0086] The K most relevant entities retrieved are filled into the placeholders in the template (e.g., {related entity 1}, {related entity 2}). After the keyword template is filled, the final prompt words may be as follows:

[0087]

[0088] Optimize the final prompt word based on the global graph; the specific optimization process includes:

[0089] (1) Global map label correction: Combined with industry standards in the global map, the professionalism of prompt words is optimized. For example, "Standard inspection method for fuel system" is added to ensure that the answer conforms to industry best practices; combined with maintenance experience data, prompt words are adjusted to make them more in line with engineers' usage habits.

[0090] (2) Optimize the prompt word format and improve parsing capabilities, for example:

[0091]

[0092] Specifically, this embodiment retrieves causal relationships between multiple entities based on prompt words, including: fuel injection system failure → affects fuel supply → may lead to starting failure. Combining the maintenance records of the meta-layer and the sub-layer, the engine fuel system knowledge retrieved includes: insufficient battery voltage → reduced power supply capacity → may cause the starter motor to malfunction. This embodiment associates the battery status data and general battery knowledge of the device, including: low temperature environment → affects fuel fluidity and battery performance → may cause starting difficulties. This embodiment reflects industry standard knowledge in the global graph, namely common problems with engines in low temperature environments.

[0093] The logical sequence of retrieving the maintenance process based on the prompt word in this embodiment includes: first checking the battery voltage (because power supply problems will directly lead to starting failure); secondly checking the fuel supply (if the power supply is normal, then checking whether the fuel is sufficient); finally checking the starter motor and ignition system (if the fuel and battery are normal, then checking the mechanical and electronic systems).

[0094] Based on the prompt words generated in the previous step, the large model LLM has obtained multiple potential reasons from the local knowledge base and screened out the K most relevant entities. The large model LLM generates an intermediate response. The specific example is as follows:

[0095]

[0096] The above reply is the intermediate result of the final answer. Its function is to integrate the original information retrieved from the knowledge base. The intermediate result serves as the basis for the subsequent large model LLM to generate the final professional answer.

[0097] The embodiment of the present invention first divides the document into blocks through static symbols and topic segmentation technology, extracts entity information and constructs a relationship graph between entities; then, through the graph merging and label generation strategy, it automatically generates maintenance suggestions and fault diagnosis results that are highly relevant to the user's problem. Finally, using retrieval enhancement generation (RAG) technology, information retrieval and answer generation are achieved from the global graph based on a top-down retrieval strategy, ensuring that the generated responses have both professional basis and can meet equipment support needs. Therefore, the specific implementation methods of the present invention can be widely used in scenarios such as maintenance and fault diagnosis of complex equipment, effectively improving the efficiency and accuracy of equipment maintenance and support.

[0098] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.

Claims

1. A method for equipment maintenance support question answering based on the RAG large language model, characterized by: include: Step 1: Obtain the question information asked by the corresponding user, perform text segmentation and mark the corresponding text labels; Step 2: Based on the U-retrieve bottom-up matching strategy, the text labels are matched from the global graph in the knowledge base to the labels of the sub-layers; Step 3: Retrieve and aggregate the corresponding K most relevant entities from the meta-layer based on the labels of the sub-layers, and generate prompt words based on the K most relevant entities using the prompt word template: First, locate the query scope in the global graph of the knowledge base and then continuously match downward until the data of the K most relevant entities is obtained. Combined with this data, search the sub-layers from top to bottom to obtain label information, and generate optimized prompt words using the prompt word template; Step 4: Use the large language model (LLM) to search the knowledge base to obtain search information and generate an intermediate response corresponding to the question information; Step 5: After generating a detailed response based on the label information of a higher-level graph in the knowledge base, iterative optimization is performed based on the detailed response until a final response is generated; wherein the final response includes maintenance suggestions or fault diagnosis results.

2. The equipment maintenance support question-answering method based on the RAG large language model according to claim 1 is characterized in that: The step one further comprises: A summary description is generated through the text label, and the summary description is used in step 2 to identify the most relevant graph in the local knowledge base; wherein the most relevant graph serves as a bridge connecting the global graph and the sub-layer. In step 2, the most relevant graph is identified during the matching process, and the graph is used as the key node connecting the global knowledge and the specific maintenance knowledge. The similarity calculation based on the text label and the summary description is selected to ensure that the matched layer covers the core issues of the user query.

3. The equipment maintenance support question-answering method based on the RAG large language model according to claim 1 is characterized in that: The step 2 is specifically as follows: Based on the U-retrieve bottom-up matching strategy, the text label starts from the corresponding global graph in the local knowledge base of the corresponding offline dataset until the label of the sub-layer is matched, and the meta-layer is reached according to the label of the sub-layer.

4. The equipment maintenance support question-answering method based on the RAG large language model according to claim 3 is characterized in that: The second step specifically includes: (1) constructing an offline data set for equipment maintenance support; (2) constructing a three-layer RAG graph structure; (3) constructing a local knowledge base; specifically: (1) Constructing an offline data set for equipment maintenance support, including: collecting data related to industrial equipment operation and application, and constructing an offline equipment maintenance data set; (2) Constructing a three-layer RAG graph structure, including: constructing a three-layer RAG graph structure for the equipment maintenance data set, wherein the constructed three-layer RAG graph structure includes an equipment document layer, a basic knowledge layer, and a domain dictionary layer, wherein the equipment document layer includes equipment maintenance manuals and technical documents provided by users, and the technical documents contain actual operation guidelines and equipment specific information; the basic knowledge layer includes technical specifications, maintenance guidelines, and academic papers related to equipment maintenance; and the domain dictionary layer covers an equipment maintenance term library, a standard failure mode library, and their knowledge relationships; (3) Constructing a local knowledge base, including: building a local knowledge base with a three-layer RAG graph structure based on the offline dataset. The global graph in the three-layer RAG graph structure ensures the overall structure of the knowledge base, the sub-layer improves the retrieval efficiency of specific equipment or tasks, and the meta-layer contains entities and manages the relationship between cross-domain knowledge.

5. The equipment maintenance support question-answering method based on the RAG large language model according to claim 4 is characterized in that: (2) Constructing a three-layer RAG graph structure, including: (21) Document semantic segmentation is performed on the device document layer, basic knowledge layer, and domain dictionary layer in the three-layer RAG graph structure; specifically: 21a. Preliminarily segment the target document into several paragraphs, and extract the core proposition of each segmented paragraph; 21b. Determining whether to merge adjacent propositions or keep them independent based on the determined semantic relationship between the propositions; 21c. Applying a sliding window technique to divide the continuous paragraphs into blocks, ensuring semantic consistency of the propositions, and completing the merging or separation of the propositions in the blocks; (22) Identify entities in the three-layer RAG graph structure and construct the meta-layer, sub-layer and global graph in sequence; specifically: 22a. Identify potential entities based on the segmented document paragraphs, and construct each identified entity into a data structure containing a unique identifier; repeat the identification and construction process to ensure that no information in the offline dataset is missed; wherein the unique identifier is linked to the subsequent generation of prompt words, and each entity in the local knowledge base is assigned a unique identifier; 22b. Perform entity hierarchical linking on the entities of the constructed three-layer data structure corresponding to the three-layer RAG graph structure, identify potential relationships between the entities, and weight each identified potential relationship. Based on the obtained weighted results, a basic weighted directed graph is constructed as a metagraph. 22c. Utilize the Large Language Model (LLM) to generate labels for each meta-graph in the meta-layer of the three-layer RAG graph structure based on the equipment maintenance category, and perform similarity calculations on all meta-graphs to obtain the sub-layers of the three-layer RAG graph structure. The entities in the three-layer RAG graph structure have multi-level associations, including relationships between the components of the equipment itself, failure modes, maintenance methods, and diagnostic strategies. Each piece of equipment in the equipment document layer is associated with maintenance manuals, technical standards, and maintenance records. The entity information for each piece of equipment is linked to the basic knowledge layer, which stores general maintenance principles, diagnostic methods, and related theories. The domain dictionary layer provides standardized term definitions, industry regulations, and parameter calculation formulas, enabling different pieces of equipment to establish connections through similarity analysis and share similar diagnoses and maintenance recommendations. 22d. Merge the meta-graphs with high similarity to form a global graph with a three-layer RAG graph structure. Further merge the sub-layers based on multiple meta-graphs to form a higher-layer graph, and repeat the iterative process to obtain the global graph.

6. The equipment maintenance support question-answering method based on the RAG large language model according to claim 1 is characterized in that: The step three is specifically as follows: Based on the U-retrieve bottom-up matching strategy, a text summary label description of the user question is first generated. Then, the label description is used to identify the most relevant graphs through a top-down matching process. Starting from the global graph, the label description is matched to the sub-layer, and then gradually indexed downward to the smaller graphs contained in it. This matching process is repeated until the meta-layer is reached. At this time, the K most relevant entities are retrieved and aggregated. Based on the K most relevant entities, a top-down matching strategy is used, starting from the global graph, and gradually locating the corresponding sub-layer through label matching. The sub-layer consists of K meta-graphs, each of which includes at least one most relevant entity and identifies the relationship between the entity and other entities. Following the matching of the most relevant entities from the sub-layer, the prompt words are optimized based on the label information of the sub-layer, and the prompt words are assembled into standardized input based on the standardized prompt word template.

7. The equipment maintenance support question-answering method based on the RAG large language model according to claim 1 is characterized in that: The step 4 is specifically as follows: Large Language Model (LLM) retrieves structured databases, unstructured text, and graph-enhanced data in the knowledge base, matching query content through semantic search; Extract specific information about specific equipment from the device document layer of the offline database. If insufficient information is found, obtain general maintenance knowledge from the basic knowledge layer of the offline database. Perform terminology parsing in the domain dictionary layer of the offline database to obtain search information. An intermediate response is generated based on the information of the relevant sub-layers matched by the retrieved information aggregation. The intermediate response includes the causal relationship between entities and the logical sequence of the maintenance process. The intermediate response integrates the original information retrieved from the knowledge base and serves as the basis for the subsequent large language model (LLM) to generate the final response.

8. The equipment maintenance support question-answering method based on the RAG large language model according to claim 1 is characterized in that: The step five is specifically as follows: The global knowledge summary layer is based on the label information of the higher-level graph in the knowledge base. The label information comes from the fusion of multiple sub-layers, which carry equipment maintenance knowledge of different granularities. The global layer in the higher-level graph is formed by multiple sub-layers through entity association and semantic aggregation to form an overall structure, ensuring the coherence, hierarchy and standardization of information during retrieval. By combining label information from matching sub-layers and the global graph, repair suggestions are gradually supplemented and optimized, generating detailed and actionable responses that meet industry standards. Based on the label information in the global graph that matches the detailed reply, the large language model (LLM) automatically increases the weight of the corresponding reply content by the frequency of occurrence in the corresponding historical maintenance records, and optimizes its expression to generate the final reply.

Citation Information

Cited By

  • Clinical test data report management system and method

    CN121306370A

  • Industrial master conceptual design method and equipment based on knowledge graph and MBSE

    CN121766116A

  • LLM-based equipment maintenance usage guarantee model intelligent generation method and device

    CN121809544A