Intelligent information retrieval and question answering system for knowledge graph

By combining the Transformer-XL and TransE models with the PageRank algorithm and TOPSIS ranking, the problems of inaccurate entity recognition and inconsistent path selection in knowledge graph question answering are solved, achieving intelligent information retrieval and question answering with high accuracy and reliability.

CN122364403APending Publication Date: 2026-07-10

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Filing Date
2026-05-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing knowledge graph question answering methods suffer from inaccurate entity recognition, incomplete relation constraint extraction, and query condition mapping bias in complex questions or long-distance context scenarios, resulting in retrieval results that deviate from the actual question requirements. Furthermore, they lack a comprehensive evaluation of the importance of candidate paths, path length, semantic matching degree, and constraint consistency, leading to redundant paths or incorrect answers.

Method used

We employ the Transformer-XL deep semantic modeling method for contextual semantic encoding, combined with TransE vector embedding and personalized PageRank path expansion, and utilize the TOPSIS multi-index ranking method for path filtering. This enables semantic parsing of user queries, construction of query conditions, and graph path retrieval, thereby improving the accuracy of semantic understanding and the precision of path selection.

Benefits of technology

It improves the semantic understanding accuracy and reliability of question-answering results in knowledge graph question-answering systems under complex question scenarios, reduces the interference of redundant paths, and enhances the accuracy and consistency of question-answering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122364403A_ABST
    Figure CN122364403A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent information retrieval and question-answering system oriented towards knowledge graphs, comprising: a data acquisition module for acquiring and preprocessing question data to generate a question text sequence; a semantic encoding module for semantically encoding the question text sequence to generate a question semantic sequence; a condition mapping module for mapping the question semantic sequence to a knowledge graph query sequence; an association matching module for matching starting nodes based on the knowledge graph query sequence and generating a candidate path sequence; a target filtering module for matching and sorting the candidate path sequences to filter target paths; and an answer output module for outputting question-answering results based on the target paths. This invention utilizes deep semantic modeling and other methods, possessing advantages such as high accuracy in semantic understanding, high precision in query mapping, strong reliability in path filtering, and good consistency in question-answering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent question answering technology, and in particular to an intelligent information retrieval and question answering system oriented towards knowledge graphs. Background Technology

[0002] With the development of knowledge graph and natural language processing technologies, intelligent retrieval and question answering for structured knowledge are increasingly being applied in scenarios such as enterprise knowledge management, government consulting, operation and maintenance analysis, and business decision support. Existing information retrieval methods largely rely on keyword matching, which, while capable of basic queries, struggles to accurately identify entities, intents, and relational constraints in user queries, leading to discrepancies between search results and actual problem requirements.

[0003] Existing knowledge graph question answering methods typically first perform semantic parsing on user questions, then convert the parsing results into graph query conditions, and perform entity matching, relation retrieval, and answer generation within the knowledge graph. However, in complex questions or long-distance context scenarios, existing methods are insufficient in modeling contextual semantic relationships, which can easily lead to inaccurate entity recognition, incomplete relation constraint extraction, and query condition mapping deviations.

[0004] Furthermore, existing methods often employ rule matching or single similarity ranking in the process of graph path expansion and answer selection, lacking a comprehensive evaluation of the importance, path length, semantic matching degree, and constraint consistency of candidate paths. This can easily lead to redundant paths or incorrect answers, affecting the accuracy, stability, and interpretability of the question-and-answer results.

[0005] Therefore, how to provide an intelligent information retrieval and question-answering system oriented towards knowledge graphs is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] One objective of this invention is to propose an intelligent information retrieval and question-answering system based on knowledge graphs. This invention comprehensively utilizes the Transformer-XL deep semantic modeling method, the TransE vector embedding method, the personalized PageRank path expansion method, and the TOPSIS multi-index ranking method to perform semantic parsing, query condition construction, graph path retrieval, and target path filtering on user question data. This enables structured information retrieval and multi-hop relationship question answering based on knowledge graphs, and has the advantages of high semantic understanding accuracy, high query mapping precision, strong path filtering reliability, and good consistency of question-answering results.

[0007] According to an embodiment of the present invention, an intelligent information retrieval and question-answering system based on a knowledge graph includes: The data acquisition module is used to acquire and preprocess user question data to generate a sequence of question texts; The semantic encoding module is used to build the Transformer-XL architecture. In this architecture, contextual semantic encoding operations based on a fragment-level recursive mechanism are performed on the question text sequence. Based on the encoding results, entity recognition, intent classification and relation constraint extraction operations are performed to generate multiple question semantic units and construct a question semantic sequence. The condition mapping module is used to perform vector embedding operations on the semantic sequence of questions in the TransE model, construct query vectors based on the embedding results, and map the query vectors into entity query conditions, attribute query conditions and relation query conditions according to the preset condition mapping rules, forming a graph query sequence of corresponding semantic units of questions; The association matching module is used to match the starting node in the pre-built knowledge graph based on the graph query sequence, and to perform a relation neighborhood expansion operation using a personalized PageRank algorithm to extract multiple candidate paths and form a corresponding candidate path sequence. The target filtering module is used to perform semantic matching calculation on the candidate path sequence based on the query vector using the TransE model, obtain the matching score of each candidate path, and perform a comprehensive sorting operation using the TOPSIS method in combination with the candidate path length, and filter the corresponding target path according to the sorting results. The answer output module is used to perform formatting operations on the target paths of each question semantic unit and output the question and answer results in the order of the question semantic sequence.

[0008] Optionally, the question data represents the natural language question content input by the user, the preprocessing includes character normalization, noise removal, sentence segmentation and word segmentation, the Transformer-XL architecture represents a deep learning network structure for long-distance contextual semantic modeling, the question semantic sequence represents a data sequence formed by arranging multiple question semantic units according to the semantic order in the question data, and the question-answering result represents the natural language answer content output according to the order of the question semantic sequence.

[0009] Optionally, the semantic encoding module includes: Build a Transformer-XL architecture, and in this architecture, perform segmentation operations on the problem text sequence according to the preset fragment length to generate multiple text fragment sequences; Perform context information encoding operations based on a segment-level recursive mechanism on each text segment sequence to generate a context semantic sequence; Based on the contextual semantic sequence, attention weights are calculated in the Transformer-XL architecture, and semantic enhancement operations are performed on the contextual semantic sequence according to the calculation results to generate a context-related sequence. Perform entity boundary recognition and entity category determination operations based on the context-related sequence to extract the problem entity sequence; The context-related sequence is mapped to a preset set of intent categories to obtain the corresponding question intent sequence; Based on the context association sequence, perform relation constraint identification operations to extract relation constraint information corresponding to each question entity and question intent, and form a relation constraint sequence; The question entity sequence, question intent sequence, and relation constraint sequence are combined according to the semantic order in the question text sequence to generate multiple question semantic units, and a question semantic sequence is constructed.

[0010] Optionally, the semantic enhancement operation specifically includes: Input the context semantic sequence into the Transformer-XL architecture, and calculate the query representation, key representation, and value representation corresponding to each semantic representation in the context semantic sequence; For each semantic representation, the query representation of the semantic representation is multiplied by the key representation of all semantic representations, and the results of all dot products are normalized to obtain the attention weight sequence of the semantic representation. For each attention weight sequence, the value representation corresponding to each semantic representation is multiplied by the corresponding attention weight in the attention weight sequence, and all multiplication results are added together to obtain the weighted semantic representation of the semantic representation corresponding to the attention weight sequence. According to the order of arrangement in the context semantic sequence, the weighted semantic representations are combined into a weighted semantic sequence; Perform a linear mapping operation on the weighted semantic sequence, and then perform position-by-position addition on the linear mapping result and the semantic representation at the corresponding position in the context semantic sequence to generate a residual semantic sequence; The residual semantic sequence is normalized, and the normalization result is used to perform feedforward mapping calculation to generate a context-related sequence.

[0011] Optionally, the relation constraint identification operation specifically includes: Based on the context association sequence, the position index extraction operation is performed on each question entity in the question entity sequence to determine the position index of each question entity in the context association sequence and generate the entity position sequence; Based on the entity location sequence, extract the semantic representations between the location indices corresponding to adjacent question entities in the context association sequence, and construct the semantic sequence between entities according to the order of arrangement in the question text sequence; Calculate the semantic similarity and association strength of each semantic representation in the semantic sequence between entities, determine the association direction and association type between each semantic representation, and generate a relation representation sequence; Align the relation representation sequence with the problem entity sequence, and map each association direction and association type to the corresponding two problem entities based on the alignment result to generate an entity relation sequence. Based on the problem intent sequence, perform relationship type matching and relationship direction consistency judgment operations on the entity relationship sequence. Based on the judgment results, remove entity relationships with mismatched relationship types or inconsistent relationship directions, and generate a relationship constraint sequence.

[0012] Optionally, the condition mapping module includes: Perform field parsing operations on each semantic unit in the semantic sequence of questions to extract the question entity, question intent, and relational constraint information respectively; The problem entities and relational constraint information in each problem semantic unit are input into the TransE model. Entity vector embedding calculation is performed on the problem entities, relational vector embedding calculation is performed on the relational constraint information, and vector translation calculation is performed on the embedding results based on the correspondence between the problem entities and relational constraint information to generate entity embedding vectors and relational embedding vectors. Based on the question intent in each question semantic unit, vector fusion calculation is performed on the entity embedding vector and the relation embedding vector, and the fusion result is dimensionally aligned to generate a query vector that corresponds one-to-one with each question semantic unit. Based on the preset condition mapping rules, the entity condition parsing operation is performed on the query vector. The entity pointing information is extracted from the query vector according to the entity embedding vector, and the entity pointing information is converted into entity query conditions. Based on the preset condition mapping rules, the attribute condition parsing operation is performed on the query vector. The attribute pointing information is extracted according to the fusion weight of the question intent in the query vector, and the attribute pointing information is converted into attribute query conditions. Based on the preset condition mapping rules, the relation condition parsing operation is performed on the query vector. The relation pointing information is extracted from the query vector according to the relation embedding vector, and the relation pointing information is converted into relation query conditions. Entity query conditions, attribute query conditions, and relation query conditions are combined according to their corresponding question semantic units, and a graph query sequence is constructed according to the order of the question semantic sequence.

[0013] Optionally, the association matching module includes: Extract the entity query conditions, attribute query conditions, and relation query conditions corresponding to each semantic unit of the question from the graph query sequence; Based on the query conditions for each entity, the node matching value is calculated in the pre-built knowledge graph, and the node with the largest node matching value is extracted as the starting node of the corresponding entity query condition. Based on the attribute query conditions, perform attribute consistency judgment operations on each starting node, retain the starting nodes that meet the attribute query conditions, and form a set of starting nodes; Based on the relation query conditions, perform relation edge filtering on the starting node set to determine the relation edges that are consistent with the relation query conditions, and construct the initial extended edge set; Based on the set of starting nodes and the set of starting extended edges, a personalized PageRank algorithm is used to perform relation neighborhood expansion operations in the knowledge graph. The node transfer direction and node transfer range are constrained according to the relation query conditions, and multiple associated paths corresponding to each starting node are generated. Perform path continuity verification, relationship direction consistency verification, and attribute constraint consistency verification on each associated path, retain the associated paths that pass all verifications, and form the candidate path sequence corresponding to each starting node.

[0014] Optionally, the relational neighborhood expansion specifically includes: Set each starting node in the starting node set as a seed node for the personalized PageRank algorithm, and set the initial expansion edge set as the initial expansion range; Based on the relation query conditions, the adjacent relation edges corresponding to various child nodes are read, and relation type matching and relation direction determination operations are performed on the adjacent relation edges to generate a set of transferable edges; The next-level neighboring nodes are determined based on the set of transferable edges, and the node access weight update operation is performed on the next-level neighboring nodes to generate a neighboring node weight sequence. The next-level neighboring nodes are sorted by expansion priority according to the neighboring node weight sequence, and target neighboring nodes that meet the node transfer range constraints are selected. The seed node, the transferable edge, and the target neighbor node are concatenated according to the node connection order to generate a single-layer associated path. Using the target neighbor node as a new seed node, the relational neighborhood expansion operation continues to be performed on the basis of the single-layer association path until the preset expansion layer is reached or there are no neighbor nodes that can be further expanded, generating multiple association paths corresponding to each starting node.

[0015] Optionally, the target filtering module includes: Extract each candidate path corresponding to each problem semantic unit from the candidate path sequence, and read the starting node, relation edge, ending node and path length of each candidate path to generate a path feature sequence; In the TransE model, a vector embedding operation is performed on the path feature sequence to generate a path vector sequence; The query vector and the path vector sequence are semantically matched to obtain the matching score for each candidate path, and a matching score sequence is constructed. Based on the candidate path length and matching score sequence, an evaluation parameter construction operation is performed on each candidate path to generate an evaluation parameter set; The TOPSIS method is used to perform a comprehensive sorting operation on the evaluation parameter set to generate a path sorting sequence corresponding to each query vector. The candidate path ranked first in each path sorting sequence is taken as the target path of the corresponding problem semantic unit, and the target path sequence is constructed according to the order of the problem semantic sequence.

[0016] Optionally, the answer output module includes: Extract the target path corresponding to each problem semantic unit from the target path sequence, and read the starting node, relation edge and ending node in each target path to generate target path information; Perform answer fragment extraction on the target path information to extract the answer content of the corresponding question semantic unit; Arrange the answer content according to the semantic sequence of the question to generate an answer content sequence; Perform text processing on the sequence of answer content and output the question and answer results.

[0017] The beneficial effects of this invention are: First, this invention introduces the Transformer-XL architecture to perform contextual semantic modeling based on a fragment-level recursive mechanism on user query data, thereby achieving effective expression of long-distance semantic dependencies and completing entity recognition, intent classification, and relation constraint extraction in a unified semantic space. This improves the accuracy and stability of semantic understanding in complex problem scenarios, thus effectively overcoming the problem of insufficient semantic parsing capabilities in existing technologies.

[0018] Secondly, this invention constructs query vectors through the TransE model and completes the mapping from semantics to graph query conditions. Under the constraint of the personalized PageRank algorithm, it performs relation neighborhood expansion. Combined with path semantic matching and TOPSIS multi-index ranking mechanism, it filters and optimizes candidate paths, improves the accuracy and consistency of path selection in the graph retrieval process, reduces the interference caused by redundant paths, and enhances the reliability of question answering results.

[0019] Finally, by organizing the target path sequentially and integrating the results, this invention outputs the question-and-answer results according to the semantic sequence of the questions, so that the answer content corresponding to multiple semantic units has good structural consistency and semantic coherence, thereby improving the accuracy and usability of the question-and-answer results as a whole. Attached Figure Description

[0020] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a block diagram of the intelligent information retrieval and question answering system based on knowledge graphs proposed in this invention. Figure 2 This is a flowchart of the query condition mapping process for the knowledge graph-oriented intelligent information retrieval and question answering system proposed in this invention. Figure 3 This is a flowchart of the graph retrieval and question answering output process of the intelligent information retrieval and question answering system based on knowledge graphs proposed in this invention. Detailed Implementation

[0021] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0022] refer to Figures 1-3 Intelligent information retrieval and question-answering systems based on knowledge graphs include: The data acquisition module is used to acquire and preprocess user question data to generate a sequence of question texts; The semantic encoding module is used to build the Transformer-XL architecture. In this architecture, contextual semantic encoding operations based on a fragment-level recursive mechanism are performed on the question text sequence. Based on the encoding results, entity recognition, intent classification and relation constraint extraction operations are performed to generate multiple question semantic units and construct a question semantic sequence. The condition mapping module is used to perform vector embedding operations on the semantic sequence of questions in the TransE model, construct query vectors based on the embedding results, and map the query vectors into entity query conditions, attribute query conditions and relation query conditions according to the preset condition mapping rules, forming a graph query sequence of corresponding semantic units of questions; The association matching module is used to match the starting node in the pre-built knowledge graph based on the graph query sequence, and to perform a relation neighborhood expansion operation using a personalized PageRank algorithm to extract multiple candidate paths and form a corresponding candidate path sequence. The target filtering module is used to perform semantic matching calculation on the candidate path sequence based on the query vector using the TransE model, obtain the matching score of each candidate path, and perform a comprehensive sorting operation using the TOPSIS method in combination with the candidate path length, and filter the corresponding target path according to the sorting results. The answer output module is used to perform formatting operations on the target paths of each question semantic unit and output the question and answer results in the order of the question semantic sequence.

[0023] In this embodiment, the question data represents the natural language question content input by the user, the preprocessing includes character normalization, noise removal, sentence segmentation and word segmentation, the Transformer-XL architecture represents a deep learning network structure for long-distance contextual semantic modeling, the question semantic sequence represents a data sequence formed by arranging multiple question semantic units according to the semantic order in the question data, and the question-answering result represents the natural language answer content output according to the order of the question semantic sequence.

[0024] In this embodiment, the semantic encoding module includes: Build a Transformer-XL architecture, and in this architecture, perform segmentation operations on the problem text sequence according to the preset fragment length to generate multiple text fragment sequences; Perform context information encoding operations based on a segment-level recursive mechanism on each text segment sequence to generate a context semantic sequence; Based on the contextual semantic sequence, attention weights are calculated in the Transformer-XL architecture, and semantic enhancement operations are performed on the contextual semantic sequence according to the calculation results to generate a context-related sequence. Perform entity boundary recognition and entity category determination operations based on the context-related sequence to extract the problem entity sequence; The context-related sequence is mapped to a preset set of intent categories to obtain the corresponding question intent sequence; Based on the context association sequence, perform relation constraint identification operations to extract relation constraint information corresponding to each question entity and question intent, and form a relation constraint sequence; The question entity sequence, question intent sequence, and relation constraint sequence are combined according to the semantic order in the question text sequence to generate multiple question semantic units, and a question semantic sequence is constructed.

[0025] In this embodiment, the context information encoding operation specifically includes: According to the order of arrangement in the question text sequence, assign segment sequence number to each text segment sequence, and perform position encoding operation on each word in each text segment sequence to generate the corresponding segment encoding sequence; Process each text segment sequence sequentially according to the segment order number. When processing the current text segment sequence, extract the hidden states corresponding to each text segment sequence whose segment order number is less than the current text segment sequence. Weights are assigned to each extracted hidden state according to the segment sequence number, and a weighted aggregation operation is performed to generate the memory state of the current text segment sequence. The preset initialization vector is used as the memory state of the text segment sequence corresponding to the first segment's sequential number; The memory state of the current text segment sequence is concatenated with the corresponding segment encoding sequence in sequence order to generate the extended encoding sequence of the current text segment sequence; Context association calculation is performed on each word in the current text segment sequence based on the extended coding sequence to obtain the hidden state corresponding to the current text segment sequence; According to the order of the question text sequence, the hidden states corresponding to each text segment sequence are concatenated to generate a contextual semantic sequence.

[0026] In this embodiment, the semantic enhancement operation specifically includes: Input the context semantic sequence into the Transformer-XL architecture, and calculate the query representation, key representation, and value representation corresponding to each semantic representation in the context semantic sequence; For each semantic representation, the query representation of the semantic representation is multiplied by the key representation of all semantic representations, and the results of all dot products are normalized to obtain the attention weight sequence of the semantic representation. For each attention weight sequence, the value representation corresponding to each semantic representation is multiplied by the corresponding attention weight in the attention weight sequence, and all multiplication results are added together to obtain the weighted semantic representation of the semantic representation corresponding to the attention weight sequence. According to the order of arrangement in the context semantic sequence, the weighted semantic representations are combined into a weighted semantic sequence; Perform a linear mapping operation on the weighted semantic sequence, and then perform position-by-position addition on the linear mapping result and the semantic representation at the corresponding position in the context semantic sequence to generate a residual semantic sequence; The residual semantic sequence is normalized, and the normalization result is used to perform feedforward mapping calculation to generate a context-related sequence.

[0027] In this embodiment, the feedforward mapping calculation specifically includes: Based on the preset pre-weight matrix, a pre-linear mapping operation is performed on each semantic representation in the residual semantic sequence to generate an intermediate representation sequence. Perform the GELU function activation operation on the intermediate representation sequence to generate the activated representation sequence; A linear mapping operation is performed on the activation representation sequence according to the preset back-back weight matrix to generate a mapped representation sequence; The mapping semantic representation sequence and the residual semantic sequence are added position by position and then normalized to generate a context-related sequence.

[0028] In this embodiment, the relation constraint identification operation specifically includes: Based on the context association sequence, the position index extraction operation is performed on each question entity in the question entity sequence to determine the position index of each question entity in the context association sequence and generate the entity position sequence; Based on the entity location sequence, extract the semantic representations between the location indices corresponding to adjacent question entities in the context association sequence, and construct the semantic sequence between entities according to the order of arrangement in the question text sequence; Calculate the semantic similarity and association strength of each semantic representation in the semantic sequence between entities, determine the association direction and association type between each semantic representation, and generate a relation representation sequence; Align the relation representation sequence with the problem entity sequence, and map each association direction and association type to the corresponding two problem entities based on the alignment result to generate an entity relation sequence. Based on the problem intent sequence, perform relationship type matching and relationship direction consistency judgment operations on the entity relationship sequence. Based on the judgment results, remove entity relationships with mismatched relationship types or inconsistent relationship directions, and generate a relationship constraint sequence.

[0029] In this embodiment, the condition mapping module includes: Perform field parsing operations on each semantic unit in the semantic sequence of questions to extract the question entity, question intent, and relational constraint information respectively; The problem entities and relational constraint information in each problem semantic unit are input into the TransE model. Entity vector embedding calculation is performed on the problem entities, relational vector embedding calculation is performed on the relational constraint information, and vector translation calculation is performed on the embedding results based on the correspondence between the problem entities and relational constraint information to generate entity embedding vectors and relational embedding vectors. Based on the question intent in each question semantic unit, vector fusion calculation is performed on the entity embedding vector and the relation embedding vector, and the fusion result is dimensionally aligned to generate a query vector that corresponds one-to-one with each question semantic unit. Based on the preset condition mapping rules, the entity condition parsing operation is performed on the query vector. The entity pointing information is extracted from the query vector according to the entity embedding vector, and the entity pointing information is converted into entity query conditions. Based on the preset condition mapping rules, the attribute condition parsing operation is performed on the query vector. The attribute pointing information is extracted according to the fusion weight of the question intent in the query vector, and the attribute pointing information is converted into attribute query conditions. Based on the preset condition mapping rules, the relation condition parsing operation is performed on the query vector. The relation pointing information is extracted from the query vector according to the relation embedding vector, and the relation pointing information is converted into relation query conditions. Entity query conditions, attribute query conditions, and relation query conditions are combined according to their corresponding question semantic units, and a graph query sequence is constructed according to the order of the question semantic sequence.

[0030] In this embodiment, the association matching module includes: Extract the entity query conditions, attribute query conditions, and relation query conditions corresponding to each semantic unit of the question from the graph query sequence; Based on the query conditions for each entity, the node matching value is calculated in the pre-built knowledge graph, and the node with the largest node matching value is extracted as the starting node of the corresponding entity query condition. Based on the attribute query conditions, perform attribute consistency judgment operations on each starting node, retain the starting nodes that meet the attribute query conditions, and form a set of starting nodes; Based on the relation query conditions, perform relation edge filtering on the starting node set to determine the relation edges that are consistent with the relation query conditions, and construct the initial extended edge set; Based on the set of starting nodes and the set of starting extended edges, a personalized PageRank algorithm is used to perform relation neighborhood expansion operations in the knowledge graph. The node transfer direction and node transfer range are constrained according to the relation query conditions, and multiple associated paths corresponding to each starting node are generated. Perform path continuity verification, relationship direction consistency verification, and attribute constraint consistency verification on each associated path, retain the associated paths that pass all verifications, and form the candidate path sequence corresponding to each starting node.

[0031] In this embodiment, relational neighborhood expansion specifically includes: Set each starting node in the starting node set as a seed node for the personalized PageRank algorithm, and set the initial expansion edge set as the initial expansion range; Based on the relation query conditions, the adjacent relation edges corresponding to various child nodes are read, and relation type matching and relation direction determination operations are performed on the adjacent relation edges to generate a set of transferable edges; The next-level neighboring nodes are determined based on the set of transferable edges, and the node access weight update operation is performed on the next-level neighboring nodes to generate a neighboring node weight sequence. The next-level neighboring nodes are sorted by expansion priority according to the neighboring node weight sequence, and target neighboring nodes that meet the node transfer range constraints are selected. The seed node, the transferable edge, and the target neighbor node are concatenated according to the node connection order to generate a single-layer associated path. Using the target neighbor node as a new seed node, the relational neighborhood expansion operation continues to be performed on the basis of the single-layer association path until the preset expansion layer is reached or there are no neighbor nodes that can be further expanded, generating multiple association paths corresponding to each starting node.

[0032] In this embodiment, the target filtering module includes: Extract each candidate path corresponding to each problem semantic unit from the candidate path sequence, and read the starting node, relation edge, ending node and path length of each candidate path to generate a path feature sequence; In the TransE model, a vector embedding operation is performed on the path feature sequence to generate a path vector sequence; The query vector and the path vector sequence are semantically matched to obtain the matching score for each candidate path, and a matching score sequence is constructed. Based on the candidate path length and matching score sequence, an evaluation parameter construction operation is performed on each candidate path to generate an evaluation parameter set; The TOPSIS method is used to perform a comprehensive sorting operation on the evaluation parameter set to generate a path sorting sequence corresponding to each query vector. The candidate path ranked first in each path sorting sequence is taken as the target path of the corresponding problem semantic unit, and the target path sequence is constructed according to the order of the problem semantic sequence.

[0033] In this embodiment, the comprehensive sorting operation specifically includes: Perform parameter homogenization on the evaluation parameter set to generate a homogenized parameter set; Based on the correspondence between candidate paths and evaluation parameters, a matrix construction operation is performed according to the set of parameters in the same direction to generate an evaluation matrix; The evaluation matrix is ​​normalized to obtain a normalized matrix; The optimal and worst values ​​for each evaluation parameter are determined based on the normalization matrix, and positive and negative ideal vectors are constructed respectively. Calculate the positive distance between each candidate path and the positive ideal vector, and the negative distance between each candidate path and the negative ideal vector, and generate a positive distance sequence and a negative distance sequence. The comprehensive proximity of each candidate path is calculated based on the positive and negative distance sequences, and the candidate paths are sorted in descending order according to the comprehensive proximity to generate the path sorting sequence corresponding to each query vector.

[0034] In this embodiment, the answer output module includes: Extract the target path corresponding to each problem semantic unit from the target path sequence, and read the starting node, relation edge and ending node in each target path to generate target path information; Perform answer fragment extraction on the target path information to extract the answer content of the corresponding question semantic unit; Arrange the answer content according to the semantic sequence of the question to generate an answer content sequence; Perform text processing on the sequence of answer content and output the question and answer results.

[0035] Example 1: To verify the feasibility of this invention in practice, it was applied to an intelligent information retrieval and question-answering scenario oriented towards a complex business knowledge base. In this scenario, the knowledge base stores a large amount of structured and semi-structured data, organized in the form of a knowledge graph, containing entity nodes, relation edges, and attribute information, involving multi-level relationships. Users typically ask questions using natural language, and the questions contain multiple entities, implicit relationships, and constraints, such as complex semantic expressions involving condition filtering, multi-hop associations, or combined queries. Traditional methods based on keyword matching or simple rule parsing are prone to semantic comprehension bias, redundant path retrieval, and inaccurate answers in this scenario.

[0036] In this scenario, the intelligent information retrieval and question-answering system described in this invention is deployed in a knowledge graph data environment. When a user inputs a natural language question, the question data is first processed by character normalization, word segmentation, and noise removal to form a question text sequence. Subsequently, the question text sequence is semantically encoded using the Transformer-XL architecture, and a fragment-level recursive mechanism is used to capture long-distance dependencies, thereby accurately extracting entity, intent, and relational constraint information from the question and constructing a question semantic sequence. After semantic parsing, the question semantic sequence is input into the TransE model for vector embedding processing. Through vector space mapping, the semantic information is transformed into a unified query vector, and entity query conditions, attribute query conditions, and relational query conditions are generated according to preset rules, thus forming a graph query sequence.

[0037] In the knowledge graph retrieval stage, the starting node is located based on the graph query sequence, and a personalized PageRank algorithm is used to expand the relation neighborhood. During the expansion process, the generation of irrelevant paths is effectively reduced and the quality of candidate paths is improved by controlling relation type, direction, and attribute constraints. Subsequently, the candidate paths are input into the TransE model for semantic matching calculation, and the matching score of each path is obtained. Combined with indicators such as path length, relation consistency, and attribute constraint consistency, the TOPSIS method is used for comprehensive ranking to select the optimal target path. Finally, a structured answer is generated based on the node and relation information in the target path, and the answer is organized and output according to the semantic order of the question, so that the question-and-answer results have good logical consistency and semantic coherence.

[0038] To verify the performance of this invention, the performance of traditional keyword retrieval methods, rule-based knowledge graph question answering methods, and the method of this invention was compared under the same data environment. Multiple sets of test data were analyzed, and the following results were obtained: Table 1 Comparison of Intelligent Information Retrieval and Question Answering Performance

[0039] Analysis of the data in Table 1 shows that the method of the present invention maintains a high level in terms of semantic understanding accuracy, entity recognition accuracy, path matching accuracy, answer accuracy, and response stability. Specifically, the semantic understanding accuracy reaches 91.6% to 93.1%, the entity recognition accuracy reaches 89.8% to 91.2%, the path matching accuracy reaches 88.2% to 90.3%, the answer accuracy reaches 89.7% to 91.5%, and the response stability reaches 90.5% to 92.1%. This indicates that the present invention can accurately identify entities, intentions, and relational constraints in user questions and form stable question-and-answer output results.

[0040] Meanwhile, the number of redundant paths corresponding to the method of this invention is 13 to 17, and the average path length is 3.1 to 3.4, both lower than that of keyword matching method and rule matching method. This indicates that by expanding the relational neighborhood through personalized PageRank algorithm and combining TransE semantic matching and TOPSIS comprehensive ranking, the candidate path screening is more focused and the interference of irrelevant paths on answer generation is reduced.

[0041] In summary, this invention can improve the stability of semantic parsing, graph path matching, and answer selection in complex knowledge graph question-answering scenarios, and solves the problems of semantic understanding bias, excessive path redundancy, and insufficient answer accuracy in existing methods, thus demonstrating good practical application results.

[0042] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. An intelligent information retrieval and question-answering system based on knowledge graphs, characterized in that, include: The data acquisition module is used to acquire and preprocess user question data to generate a sequence of question texts; The semantic encoding module is used to build the Transformer-XL architecture. In this architecture, contextual semantic encoding operations based on a fragment-level recursive mechanism are performed on the question text sequence. Based on the encoding results, entity recognition, intent classification and relation constraint extraction operations are performed to generate multiple question semantic units and construct a question semantic sequence. The condition mapping module is used to perform vector embedding operations on the semantic sequence of questions in the TransE model, construct query vectors based on the embedding results, and map the query vectors into entity query conditions, attribute query conditions and relation query conditions according to the preset condition mapping rules, forming a graph query sequence of corresponding semantic units of questions; The association matching module is used to match the starting node in the pre-built knowledge graph based on the graph query sequence, and to perform a relation neighborhood expansion operation using a personalized PageRank algorithm to extract multiple candidate paths and form a corresponding candidate path sequence. The target filtering module is used to perform semantic matching calculation on the candidate path sequence based on the query vector using the TransE model, obtain the matching score of each candidate path, and perform a comprehensive sorting operation using the TOPSIS method in combination with the candidate path length, and filter the corresponding target path according to the sorting results. The answer output module is used to perform formatting operations on the target paths of each question semantic unit and output the question and answer results in the order of the question semantic sequence.

2. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The question data represents the natural language question content input by the user. The preprocessing includes character normalization, noise removal, sentence segmentation and word segmentation. The Transformer-XL architecture represents a deep learning network structure for long-distance contextual semantic modeling. The question semantic sequence represents a data sequence formed by arranging multiple question semantic units according to the semantic order in the question data. The question-answering result represents the natural language answer content output according to the order of the question semantic sequence.

3. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The semantic encoding module includes: Build a Transformer-XL architecture, and in this architecture, perform segmentation operations on the problem text sequence according to the preset fragment length to generate multiple text fragment sequences; Perform context information encoding operations based on a segment-level recursive mechanism on each text segment sequence to generate a context semantic sequence; Based on the contextual semantic sequence, attention weights are calculated in the Transformer-XL architecture, and semantic enhancement operations are performed on the contextual semantic sequence according to the calculation results to generate a context-related sequence. Perform entity boundary recognition and entity category determination operations based on the context-related sequence to extract the problem entity sequence; The context-related sequence is mapped to a preset set of intent categories to obtain the corresponding question intent sequence; Based on the context association sequence, perform relation constraint identification operations to extract relation constraint information corresponding to each question entity and question intent, and form a relation constraint sequence; The question entity sequence, question intent sequence, and relation constraint sequence are combined according to the semantic order in the question text sequence to generate multiple question semantic units, and a question semantic sequence is constructed.

4. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 3, characterized in that, The semantic enhancement operation specifically includes: Input the context semantic sequence into the Transformer-XL architecture, and calculate the query representation, key representation, and value representation corresponding to each semantic representation in the context semantic sequence; For each semantic representation, the query representation of the semantic representation is multiplied by the key representation of all semantic representations, and the results of all dot products are normalized to obtain the attention weight sequence of the semantic representation. For each attention weight sequence, the value representation corresponding to each semantic representation is multiplied by the corresponding attention weight in the attention weight sequence, and all multiplication results are added together to obtain the weighted semantic representation of the semantic representation corresponding to the attention weight sequence. According to the order of arrangement in the context semantic sequence, the weighted semantic representations are combined into a weighted semantic sequence; Perform a linear mapping operation on the weighted semantic sequence, and then perform position-by-position addition on the linear mapping result and the semantic representation at the corresponding position in the context semantic sequence to generate a residual semantic sequence; The residual semantic sequence is normalized, and the normalization result is used to perform feedforward mapping calculation to generate a context-related sequence.

5. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 3, characterized in that, The relation constraint identification operation specifically includes: Based on the context association sequence, the position index extraction operation is performed on each question entity in the question entity sequence to determine the position index of each question entity in the context association sequence and generate the entity position sequence; Based on the entity location sequence, extract the semantic representations between the location indices corresponding to adjacent question entities in the context association sequence, and construct the semantic sequence between entities according to the order of arrangement in the question text sequence; Calculate the semantic similarity and association strength of each semantic representation in the semantic sequence between entities, determine the association direction and association type between each semantic representation, and generate a relation representation sequence; Align the relation representation sequence with the problem entity sequence, and map each association direction and association type to the corresponding two problem entities based on the alignment result to generate an entity relation sequence. Based on the problem intent sequence, perform relationship type matching and relationship direction consistency judgment operations on the entity relationship sequence. Based on the judgment results, remove entity relationships with mismatched relationship types or inconsistent relationship directions, and generate a relationship constraint sequence.

6. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The condition mapping module includes: Perform field parsing operations on each semantic unit in the semantic sequence of questions to extract the question entity, question intent, and relational constraint information respectively; The problem entities and relational constraint information in each problem semantic unit are input into the TransE model. Entity vector embedding calculation is performed on the problem entities, relational vector embedding calculation is performed on the relational constraint information, and vector translation calculation is performed on the embedding results based on the correspondence between the problem entities and relational constraint information to generate entity embedding vectors and relational embedding vectors. Based on the question intent in each question semantic unit, vector fusion calculation is performed on the entity embedding vector and the relation embedding vector, and the fusion result is dimensionally aligned to generate a query vector that corresponds one-to-one with each question semantic unit. Based on the preset condition mapping rules, the entity condition parsing operation is performed on the query vector. The entity pointing information is extracted from the query vector according to the entity embedding vector, and the entity pointing information is converted into entity query conditions. Based on the preset condition mapping rules, the attribute condition parsing operation is performed on the query vector. The attribute pointing information is extracted according to the fusion weight of the question intent in the query vector, and the attribute pointing information is converted into attribute query conditions. Based on the preset condition mapping rules, the relation condition parsing operation is performed on the query vector. The relation pointing information is extracted from the query vector according to the relation embedding vector, and the relation pointing information is converted into relation query conditions. Entity query conditions, attribute query conditions, and relation query conditions are combined according to their corresponding question semantic units, and a graph query sequence is constructed according to the order of the question semantic sequence.

7. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The association matching module includes: Extract the entity query conditions, attribute query conditions, and relation query conditions corresponding to each semantic unit of the question from the graph query sequence; Based on the query conditions for each entity, the node matching value is calculated in the pre-built knowledge graph, and the node with the largest node matching value is extracted as the starting node of the corresponding entity query condition. Based on the attribute query conditions, perform attribute consistency judgment operations on each starting node, retain the starting nodes that meet the attribute query conditions, and form a set of starting nodes; Based on the relation query conditions, perform relation edge filtering on the starting node set to determine the relation edges that are consistent with the relation query conditions, and construct the initial extended edge set; Based on the set of starting nodes and the set of starting extended edges, a personalized PageRank algorithm is used to perform relation neighborhood expansion operations in the knowledge graph. The node transfer direction and node transfer range are constrained according to the relation query conditions, and multiple associated paths corresponding to each starting node are generated. Perform path continuity verification, relationship direction consistency verification, and attribute constraint consistency verification on each associated path, retain the associated paths that pass all verifications, and form the candidate path sequence corresponding to each starting node.

8. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 7, characterized in that, The relational neighborhood expansion specifically includes: Set each starting node in the starting node set as a seed node for the personalized PageRank algorithm, and set the initial expansion edge set as the initial expansion range; Based on the relation query conditions, the adjacent relation edges corresponding to various child nodes are read, and relation type matching and relation direction determination operations are performed on the adjacent relation edges to generate a set of transferable edges; The next-level neighboring nodes are determined based on the set of transferable edges, and the node access weight update operation is performed on the next-level neighboring nodes to generate a neighboring node weight sequence. The next-level neighboring nodes are sorted by expansion priority according to the neighboring node weight sequence, and target neighboring nodes that meet the node transfer range constraints are selected. The seed node, the transferable edge, and the target neighbor node are concatenated according to the node connection order to generate a single-layer associated path. Using the target neighbor node as a new seed node, the relational neighbor expansion operation continues to be performed on the basis of the single-layer association path until the preset expansion layer is reached or there are no neighbor nodes that can be further expanded, generating multiple association paths corresponding to each starting node.

9. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The target filtering module includes: Extract each candidate path corresponding to each problem semantic unit from the candidate path sequence, and read the starting node, relation edge, ending node and path length of each candidate path to generate a path feature sequence; In the TransE model, a vector embedding operation is performed on the path feature sequence to generate a path vector sequence; The query vector and the path vector sequence are semantically matched to obtain the matching score for each candidate path, and a matching score sequence is constructed. Based on the candidate path length and matching score sequence, an evaluation parameter construction operation is performed on each candidate path to generate an evaluation parameter set; The TOPSIS method is used to perform a comprehensive sorting operation on the evaluation parameter set to generate a path sorting sequence corresponding to each query vector. The candidate path ranked first in each path sorting sequence is taken as the target path of the corresponding problem semantic unit, and the target path sequence is constructed according to the order of the problem semantic sequence.

10. The intelligent information retrieval and question-answering system based on knowledge graphs according to claim 1, characterized in that, The answer output module includes: Extract the target path corresponding to each problem semantic unit from the target path sequence, and read the starting node, relation edge and ending node in each target path to generate target path information; Perform answer fragment extraction on the target path information to extract the answer content of the corresponding question semantic unit; Arrange the answer content according to the semantic sequence of the question to generate an answer content sequence; Perform text processing on the sequence of answer content and output the question and answer results.