Fault diagnosis method and system in aviation manufacturing field based on vertical large model
By using a fault diagnosis method based on a vertical large model in the aerospace manufacturing field, adaptive semantic segmentation and hybrid indexing techniques are employed to generate fault diagnosis question-and-answer data. This addresses the limitations of traditional manual methods in fault analysis, achieving efficient and accurate fault diagnosis and improving fault analysis capabilities in the aerospace manufacturing field.
Patent Information
- Application Number
- CN202610008436.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-06
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2046-01-06
AI Technical Summary
In the field of aerospace manufacturing, traditional fault diagnosis methods that rely on human experience are difficult to meet the needs of efficient and accurate fault analysis. Especially when faults are caused by the interaction of multiple factors, the limitations of manual methods are significant, leading to incomplete root cause analysis of faults.
A fault diagnosis method based on a vertical large model is adopted. Fault diagnosis question and answer data is generated through adaptive semantic segmentation to construct a fault diagnosis question and answer dataset. The projection layer and linear transformation layer of the base model are decomposed by LoRA method to generate an intermediate base model. Combined with hybrid indexing and reordering techniques, relevant text blocks are selected from the fault diagnosis vector knowledge base for diagnosis.
It enables efficient and accurate fault analysis, overcomes the limitations of relying on human experience for judgment, improves the accuracy and efficiency of fault tracing and analysis, and meets the safety and reliability requirements of aerospace component products and systems.
Smart Images

Figure CN121456409B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aerospace manufacturing technology, and in particular to a fault diagnosis method and system for aerospace manufacturing based on a vertical large model. Background Technology
[0002] In the practical application of fault diagnosis in the field of aerospace manufacturing, problems such as diverse data sources, complex fault knowledge systems, and complex root cause analysis are often encountered.
[0003] These challenges make traditional methods relying on human experience insufficient for efficient and accurate fault analysis, especially when faults are caused by the interaction of multiple factors rather than a single cause. Therefore, there is an urgent need for an intelligent and scalable solution to assist in fault tracing and analysis, thereby improving the safety and reliability of aerospace components and systems. Summary of the Invention
[0004] Therefore, the purpose of this invention is to provide a fault diagnosis method and system for the aerospace manufacturing field based on a vertical large model, so as to overcome the shortcomings of the prior art.
[0005] To achieve the above objectives, this invention provides a fault diagnosis method for the aerospace manufacturing field based on a vertical large model, the method comprising:
[0006] Fault diagnosis data in the aviation manufacturing field is collected to form a raw dataset. The raw dataset is then processed through adaptive semantic segmentation to generate fault diagnosis question and answer data. A fault diagnosis question and answer dataset is constructed, and the fault diagnosis question and answer dataset is divided into a training set and a test set according to a preset ratio.
[0007] Based on the requirements and using the LoRA method, the projection layer and linear transformation layer in the base model are selected. The original projection weights of the projection layer are decomposed into two first low-rank matrices. The two first low-rank matrices are applied in parallel with the original projection weights. The linear transformation layer is concatenated with the second low-rank matrix to obtain the intermediate base model. The intermediate base model is trained based on the training set to obtain the fault diagnosis model.
[0008] The original problem text is segmented and transformed sequentially to obtain corresponding text vectors. Based on the text vectors, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and reordering. The original problem text and the relevant text blocks are concatenated to obtain data in a specific form. Fault diagnosis is performed based on the specific form of data and the fault diagnosis model.
[0009] The beneficial effects of this invention are as follows: By preprocessing the original dataset, adaptive semantic segmentation of text blocks is performed to generate fault diagnosis question-and-answer data, and a fault diagnosis question-and-answer dataset is constructed. Based on the requirements, the projection layer and linear transformation layer in the base model are selected using the LoRA method. Then, the original projection weights of the projection layer are decomposed into two first low-rank matrices, so that the two first low-rank matrices and the original projection weights can be used in parallel. The linear transformation layer is concatenated with the second low-rank matrix to obtain an intermediate base model. The intermediate base model is then trained based on the training set to obtain a fault diagnosis model. The original question text is processed, and based on the processed text vectors, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and reordering. The original question text and relevant text blocks are concatenated to obtain data in a specific form. Based on the data in this specific form, fault diagnosis is performed through the fault diagnosis model. This invention differs from existing technologies and improves the problems of the large limitations of relying on human experience to judge faults and the incomplete analysis of fault root causes. It can meet the needs of efficient and accurate fault analysis.
[0010] Furthermore, the step of training the intermediate pedestal model based on the training set includes:
[0011] By setting corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, applying L2 regularization to the first low-rank matrix, and defining a loss function as a constraint, the intermediate base model is trained in multiple rounds based on the training set to obtain the latest low-rank matrix parameters.
[0012] During inference, the latest low-rank matrix parameters are loaded into the corresponding positions in the intermediate base model, and the intermediate base model is adjusted.
[0013] Furthermore, the expression for the loss function is as follows:
[0014]
[0015] in, Denotes the first low-rank matrix. Describes the second low-rank matrix. Represents the loss function. This represents other trainable parameters in the model. The L2 regularization strength is... For the training set, This represents the task loss function.
[0016] Furthermore, the step of processing the original dataset through adaptive semantic segmentation to generate fault diagnosis question-and-answer data includes:
[0017] Using a BERT-based pre-trained model, the semantic similarity between different paragraphs in the original dataset is calculated. The semantic similarity is compared with a similarity threshold. Based on the comparison results, the original dataset is processed to obtain several text blocks.
[0018] Based on the descriptions, root causes, and troubleshooting methods of historical aircraft manufacturing failures, a domain-specific prompt word template is designed. The text blocks are embedded one by one into the domain-specific prompt word template to obtain concatenated sentences. Based on the concatenated sentences, relevant question-and-answer pairs are generated through a general large language model. The relevant question-and-answer pairs are manually screened and verified to form fault diagnosis question-and-answer data.
[0019] Furthermore, the method also includes:
[0020] The original dataset is cleaned and formatted to obtain an intermediate dataset, which is then transformed into multiple structured text blocks using a text segmentation algorithm.
[0021] The text blocks are semantically extracted and understood using the bge-small-zh model. Based on the semantic relationships within the text, the multiple text blocks are divided into multiple independent text blocks. Each independent text block corresponds to a single aviation manufacturing fault topic. The aviation manufacturing fault topic includes fault description and solution.
[0022] The segmentation threshold is dynamically adjusted by a recursive character segmenter, and the independent text block is then segmented a second time based on the dynamically adjusted segmentation threshold to obtain the final text block.
[0023] Add relevant metadata to each of the final text blocks and store it in the fault diagnosis vector knowledge base.
[0024] Furthermore, the step of filtering the top K relevant text blocks from the fault diagnosis vector knowledge base through hybrid indexing and reordering includes:
[0025] The system acquires aviation malfunction issues, transforms these issues into problem vectors using a vectorization model, and then uses a hybrid indexing strategy to initially recall candidate text blocks from a fault diagnosis vector knowledge base.
[0026] The candidate text blocks are reordered based on their relevance to the joint encoding problem using a Cross-Encoder architecture, and the top K relevant text blocks are selected based on the sorting results.
[0027] Furthermore, the step of initially recalling candidate text blocks from the fault diagnosis vector knowledge base using a hybrid indexing strategy includes:
[0028] Candidate text blocks are initially retrieved from the fault diagnosis vector knowledge base by combining semantic retrieval and keyword retrieval. The weight ratio of keywords and semantics is adaptively determined based on their overall performance in the training set. The expression for the weight ratio of keywords and semantics is as follows:
[0029]
[0030] in, This indicates the combined search matching degree, where q represents the term to be searched, and d represents the set of relevant documents. This represents the original matching degree of semantic retrieval. This indicates the original match degree of the keyword search. This represents the global adaptive weight for semantic retrieval. The expression is as follows:
[0031]
[0032] in, This represents the total number of query terms in the training set, and the set of related documents for query q in the knowledge vector database. Representing the search results Cutoff value, This represents the set of query keywords in the training set. This represents the set of search results for the first K keywords. This indicates that the vector library R contains only a collection of documents related to the query term q.
[0033] Furthermore, the method also includes:
[0034] Based on the fault diagnosis vector knowledge base and the fault diagnosis model, a fault diagnosis platform for the aerospace manufacturing field is deployed and visualized through a multi-technology component architecture design.
[0035] To achieve the above objectives, the present invention also provides a fault diagnosis system for the aerospace manufacturing field based on a vertical large model, used to implement the fault diagnosis method for the aerospace manufacturing field based on a vertical large model as described above, the system comprising:
[0036] The data acquisition module is used to collect fault diagnosis data in the field of aviation manufacturing, form a raw dataset, process the raw dataset through adaptive semantic segmentation, generate fault diagnosis question and answer data, and construct a fault diagnosis question and answer dataset, which is divided into a training set and a test set according to a preset ratio.
[0037] The module is used to compare multiple large language models based on evaluation metrics to obtain a base model. Based on requirements, the projection layer and linear transformation layer in the base model are selected using the LoRA method. The original projection weights of the projection layer are decomposed into two first low-rank matrices. The two first low-rank matrices are applied in parallel with the original projection weights. The linear transformation layer is concatenated with the second low-rank matrix to obtain an intermediate base model. The intermediate base model is trained based on the training set to obtain a fault diagnosis model.
[0038] The question-and-answer interaction module is used to segment and transform the original question text sequentially to obtain the corresponding text vector. Based on the text vector, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and reordering. The original question text and the relevant text blocks are concatenated to obtain data in a specific form. Based on the data in the specific form, fault diagnosis is performed through the fault diagnosis model.
[0039] Furthermore, the obtaining module includes:
[0040] The training unit is used to set corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, apply L2 regularization to the first low-rank matrix, define a loss function as a constraint, and perform multiple rounds of iterative training on the intermediate base model based on the training set to obtain the latest low-rank matrix parameters.
[0041] The loading unit is used to load the latest low-rank matrix parameters into the corresponding position in the intermediate base model during inference, thereby adjusting the intermediate base model. Attached Figure Description
[0042] Figure 1 This is a flowchart of a fault diagnosis method in the aerospace manufacturing field based on a vertical large model, according to an embodiment of the present invention.
[0043] Figure 2 This is a structural block diagram of a fault diagnosis system for the aerospace manufacturing field based on a vertical large model, according to an embodiment of the present invention.
[0044] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0046] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0047] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0048] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0049] Example 1
[0050] Please see Figure 1This is a flowchart of the fault diagnosis method for the aerospace manufacturing field based on a vertical large model according to the first embodiment of the present invention. This method utilizes fine-tuning techniques of a large language model and retrieval-enhanced generation techniques to improve its identification and analysis capabilities in aerospace manufacturing fault diagnosis; it relies on an external knowledge base to enhance the model's reasoning depth and answer accuracy, thereby assisting in the fault tracing and analysis process and improving the manufacturing quality and efficiency of aerospace products. The method includes the following steps:
[0051] Step S101: Collect fault diagnosis data in the field of aviation manufacturing to form a raw dataset. Process the raw dataset through adaptive semantic segmentation to generate fault diagnosis question and answer data and construct a fault diagnosis question and answer dataset. Divide the fault diagnosis question and answer dataset into a training set and a test set according to a preset ratio.
[0052] First, fundamental professional knowledge in the field of aviation manufacturing is collected, integrating relevant information from professional textbooks and standardized technical documents such as "Aviation Manufacturing Technology," "Aircraft Maintenance Manual," and "Aviation Fault Diagnosis and Maintenance Engineering." Second, knowledge of aviation manufacturing fault diagnosis is collected. High-value knowledge content, including typical fault cases, fault mode classifications, fault tree analysis (FTA), and maintenance records, is extracted from official platforms of the Civil Aviation Administration of China (CAAC) and the Federal Aviation Administration (FAA), as well as authoritative websites and public databases containing open documents such as technical manuals published by aviation manufacturers such as Boeing and Airbus. Finally, this data is compiled into a raw dataset for fault diagnosis in the field of aviation manufacturing. It should be noted that the preset ratio is 8:2.
[0053] Step S102: Based on the evaluation metrics, compare multiple large language models to obtain a base model, reintroduce a low-rank trainable weight matrix into the base model, and adjust the intermediate base model based on the training set to obtain a fault diagnosis model.
[0054] In particular, due to the high noise levels and varying text lengths in aviation manufacturing fault data, and the need for accuracy in the core content of fault diagnosis solutions, a semantically focused evaluation metric was used to compare the fault analysis capabilities of multiple large language models. This evaluation metric includes BLEU-N (bilingual evaluation substitution score with N consecutive lexical units), ROUGE-N (recall score with N consecutive lexical units), and ROUGE-L (recall score with the longest common subsequence). Based on the evaluation metric, multiple large language models were initially evaluated. Then, based on a comprehensive consideration of accuracy, computational power requirements, and subsequent fine-tuning effects, a suitable base model was selected for fault diagnosis and analysis tasks in the aviation manufacturing field.
[0055] Step S103: The original problem text is segmented and transformed sequentially to obtain the corresponding text vector. Based on the text vector, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and reordering. The original problem text and the relevant text blocks are concatenated to obtain data in a specific form. Based on the data in the specific form, fault diagnosis is performed through the fault diagnosis model.
[0056] Specifically, the process of concatenating the original question text and related text blocks to obtain data in a specific format involves using a structured prompt template, i.e., a domain-specific prompt template. It begins with a domain-specific introductory phrase (e.g., "Answer the question based on the following aviation fault professional information"), followed by embedding the original fault question with "[User Question]: XXX". Then, the first K related text blocks are sorted by relevance and concatenated sequentially in the format "[Related Information N (Source: XXX)]: XXX" (labeling source metadata such as maintenance manual chapters and fault case IDs). Finally, output format constraints are added (e.g., "Output according to 'Fault Cause - Troubleshooting Steps - Maintenance Suggestions'"). This method enhances the adaptability of the input data to the fault diagnosis task, ensuring that the model generates standardized answers by combining professional information.
[0057] Through the above steps, the original dataset is preprocessed, text blocks are adaptively segmented semantically to generate fault diagnosis question-and-answer data, and a fault diagnosis question-and-answer dataset is constructed. Based on the requirements, the projection layer and linear transformation layer in the base model are selected using the LoRA method. Then, the original projection weights of the projection layer are decomposed into two first low-rank matrices, which are then used in parallel with the original projection weights. The linear transformation layer is concatenated with the second low-rank matrix to obtain an intermediate base model. The intermediate base model is then fine-tuned and trained based on the training set to obtain the fault diagnosis model. The original question text is processed, and based on the processed text vectors, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and re-sorting. The original question text and relevant text blocks are filled into the set domain-specific prompt word template to obtain a context containing the original question and knowledge base matching. This context is then input into the fault diagnosis model for diagnostic analysis. Unlike existing technologies, this approach improves the limitations of relying on human experience to judge faults and the incomplete root cause analysis of faults, thus meeting the requirements for efficient and accurate fault analysis.
[0058] Furthermore, the step of processing the original dataset through adaptive semantic segmentation to generate fault diagnosis question-and-answer data includes:
[0059] Using a BERT-based pre-trained model, the semantic similarity between different paragraphs in the original dataset is calculated. The semantic similarity is compared with a similarity threshold. Based on the comparison results, the original dataset is processed to obtain several text blocks.
[0060] In response to the varying lengths and numerous technical terms in aviation malfunction documents, a BERT-based pre-trained model was designed to calculate the semantic similarity between different paragraphs in the original dataset. This semantic similarity was then compared with a similarity threshold. Based on the comparison results, the original dataset was processed to obtain several text blocks. Specifically, the semantic similarity between different sentences or paragraphs in the original dataset was calculated using a BERT-based pre-trained model, and a similarity threshold was set. Based on this, the original dataset was divided into several semantically complete and independent text blocks.
[0061] It should be noted that the core function of the similarity threshold is to define the semantic connection strength between text paragraphs or sentences, and use this as the criterion for judging text block segmentation. This ensures that each segmented text block can maintain the internal semantic coherence and integrity, and also achieve semantic independence between different text blocks. It avoids destroying complete semantic units due to excessive segmentation or causing irrelevant information to be included in text blocks due to excessive merging.
[0062] Specifically, after converting sentences or paragraphs in the original dataset into semantic vectors using a BERT pre-trained model, the semantic similarity between adjacent sentences or paragraphs is calculated. The calculated similarity value is compared with a preset similarity threshold. If the similarity between two adjacent sentences or paragraphs is higher than the threshold, it means that the two sentences or paragraphs are semantically closely related and should be merged into the same text block. If the similarity is lower than the similarity threshold, it means that the two sentences or paragraphs belong to different semantic topics. In this case, they are cut at that point to form two independent text blocks. In the end, the entire original dataset is divided into several semantically complete and topic-single text blocks, which are adapted to the subsequent needs of structured storage and accurate retrieval of fault diagnosis knowledge.
[0063] The text blocks are embedded one by one into a preset domain-specific prompt word template to obtain a concatenated sentence. Based on the concatenated sentence, relevant question-and-answer pairs are generated through a general large language model. The relevant question-and-answer pairs are manually screened and verified to form fault diagnosis question-and-answer data.
[0064] Specifically, a domain-specific prompt template was designed from the perspective of fault description, root cause, and troubleshooting methods for aircraft manufacturing failures.
[0065] The specific algorithm for generating relevant question-and-answer pairs using a general large language model is shown in the table below. F represents the cleaned and formatted domain text corpus, chunk_list is the set of semantic blocks obtained through text segmentation algorithms, r is the response generated by the large language model, and Q represents the final question data set. `text_split` segments the document into semantic blocks; `create_client` establishes an LLM connection based on the API_KEY and URL; `build_prompt` constructs prompt words; `get_result` retrieves the model output; `is_valid` checks if the generated format is compliant; and `abstract` extracts and summarizes valid question-and-answer data from the response.
[0066]
[0067] Furthermore, the step of reintroducing a low-rank trainable weight matrix into the base model and adjusting the intermediate base model based on the training set includes:
[0068] Based on the requirements, the key layer in the base model is selected using the LoRA method, a low-rank trainable weight matrix is inserted into the key layer, and the base model with the inserted low-rank trainable weight matrix is trained based on the training set to obtain the latest low-rank matrix parameters.
[0069] The key layer includes a projection layer and a linear transformation layer, and the step of inserting a low-rank trainable weight matrix into the key layer includes:
[0070] The original projection weights of the projection layer are decomposed into two first low-rank matrices. The two first low-rank matrices are applied in parallel with the original projection weights, and the linear transformation layer is concatenated with a second low-rank matrix to obtain the intermediate base model.
[0071] It should be noted that the two first low-rank matrices and the original projection weights are applied to the input features in parallel, and the outputs are superimposed through residual connections to enhance semantic matching capabilities. The second low-rank matrix transformation is then concatenated after the original linear transformation to adapt to the nonlinear mapping requirements of domain features and avoid excessive interference with the extraction of basic features.
[0072] Furthermore, after obtaining the intermediate base model, the intermediate base model is trained based on the training set. Specifically, the step of training the intermediate base model based on the training set includes:
[0073] By setting corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, applying L2 regularization to the first low-rank matrix, and defining a loss function as a constraint, the intermediate base model is trained iteratively multiple times based on the training set to obtain the latest low-rank matrix parameters.
[0074] The core logic of the training process remains consistent, employing an efficient fine-tuning strategy that freezes the original parameters of the base model and only updates the low-rank trainable weight matrix to reduce the number of parameters and lower the risk of overfitting. However, there are differences in the details. Different learning rates are set for the low-rank matrices of different key layers (slightly higher for the attention layer and slightly lower for the feedforward layer). Furthermore, by defining a loss function as a constraint, the intermediate base model is guided to continuously improve its accuracy on the training set. In addition, to address the "sparse semantics of fault modes" in the field of aviation fault diagnosis, L2 regularization (weight decay coefficient 0.01) is applied to the first low-rank matrix to enhance the model's ability to generalize to low-frequency fault features in the domain.
[0075] During inference, the corresponding latest low-rank matrix parameters are loaded into the corresponding positions in the intermediate base model, and the intermediate base model is adjusted.
[0076] Furthermore, the expression for the loss function is as follows:
[0077]
[0078] in, Denotes the first low-rank matrix. Describes the second low-rank matrix. Represents the loss function. This represents other trainable parameters in the model. The L2 regularization strength is... For the training set, This represents the task loss function.
[0079] Furthermore, the method also includes:
[0080] The original dataset is cleaned and formatted to obtain an intermediate dataset, which is then transformed into multiple structured text blocks using a text segmentation algorithm.
[0081] The text blocks are semantically extracted and understood using the bge-small-zh model. Based on the semantic relationships within the text, the multiple text blocks are divided into multiple independent text blocks. Each independent text block corresponds to a single aviation manufacturing fault topic. The aviation manufacturing fault topic includes fault description and solution.
[0082] The semantic connections within the text include the logical coherence of the technical principles and the sequential relationships of the operational procedures.
[0083] The segmentation threshold is dynamically adjusted by a recursive character segmenter, and the independent text block is then segmented a second time based on the dynamically adjusted segmentation threshold to obtain the final text block.
[0084] Add relevant metadata to each of the final text blocks and store it in the fault diagnosis vector knowledge base.
[0085] The system stores fault knowledge acquired from the aerospace manufacturing field and uses a proposed "dynamic semantics + character segmentation" method to divide the fault knowledge text into blocks. First, the bge-small-zh model is used for fault semantic understanding, achieving preliminary semantic segmentation. Then, a recursive character segmenter is used to accurately identify block boundaries, enabling dynamic subdivision of the fault knowledge. After segmentation, relevant metadata is added to each text block and stored in a fault diagnosis vector knowledge base for use by the question-and-answer interaction module.
[0086] It should be noted that the metadata includes serial number, document source, and content type. The serial number is a unique identifier for the entry to facilitate indexing and tracking; the document source is the original source of the recorded text, such as a corporate standard document, equipment manufacturer manual, or fault analysis report; and the content type indicates the category to which the text belongs, such as code, markdown, text, table, etc.
[0087] Furthermore, the step of filtering the top K relevant text blocks from the fault diagnosis vector knowledge base through hybrid indexing and reordering includes:
[0088] The system acquires aviation malfunction issues, transforms these issues into problem vectors using a vectorization model, and then uses a hybrid indexing strategy to initially recall candidate text blocks from a fault diagnosis vector knowledge base.
[0089] The candidate text blocks are reordered based on their relevance to the joint encoding problem using a Cross-Encoder architecture, and the top K relevant text blocks are selected based on the sorting results.
[0090] The process begins by transforming user-input aviation malfunction questions into question vectors using a vectorization model consistent with the malfunction diagnosis vector library, bge-small-zh. Then, a hybrid indexing strategy combining semantic retrieval (recalling semantically relevant text blocks based on cosine similarity) and keyword retrieval (matching technical terms and supplementing accuracy with metadata) is employed to initially recall candidate text blocks. Subsequently, the bge-reranker-v2-m3 model (Cross-Encoder architecture) is used to jointly encode the questions and candidate text blocks for deep relevance reordering (filtering domain interference information). Finally, the top K most relevant text blocks are selected based on their scores and used to concatenate with the questions into the diagnostic model to enhance the professionalism of the answers.
[0091] It should be noted that in the knowledge vector base retrieval stage, a hybrid retrieval strategy combining semantic retrieval and keyword retrieval is adopted. The weight ratio of keywords to semantics is adaptively determined based on the overall performance of both in the training set. The hybrid retrieval matching degree is described by the following formula:
[0092]
[0093] in, This indicates the combined search matching degree, where q represents the term to be searched, and d represents the set of relevant documents. This represents the original matching degree of semantic retrieval. This indicates the original match degree of the keyword search. This represents the global adaptive weight for semantic retrieval. Determined by the following formula:
[0094]
[0095] in, This represents the total number of query terms in the training set, and the set of related documents for query q in the knowledge vector database. Representing the search results Cutoff value, This represents the set of query keywords in the training set. This represents the set of search results for the first K keywords. This indicates that the vector library R contains only a collection of documents related to the query term q.
[0096] In the embodiments, the weight ratio of keywords and semantics in the constructed dataset was ultimately determined to be 40% and 60% (experiments have verified that this is the best result). To address the interference information that may be introduced by mixed retrieval, the bge-reranker-v2-m3 model is introduced to implement a re-ranking mechanism (Cross-Encoder). This model performs deep contextual understanding and matching on the initially recalled candidate documents, and refines the ranking through joint encoding, thereby selecting the top K text blocks related to the user's question. These text blocks are then embedded as prompt words into the given template, constructing a retrieval system with higher accuracy and stronger semantic understanding.
[0097] Furthermore, the method also includes:
[0098] Based on the fault diagnosis vector knowledge base and the fault diagnosis model, a fault diagnosis platform for the aerospace manufacturing field is deployed and visualized through a multi-technology component architecture design.
[0099] First, vLLM is deployed at the bottom layer as the inference engine for the fault diagnosis model, supporting multi-GPU parallel and distributed deployment and finely dividing the model's computational load. Next, the FastAPI framework combined with the Uvicorn high-performance asynchronous server is used for communication interface deployment, providing RESTful API services. Then, the LangChain framework is integrated to build the model call logic, implementing a retrieval enhancement generation mechanism. User questions are first semantically similar to a vector knowledge base, extracting relevant context and constructing prompt words to input into the large model. Finally, Grado is used for front-end interaction and visualization design, building a graphical user interface. Users input questions through Grado, which are sent to the backend via HTTP requests, triggering semantic retrieval, streaming inference, and other processes, with results rendered and displayed in real time. Ultimately, this system forms a closed-loop fault diagnosis platform for the aerospace manufacturing field, integrating an inference engine, semantic retrieval, and human-computer interaction.
[0100] Example 2
[0101] Please see Figure 2 The diagram below shows the structural block diagram of the fault diagnosis system for the aerospace manufacturing field based on a vertical large model according to the second embodiment of the present invention. This system is used to implement the fault diagnosis method for the aerospace manufacturing field based on a vertical large model according to the first embodiment. The system includes:
[0102] The acquisition module 10 is used to acquire fault diagnosis data in the field of aviation manufacturing, form a raw dataset, process the raw dataset through adaptive semantic segmentation, generate fault diagnosis question and answer data, and construct a fault diagnosis question and answer dataset, and divide the fault diagnosis question and answer dataset into a training set and a test set according to a preset ratio.
[0103] Module 20 is obtained to compare multiple large language models based on evaluation metrics to obtain a base model. Based on requirements, the projection layer and linear transformation layer in the base model are selected using the LoRA method. The original projection weights of the projection layer are decomposed into two first low-rank matrices. The two first low-rank matrices are applied in parallel with the original projection weights. The linear transformation layer is concatenated with the second low-rank matrix to obtain an intermediate base model. The intermediate base model is trained based on the training set to obtain a fault diagnosis model.
[0104] The question-and-answer interaction module 30 is used to segment and transform the original question text sequentially to obtain the corresponding text vector. Based on the text vector, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and reordering. The original question text and the relevant text blocks are concatenated to obtain data in a specific form. Based on the data in the specific form, fault diagnosis is performed through the fault diagnosis model.
[0105] In practical implementation, the original dataset is preprocessed, text blocks are adaptively segmented semantically to generate fault diagnosis question-and-answer data, and a fault diagnosis question-and-answer dataset is constructed. Based on the requirements, the projection layer and linear transformation layer in the base model are selected using the LoRA method. Then, the original projection weights of the projection layer are decomposed into two first low-rank matrices, which are then used in parallel with the original projection weights. The linear transformation layer is concatenated with the second low-rank matrix to obtain an intermediate base model. The intermediate base model is then trained on the training set to obtain a fault diagnosis model. The original question text is processed, and based on the processed text vectors, the top K relevant text blocks are selected from the fault diagnosis vector knowledge base through hybrid indexing and re-sorting. The original question text and relevant text blocks are concatenated to obtain data in a specific form. Based on this specific form of data, fault diagnosis is performed using the fault diagnosis model. This approach differs from existing technologies and improves upon the limitations of relying on human experience to judge faults, which results in incomplete root cause analysis. It can meet the requirements for efficient and accurate fault analysis.
[0106] Furthermore, the obtaining module 20 includes:
[0107] The training unit is used to set corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, apply L2 regularization to the first low-rank matrix, define a loss function as a constraint, and perform multiple rounds of iterative training on the intermediate base model based on the training set to obtain the latest low-rank matrix parameters.
[0108] The loading unit is used to load the latest low-rank matrix parameters into the corresponding position in the intermediate base model during inference, thereby adjusting the intermediate base model.
[0109] Furthermore, the expression for the loss function is as follows:
[0110]
[0111] in, Denotes the first low-rank matrix. Describes the second low-rank matrix. Represents the loss function. This represents other trainable parameters in the model. The L2 regularization strength is... For the training set, This represents the task loss function.
[0112] Furthermore, the acquisition module 10 includes:
[0113] The segmentation unit is used to calculate the semantic similarity between different paragraphs in the original dataset using a BERT-based pre-trained model, compare the semantic similarity with a similarity threshold, and process the original dataset based on the comparison results to obtain several text blocks.
[0114] The forming unit is used to embed the text blocks one by one into a preset domain-specific prompt word template to obtain a concatenated sentence. Based on the concatenated sentence, relevant question-and-answer pairs are generated through a general large language model. The relevant question-and-answer pairs are manually screened and verified to form fault diagnosis question-and-answer data.
[0115] Furthermore, the system includes:
[0116] The conversion module is used to clean and format the original dataset to obtain an intermediate dataset, and then convert the intermediate dataset into multiple structured text blocks using a text segmentation algorithm.
[0117] The segmentation module is used to extract and understand the semantic features of the text blocks using the bge-small-zh model, and to divide the multiple text blocks into multiple independent text blocks based on the semantic relationships within the text. Each independent text block corresponds to a single aviation manufacturing fault topic, and the aviation manufacturing fault topic includes fault description and solution.
[0118] The adjustment module is used to dynamically adjust the segmentation threshold through a recursive character segmenter, and perform secondary segmentation on the independent text block based on the dynamically adjusted segmentation threshold to obtain the final text block.
[0119] The storage module is used to add relevant metadata to each of the final text blocks and store it in the fault diagnosis vector knowledge base.
[0120] Furthermore, the question-and-answer interaction module 30 includes:
[0121] The recall unit is used to obtain aviation malfunction issues, transform the aviation malfunction issues into issue vectors through a vectorization model, and initially recall candidate text blocks from the fault diagnosis vector knowledge base based on the issue vectors and through a hybrid indexing strategy.
[0122] The reordering unit is used to reorder the candidate text blocks in relation to the joint encoding problem using the Cross-Encoder architecture, and to select the top K relevant text blocks based on the reordering results.
[0123] Furthermore, the recall unit includes:
[0124] Candidate text blocks are initially retrieved from the fault diagnosis vector knowledge base by combining semantic retrieval and keyword retrieval. The weight ratio of keywords and semantics is adaptively determined based on their overall performance in the training set. The expression for the weight ratio of keywords and semantics is as follows:
[0125]
[0126] in, This indicates the combined search matching degree, where q represents the term to be searched, and d represents the set of relevant documents. This represents the original matching degree of semantic retrieval. This indicates the original match degree of the keyword search. This represents the global adaptive weight for semantic retrieval. The expression is as follows:
[0127]
[0128] in, This represents the total number of query terms in the training set, and the set of related documents for query q in the knowledge vector database. Representing the search results Cutoff value, This represents the set of query keywords in the training set. This represents the set of search results for the first K keywords. This indicates that the vector library R contains only a collection of documents related to the query term q.
[0129] Furthermore, the system also includes:
[0130] The deployment module is used to deploy and visualize a fault diagnosis platform in the aerospace manufacturing field based on the fault diagnosis vector knowledge base and the fault diagnosis model, through a multi-technology component architecture design.
[0131] Example 3
[0132] In the third embodiment of the present invention, based on the same inventive concept, the present invention proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the fault diagnosis method for the aerospace manufacturing field based on a vertical large model as described in the above embodiments.
[0133] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means containing storage, communication, propagation, or transmission programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0134] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0135] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to the data processing device. In a particular embodiment, the memory is non-volatile memory. In a particular embodiment, the memory includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), Extended Data Out Dynamic Random-Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0136] Example 4
[0137] In the fourth embodiment of the present invention, based on the same inventive concept, the present invention proposes a terminal, the terminal comprising: a processor and a memory; the processor and the memory communicate with each other; the memory is used to store instructions; the processor is used to execute the instructions in the memory to execute the fault diagnosis method for the aerospace manufacturing field based on the vertical large model of the above embodiment.
[0138] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0139] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0140] Without causing conflict, those skilled in the art can freely combine and use the above-mentioned additional technical features.
[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A vertical large model-based fault diagnosis method in the field of aviation manufacturing, characterized in that, The method comprises: Collecting fault diagnosis data in the field of aviation manufacturing to form an original data set, processing the original data set through adaptive semantic segmentation, generating fault diagnosis question and answer data, and constructing a fault diagnosis question and answer data set, and dividing the fault diagnosis question and answer data set into a training set and a test set at a preset ratio; Based on the demand and through the LoRA method, the projection layer and the linear transformation layer in the base model are selected, the original projection weight of the projection layer is decomposed into two first low-rank matrices, the two first low-rank matrices and the original projection weight are acted in parallel, and the linear transformation layer is connected with a second low-rank matrix to obtain an intermediate base model, the intermediate base model is trained based on the training set to obtain a fault diagnosis model; The original problem text is sequentially segmented and converted to obtain a corresponding text vector, based on the text vector, the top K related text blocks are screened out from the fault diagnosis vector knowledge base through hybrid indexing and reordering, the original problem text and the related text blocks are spliced to obtain data in a specific form, and fault diagnosis is performed based on the data in the specific form and through the fault diagnosis model; The step of screening out the top K related text blocks from the fault diagnosis vector knowledge base through hybrid indexing and reordering comprises: An aviation fault problem is obtained, the aviation fault problem is converted into a problem vector through a vectorization model, based on the problem vector, and through a hybrid indexing strategy, candidate text blocks are preliminarily recalled from the fault diagnosis vector knowledge base; The correlation of the problem and the candidate text blocks is re-ordered through a Cross-Encoder architecture, and the top K related text blocks are screened out based on the ordering result; The step of preliminarily recalling candidate text blocks from the fault diagnosis vector knowledge base through a hybrid indexing strategy comprises: Preliminarily recalling candidate text blocks from the fault diagnosis vector knowledge base by combining semantic retrieval and keyword retrieval, wherein the weight ratio of the keyword and the semantic is adaptively determined based on the overall effect of the two in the training set, and the expression of the weight ratio of the keyword and the semantic is as follows: wherein, represents a mixed search matching degree, q represents a word to be searched, d represents a relevant document set, represents an original matching degree of semantic search, represents an original matching degree of keyword search, represents a global adaptive weight of semantic search, and the expression of is as follows: wherein, represents the total number of query terms in the training set, the relevant document set of the query q in the knowledge vector library, represents the cut-off value, represents the set of query keywords in the training set, represents the top K keyword retrieval result set, represents only the relevant document set containing the query term q in the vector library R.
2. The vertical large model-based fault diagnosis method in the field of aircraft manufacturing according to claim 1, characterized in that, The step of training the intermediate base model based on the training set comprises: By setting corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, applying L2 regularization to the first low-rank matrix, and defining a loss function as a constraint condition, the intermediate base model is trained based on the training set for multiple rounds of iteration to obtain the latest low-rank matrix parameters; When reasoning, the latest low-rank matrix parameters are loaded into the corresponding positions in the intermediate base model to adjust the intermediate base model.
3. The vertical large model-based fault diagnosis method in the field of aircraft manufacturing according to claim 2, characterized in that, The expression of the loss function is as follows: wherein, denotes a first low-rank matrix, denotes a second low-rank matrix, denotes a loss function, denotes other trainable parameters in the model, is an L2 regularization strength, is a training set, denotes a task loss function.
4. The vertical large model-based fault diagnosis method in the field of aircraft manufacturing according to claim 1, characterized in that, The step of processing the original data set through adaptive semantic segmentation to generate fault diagnosis question and answer data comprises: By using a BERT-based pre-training model, the semantic similarity between different paragraphs in the original data set is calculated, the semantic similarity is compared with a similarity threshold, and based on the comparison result, the original data set is processed to obtain a plurality of text blocks; The text blocks are sequentially embedded into the field-specific prompt word templates based on the fault description, fault root cause and troubleshooting method design field-specific prompt word templates of historical aviation manufacturing faults, to obtain spliced sentences, and the relevant question and answer pairs are generated based on the spliced sentences and through a general large language model, and the relevant question and answer pairs are screened and verified by manual screening to form fault diagnosis question and answer data.
5. The vertical large model-based fault diagnosis method in the field of aircraft manufacturing according to claim 1, characterized in that, The method further comprises: The original data set is cleaned and formatted to obtain an intermediate data set, and the intermediate data set is converted into a plurality of structured text blocks through a text segmentation algorithm; The text blocks are subjected to semantic feature extraction and understanding through a bge-small-zh model, and a plurality of text blocks are divided into a plurality of independent text blocks according to the semantic association within the text, and each independent text block corresponds to a single aviation manufacturing fault theme, which includes fault description and solution; The independent text blocks are subjected to secondary segmentation based on the dynamically adjusted segmentation threshold to obtain final text blocks; Each final text block is added with relevant meta information and stored in the fault diagnosis vector knowledge base.
6. The vertical large model-based fault diagnosis method in the field of aircraft manufacturing according to claim 1, characterized in that, The method further comprises: Based on the fault diagnosis vector knowledge base and the fault diagnosis model, an aviation manufacturing field fault diagnosis platform is deployed and visualized through a multi-technology component design architecture.
7. A vertical large model-based fault diagnosis system for the field of aviation manufacturing, for implementing the vertical large model-based fault diagnosis method for the field of aviation manufacturing according to any one of claims 1-6, characterized in that, The system comprises: A collection module is configured to collect aviation manufacturing field fault diagnosis data to form an original data set, process the original data set through adaptive semantic segmentation, generate fault diagnosis question and answer data, construct a fault diagnosis question and answer data set, and divide the fault diagnosis question and answer data set into a training set and a test set at a preset ratio; A obtaining module is configured to compare a plurality of large language models based on evaluation indexes to obtain a base model, select a projection layer and a linear transformation layer in the base model based on requirements and through a LoRA method, decompose original projection weights of the projection layer into two first low-rank matrices, make the two first low-rank matrices and the original projection weights act in parallel, and connect a second low-rank matrix in series with the linear transformation layer to obtain an intermediate base model, train the intermediate base model based on the training set to obtain a fault diagnosis model; An interactive question and answer module is configured to sequentially segment and convert an original question text to obtain a corresponding text vector, select the top K relevant text blocks from a fault diagnosis vector knowledge base based on the text vector through hybrid indexing and reordering, splice the original question text and the relevant text blocks to obtain data in a specific form, and perform fault diagnosis based on the data in the specific form and through the fault diagnosis model.
8. The vertical large model-based aviation manufacturing field failure diagnosis system according to claim 7, characterized in that, The obtaining module comprises: A training unit is configured to set corresponding learning rates for the first low-rank matrix in the projection layer and the second low-rank matrix in the linear transformation layer, apply L2 regularization to the first low-rank matrix, define a loss function as a constraint condition, perform multi-round iterative training on the intermediate base model based on the training set, and obtain the latest low-rank matrix parameters; a loading unit for loading the latest low-rank matrix parameter to a corresponding position in the intermediate base model when reasoning, adjusting the intermediate base model.
Citation Information
Patent Citations
Intelligent fault diagnosis method for aviation maintenance text record
CN117313742A
Filling system fault diagnosis-oriented case library construction and retrieval method
CN117421320A