Large language model retrieval enhancement method and system based on aerospace domain knowledge graph

By constructing a composite index of knowledge graph and graph vector in the aerospace field, the problems of complex entity relationship expression and fragmented retrieval results in the aerospace knowledge management system were solved. This achieved a deep integration of structured knowledge retrieval and semantic retrieval, improving the credibility of the aerospace knowledge management system and the accuracy of intelligent question answering.

CN121901400APending Publication Date: 2026-04-21BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2026-01-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing knowledge management systems in the aerospace field struggle to explicitly express the complex structural relationships between entities within the aerospace sector. In multi-document scenarios, search results are fragmented, and the generated results lack traceability and credibility, making it difficult to meet the aerospace field's needs for efficient and reliable knowledge enhancement retrieval and question answering.

Method used

We construct a composite index of knowledge graph and graph vector in the aerospace field. With entity nodes and relation edges as the core, we combine semantic retrieval and graph structure retrieval to achieve deep integration of structured knowledge retrieval and semantic retrieval. We dynamically construct contextual content to enhance the generation process of large language models.

Benefits of technology

It has achieved a systematic improvement in the reliability of knowledge retrieval in the aerospace field, generated results with complete structure and logical coherence, reduced factual errors, met the aerospace field's requirements for traceability of results, and improved the accuracy and flexibility of intelligent question answering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901400A_ABST
    Figure CN121901400A_ABST
Patent Text Reader

Abstract

The invention provides a large language model retrieval enhancement method and system based on a spaceflight domain knowledge graph, and belongs to the technical field of artificial intelligence and spaceflight information systems. The method comprises the following steps: firstly, carrying out block vectorization on a spaceflight field text, automatically extracting entities and relationships through a cue word project of field optimization, and constructing a knowledge graph; and establishing a graph index and vector index fused retrieval system. During retrieval, semantic retrieval based on query vectors, atlas relation retrieval based on keywords and entity retrieval are synchronously executed, semantic and graph structure fusion reordering is carried out on multiple paths of results, and structured contexts are dynamically constructed according to the semantic and graph structure fusion reordering to be input into a large language model to generate answers. According to the large language model retrieval enhancement method and system based on the spaceflight domain knowledge graph, through deep fusion of the graph and semantic retrieval, the problems that spaceflight knowledge retrieval is weak in association and low in fragmentization and credibility are solved, and systematicness, accuracy and traceability response to complex queries is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and aerospace information systems, and in particular to a method and system for enhancing large language model retrieval based on aerospace knowledge graphs. Background Technology

[0002] With the development of aerospace technology, the aerospace transportation field has accumulated a wealth of technical documents, standards, and test data during model development, testing, and engineering applications. This knowledge is typically stored in unstructured document format and widely distributed across different systems and business processes, playing a crucial supporting role in aerospace product design, test analysis, and troubleshooting. In recent years, with the development of artificial intelligence and large language model technology, natural language-based intelligent retrieval and question-answering methods have been increasingly applied to knowledge management and decision support scenarios in the aerospace field.

[0003] The existing technologies have the following technical problems: 1) Existing knowledge management systems in the aerospace field mostly use documents or text blocks as basic retrieval units, mainly relying on keyword matching or semantic vector similarity for retrieval. It is difficult to explicitly express the complex structural relationships between entities in the aerospace field. When faced with queries involving multiple entities and multiple relationships, it is difficult to support systematic reasoning and association analysis; 2) Existing semantic vector-based retrieval enhancement generation technology is prone to introducing context fragmentation problems in multi-document scenarios. The retrieval results often come from multiple text fragments without explicit association, resulting in a lack of structural constraints in the generation process of large language models, which can easily lead to factual inconsistencies or content illusions; 3) Existing large language models mostly rely on knowledge solidified in the pre-training stage. It is difficult to cover the continuously updated standards, specifications, experimental conclusions and engineering experience in the aerospace field in a timely manner, and the generated results lack clear source support, making it difficult to meet the requirements of traceability and credibility of results in the aerospace field; 4) Existing technologies that partially introduce knowledge graphs usually only use knowledge graphs as static knowledge bases or auxiliary display tools, without using the entities and relationships in the knowledge graph as the core basis for retrieval indexes and context construction. It is difficult to give full play to the advantages of knowledge graphs in multi-hop reasoning and structured knowledge organization.

[0004] Therefore, existing technologies still struggle to achieve an efficient and reliable knowledge-enhanced retrieval and question-answering solution in the aerospace field that can simultaneously address structured knowledge representation, semantic retrieval capabilities, and large language model generation capabilities. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for enhancing large language model retrieval based on aerospace knowledge graphs. This method solves the problems of weak relevance, severe fragmentation, unreliable results, and lack of traceability in existing aerospace knowledge retrieval technologies. By constructing a composite index of domain knowledge graphs and graph vectors, it achieves deep integration of structured knowledge retrieval and semantic retrieval, thereby improving the accuracy, systematicity, and credibility of intelligent question answering in the aerospace field.

[0006] To achieve the above objectives, this invention provides a method for enhancing retrieval of large language models based on aerospace knowledge graphs, comprising the following steps: Step S1: Obtain unstructured text data in the aerospace field, perform block processing and vectorization construction to form a text block set and corresponding text vector library; Step S2: Using the large language model prompt word engineering optimized for the aerospace field, automatically extract and merge the aerospace field entity, relationship and attribute information of the text block set, and construct an aerospace field knowledge graph; Step S3: Using entity nodes and relation edges in the aerospace knowledge graph as retrieval index units, construct an index system based on graph structure, and establish corresponding semantic vector representations for entity nodes and relation edges respectively; Step S4: Receive the query question input by the user, map the query question into a query semantic vector, and at the same time use the aerospace big model intelligent agent to parse the query question, extract high-level keywords to represent the query topic concept and low-level keywords to represent the specific entities involved in the query. Step S5: In the text vector library, perform semantic similarity retrieval based on the query semantic vector to obtain the first candidate result set; Step S6: In the aerospace knowledge graph, perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords to obtain the second candidate result set; Step S7: Merge the first candidate result set and the second candidate result set, and re-rank the merged results based on semantic similarity index and graph structure feature index; Step S8: Based on the reordering result, select the top-ranked entity nodes, relation edges, and their associated source text block information to dynamically construct the context content for input to the large language model. Step S9: Input the context content into the large language model to generate a response to the query.

[0007] Preferably, in step S2, the entity nodes include at least one entity type among aerospace systems, components, communication protocols, parameter indicators, algorithm models, and test methods; the relation edges are used to represent at least one relation type of system association, process logic, classification hierarchy, test analysis, and parameter attributes, and are associated with relation weights set based on the credibility of aerospace knowledge; each relation is associated with its source entity, target entity, and source text block information.

[0008] Preferably, in step S2, the large language model prompt word engineering optimized for the aerospace field includes a small sample examples and structured instructions for guiding the large language model to recognize aerospace professional terms, engineering parameters and model identifiers.

[0009] Preferably, in step S3, the graph-based indexing system is a composite indexing system of graph index and vector index; wherein, the graph index is used to represent the topological connection structure between entities and relations, and the vector index is used to represent the semantic features of entity nodes and relation edges.

[0010] Preferably, in step S4, the query question is parsed using a large language model agent from the aerospace field, including: Based on pre-trained aerospace knowledge identification, the macro-intent of the query is determined, and the question is mapped to high-level concept nodes in the knowledge graph to determine the main relationship type to be queried, thereby extracting high-level keywords that represent the query topic concept; Based on the constraint extraction keyword prompt template optimized in the aerospace field, the limiting words and indicators in the query are parsed and transformed into node attributes and relation constraints required for knowledge graph query, thereby extracting low-level keywords that represent the specific entities involved in the query. Finally, high-level and low-level keywords are output to drive subsequent graph retrieval.

[0011] Preferably, in step S6, the global relation retrieval includes performing a multi-hop traversal based on relation weights along relation edges in the aerospace knowledge graph to obtain an entity relation subgraph related to the advanced keywords.

[0012] Preferably, in step S6, the strategy of performing local entity retrieval and global relation retrieval is adaptively selected based on the semantic features of the query question; the strategy includes: prioritizing local entity retrieval for queries involving specific aerospace models or components, prioritizing global relation retrieval for queries involving system principles or technical links, and using a hybrid retrieval that combines the two for comprehensive technical queries.

[0013] Preferably, in step S7, the graph structure features are constructed based on the structural information in the knowledge graph to construct graph structure scoring items, which can be determined by at least one of node degree, edge weight, or centrality index. In the candidate answer subgraph, the calculation of node degree includes the node's in-degree, out-degree, and the sum of the weights of all its adjacent edges; the edge weight is a weight score of 1-10 given by the model when constructing the graph structure based on prior confidence and co-occurrence frequency. Re-ranking is achieved by linearly weighting and fusing semantic similarity metrics with graph structure feature metrics: ; in, This represents the overall ranking score. This indicates that based on the user query semantic vector and text block semantic vector Similarity score, Represents the semantic vector of the text The graph structure score of the evaluation. and All of these represent weighting coefficients.

[0014] Preferably, in step S8, the context content is organized in a structured format that includes an entity information area, a relationship information area, and a text evidence area; When the length of the context content exceeds the preset context window limit, dynamic pruning is performed based on the reordering result.

[0015] This invention also provides a large language model retrieval enhancement system based on aerospace knowledge graphs, including: The data acquisition and vectorization module is used to acquire unstructured text data in the aerospace field, perform block processing and vectorization construction, and form a set of text blocks and a corresponding text vector library. The knowledge graph construction module is used to automatically extract and merge the entities, relationships and attributes of the aerospace field from a set of text blocks using a large language model prompt word engineering optimized for the aerospace field, and to construct an aerospace field knowledge graph. The graph structure indexing module is used to construct an indexing system based on graph structure by using entity nodes and relation edges in the knowledge graph of the aerospace field as retrieval indexing units, and to establish corresponding semantic vector representations for entity nodes and relation edges respectively. The query parsing module is used to receive query questions input by users, map the query questions into query semantic vectors, and use a large model intelligent agent in the aerospace field to parse the query questions, extracting high-level keywords to represent the query topic concepts and low-level keywords to represent the specific entities involved in the query. The semantic retrieval module is used to perform semantic similarity retrieval based on the query semantic vector in the text vector library to obtain the first candidate result set; The graph retrieval module is used to perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords in the knowledge graph of the aerospace field to obtain a second candidate result set. The fusion and re-ranking module is used to fuse the first candidate result set and the second candidate result set, and re-rank the fused results based on semantic similarity index and graph structure feature index. The context building module is used to dynamically construct the context content for input to the large language model by selecting the top-ranked entity nodes, relation edges and their associated source text blocks based on the re-sorting results. The answer generation module is used to input contextual information into a large language model and generate a response to the query question.

[0016] Therefore, the present invention employs the aforementioned large language model retrieval enhancement method and system based on aerospace knowledge graphs, and the beneficial technical effects are as follows: (1) This invention utilizes prompts from a large language model optimized for the aerospace field to automatically construct an aerospace knowledge graph containing entities, relationships, and their sources from unstructured text. It then establishes a composite retrieval system integrating graph structure indexes and vector indexes, with entity nodes and relationship edges at its core. This technique fundamentally changes the retrieval unit, enabling the system to explicitly capture and utilize the complex relationship networks between spacecraft systems, components, and parameters. When faced with engineering queries involving multiple entities and steps, the system can perform multi-hop relationship retrieval and subgraph discovery based on the graph index, thereby returning structurally complete and logically connected retrieval results, rather than discrete and isolated text fragments. This effectively solves the problems of knowledge association breaks and context fragmentation in existing technologies, providing a structured context for the large language model that supports systematic analysis and reasoning.

[0017] (2) This invention provides a strong and traceable factual constraint for the generation process of large language models by multi-dimensionally fusing and reordering graph retrieval results and vector retrieval results based on semantic and graph structure features, and dynamically constructing structured contextual content (clearly including entity information area, relation information area, and source text block information area) based on the sorting results. This technical solution ensures that the context of the input model has been screened for credibility and has clear source annotations. Therefore, the responses generated by the large language model are not only more accurate, greatly reducing factual errors and logical "illusions", but can also be associated with and traced to the specific entities, relational paths, and original textual evidence supporting the conclusion, thereby meeting the high credibility and traceability requirements of decision support results in the aerospace field and solving the problems of lagging model knowledge and unreliable generation in the prior art.

[0018] (3) This invention parses and extracts high-level keywords representing thematic concepts and low-level keywords representing specific entities from user queries, and uses these to drive global relation retrieval (multi-hop traversal) and local entity retrieval in the knowledge graph, while supporting the intelligent fusion of the two. This design enables the system to adaptively understand the query intent and select or combine the most suitable retrieval strategy: for queries involving system principles and fault propagation paths, relation retrieval is emphasized; for queries looking for specific models and parameter details, entity retrieval is emphasized; and for comprehensive questions, hybrid retrieval is enabled. This overcomes the limitations of existing technologies where a single retrieval strategy (pure keywords or pure vectors) is difficult to cope with the diverse and complex query scenarios in the aerospace field, and significantly improves the flexibility and practicality of the system in practical applications. Attached Figure Description

[0019] Figure 1 This is a flowchart of the large language model retrieval enhancement method based on aerospace knowledge graphs, as described in this invention. Figure 2 This diagram illustrates local entity retrieval, global relationship retrieval, and hybrid retrieval. Detailed Implementation

[0020] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0021] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0022] Example 1 like Figure 1 As shown, the large language model retrieval enhancement method based on aerospace knowledge graph includes the following steps: Step S1: Obtain unstructured text data in the aerospace field, perform block processing and vectorization construction to form a set of text blocks and a corresponding text vector library.

[0023] First, unstructured text data in the aerospace field is acquired. This data includes aerospace technical standards, test reports, engineering documents, patent documents, academic papers, etc., in PDF, Word, HTML, or plain text formats. The unstructured text data undergoes document parsing and cleaning to remove headers, footers, page numbers, irrelevant symbols, and other noise, retaining engineering-significant formulas, tables, parameter descriptions, and model identification information. Simultaneously, the parsed text generates corresponding metadata information, including document source identifiers, chapter structure, and sequence information.

[0024] The cleaned text is divided into multiple text blocks according to a preset block length of 2048 characters. A 256-character overlap is established between adjacent text blocks to ensure semantic continuity. Each text block records its position and source identifier in the original document. Furthermore, text embedding models (such as bge-m3, gemini-embedding-001, and qwen3-embedding) are used to vectorize the text blocks, generating a corresponding semantic vector for each block. The text blocks and their semantic vectors are stored in a text vector library to support subsequent semantic similarity-based retrieval.

[0025] Step S2: Using the large language model prompt word engineering optimized for the aerospace field, automatically extract and merge the aerospace field entity, relationship and attribute information of the text block set, and construct an aerospace field knowledge graph.

[0026] For the text block set obtained in step S1, the large language model prompt word engineering optimized for the aerospace field is used to automatically extract entity, relation, and attribute information. By introducing aerospace-specific terminology, formula structures, parameter units, and few-sample examples into the prompt words, the large language model is guided to identify aerospace entities from each text block and generate entity names, entity types, and entity descriptions for each entity. Entity types include aerospace systems, components, parameter indicators, and test methods.

[0027] After entity extraction, the large language model is further guided to identify semantic relationships between entities in the text block, generating relationship descriptions and corresponding relationship weight information. Each relationship is associated with its source entity, target entity, and source text block information.

[0028] The extracted results are standardized, including entity synonym merging, relation deduplication, and descriptive feature merging, to form a structured aerospace domain knowledge graph. The knowledge graph includes entity nodes, relation edges, and source text blocks associated with entity nodes and relation edges, thereby enabling bidirectional tracing between the graph structure and the original text.

[0029] Step S3: Using entity nodes and relation edges in the aerospace knowledge graph as retrieval index units, construct an index system based on graph structure, and establish corresponding semantic vector representations for entity nodes and relation edges respectively.

[0030] Based on the aerospace knowledge graph constructed in step S2, entity nodes and relation edges are used as the basic units of the retrieval index. The name, type, and description information of entity nodes are semantically vectorized to generate entity node vectors; the source entity, target entity, and relation description of relation edges are semantically vectorized to generate relation edge vectors. This constructs a graph vector index based on the knowledge graph.

[0031] Simultaneously, the topological connections between entity nodes and relation edges in the knowledge graph are preserved, forming a graph structure index. The graph structure index and the vector index together constitute a composite index system to support joint retrieval based on structure and semantics.

[0032] Step S4: Receive the query question input by the user, map the query question into a query semantic vector, and use a large model intelligent agent in the aerospace field to parse the query question, extracting high-level keywords to represent the query topic concept and low-level keywords to represent the specific entities involved in the query.

[0033] High-level keywords represent query topic concepts, such as "deep space exploration," "manned spaceflight," and "guidance and control," while low-level keywords represent specific entities, such as "launch vehicle model," "national technical standards," and "actuating agency." In some embodiments, the query question can be rewritten or decomposed to obtain a standardized expression more suitable for subsequent retrieval.

[0034] Step S5: In the text vector library, perform semantic similarity retrieval based on the query semantic vector to obtain the first candidate result set.

[0035] The query semantic vector obtained in step S4 is input into the text vector library. Similarity retrieval is performed based on cosine similarity calculation to obtain a set of candidate text blocks semantically similar to the user's query. (Similarity) Represented as: ; in, This represents the semantic vector corresponding to the user query. A semantic vector representing a text block. The candidate text block set contains the text block content and its corresponding source identifier and order information.

[0036] Step S6: In the aerospace knowledge graph, perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords to obtain the second candidate result set.

[0037] like Figure 2 As shown, based on the high-level and low-level keywords extracted in step S4, graph retrieval is performed in the aerospace knowledge graph. Local entity retrieval is performed based on low-level keywords to locate corresponding entity nodes in the knowledge graph and obtain their adjacent relational edges and associated entities. Global relation retrieval is performed based on high-level keywords, performing multi-hop traversal along relational edges in the knowledge graph to obtain relational subgraphs related to fault analysis.

[0038] In this embodiment, the local entity retrieval results and the global relationship retrieval results are merged to form a hybrid retrieval result, so as to simultaneously cover the specific entity information and topic-level relationship information involved in the query.

[0039] Step S7: Merge the first candidate result set and the second candidate result set, and re-rank the merged results based on semantic similarity index and graph structure feature index.

[0040] Ranking features are calculated for the fused entities, relations, and text blocks. These ranking features include semantic similarity features and graph structure features. Graph structure features are constructed based on structural information in the knowledge graph to create graph structure scoring items. The score can be determined by node degree, edge weight, or centrality. (Comprehensive ranking score) Calculated through linear weighted fusion: ; in, This indicates the scoring criteria for establishing the reordering. This indicates that based on the user query semantic vector and text block semantic vector Similarity score, Represents the semantic vector of the text The graph structure score is evaluated.

[0041] in, and The weighting coefficient (in this embodiment, it is set to the default value) =0.6, =0.4), used to balance the influence of semantic similarity and graph structure features. By weighting and fusing the above features, a comprehensive ranking score is generated, and entities, relations and text blocks are ranked according to the comprehensive ranking score to obtain a set of ranked candidate results.

[0042] Step S8: Based on the reordering result, select the top-ranked entity nodes, relation edges, and their associated source text block information to dynamically construct the context content for input to the large language model.

[0043] Based on the sorting results obtained in step S7, contextual content for input to the large language model is constructed. The contextual content is organized in a structured format, including at least an entity information area, a relation information area, and a text block information area. Each entity and relation is associated with its corresponding source text block identifier.

[0044] When the constructed context content exceeds the context length limit of the large language model, the context content is dynamically pruned according to the ranking priority, prioritizing the retention of entities, relations, and their associated text blocks that rank higher. A scoring threshold is set. Only retain those that meet the requirements. Conditional text blocks or graph elements, where This represents the set of text vectors that have reached the scoring threshold.

[0045] Step S9: Input the context content into the large language model to generate a response to the query.

[0046] The context content constructed in step S8, along with the user's original query, is input into a large language model (such as GPT-4, Gemini-2.5, ChatGLM, etc.) to generate a natural language response to the user's query. The generated response also outputs the associated key entities, relationship paths, or source text block identifiers to enhance the interpretability and traceability of the results.

[0047] The invention will be further illustrated below with specific examples.

[0048] (1) Data processing and knowledge graph construction.

[0049] Source documents: GBT-43669-2024 (Spacecraft 153B Bus Communication Protocol) and GBT-43671-2024 (Spacecraft CAN Bus Communication Protocol).

[0050] Text processing: The document is split into text blocks of approximately 2048 characters in length (±256 characters overlap).

[0051] Hash the text block.

[0052] The bge-m3 text embedding model is used to vectorize text blocks.

[0053] Knowledge graph construction: Using prompt word templates optimized for the aerospace field, the system automatically extracts entity, relationship, and attribute information from each text block.

[0054] The extracted information is feature-merged to build a domain knowledge graph.

[0055] Establish a node and edge retrieval index based on graph structure.

[0056] Node example: <node id="双余度总线"> ; <data key="d0"> "CATEGORY"< / data> ; <data key="d1"> "Message retry methods can be configured to retry once on the current bus, and if that fails, retry once on the redundant bus. If that fails again, no further retrying is allowed. Alternatively, the redundant bus can be retried first, followed by the current bus."< / data> ; <data key="d2"> chunk-97491bee8fc250b9eb5893ba22157721< / data> < / node> .

[0057] Example of edge relationship: <edge source="双余度或者多余度总线" target="航天器"> ; <data key="d3">8.0< / data> ; <data key="d4">Spacecraft are equipped with dual-redundant or multi-redundant buses depending on the criticality of the system.

[0058] <data key="d5"> "System Configuration Association"< / data> ; <data key="d6"> chunk-9c4fa0196f5b8772642f1f7f6606976f< / data> < / data> < / edge> .

[0059] (2) Query parsing and retrieval.

[0060] A user asked: "What are the similarities and differences between the communication processes of the 153B bus and the CAN bus for spacecraft communication protocols?" Query Analysis: Map queries to semantic vectors.

[0061] Key words were extracted through large-scale intelligent agent analysis in the aerospace field: Advanced keywords (topic concepts): communication process, data transmission protocol categories, comparative references.

[0062] Low-level keywords (concrete entities): 153B bus, CAN bus, spacecraft communication protocol, message format.

[0063] Parallel retrieval: Semantic retrieval: Based on the query semantic vector, similarity retrieval is performed in the text vector library to obtain the first candidate text set.

[0064] Knowledge Graph Retrieval: In the aerospace field knowledge graph: Perform global relational sparse retrieval based on advanced keywords.

[0065] Perform local entity retrieval based on low-level keywords.

[0066] Obtain the second candidate set.

[0067] (3) Result fusion, reordering and context construction.

[0068] Fusion and Re-ranking: The two candidate sets are merged and re-ranked based on semantic similarity and graph structure metrics.

[0069] Context building: Based on the reordering results, dynamically construct structured context instructions for input to large language models, as shown in the following example: You are a professional domain knowledge analysis assistant. Please generate accurate and clear answers strictly based on the provided knowledge graph subgraph information. The knowledge graph information consists of the following parts: 1. Code of conduct.

[0070] Core principle: Answers must be generated entirely based on the facts of the provided graph, and must not be fabricated or introduce external assumptions.

[0071] Reasoning logic: For problems that require multi-step reasoning, the explanation should be based on the entities and relationship chains in the graph, and an index should be provided for tracing the source.

[0072] Uncertainty handling: If the information in the graph is insufficient to answer a part of the question, please clearly state "Based on the available information, it cannot be determined".

[0073] Output format: Answers should be clearly structured, preferably using lists or comparison tables, and include brief explanations of key terms.

[0074] 2. Entities and Relationships.

[0075] Entity List: The following are the core entities related to the problem and their key attributes.

[0076] Entity type: Entity name; Attribute 1: Value; Attribute 2: Value; Example: Bus protocol: CAN bus; Topology: Multi-master, linear bus; Arbitration method: CSMA / CA + priority; Error detection: CRC check; Relationship Network: The following are the main relationships between the above entities.

[0077] [Entity A] -- [Relation] -- -> [Entity B]; [CAN bus] -- belongs to category --> [data bus]; [CAN bus] -- Comparison reference --> [1553B bus]; 3. Context and Questions Section.

[0078] Original context: [text content][source text block][source article name]; Instructions: Based on the facts provided in the Entities and Relationships section above, please answer the [question] in a structured format, focusing on comparing the similarities and differences in their communication processes in terms of topology, arbitration, and error handling.

[0079] 4. Answer generation.

[0080] Model: Deepseek-v3 is used as the inference language model.

[0081] Generate reply: I. Commonalities: Both are data transmission buses inside spacecraft, enabling the transmission of messages on the bus.

[0082] In 153B bus communication, messages are transmitted between the bus controller and the remote terminal in a specific format of command words and data words.

[0083] In CAN bus communication, information is transmitted between nodes in the form of data packets (such as spatial packets, encapsulated packets, etc.).

[0084] Communication Role: Both types of bus protocols define master-slave communication relationships.

[0085] The 153B bus system clearly distinguishes between the bus controller (master device) and the remote terminal (slave device).

[0086] Although the CAN bus logically supports a multi-master architecture, in specific aerospace applications, master and slave nodes are often configured to achieve orderly scheduling.

[0087] II. Differences: Bus topology: The 153B bus system consists of one bus controller (BC) and 1 to 31 remote terminals (RT) (address range 0–30).

[0088] The CAN bus network is recommended to adopt an A / B dual-redundant bus structure, and supports a topology scheme in which the platform bus and payload bus can be configured independently.

[0089] The communication protocol stipulates: The 153B bus communication protocol specifies in detail the correspondence between its protocol architecture and the OSI layered model, and covers the specific content of the link layer protocol sublayer and the application layer lower-level interface.

[0090] The spacecraft CAN bus communication protocol defines a communication standard suitable for spacecraft environments. Its standard frame format protocol includes specific field structures, arbitration mechanisms, and error handling procedures.

[0091] Message transmission mechanism: The 153B bus supports both periodic transfer and insertion transfer mechanisms.

[0092] The CAN bus does not explicitly describe a similar transmission mechanism in its documentation; its design focuses more on real-time performance and multi-node arbitration.

[0093] Synchronization mechanism: The 153B bus synchronization mechanism includes three modes: synchronization mode code message (001), synchronization mode code message with data word (1001), and non-mode code synchronization message.

[0094] The CAN bus documentation does not explicitly mention a similar synchronization mechanism; its synchronization typically relies on bit timing and frame structure implementation.

[0095] Example 2 A large language model retrieval enhancement system based on aerospace knowledge graphs includes: The data acquisition and vectorization module is used to acquire unstructured text data in the aerospace field, perform block processing and vectorization construction, and form a set of text blocks and a corresponding text vector library. The knowledge graph construction module is used to automatically extract and merge the entities, relationships and attributes of the aerospace field from a set of text blocks using a large language model prompt word engineering optimized for the aerospace field, and to construct an aerospace field knowledge graph. The graph structure indexing module is used to construct an indexing system based on graph structure by using entity nodes and relation edges in the knowledge graph of the aerospace field as retrieval indexing units, and to establish corresponding semantic vector representations for entity nodes and relation edges respectively. The query parsing module is used to receive query questions input by users, map the query questions into query semantic vectors, and use a large model intelligent agent in the aerospace field to parse the query questions, extracting high-level keywords to represent the query topic concepts and low-level keywords to represent the specific entities involved in the query. The semantic retrieval module is used to perform semantic similarity retrieval based on the query semantic vector in the text vector library to obtain the first candidate result set; The graph retrieval module is used to perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords in the knowledge graph of the aerospace field to obtain a second candidate result set. The fusion and re-ranking module is used to fuse the first candidate result set and the second candidate result set, and re-rank the fused results based on semantic similarity index and graph structure feature index. The context building module is used to dynamically construct the context content for input to the large language model by selecting the top-ranked entity nodes, relation edges and their associated source text blocks based on the re-sorting results. The answer generation module is used to input contextual information into a large language model and generate a response to the query question.

[0096] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.

[0097] Therefore, this invention adopts the above-mentioned large language model retrieval enhancement method and system based on aerospace knowledge graph. By constructing a composite retrieval system that integrates graph structure and semantic vector, and dynamically constructing structured context based on multi-dimensional reordering, it effectively solves the problems of weak relevance, fragmented results and low credibility in aerospace knowledge retrieval, and realizes systematic, highly accurate and traceable intelligent response to complex engineering queries.

[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for enhancing retrieval using a large language model based on aerospace knowledge graphs, characterized in that: Includes the following steps: Step S1: Obtain unstructured text data in the aerospace field, perform block processing and vectorization construction to form a text block set and corresponding text vector library; Step S2: Using the large language model prompt word engineering optimized for the aerospace field, automatically extract and merge the aerospace field entity, relationship and attribute information of the text block set, and construct an aerospace field knowledge graph; Step S3: Using entity nodes and relation edges in the aerospace knowledge graph as retrieval index units, construct an index system based on graph structure, and establish corresponding semantic vector representations for entity nodes and relation edges respectively; Step S4: Receive the query question input by the user, map the query question into a query semantic vector, and at the same time use the aerospace big model intelligent agent to parse the query question, extract high-level keywords to represent the query topic concept and low-level keywords to represent the specific entities involved in the query. Step S5: In the text vector library, perform semantic similarity retrieval based on the query semantic vector to obtain the first candidate result set; Step S6: In the aerospace knowledge graph, perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords to obtain the second candidate result set; Step S7: Merge the first candidate result set and the second candidate result set, and re-rank the merged results based on semantic similarity index and graph structure feature index; Step S8: Based on the reordering result, select the top-ranked entity nodes, relation edges, and their associated source text block information to dynamically construct the context content for input to the large language model. Step S9: Input the context content into the large language model to generate a response to the query.

2. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S2, the entity nodes include at least one entity type among aerospace systems, components, communication protocols, parameter indicators, algorithm models, and test methods; the relation edges are used to represent at least one relation type among system association, process logic, classification hierarchy, test analysis, and parameter attributes, and are associated with relation weights set based on the credibility of aerospace knowledge. Each relationship is associated with its source entity, target entity, and source text block information.

3. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S2, the large language model prompt word project optimized for the aerospace field includes a small sample examples and structured instructions to guide the large language model to recognize aerospace professional terms, engineering parameters and model identifiers.

4. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S3, the graph-based indexing system is a composite indexing system of graph index and vector index; wherein, the graph index is used to represent the topological connection structure between entities and relations, and the vector index is used to represent the semantic features of entity nodes and relation edges.

5. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S4, the query question is parsed using a large language model agent from the aerospace field, including: Based on pre-trained aerospace knowledge identification, the macro-intent of the query is determined, and the question is mapped to high-level concept nodes in the knowledge graph to determine the main relationship type to be queried, thereby extracting high-level keywords that represent the query topic concept; Based on the constraint extraction keyword prompt template optimized in the aerospace field, the limiting words and indicators in the query are parsed and transformed into node attributes and relation constraints required for knowledge graph query, thereby extracting low-level keywords that represent the specific entities involved in the query. Finally, high-level and low-level keywords are output to drive subsequent graph retrieval.

6. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S6, global relation retrieval includes performing a multi-hop traversal based on relation weights along relation edges in the aerospace knowledge graph to obtain entity relation subgraphs related to high-level keywords.

7. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S6, the strategy of performing local entity retrieval and global relation retrieval is adaptively selected based on the semantic features of the query question. The strategy includes: prioritizing local entity retrieval for queries involving specific aerospace models or components, prioritizing global relation retrieval for queries involving system principles or technical links, and using a hybrid retrieval that combines the two for comprehensive technical queries.

8. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S7, the graph structure features are used to construct graph structure scoring items based on the structural information in the knowledge graph. The graph structure scoring items can be determined by at least one of node degree, edge weight, or centrality index. Re-ranking is achieved by linearly weighting and fusing semantic similarity metrics with graph structure feature metrics: ; in, This represents the overall ranking score. This indicates that based on the user query semantic vector and text block semantic vector Similarity score, Represents the semantic vector of the text The graph structure score of the evaluation. and All of these represent weighting coefficients.

9. The method for enhancing retrieval of a large language model based on aerospace knowledge graphs according to claim 1, characterized in that, In step S8, the context content is organized in a structured format that includes an entity information area, a relationship information area, and a text evidence area; When the length of the context content exceeds the preset context window limit, dynamic pruning is performed based on the reordering result.

10. A large language model retrieval enhancement system based on aerospace knowledge graphs, characterized in that: include: The data acquisition and vectorization module is used to acquire unstructured text data in the aerospace field, perform block processing and vectorization construction, and form a set of text blocks and a corresponding text vector library. The knowledge graph construction module is used to automatically extract and merge the entities, relationships and attributes of the aerospace field from a set of text blocks using a large language model prompt word engineering optimized for the aerospace field, and to construct an aerospace field knowledge graph. The graph structure indexing module is used to construct an indexing system based on graph structure by using entity nodes and relation edges in the knowledge graph of the aerospace field as retrieval indexing units, and to establish corresponding semantic vector representations for entity nodes and relation edges respectively. The query parsing module is used to receive query questions input by users, map the query questions into query semantic vectors, and use a large model intelligent agent in the aerospace field to parse the query questions, extracting high-level keywords to represent the query topic concepts and low-level keywords to represent the specific entities involved in the query. The semantic retrieval module is used to perform semantic similarity retrieval based on the query semantic vector in the text vector library to obtain the first candidate result set; The graph retrieval module is used to perform global relation sparse retrieval based on high-level keywords and local entity retrieval based on low-level keywords in the knowledge graph of the aerospace field to obtain a second candidate result set. The fusion and re-ranking module is used to fuse the first candidate result set and the second candidate result set, and re-rank the fused results based on semantic similarity index and graph structure feature index. The context building module is used to dynamically construct the context content for input to the large language model by selecting the top-ranked entity nodes, relation edges and their associated source text blocks based on the re-sorting results. The answer generation module is used to input contextual information into a large language model and generate a response to the query question.