Aviation maintenance processing method based on RAG framework
By adopting a RAG framework-based method in aviation maintenance, long text and large table data are processed, MultiHop-RAG data sets and knowledge graph triplets are constructed, and multi-hop query is combined with large language models, the data processing efficiency in aviation maintenance is solved. and accuracy issues achieve more efficient troubleshooting and repair decision support.
Patent Information
- Application Number
- CN202411413211.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-03
AI Technical Summary
Existing aviation maintenance data processing methods are difficult to effectively process long text and large table data, resulting in insufficient efficiency and accuracy of fault diagnosis. Especially in aircraft maintenance, traditional methods are difficult to meet the requirements of efficiency and accuracy.
Using the aviation maintenance processing method based on the RAG framework, the multiHop-RAG data set and knowledge graph triplet are constructed by analyzing long text documents and large table documents, and multi-hop query and retrieval are combined with large language models to optimize table processing and Search technology to reduce misdiagnosis and improve the accuracy of fault diagnosis.
It significantly improves the processing efficiency and accuracy of long text and large table data, reduces the possibility of misdiagnosis, improves the accuracy of fault diagnosis, and provides more accurate maintenance guidance and decision-making support.
Smart Images

Figure CN119248906A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an aviation maintenance processing method, and in particular to an aviation maintenance processing method based on a RAG framework. Background Art
[0002] With the rapid development of the aviation industry, the requirements for aircraft operation and maintenance safety and efficiency are increasing. In this context, technological innovation in the field of aviation maintenance is particularly important. Aviation maintenance is a key link in ensuring flight safety, and the accuracy of its data processing and fault diagnosis is directly related to the operational safety and efficiency of the aircraft. Therefore, it is particularly urgent to find an advanced technology that can improve the efficiency and accuracy of maintenance data processing. RAG (Retrieval-Augmented Generation) technology, as a technology that combines information retrieval and generation models, provides new possibilities for aviation maintenance.
[0003] RAG technology can more accurately interpret and respond to complex maintenance scenarios by effectively combining existing maintenance data and generating models, significantly improving the speed and accuracy of fault diagnosis. Its core advantage is the ability to quickly retrieve a large amount of scattered historical maintenance data and assist in generating models based on the retrieval results to accurately answer or provide solutions. This is particularly critical in the field of aviation maintenance, because aircraft downtime and maintenance efficiency directly affect the operating costs and service quality of airlines.
[0004] In addition, maintenance data in the aviation field usually exists in the form of large tables and long texts, containing a large amount of detailed information and professional knowledge. The complexity of its content and the huge amount of information make it difficult for traditional data processing methods to meet the requirements of efficiency and accuracy. Therefore, the processing of long texts and large tables is particularly necessary. RAG technology not only ensures the integrity of information through efficient understanding and processing of these long text data, but also significantly improves processing speed and accuracy. Through the effective management and processing of long-term data, RAG technology can support the construction of a more comprehensive and accurate knowledge graph, thereby providing more accurate maintenance guidance and decision support.
[0005] RAG is a natural language processing model that combines retrieval and generation techniques. It combines the two techniques of retrieval and generation, solves some problems existing in traditional generation models, and improves the effectiveness and efficiency of generation models. RAG technology consists of two modules: Retriever and Generator. The Retriever is responsible for retrieving documents or paragraphs related to the input query content from a large knowledge base, and the Generator generates text using autoregression based on the documents or paragraphs returned by the Retriever. By combining the Retriever and the Generator, the RAG model can not only utilize the rich information in a large-scale knowledge base, but also generate high-quality text through the Generator. This has enabled the RAG model to make significant progress in natural language processing tasks such as question answering, summary generation, and dialogue systems, and has improved both efficiency and performance.
[0006] However, the retriever module in RAG technology is limited by the input length of the Embedding model and usually needs to slice a document. Slicing leads to a lack of overall understanding of the content of the text. Especially for Excel documents, when the table content is very large, the table needs to be split into multiple parts, which cannot meet the needs of overall summary statistics of the table. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide an aviation maintenance processing method based on the RAG framework, which can meet the processing of long texts and large tables, greatly reduce the possibility of misdiagnosis, and improve the accuracy of fault diagnosis.
[0008] The technical solution adopted by the present invention to solve the above technical problems is to provide an aviation maintenance processing method based on the RAG framework, comprising the following steps: S1) based on the RAG framework, the local knowledge document is parsed into long text documents and large table documents; S2) for the long text documents, the relevant knowledge of the document is first extracted using a large language model to construct a MultiHop-RAG data set, and the long text is designed as a long sequence thinking chain; for each document slice, a triple of the knowledge graph is generated, and factual knowledge is extracted from the triple of each slice document; S3) for the large table document, the Excel table is parsed into Markdown in the document parsing module n format; in the Chunk module, the original large table is divided according to a certain number of bytes, and a header is added to each Chunk to divide the original large table into several small tables; S4) constructs vector retrieval and keyword retrieval for user prompt words; then uses the large language model to sort the relevance of prompt words and retrieval content, and selects the relevant knowledge content with the highest similarity; S5) constructs a multi-hop query strategy, first retrieves triples based on the question, then converts the triple information into retrieval keywords, and performs multi-hop query; S6) Finally, the large language model is used to sort the relevance of the retrieved knowledge, and based on the historical maintenance log, a fault diagnosis for the current state is generated.
[0009] Furthermore, the MultiHop-RAG dataset in step S2 is constructed as follows: first, the factual sentences in each article are extracted as original evidence using a large language model; then, each piece of evidence is rewritten using the large language model to generate a corresponding statement, and the core entities and topics therein are identified as bridge points for subsequent generation of multi-hop questions; and then, the large language model is used to construct four types of multi-hop questions and their answers, namely, reasoning, comparison, timing, and empty question, around the same bridging entity or topic.
[0010] Furthermore, the step S3 includes, after parsing the table, introducing indexing technology to replace Chinese characters in the table with digital indexes, thereby obtaining a reduced table for summary statistics.
[0011] Furthermore, the step S3 includes: when a column of data is in digital format or the repetition rate is lower than a preset threshold, it is determined that the column of data is segmented data that does not need to be summarized, and summary statistics are performed on all other columns.
[0012] Furthermore, step S5 includes determining the correlation between prompt and the knowledge graph triple. If there is a strong correlation, the triple array is used as a keyword to perform a second query.
[0013] Furthermore, the step S5 includes: S51: searching the vector library for relevant knowledge according to the prompt requirement; searching the text knowledge library for relevant knowledge using keywords; S52: combining the knowledge retrieved in S51 with the prompt, calculating the correlation using the large language model, and selecting the one with stronger correlation as the new keyword; S53: performing multi-hop query according to the knowledge keywords obtained in S52, and obtaining relevant knowledge using vector retrieval and keyword retrieval respectively; S54: using the relevant knowledge obtained in S52 and S53, sorting using the large language model, selecting the fusion keyword method, and obtaining the top-ranked relevant knowledge.
[0014] Furthermore, the step S6 includes: detecting a faulty device from a fault state, querying the design documents and manufacturer information of the device according to the faulty device, formulating a maintenance strategy based on the information, and performing maintenance according to the maintenance strategy.
[0015] Compared with the prior art, the present invention has the following beneficial effects: the aviation maintenance processing method based on the RAG framework provided by the present invention proposes a processing solution for Long-term based on natural language processing and indexing technology, converting Long-term into Short-term, thereby meeting the processing of long texts and large tables, greatly reducing the possibility of misdiagnosis, and improving the accuracy of fault diagnosis. RAG technology is combined with historical maintenance logs, and a large language model is used to build an intelligent question-answering system in the field of aviation maintenance knowledge base. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 The present invention is an aviation maintenance process flow chart based on the RAG framework; Figure 2 A schematic diagram of constructing the Hop-KG dataset of the present invention; Figure 3 A schematic diagram of the Hop-KG dataset query of the present invention; Figure 4 This is a schematic diagram of the segmentation of a large table of the present invention; Figure 5 This is the optimized search flow chart of the present invention. DETAILED DESCRIPTION
[0017] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0018] Figure 1 The figure is a flowchart of the aviation maintenance process based on the RAG framework of the present invention.
[0019] (1) Long text optimization For long texts, based on the ideas of large language models (LLM), knowledge graphs (KG) and HotpotQA multi-hop datasets, we designed long texts into long sequence thinking chains. With reference to the paper "MultiHop-RAG: Benchmarking Retrieval-Augmented Generation for Multi-Hop Queries" [Yixuan Tang, Yi Yang, MultiHop-RAG: Benchmarking Retrieval-Augmented Generation for Multi-Hop Queries,arXiv:2401.15391[cs.CL]], we used a large language model to first extract relevant knowledge of the document to create the MultiHop-RAG dataset.
[0020] The construction method of the MultiHop-RAG dataset is as follows: First, LLM is used to extract factual sentences in each article as original evidence. Then, LLM is used to rewrite each piece of evidence, generate corresponding statements, and identify the core entities and topics as "bridge points" for subsequent generation of multi-hop questions. Then, GPT-4 is used to construct four types of multi-hop questions and their answers around the same bridging entity or topic: reasoning, comparison, time sequence, and empty question.
[0021] The scheme of generating data sets by LLM is borrowed, but considering the characteristics of aviation maintenance knowledge, aviation equipment is interrelated, and fault detection is a chain method. Therefore, the present invention designs a knowledge graph triple suitable for maintenance fault detection, and progressively queries related knowledge based on multi-hop query technology. The present invention uses LLM to make a knowledge graph triple for each document, and extracts factual knowledge from the triple of each document (entity 1, relationship, entity 2, text). This method designs a data set containing 4 elements. On the basis of the knowledge graph triple, a factual knowledge is added, namely the "text" in the last triple, which is called a jump knowledge base based on the Knowledg Graph, as shown below: Hop-KG: (Entity 1, Relation, Entity 2, Text) The Hop-KG dataset is constructed as follows Figure 2 As shown: Based on the Hop-KG dataset, it is necessary to build a multi-hop query strategy and implement the multi-hop query function: that is, when querying a Hop-KG data, first retrieve the triples according to the question, then turn the triple information into search keywords and perform multi-hop query. This can avoid the trouble of querying the graph database in the search statement, and the query based on keywords can also make up for the lack of semantic space and supplement semantic retrieval.
[0022] Hop-KG dataset query Figure 3 shown.
[0023] (2) Large table processing In the RAG technology, what is usually read in is a text file, such as a PDF or word document, and the support for Excel table data is relatively weak. Most of the aviation maintenance knowledge is stored in table data, and the present invention proposes a method for optimizing table processing.
[0024] A large table refers to a table with a large number of bytes. For example, if a column in a table contains a large number of characters, which exceeds the input byte requirement of the model, the table usually needs to be split. At this time, the table will be incomplete due to segmentation, resulting in incomplete retrieval, and further making it impossible to summarize and count the table.
[0025] Based on this, the present invention designs a method for processing tables. In the document parsing module, the present invention parses the Excel table into Markdown format. In the Chunk module, the table is segmented according to a certain number of bytes, and a header is added to each chunk. This method is used to segment the table into several small tables, so that the small tables can be retrieved during retrieval, making it easier for LLM to understand.
[0026] The number of bytes of the sliced document can refer to the maxtoken length of the large model and the number of topk to be retrieved. Currently, the maximum input length of the large model is usually around 1024, and topk is usually selected as 2-5 sliced documents, so the number of bytes of the sliced document of the present invention is usually set to around 500.
[0027] In the above scheme, a large table is divided into several small tables. Although the understanding and summarization ability of LLM is improved, the entire large table is still divided and cannot meet the overall summary statistics and other requirements. Therefore, the present invention designs a Long-to-short method.
[0028] Design a table processing module. After parsing the table, introduce indexing technology to replace the Chinese characters in the table with numeric indexes to reduce the number of bytes in the table. This reduced table can be used as a summary statistic.
[0029] Considering that some very large tables must be split to meet the input length requirements of LLM, in this case, before the Chunk module, it is necessary to use summary statistics to process the reduced table similar to a pivot table to generate a new table. For example, count each column in the table and perform groupby statistics on each row to generate a new small byte table. The above solution process is as follows Figure 4 shown.
[0030] Regarding the technical statistical process of processing the table, the present invention has the following operations: For the Pandas Dataframe table, the present invention needs to check the size of the table first, and then perform technical statistical operations if the length exceeds a certain threshold.
[0031] For all columns in Dataframe, the format of each column data is determined. When a column data is in digital format or the repetition rate is lower than a certain threshold, the present invention considers this column data as segmented data, not dimensional data that needs to be summarized. Based on this statistical idea, the present invention finds all the columns in Dataframe that can be grouped, and performs summary counting statistics operations on each column.
[0032] Therefore, the present invention converts the large table data into the data format of the sliced markdown overall table through the above scheme (the present invention does not display the real business data, but only displays the desensitized data): (3) Retrieval technology optimization Aviation intelligent maintenance can make fault diagnosis for the current status based on historical maintenance logs. The fault diagnosis technology is based on the retrieval technology of RAG in historical knowledge. RAG retrieval usually refers to storing local document chunks in a vector database, retrieving similar vectors based on the vector cosine distance, and then retrieving related documents. Under the multi-hop database design based on knowledge graph, the retrieval scheme needs to be optimized and updated. In order to meet multi-hop queries, it is first necessary to evaluate the query results, that is, to draw on the Self-Rag technology in [Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, Hannaneh Hajishirzi, Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection, arXiv:2310.11511[cs.CL]]: Modify the step 2 process of this architecture to determine the correlation between prompt and the knowledge graph triple. If there is a strong correlation, use the triple array as the keyword for a second query. The process is as follows: Figure 5 As shown: Step 1: Retrieve relevant knowledge from the vector library according to the prompt; use keywords to retrieve relevant knowledge from the text knowledge base; Step 2: Combine the knowledge retrieved in step 1 with the prompt, use the large language model to calculate the relevance, and select the one with stronger relevance as the new keyword; Step 3: Based on the knowledge keywords obtained in step 2, perform multi-hop query and use vector search and keyword search to obtain relevant knowledge; Step 4: Use the relevant knowledge obtained in step 2 and step 3, use the large language model to sort, select the best fusion keyword method, and obtain the best relevant knowledge, such as sorting the top n (Here n is a hyperparameter, which can be set according to the specific effect) related knowledge.
[0033] The aviation maintenance processing method based on the RAG framework provided by the present invention has the following beneficial effects: 1. This method can parse and understand the text content at a deeper level by extracting key factual sentences from long texts and converting them into triples of knowledge graphs. This not only helps the model grasp the core information of the document, but also clearly maps out the entities and their relationships, thereby providing richer and more accurate information support.
[0034] 2. The present invention uses the constructed MultiHop-RAG data set, and the model can handle complex query problems that require multi-step reasoning. This jump query capability is particularly suitable for scenarios such as aviation maintenance, where the solution of the problem requires the connection and reasoning of multiple knowledge points. For example, in aviation maintenance, the present invention usually detects a faulty device from a fault state, queries the design documents, manufacturers and other related information of the device based on the faulty device, and then formulates a maintenance strategy based on this information, and implements maintenance according to the maintenance strategy. This multi-hop query logic is suitable for implementation using the MultiHop-RAG solution.
[0035] 3. The present invention converts document content into a knowledge graph triple form, which helps to organize and store knowledge more systematically, making it easier to retrieve and use. This structured knowledge representation also facilitates more effective learning and memory of the model.
[0036] 4. The present invention improves the processing capability of large-scale table data by converting large tables into Markdown format and further processing. In particular, when facing super-large tables that must be segmented, it can effectively manage and process data that exceeds the conventional processing capability.
[0037] 5. By retaining the table header in the segmented table blocks, the model can better understand the meaning of each data block and the relationship between the data, which is especially important for processing tabular data using a natural language model.
[0038] 6. The processing method of the present invention makes large table data more suitable for the training and application of machine learning models, especially when using large language models (LLMs) for text analysis and other intelligent processing.
[0039] 7. The present invention first determines the relevance between the query prompt and the knowledge graph triple. This method ensures that only information that is highly relevant to the current fault situation is used for further query. This precise relevance check can greatly reduce the possibility of misdiagnosis and improve the accuracy of fault diagnosis.
[0040] 8. The second query using the knowledge graph triple as a keyword allows the system to not only match based on surface text information, but also go deep into the semantic level of the data for a more in-depth analysis. Such multi-hop query can explore more potential relevant information and provide a more comprehensive diagnosis basis.
[0041] 9. The multi-hop query in the present invention can provide multi-level information to support the complexity and variability in maintenance decision making. Maintenance personnel can make more comprehensive and thoughtful decisions based on information obtained from multiple perspectives.
[0042] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art may make some modifications and improvements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the definition of the claims.
Claims
1. An aviation maintenance processing method based on RAG framework, characterized in that: The steps include: S1) Based on the RAG framework, local knowledge document parsing is divided into long text documents and large table documents; S2) For long text documents, we use a large language model to extract relevant knowledge of the document to construct the MultiHop-RAG dataset, and design the long text into a long sequence thinking chain; generate a triple of the knowledge graph for each document slice, and extract factual knowledge from the triple of each slice document; S3) For large table documents, parse the Excel table into Markdown format in the document parsing module; in the Chunk module, split the original large table according to a certain number of bytes, add a header to each Chunk, and split the original large table into several small tables; S4) Construct vector retrieval and keyword retrieval for user prompt words; then use the large language model to sort the relevance of prompt words and search content, and select the relevant knowledge content with the highest similarity; S5) Construct a multi-hop query strategy, first retrieve triples according to the question, then convert the triple information into search keywords and perform multi-hop query; S6) Finally, the large language model is used to sort the relevance of the retrieved knowledge, and a fault diagnosis for the current status is generated based on the historical maintenance log.
2. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The MultiHop-RAG dataset in step S2 is constructed as follows: first, the factual sentences in each article are extracted as original evidence using a large language model; then, each piece of evidence is rewritten using the large language model to generate a corresponding statement, and the core entities and topics therein are identified as bridge points for subsequent generation of multi-hop questions; and then, the large language model is used to construct four types of multi-hop questions and their answers, namely, reasoning, comparison, timing, and empty question, around the same bridge entity or topic.
3. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The step S3 includes, after parsing the table, introducing indexing technology to replace the Chinese characters in the table with digital indexes, and obtaining a reduced table for summary statistics.
4. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The step S3 includes: when a column of data is in digital format or the repetition rate is lower than a preset threshold, determining that the column of data is segmented data that does not need to be summarized, and performing summary statistics on all other columns.
5. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The step S5 includes determining the correlation between prompt and the knowledge graph triple. If there is a strong correlation, the triple array is used as a keyword to perform a second query.
6. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The step S5 comprises: S51: Retrieve relevant knowledge from the vector library according to the prompt; use keywords to retrieve relevant knowledge from the text knowledge base; S52: Combine the knowledge retrieved in S51 with the prompt, calculate the relevance using the large language model, and select the one with stronger relevance as the new keyword; S53: performing multi-hop query according to the knowledge keywords obtained in S52, and obtaining relevant knowledge by using vector search and keyword search respectively; S54: Utilize the relevant knowledge obtained in S52 and S53, use the large language model for sorting, select the fusion keyword method, and obtain the top-ranked relevant knowledge.
7. The aviation maintenance processing method based on the RAG framework as claimed in claim 1, characterized in that: The step S6 includes: detecting a faulty device from a fault state, querying the design documents and manufacturer information of the device according to the faulty device, formulating a maintenance strategy based on the information, and performing maintenance according to the maintenance strategy.
Citation Information
Cited By
Intelligent question and answer method and system for table-containing document
CN120448497A
Large model reliable fault diagnosis method and system for aviation maintenance scene
CN122262159A
