Multi-path logic generation method and system based on aviation accident knowledge graph

CN121094080BActive Publication Date: 2026-08-21CHINA AERO POLYTECH ESTAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511273354.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2026-08-21
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

首先,领域知识图谱的构建需要耗费大量的人力和时间,且不同领域的知识图谱结构和质量差异较大,如何构建高质量、可复用的领域知识图谱是一个关键问题

Benefits of technology

(1)本发明融合了语义相似度检索、术语匹配检索和关联推理检索三种策略,能够从不同维度挖掘航空领域知识图谱中的信息,更全面、准确地捕获与输入查询相关的知识,有效解决了大语言模型在专业领域中存在的知识盲区和幻觉问题,从而显著提升了航空专业领域推理的准确性和可解释性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121094080B_ABST
    Figure CN121094080B_ABST
Patent Text Reader

Abstract

The application provides a multi-path logic generation method and system based on an aviation accident knowledge graph, relates to the technical field of aviation accident information data retrieval and analysis, and comprises the following steps: S1, vectorization embedding of the aviation accident knowledge graph and input query text is performed to obtain discrete aviation accident triples, and a dimension reduction mapping target function is constructed; S2, multi-path retrieval of the aviation accident knowledge graph is realized by using retrieval enhancement generation technology; S3, an aviation accident knowledge graph enhanced input sequence is obtained by using weight distribution mechanism and multi-feature joint sorting method fusion enhancement; S4, a correlation reasoning result is obtained by using a multi-path retrieval enhancement generation reasoning enhancement system. The application introduces a dynamic weight fusion mechanism to fuse three strategies of semantic similarity retrieval, term matching retrieval and correlation reasoning retrieval, multi-dimensionally mines aviation field knowledge graph information, realizes multi-source heterogeneous knowledge generation, verification and fusion, and improves aviation professional field reasoning accuracy and interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of aviation accident information data retrieval and analysis technology, specifically to a multi-path logic generation method and system based on aviation accident knowledge graph. Background Technology

[0002] Extracting key information from massive amounts of data and performing reasoning has become a core challenge in the field of artificial intelligence. Large language models (LLMs), with their powerful natural language understanding and generation capabilities, have made significant progress in tasks such as reasoning, text summarization, and machine translation. However, when dealing with complex reasoning problems, especially those involving domain-specific knowledge or requiring multi-step reasoning, LLMs often face problems such as knowledge scarcity, factual errors, and insufficient interpretability.

[0003] To address the shortcomings of Large Language Models (LLMs), researchers have proposed the Retrieval-Augmented Generation (RAG) framework. This framework retrieves relevant information from external knowledge bases, providing richer context to LLMs and thus improving their reasoning ability and generation quality. RAG has become an important tool for enhancing the performance of LLMs. However, existing RAG methods still have limitations in terms of the accuracy and relevance of retrieval results, the effectiveness of knowledge fusion, and interpretability, which restricts their application in complex reasoning tasks.

[0004] Knowledge graphs (KGs), with their structured form, can clearly represent entities, relationships, and attributes, providing rich domain knowledge and reasoning paths for large language models (LLMs). However, effectively utilizing knowledge graphs to enhance the reasoning capabilities of LLMs remains a challenge. Traditional retrieval-enhanced generative algorithms (RAGs) typically employ simple keyword matching or semantic similarity retrieval, failing to fully leverage the complex relationships and reasoning paths within knowledge graphs. For example, in the aviation field, accident causes often involve multiple entities and relationships, requiring multi-step reasoning to find the root cause. Therefore, designing a RAG method that fully utilizes the structured information of knowledge graphs to improve the performance of large language models (LLMs) in complex reasoning tasks has become a current research hotspot.

[0005] While retrieval-enhanced generative (RAG) frameworks and knowledge graphs have shown potential in enhancing Large Language Model (LLM) reasoning, effectively integrating the two still faces numerous challenges. First, constructing domain knowledge graphs requires significant human and time investment, and the structure and quality of knowledge graphs vary considerably across different domains; therefore, constructing high-quality, reusable domain knowledge graphs is a critical issue. Second, a RAG method that fully leverages the complex relationships and reasoning paths within knowledge graphs is needed to improve the performance of LLMs in complex reasoning tasks. For example, in aviation accident analysis, it is necessary to retrieve accident-related entities, relationships, and reasoning paths from the knowledge graph and effectively integrate them into the LLM generation process to generate accurate and reliable accident cause analysis reports. Finally, improving the interpretability of retrieval-enhanced generative (RAG) methods, enabling understanding of the reasoning process and underlying principles of LLMs, is also an important research direction. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, the present invention aims to provide a multi-path logic generation method based on aviation accident knowledge graphs. By introducing a dynamic weight fusion mechanism, this method integrates three strategies: semantic similarity retrieval, terminology matching retrieval, and association reasoning retrieval. It mines aviation knowledge graph information from multiple dimensions, effectively integrates multi-source heterogeneous knowledge, and improves the accuracy and interpretability of reasoning in the aviation professional field.

[0007] Specifically, on the one hand, the present invention provides a multi-path logic generation method based on an aviation accident knowledge graph, which includes the following steps: S1: Perform vectorized embedding of the aviation accident knowledge graph and the input query text to obtain discrete aviation accident triples, map them to a continuous vector space, and model the semantic relationships in the aviation accident knowledge graph data through vector operations; construct a dimensionality reduction mapping objective function to match the dimensionality space of the BERT model and the translation embedding model TransE. S2: Implement multi-path retrieval of the aviation accident knowledge graph using retrieval enhancement generation (RAG) technology; perform semantic similarity retrieval between the aviation accident knowledge graph and the input query text, and output the semantic space similarity normalization result of the aviation accident triple vector. Perform terminology matching retrieval between the aviation accident knowledge graph and the input query text to obtain the normalized results of the terminology matching retrieval from the aviation accident knowledge graph. Perform association reasoning retrieval between the aviation accident knowledge graph and the input query text to obtain the normalized results of path association reasoning retrieval. ; S3: The retrieval results from step S2 are fused and enhanced using a weight allocation mechanism and a multi-feature joint ranking method. The normalized confidence scores of the aviation accident triplet for each retrieval method are calculated. for: ; in, Normalized confidence level for aviation accident triplets; The semantic space similarity normalization result for the aviation accident knowledge graph; For semantic similarity weights; Normalized results for term matching retrieval of aviation accident knowledge graph; Weighting terms for matching; Normalized results for path association reasoning retrieval of aviation accident knowledge graph; Weights for associative reasoning; Based on the normalized confidence level of the aviation accident triplet Obtain the enhanced input sequence for the aviation accident knowledge graph. ; S4: Enhance the input sequence with the aviation accident knowledge graph from step S3. The input is fed into the multi-path retrieval enhanced generation RAG reasoning enhancement system to obtain the relational logic generation result of the multi-path retrieval enhanced generation RAG.

[0008] Preferably, in step S1, a dimensionality reduction mapping objective function is constructed to match the dimensionality space of the BERT model and the translation embedding model TransE, specifically as follows: ; in, The output of the dimensionality reduction mapping objective function; To be a function that maximizes the value; The target projection matrix; The trace of the target projection matrix; It is the covariance matrix; These are constraints; This is the transpose symbol for the projection matrix; It is an identity matrix.

[0009] Preferably, step S2 specifically includes: S21: Semantic similarity retrieval uses a dual-tower model to calculate similarity, achieving accurate matching between the query intent of the input query text and the aviation accident knowledge graph, and outputting the semantic space similarity of the aviation accident triple vector. And normalize it; S22: Terminology matching retrieval uses the Best Matching 25 probability-weighted algorithm, with the semantic vector of the input query text as the input. Semantic vector of aviation accident triples and terminology dictionary Output term matching search results And normalize it; S23: The association reasoning retrieval method employs multi-hop path search based on the knowledge graph topology, outputting path association reasoning retrieval results. And normalize it.

[0010] Preferably, the semantic space similarity of the aviation accident triple vectors in step S21 Specifically: ; in, The semantic space similarity of the triple vectors of aviation accidents; A semantic vector for the input query text; This is a semantic vector for triples.

[0011] Preferably, the term matching retrieval results in step S22 Specifically: ; in, The results are for term matching search. For the first line of the input query text A semantic vector; semantic vectors for input query text semantic vector of aviation accident triples Word frequency in; To control the word frequency saturation rate parameter, in the embodiments... =1.2; To adjust the document length penalty item; To highlight the distinguishing parameters of low-frequency technical terms; For a terminology dictionary; Number the semantic vectors; This represents the total number of semantic vectors. The average length of all documents in the knowledge graph; The total number of documents for which you enter the query text; For included terms The number of documents; It is a logarithmic function.

[0012] Preferably, the path association reasoning retrieval results in step S23 Specifically: ; in, The results are retrieved based on path association reasoning. A set of paths; β represents the path length; β controls the attenuation rate, and in this example, β = 0.5. To balance the path length and relationship weight, the adjustment factor is set to λ=0.6 in this example; For relation type The frequency of occurrence in the entire graph is used to suppress high-frequency generalization relationships; For relation edges The composite weights; It is the natural logarithm; This is the vector correction term in dynamic weight calculation; It is a natural exponential function.

[0013] Preferably, step S3 specifically includes: S31: Calculate the normalized confidence score of the aviation accident triplet based on the results of semantic similarity retrieval, term matching retrieval, and association reasoning retrieval. ; S32: Set confidence threshold Filter high-confidence triples and create triples containing those with confidence levels above a threshold. List of triples ; S33: Adapts to the input length limit of large language models, truncating the maximum number of entries. Within a certain number of items, an enhanced input sequence for the aviation accident knowledge graph is obtained. .

[0014] Preferably, step S32 specifically includes: in, Output a list of aviation accident triples; Normalized confidence level for aviation accident triplets; This is the confidence threshold.

[0015] On the other hand, this invention proposes a multi-path logic generation system based on an aviation accident knowledge graph, which includes: a data acquisition and management module, a multi-path retrieval module, a knowledge graph construction and reasoning module, a service interface call module, and a visualization display module; The data acquisition and management module is used to extract, store, and manage aviation accident-related data; semi-structured and unstructured data will be stored in the database, and data creation, deletion, modification, and query operations can be performed; execution commands will be built into the interactive buttons; The multi-path retrieval module calculates and outputs an enhanced input sequence of the aviation accident knowledge graph through a multi-path retrieval enhancement generation method, providing enhanced prompt words for subsequent reasoning in the large language model; The knowledge graph construction and reasoning module is used to preprocess, extract, and fuse knowledge from an unprocessed corpus, and construct an aviation accident knowledge graph using an automated graph construction algorithm; it can also be used to improve the factuality and interpretability of large language models in the field of aviation accidents. The service interface call module is mainly used to implement application interfaces related to functions. It uses an HTTP server component to receive and process input requests, as well as return the corresponding results. The visualization module is used to visualize and display the multi-path logic generation system, including the homepage query interface, accident data interface, accident graph interface, and accident reasoning interface.

[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention integrates three strategies: semantic similarity retrieval, term matching retrieval, and association reasoning retrieval. It can mine information in the aviation knowledge graph from different dimensions, capture knowledge related to the input query more comprehensively and accurately, and effectively solve the knowledge blind spots and illusion problems of large language models in professional fields, thereby significantly improving the accuracy and interpretability of reasoning in the aviation professional field.

[0017] (2) The present invention introduces a dynamic weight fusion mechanism, which can dynamically adjust the weights of different retrieval paths according to their confidence and importance, and realize the effective fusion of semantic similarity, term matching and related reasoning results. This avoids low-quality or irrelevant knowledge from interfering with the reasoning of large models, thereby improving the quality of retrieval results and the reasoning enhancement effect, and realizing the effective fusion of multi-source heterogeneous knowledge.

[0018] (3) This invention has been customized for professional fields such as aviation accident analysis and has constructed a multi-path retrieval enhanced generation RAG framework, which can perform targeted reasoning enhancement for professional fields. It provides a new approach to solving the problems of knowledge scarcity, factual errors and insufficient interpretability faced by large language models (LLM) when dealing with complex reasoning problems, and has important application value. Attached Figure Description

[0019] Figure 1 This is a control block diagram of the multi-path logic generation method based on aviation accident knowledge graph of the present invention; Figure 2 This is a flowchart of the multi-path logic generation method of the present invention; Figure 3 This is a schematic diagram of the architecture of the multi-path logic generation method of the present invention; Figure 4 This is the overall architecture diagram of the multi-path logic generation system of the present invention; Figure 5 This is a screenshot of the output result interface of the LLMQA model of this invention; Figure 6 This is a screenshot of the output result interface of the KGQA model of this invention; Figure 7 This is a screenshot of the output result interface of the LLM+KG model of this invention. Detailed Implementation

[0020] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.

[0021] This invention proposes a multi-path logic generation method based on an aviation accident knowledge graph, such as... Figure 1 As shown, vectorized embedding of the aviation accident knowledge graph and the input query text is performed to obtain discrete aviation accident triples, and a dimensionality reduction mapping objective function is constructed. Multi-path retrieval of the aviation accident knowledge graph is achieved using retrieval enhancement generation technology. Weight allocation mechanism and multi-feature joint ranking method are used for fusion enhancement to obtain an enhanced input sequence for the aviation accident knowledge graph. A multi-path retrieval enhancement generation reasoning enhancement system is used to obtain the relevance reasoning results; as shown... Figure 2 The diagram shown is a flowchart of the multi-path logic generation method of the present invention, which specifically includes the following steps: Step S1: Perform vectorized embedding of the aviation accident knowledge graph and the input query text. To facilitate aviation accident knowledge retrieval, the aviation accident knowledge graph data stored in the example database is vectorized and embedded to obtain discrete aviation accident triples: head entity-relationship-tail entity, such as "cabin fire-cause-oxygen supply system short circuit". These are mapped to a continuous vector space, and the semantic relationships in the aviation accident knowledge graph data are modeled through vector operations. To determine the rationality of the vectorized aviation accident triples, a translational embedding model, namely TransE, is used. The determination result of the aviation accident triples is as follows: ; in, The results of the aviation accident ternary group assessment; For the head entity embedding vector; For relation embedding vectors; For tail entity embedding vectors; The norm order is typically 1 or 2 in the examples.

[0022] If the result of the aviation accident triplet is 0, then the aviation accident triplet in the aviation accident knowledge graph... If it is established, then there is Relation embedding vector Embed the head entity into the vector Translation to tail entity embedding vector .

[0023] Similarly, to match and retrieve input query text against a vectorized aviation accident knowledge graph, entity relation extraction and vectorized embedding of the input query text are required to identify its semantic information. The BERT model and the translational embedding model TransE can be used to identify this semantic information, which is then compared with the data in the aviation accident knowledge graph. The BERT model is a pre-trained language model based on the Transformer encoder, improving natural language processing (NLP) through bidirectional contextual understanding. Since the dimensionality spaces of the BERT model and the translational embedding model TransE are mismatched, dimensionality reduction mapping is needed for the BERT model's output. Dimensionality reduction mapping projects the high-dimensional vector data of the input query text processed by the BERT model onto the direction of maximum variance through orthogonal transformation, preserving the main semantic differences of the input query text. The initial BERT model embedding matrix is... ,in, Given the number of samples for the input query text, the dimensionality-reduced target matrix is: ;in, This refers to the dimension of the TransE embedding model. Therefore, to achieve dimensionality reduction, the target projection matrix must be found. , making Establishment, construction of a defined target projection matrix The objective function for dimensionality reduction mapping is: ; in, The output of the dimensionality reduction mapping objective function; To be a function that maximizes the value; The target projection matrix; The trace of the target projection matrix; Let covariance matrix be the variance matrix. ; As a constraint, the projected basis vectors are made orthogonal; This is the transpose symbol for the projection matrix; It is an identity matrix.

[0024] The aviation accident knowledge graph in this embodiment contains aviation accident triples: "737 MAX", "has_part", and "MCAS". After training with the TransE translation embedding model, the embedding vectors of the aviation accident triples are obtained as follows: =[0.2,0.5,-0.1,0.3]、 =[0.1,-0.2,0.4,0.0]、 =[0.3,0.3,0.3,0.3]; The output of the aviation accident triplet judgment result calculated using the L1 norm is: ; Since the result of the aviation accident triplet is 0, it indicates that the aviation accident triplet is valid in the aviation accident knowledge graph. When the input query text is "What caused the 737 MAX crashes?", after processing by the BERT model, the embedding matrix is ​​obtained as follows: =[[0.1,0.2,0.3,...,0.9],[0.2,0.3,0.4,...,0.8],...]. When the BERT model output dimension is 768, and the translation embedding model TransE has a dimension of 128, a target projection matrix is ​​found through the dimensionality reduction mapping objective function. The 768-dimensional vector is reduced to 128 dimensions. The optimal target projection matrix is ​​obtained by solving the dimensionality reduction mapping objective function. Then, the vector e of each token output by the BERT model is... i Projecting to 128 dimensions, i.e., e i降维 =P*e i .

[0025] Step S2: Use search enhancement to generate RAG technology to achieve multi-path retrieval of the aviation accident knowledge graph.

[0026] Step S21: Perform semantic similarity retrieval between the aviation accident knowledge graph and the input query text. Semantic similarity retrieval is achieved using methods such as word vectors, sentence vectors, interactive deep matching, or the dual-tower model. The dual-tower model used in this embodiment of the invention, due to its advantages of a separated encoding structure and efficient retrieval, can achieve cross-modal semantic alignment and support large-scale real-time retrieval. Based on the vectorized embedding results of the aviation accident knowledge graph and the input query text obtained in Step S1, the dual-tower model converts the aviation accident triple vectors mapped by the TransE translation embedding model into a unified semantic space. Through similarity calculation, it achieves accurate matching between the query intent of the input query text and the aviation accident knowledge graph, specifically: ; in, The semantic space similarity of the triple vectors of aviation accidents; A semantic vector for the input query text; This is a semantic vector of aviation accident triples. The result of the aviation accident triplet judgment output in step S1.

[0027] Semantic space similarity normalization of aviation accident triple vectors is performed as follows: ; in, The semantic space similarity normalization result for the aviation accident knowledge graph; This represents the maximum semantic similarity of all aviation accident triples. It represents the minimum semantic similarity of all aviation accident triples.

[0028] In this example, the vector representation of the input query text "737 MAX crash cause" after dimensionality reduction by the BERT model is as follows: =[0.2,0.4,-0.2,0.1]. In the aviation accident knowledge graph, the vector representation of an aviation accident triple "MCAS", "caused_by", and "sensor failure" is as follows: =[0.3,0.2,-0.1,0.4]. Calculated using cosine similarity. for: ; When the semantic similarity of all aviation accident triples ranges from [0.1, 0.9], then =0.9, =0.1, the semantic space similarity normalization result of the aviation accident triple vector is as follows: ; Step S22: Perform term matching retrieval between the aviation accident knowledge graph and the input query text. Terms matching retrieval methods typically include word frequency-based methods, Boolean retrieval methods, and probabilistic weighted model methods. In this embodiment of the invention, the Best Matching 25 probabilistic weighted algorithm (BM25) is used for information retrieval and text mining. Widely used in search engines and related fields, BM25, with its dynamic weight adjustment and terminology discrimination optimization characteristics, can accurately capture the core features of aviation-related professional terms and suppress interference from common vocabulary. The BM25 probabilistic weighted algorithm first extracts a terminology dictionary from the aviation accident knowledge graph, then translates the terminology dictionary built during the training of the TransE embedding model. A terminology whitelist was provided for the BM25 probabilistic weighted algorithm to ensure that the retrieval process focuses on entity information within the aviation accident knowledge graph. Then, the input query text was segmented and cleaned, and the matching confidence of terms with aviation accident triples in the aviation accident knowledge graph was calculated using inverse document frequency (IDF) as a weight. The semantic vector of the input query text... Semantic vector of aviation accident triples and terminology dictionary The terminology matching retrieval results obtained by matching the aviation accident knowledge graph with the input query text are as follows: ; in, The results are for term matching search. For the first line of the input query text A semantic vector; semantic vectors for input query text semantic vector of aviation accident triples Word frequency in; For the semantic vector of triples, The result of the aviation accident triplet judgment output in step S1; To control the word frequency saturation rate parameter, in the embodiments... =1.2; To adjust the document length penalty, in the example... =0.75; To highlight the distinguishing parameters of low-frequency technical terms, ; For a terminology dictionary; Number the semantic vectors; This represents the total number of semantic vectors. The average length of all documents in the knowledge graph; The total number of documents for which the query text is entered; For included terms The number of documents; It is a logarithmic function.

[0029] This step specifically retrieves explicit terminology matches, accurately locating aviation accident report paragraphs containing proper nouns, ensuring no core entities are lost, and yielding the normalized results of the terminology matching retrieval: ; in, The normalized results of term matching retrieval for the aviation accident knowledge graph.

[0030] In this example, the input query text is "737 MAX MCAS failure". The text description of an aviation accident triple in the aviation accident knowledge graph is "The 737 MAX crashes were linked to the MCAS system malfunctioning due to a faulty sensor."; the input query text is segmented as ["737", "MAX", "MCAS", "failure"]; the discriminative parameters highlighting low-frequency technical terms are calculated. In the example, the corpus contains 1000 documents, and 10 of them contain "MCAS". Therefore, the result is: ; Similarly, to obtain , , Furthermore, in the example, in the aviation accident triplet description, "737" appears once, "MAX" appears twice, "MCAS" appears once, and "failure" appears once. The length of the aviation accident triplet is set to 30, and the average document length is 50. Then, the term matching retrieval results are calculated. for: ; Term matching retrieval results for all aviation accident triples in the example If the range is [5, 25], then =25, =5, yielding the normalized result of term matching retrieval. for: ; Step S23: Perform association reasoning retrieval between the aviation accident knowledge graph and the input query text. Association reasoning retrieval methods include reasoning based on path ranking models, reasoning based on retrieval-enhanced RAG generation, and reasoning based on graph neural networks. This embodiment of the invention includes a multi-hop path search based on the knowledge graph topology, whose explicit causal tracing capability highly matches the chain-like characteristics of aviation accidents. Therefore, this method is used to achieve association reasoning retrieval. The advantage of this method is that it natively supports real-time adjacency traversal of the graph database, and can link to entity relationship networks of layers 3-5 to reveal the root cause of the accident. For example, the complete propagation chain of "sensor failure → control command error → aircraft dive" can be obtained through multi-hop reasoning of the aviation accident knowledge graph.

[0031] like Figure 3The diagram illustrates the architecture of the multi-path logic generation method of this invention. In the implementation of associative reasoning, the path pattern setting constructs a multi-hop causal reasoning template based on aviation accident investigation procedures. It matches the chain-like relationship network between accident cause nodes and result nodes using a pre-defined Cypher graph query statement. For example, it searches for propagation paths containing relation types such as "cause" and "association" and spanning 2 to 5 layers of entity connections. Simultaneously, it constrains the path's starting and ending points to contain keyword entities from the input query text. Cypher is a dedicated query language for graph databases, functionally equivalent to SQL in relational databases, used for pattern matching and data processing of nodes, relations, and attributes in the graph database. Based on this, dynamic weight calculation integrates knowledge graph embedding features. On one hand, it assigns basic weights to relations based on the statistical probability of aviation accidents in the aviation safety manual. On the other hand, it generates dynamic correction terms by calculating the relation translation error (h+r−t) using the TransE embedding vector translation model. This ensures that reasonable paths conforming to the semantic constraints of the aviation accident knowledge graph receive weight enhancement, while logically conflicting abnormal paths are automatically suppressed. This multi-dimensional ranking strategy comprehensively considers three factors: total path weight, hop length, and node centrality. It prioritizes explanatory paths with high cumulative weight, short propagation chains, and involvement of core entities. For example, it ranks high-weight short paths like "design flaw → system misjudgment → loss of control" before long paths like "maintenance oversight → component aging → sensor failure → system misjudgment." This ensures both the credibility of the inference results and adheres to the "Occam's Razor" principle in aviation safety analysis, which emphasizes concise explanations. The path association inference retrieval results are as follows: ; in, The results are retrieved based on path association reasoning. A set of paths; λ is the path length; β is the control attenuation rate, which is 0.5 in this example; λ is the adjustment factor that balances the path length and the relationship weight, which is 0.6 in this example. For relation type The frequency of occurrence in the entire graph is used to suppress high-frequency generalization relationships; For relation edges The composite weights; It is the natural logarithm; This is the vector correction term in dynamic weight calculation. ; It is a natural exponential function; This is a semantic vector of aviation accident triples. The result of the aviation accident triplet judgment output in step S1.

[0032] The right-hand side of the above formula is in the form of adding two terms, the first term... The second item is used to evaluate the simplicity of the path. Used to evaluate the significance of a relationship; The normalized result of path association reasoning retrieval is as follows: ; in, Normalized results for path association reasoning retrieval of aviation accident knowledge graph; The maximum score across all inference paths; The maximum score across all inference paths.

[0033] In this embodiment of the invention, the aviation accident knowledge graph contains the following 4-hop inference path with a path length of L=4: “737 MAX”->“has_part”->“MCAS”->“caused_by”->“sensor failure”->“leads_to”->“incorrect control input”->“results_in”->“crash”. In this embodiment, based on the aviation safety manual and the translational embedding model TransE, the composite weights of the path associations are determined as follows: whas_part=0.8; wcaused_by=0.9; wleads_to=0.7; wresults_in=0.95. The frequency of these path associations in the entire aviation accident knowledge graph is as follows: Degree(has_part)=100; Degree(caused_by)=50; Degree(leads_to)=80; Degree(results_in)=40. Therefore, the calculated path association inference retrieval result is: ; If the score range for all reasoning paths is set to [0.001, 0.005], then... =0.005, =0.001, the normalized result of path association reasoning retrieval is: ; Step S3: The retrieval results from Step S2 are fused and enhanced using a weight allocation mechanism and a multi-feature joint ranking method to obtain an enhanced input sequence for the aviation accident knowledge graph. After capturing multi-dimensional information from the aviation accident knowledge graph using the three retrieval methods in Step S2, cross-modal alignment and confidence fusion are performed on the heterogeneous retrieval results to eliminate redundant information, resolve semantic conflicts, and improve factual accuracy. Through the weight allocation mechanism and the multi-feature joint ranking method, the synergistic enhancement of terminology accuracy, semantic relevance, and causal completeness is achieved, ultimately forming an enhanced input sequence for aviation accident knowledge that combines high accuracy and strong interpretability.

[0034] Step S31: Based on the three search results from step S2, calculate the normalized confidence score of the aviation accident triplet for each search method as follows: ; in, Normalized confidence level for aviation accident triplets; For semantic similarity weights; Weighting terms for matching; For associative reasoning weights.

[0035] To determine the optimal weight coefficients for each retrieval method, 20 experimental control groups were designed. Different weight ratios were assigned to semantic similarity retrieval, terminology matching retrieval, and association reasoning retrieval methods. The tests were conducted on the HotPotQA question-answering dataset. The performance of different weight combinations was measured using the precision matching metric (EM) and the harmonic mean metric (F1). The weight allocation ratios and metric scores are shown in Table 1. Both the precision matching metric (EM) and the harmonic mean metric (F1) are used to evaluate model performance. EM stands for exact match; if the model's predicted text is exactly the same as the standard answer, EM is recorded as 1; otherwise, it is recorded as 0. The final value is the average of all samples. F1 is the harmonic mean of precision and recall.

[0036] Table 1. Multi-path RAG weight allocation ratio and index score The experimental data in Table 1 reveal the complex influence mechanism between different weight allocations. When used alone, the term matching retrieval method performs best with an accuracy matching index (EM) of 24.0%, but its harmonic mean index (F1) is lower than that of the associative reasoning module. This may be because exact matching is limited by semantic generalization ability. The similarity retrieval method performs worst when used alone, but performs better when the proportion of similarity in a mixed weight allocation is higher. When the weights are set to 0.5:0.3:0.2, i.e., when w sim =0.5, w BM25 =0.3, w score When the value is 0.2, the multi-path retrieval enhanced RAG generation method can achieve optimal performance.

[0037] Step S32: Normalize the confidence level of the aviation accident triplet output in step S31. Filter for high-confidence aviation accident triples. Create a list of aviation accident triples. Only include those with a confidence level higher than the threshold. Triples: ,in, Output a list of aviation accident triples; Normalized confidence level for aviation accident triplets; This is the confidence threshold. A comprehensive confidence threshold of 0.75 is set, and only search results exceeding this threshold are retained.

[0038] Step S33: Adapt to the input length limit of the large language model; the maximum number of entries needs to be truncated. Within the range of items, that is, if the output is a list of aviation accident triples The number of aviation accident triples exceeds Then only the first one is retained. A triplet of aviation accidents; an enhanced input sequence for an aviation accident knowledge graph. This is the list of aviation accident triples after filtering, sorting, and truncation in step S32, specifically: ; in, Enhance input sequences for aviation accident knowledge graphs; To obtain the output list of aviation accident triplets Select before One element; This represents the maximum number of entries.

[0039] The fused knowledge retrieval results will be used as enhancement prompts for the Large Language Model (LLM) to augment the output of the LLM. For the above embodiment, the calculated results are: Sim'=0.7875; BM25'=0.705; Inf'=0.3. The confidence scores are calculated as follows: ; because =0.66525 is lower than the set threshold of 0.75, therefore the aviation accident triple will not be selected as an augmentation input for the large language model.

[0040] Another aviation accident triplet has the following calculation results: Sim'=0.9; BM25'=0.85; Inf'=0.7; therefore, the calculated confidence level is: ; because =0.845, which is higher than the threshold of 0.75, therefore this aviation accident triple will be selected as augmented input for the large language model. According to The values ​​are sorted among all retrieved aviation accident triples, and the top three are selected. A high-confidence aviation accident triple is used as an enhancement cue word in the large language model. The maximum value is 20.

[0041] Step S4: Enhance the input sequence of the aviation accident knowledge graph from step S3. The input is fed into the multi-path retrieval enhanced generation RAG reasoning enhancement system to obtain the correlation reasoning results of the multi-path retrieval enhanced generation RAG based on the aviation accident knowledge graph. The multi-path retrieval enhanced generation RAG reasoning enhancement system offers three selectable reasoning models: the LLMQA model, with the underlying Qwen large model; the KGQA model, which is the aviation accident knowledge graph reasoning model built into the multi-path retrieval enhanced generation RAG reasoning enhancement system; and the LLM+KG model, which is the multi-path retrieval enhanced generation RAG enhanced reasoning system used in this invention.

[0042] In this example, the input query text is "What is the relationship between the landing accident at Airport A and the landing accident at Airport B?". The response results in the three different models are as follows: Figure 5 , Figure 6 and Figure 7 As shown. Figure 5 While the output of the LLMQA model provides answers at the model reasoning level, it lacks more domain-specific content, fails to capture the factual connection between the two incidents, and cannot visualize the reasoning process. Figure 6 The output results using the KGQA model, based on the aviation accident knowledge graph, can effectively capture the potential relationship between two accidents within the knowledge graph and display the retrieved inference paths in the inference path bar on the right. However, the answers generated solely based on the graph have relatively simple semantic information and lack refinement.

[0043] like Figure 7 To utilize the output of the LLM+KG model, based on an aviation accident knowledge graph, the model can retrieve the correlation information between two accidents. During the response process, it compares the correlation between the two accidents based on node and attribute information in the aviation accident knowledge graph, accompanied by the black-box reasoning mechanism unique to LLM. With the assistance of a hybrid retrieval strategy, it can retrieve the relationship information between relevant nodes of the two accidents from the aviation accident knowledge graph and visualize the reasoning path. Comparing the reasoning paths extracted by KGQA and LLM+KG, it was found that LLM+KG can uncover higher relevance than KGQA. In KGQA, only 3-hop reasoning paths were discovered between the two accidents, while LLM+KG discovered 5-hop reasoning paths.

[0044] The second aspect of this invention proposes a multi-path logic generation system based on an aviation accident knowledge graph, the overall architecture of which is as follows: Figure 4 As shown, it specifically includes: a data acquisition and management module, a multi-path retrieval module, a knowledge graph construction and reasoning module, a service interface call module, and a visualization display module.

[0045] The data acquisition and management module is mainly used to extract, store, and manage aviation accident-related data. It integrates a distributed web crawler framework, allowing users to crawl information from web pages using specified URLs. It also allows for the uploading of custom accident-related files, creating an unprocessed data corpus. Semi-structured and unstructured data will be stored in a MySQL database, while structured data in the form of aviation accident triples will be stored in a Neo4j database using Cypher statements. Embedded vector data will be stored in a Milvus database. All databases can perform operations such as adding, deleting, modifying, and querying data. Within the system, statement execution commands are integrated into the interactive buttons.

[0046] The multi-path retrieval module calculates and outputs enhanced input sequences for the aviation accident knowledge graph using the multi-path retrieval enhancement generation RAG method, providing enhanced prompt words for subsequent reasoning in the large language model.

[0047] The knowledge graph construction and reasoning module is mainly divided into two key parts. One is the knowledge graph construction part enhanced by the Large Language Model (LLM), which is mainly used for data preprocessing, knowledge extraction, and knowledge fusion of the unprocessed data corpus, and constructs an aviation accident knowledge graph through an automated graph construction algorithm. The other is the knowledge graph enhanced LLM reasoning part, which is mainly used to improve the factuality and interpretability of the LLM in the field of aviation accidents. The knowledge graph enhanced LLM reasoning part includes knowledge vectorization, hybrid retrieval enhancement, path parsing, and path subgraph generation.

[0048] The service interface call module is mainly used to implement application interfaces related to the main functions; the service interface call module contains the six core parts of the main functions of the system; since the module call scale involved in the multi-path logic generation system is relatively small and the response is directly in the web page, the services in the service interface call module all use HTTP server components to receive and process input requests, as well as return the corresponding results.

[0049] The visualization module is mainly used to realize the visualization and user interface of the multi-path logic generation system, including the homepage query interface, accident data interface, accident graph interface and accident reasoning interface.

[0050] The beneficial effects of this invention are as follows: This invention proposes a multi-path logic generation method and system based on aviation accident knowledge graphs. By integrating three retrieval strategies, it mines information from aviation knowledge graphs from different dimensions, capturing knowledge related to the input query more comprehensively and accurately. The dynamic weight fusion mechanism can dynamically adjust the weights of different retrieval paths according to their confidence and importance, achieving effective fusion of semantic similarity, term matching, and association reasoning results. A multi-path retrieval enhanced generation (RAG) framework is constructed, which can perform targeted reasoning enhancement for professional domains. This provides a new approach to solving the problems of knowledge scarcity, factual errors, and insufficient interpretability faced by large language models (LLMs) when dealing with complex reasoning problems, and has significant application value.

[0051] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A multi-path logic generation method based on aviation accident knowledge graph, characterized in that, It includes: S1: Perform vectorized embedding of the aviation accident knowledge graph and the input query text to obtain discrete aviation accident triples, map them to a continuous vector space, and model the semantic relationships in the aviation accident knowledge graph data through vector operations; construct a dimensionality reduction mapping objective function to match the dimensionality space of the BERT model and the translation embedding model TransE. S2: Implement multi-path retrieval of the aviation accident knowledge graph using retrieval enhancement generation (RAG) technology; perform semantic similarity retrieval between the aviation accident knowledge graph and the input query text, and output the semantic space similarity normalization result of the aviation accident triple vector. Perform terminology matching retrieval between the aviation accident knowledge graph and the input query text to obtain the normalized results of the terminology matching retrieval from the aviation accident knowledge graph. Perform association reasoning retrieval between the aviation accident knowledge graph and the input query text to obtain the normalized results of path association reasoning retrieval. ; Step S2 is as follows: S21: Semantic similarity retrieval uses a dual-tower model to calculate similarity, achieving accurate matching between the query intent of the input query text and the aviation accident knowledge graph, and outputting the semantic space similarity of the aviation accident triple vector. And normalize it; S22: Terminology matching retrieval uses the Best Matching 25 probability-weighted algorithm, with the semantic vector of the input query text as input. Semantic vector of aviation accident triples and terminology dictionary Output term matching search results And normalize it; S23: The association reasoning retrieval method employs multi-hop path search based on the knowledge graph topology, outputting path association reasoning retrieval results. And normalize it; Path association reasoning retrieval results in step S23 Specifically: ; in, The results are retrieved based on path association reasoning. A set of paths; β is the path length; β is the control attenuation rate, and in this example, β = 0.

5. To balance the path length and relationship weight, the adjustment factor is set to λ=0.6 in this example; For relation type The frequency of occurrence in the entire graph is used to suppress high-frequency generalization relationships; For relation edges The composite weights; It is the natural logarithm; This is the vector correction term in dynamic weight calculation; It is a natural exponential function; The normalized result of path association reasoning retrieval is as follows: ; in, Normalized results for path association reasoning retrieval of aviation accident knowledge graph; The maximum score across all inference paths; The maximum score across all inference paths; S3: The retrieval results from step S2 are fused and enhanced using a weighted allocation mechanism and a multi-feature joint ranking method, and the normalized confidence score of the aviation accident triplet is calculated. for: ; in, Normalized confidence level for aviation accident triplets; The semantic space similarity normalization result for the aviation accident knowledge graph; For semantic similarity weights; Normalized results for term matching retrieval of aviation accident knowledge graph; Weighting terms for matching; Normalized results for path association reasoning retrieval of aviation accident knowledge graph; Weights for associative reasoning; Based on the normalized confidence level of the aviation accident triplet Obtain the enhanced input sequence for the aviation accident knowledge graph. ; S4: Enhance the input sequence with the aviation accident knowledge graph from step S3. The input is fed into the multi-path retrieval enhanced generation RAG reasoning enhancement system to obtain the relational logic generation result of the multi-path retrieval enhanced generation RAG.

2. The multi-path logic generation method based on aviation accident knowledge graph according to claim 1, characterized in that: In step S1, a dimensionality reduction mapping objective function is constructed to match the dimensionality space of the BERT model and the translation embedding model TransE, specifically as follows: ; in, The output of the dimensionality reduction mapping objective function; To be a function that maximizes the value; The target projection matrix; The trace of the target projection matrix; It is the covariance matrix; These are constraints; This is the transpose symbol for the projection matrix; It is an identity matrix.

3. The multi-path logic generation method based on aviation accident knowledge graph according to claim 1, characterized in that: Semantic space similarity of aviation accident triple vectors in step S21 Specifically: ; in, The semantic space similarity of the triple vectors of aviation accidents; A semantic vector for the input query text; This is a semantic vector for triples.

4. The multi-path logic generation method based on aviation accident knowledge graph according to claim 1, characterized in that: Term matching search results in step S22 Specifically: ; in, The results are for term matching search. For the first line of the input query text A semantic vector; semantic vectors for input query text semantic vector of aviation accident triples Word frequency in; To control the word frequency saturation rate parameter, in the embodiments... =1.2; To adjust the document length penalty item; To highlight the distinguishing parameters of low-frequency technical terms; For a terminology dictionary; Number the semantic vectors; This represents the total number of semantic vectors. The average length of all documents in the knowledge graph; The total number of documents for which the query text is entered; For included terms The number of documents; It is a logarithmic function.

5. The multi-path logic generation method based on aviation accident knowledge graph according to claim 1, characterized in that: Step S3 is as follows: S31: Calculate the normalized confidence score of the aviation accident triplet based on the results of semantic similarity retrieval, term matching retrieval, and association reasoning retrieval. ; S32: Set confidence threshold Filter high-confidence triples and create triples containing those with confidence levels above a threshold. List of triples ; S33: Adapts to the input length limit of large language models, truncating the maximum number of entries. Within a certain number of items, an enhanced input sequence for the aviation accident knowledge graph is obtained. .

6. The multi-path logic generation method based on aviation accident knowledge graph according to claim 5, characterized in that: Step S32 is as follows: ; in, Output a list of aviation accident triples; Normalized confidence level for aviation accident triplets; This is the confidence threshold.

7. A system for the multi-path logic generation method based on aviation accident knowledge graph as described in any one of claims 1 to 6, characterized in that, It includes: The module includes a data acquisition and management module, a multi-path retrieval module, a knowledge graph construction and reasoning module, a service interface call module, and a visualization display module. The data acquisition and management module is used to extract, store, and manage aviation accident-related data; semi-structured and unstructured data will be stored in the database, and data creation, deletion, modification, and query operations can be performed; execution commands will be built into the interactive buttons; The multi-path retrieval module calculates and outputs an enhanced input sequence of the aviation accident knowledge graph through a multi-path retrieval enhancement generation method, providing enhanced prompt words for subsequent reasoning in the large language model; The knowledge graph construction and reasoning module is used to preprocess, extract, and fuse knowledge from an unprocessed corpus, and constructs an aviation accident knowledge graph using an automated graph construction algorithm. It can also be used to improve the factuality and interpretability of large language models in the field of aviation accidents; The service interface call module is used to implement application interfaces related to functions. It uses an HTTP server component to receive and process input requests and return corresponding results. The visualization module is used to visualize and display the multi-path logic generation system, including the homepage query interface, accident data interface, accident graph interface, and accident reasoning interface.