Personalized question and answer recommendation method based on knowledge graph and two layers of attention

By constructing a structured knowledge network and a two-layer attention mechanism, this study addresses the challenges of fragmented learning resources and complex knowledge systems in online education, enabling personalized and accurate question-and-answer recommendations and improving user experience.

CN121880655APending Publication Date: 2026-04-17HENAN UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN UNIVERSITY
Filing Date
2026-01-07
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In online education, the fragmentation of learning resources and the complexity of knowledge systems make it difficult for existing question-and-answer recommendation methods to achieve high-precision and personalized matching, while traditional methods lack deep semantic understanding and knowledge association.

Method used

We construct a structured knowledge network, utilize a two-layer attention mechanism for natural language query parsing and deep semantic intent recognition, and combine it with knowledge graphs for retrieval and natural language generation to achieve accurate question answering and recommendation.

Benefits of technology

By leveraging deep semantic understanding and knowledge association, the system systematically addresses the issues of resource fragmentation and superficial intent understanding, providing personalized and accurate question-and-answer recommendations to enhance user experience and recommendation effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121880655A_ABST
    Figure CN121880655A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge maps, in particular to a personalized question and answer recommendation method based on a knowledge map and two-layer attention, and the method comprises the steps: constructing and storing a structured knowledge network containing a plurality of entities and association relationships thereof, analyzing an input natural language query, and recognizing query elements; based on semantic comprehension, calculating a semantic matching degree between the query elements and candidate answers extracted from the structured knowledge network, and further identifying a deep semantic intention of the natural language query; and based on the identified query elements and semantic intentions, in combination with the semantic matching degree, performing retrieval in the structured knowledge network to obtain an initial result, performing structured recombination and natural language generation on the initial result, and outputting a readable answer. The method has higher question and answer matching precision and query generation quality in a data sparse and relation complex scene, and is widely applied to the fields of education question and answer, intelligent recommendation, knowledge retrieval and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge graph technology, specifically to a personalized question-answering recommendation method based on knowledge graphs and two-layer attention. Background Technology

[0002] With the expansion of online education, learning resources have exploded, and the problems of resource redundancy and knowledge fragmentation have become increasingly prominent. This makes it difficult for learners to grasp the key points of learning from a sea of ​​content, and significantly increases their cognitive burden.

[0003] In existing technologies, mainstream question-answering recommendation methods typically follow the framework of traditional recommendation systems, making recommendations based on explicit user feedback or superficial interaction behavior. However, these methods struggle to deeply understand the semantic connections between the question text and the knowledge system, often resulting in a mismatch between recommended answers and the question's intent. In recent years, knowledge graph technology has been introduced into this field. By constructing a network of relationships between entities such as courses, articles, and concepts, it has alleviated recommendation bias caused by data sparsity to some extent and offered the possibility of revealing the potential relationships between question-answering resources and knowledge points. However, the knowledge system in the educational field has unique characteristics such as complex layers, multi-dimensional relationships, and dynamic evolution, posing a dual challenge to the quality of knowledge graph construction and application efficiency. This makes it difficult for existing methods to achieve high-precision, personalized matching between question-answering needs and high-quality resources.

[0004] Therefore, how to overcome the above-mentioned shortcomings and achieve accurate question-answering recommendation based on deep semantic understanding and knowledge association has become a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] To address the aforementioned technical problems, the present invention aims to provide a personalized question-answering recommendation method based on knowledge graphs and two-layer attention. The specific technical solution adopted is as follows: One embodiment of the present invention provides a personalized question-answering recommendation method based on knowledge graphs and two-layer attention, the method comprising the following steps: Construct and store a structured knowledge network containing several entities and their relationships. The structured knowledge network is an educational knowledge system represented by a graph structure. The nodes of the graph structure represent at least one entity among courses, articles, and knowledge concepts, and the edges represent the relationships between the entities. The input natural language query is parsed to identify query elements, which are core information elements extracted from the natural language query to reflect the query intent; Based on semantic understanding, the semantic matching degree between the query element and the candidate answer extracted from the structured knowledge network is calculated. The semantic matching degree is an indicator used to quantify the relevance between the query element and the candidate answer in the semantic space. Identify the deep semantic intent of the natural language query, which is a query purpose that goes beyond the literal meaning of the natural language query and points to a specific relation type in the structured knowledge network; Based on the identified query elements and semantic intent, and combined with the semantic matching degree, a retrieval is performed in the structured knowledge network to obtain initial results; The initial results are then restructured and natural language generated to output a readable answer.

[0006] Furthermore, a structured knowledge network is constructed and stored, including: The system extracts course, article, and knowledge concept entity information from a pre-defined educational dataset, cleans and indexes various types of entity information, and constructs corresponding entity data files. Based on the relation definition file in the educational dataset, the hierarchical relationships and cross-node associations between entities are extracted to generate a relation data file; A graph structure is constructed and stored using entity identifiers in the entity data file as nodes and associations in the relation data file as edges.

[0007] Furthermore, the parsing of the input natural language query to identify query elements includes: The natural language query was converted into a word sequence using a word segmentation tool; Part-of-speech tagging is performed on the words in the word sequence; Based on a predefined set of stop words and a set of allowed part-of-speech categories, the word sequences labeled with part-of-speech are filtered to extract a set of core keywords as the query elements.

[0008] Furthermore, the expression for the i-th word in the word sequence labeled with part-of-speech tags as the core keyword is: In the formula, This represents the i-th core keyword in the core keyword set. Let Q represent the i-th word in the word sequence, and let Q represent the word sequence. This indicates that it does not belong to [the group / organization]. Indicates belonging to, Represents a set of stop words. Let represent the i-th word with part-of-speech tagging, and P represent the set of allowed part-of-speech categories.

[0009] Further, the step of calculating the semantic matching degree between the query element and the candidate answers extracted from the structured knowledge network based on semantic understanding includes: Input the query elements into a pre-trained language model to obtain the question semantic vector; Input the text description of the candidate answer into the pre-trained language model to obtain the answer semantic vector; The semantic matching degree is calculated based on the semantic vector of the question and the semantic vector of the answer.

[0010] Further, the calculation of the semantic matching degree includes: Calculate the cosine similarity between the question semantic vector and the answer semantic vector. The expression for the cosine similarity is: In the formula, Represents cosine similarity. Represents the semantic vector of the problem. Represents the semantic vector of the answer. This indicates finding the magnitude of a vector; Calculate the dot product similarity between the question semantic vector and the answer semantic vector. The expression for the dot product similarity is: In the formula, Represents dot product similarity. Represents the transpose of the problem semantic vector; The dot product similarity is then subjected to nonlinear normalization. The semantic matching score is obtained by weighted fusion of the cosine similarity and the normalized dot product similarity. The expression for the semantic matching score is: In the formula, Indicates semantic matching degree. and All are preset weights, and the sum of two preset weights is 1.

[0011] Furthermore, identifying the deep semantic intent of the natural language query includes: The natural language query is semantically encoded to obtain a contextual representation; based on a predefined prototype set of interrogative words, trigger phrases, and domain cue words, the semantic cue strength at each position in the contextual representation is calculated as follows: In the formula, This represents the semantic cue strength of the semantic vector of the t-th question. The weighting coefficients representing questionable clues. Let W represent the function for finding the maximum value, and let W represent the set of interrogative word vectors. This represents the semantic vector of the t-th question. Let represent each vector in the question word vector set, and cos represent the cosine similarity. This represents the weight coefficient of the relation-triggered phrase. This represents a set of phrase vectors that trigger a relation. Each vector in the set of relation-triggered phrase vectors represents a relation; The weight coefficient representing the domain suggestion keyword. This represents a set of domain-specific word vectors. This represents each vector in the set of domain cue word vectors; By combining the semantic cue strength and semantic attention, the context representation is weighted and aggregated to generate a question intent representation. The calculation method for the question intent representation is as follows: ; ; In the formula, Let represent the attention weight of the semantic vector of the t-th question, and exp represent an exponential function with the natural constant e as the base. This represents the transpose of the semantic scoring vector. This represents the clue strength fusion coefficient, where n represents the number of question semantic vectors. This represents the semantic vector of the j-th question. The semantic cue strength of the semantic vector of the j-th question is represented; This represents the core question fragment vector obtained by attention weighting. This indicates the intended representation of the problem. Represents sentence-level vectors; The problem intent representation is inferred using a pre-trained relation classifier model, and the inference results are corrected by combining relation prototype similarity and prior probability to determine the deep semantic intent.

[0012] Furthermore, the relation classifier model is obtained through unsupervised training, and its overall loss function during training includes: The cross-entropy loss term is used to optimize relation category determination, and the cross-entropy loss term is calculated as follows: In the formula, This represents the cross-entropy loss, where N represents the number of samples. Indicates category weight, Represents a logarithmic function; The model determines the input problem using the following formula as belonging to the first... The posterior probability of each relation category. Represents the i-th truth relation. This represents the i-th question; Based on cross-entropy, the overall optimization objective is calculated as follows: In the formula, Let represent the overall optimization objective function of the relation classifier training process. express Preset weights, This represents a prototype consistency term, used to drive the problem representation of the same relation to be closer to the corresponding relation prototype and further away from other prototypes; express Preset weights, This represents the triggering margin term, which imposes a minimum margin constraint on samples that hit strong triggering semantics; express The weight, This represents the L2 regularization constraint term of the model, used to prevent overfitting. A prototype consistency loss term is used to aggregate the problem intent representation toward the corresponding prototype vector. The prototype consistency loss term is calculated as follows: In the formula, Let represent the initial value of the prototype vector for the j-th relation category, and q represent the training sample index. The training sample set is labeled as a relation. Problem sample set, This represents the class weight of sample q. , This indicates the intended representation of the problem; During the training process of the relation classifier model, Using exponential sliding updates, the update formula is as follows: In the formula, Let represent the relation prototype vector after the t-th iteration update. This represents the update coefficient, and its value range is... ; Will As a learning parameter, combined with the minimization of the prototype consistency term, the expression for the prototype consistency term is: In the formula, The prototype vector representing the truth relation category to which sample q belongs. The squared Euclidean distance between the problem's intended representation and the corresponding truth relation prototype is expressed as . Indicates the first hyperparameter. The index represents the category of non-truthful relations, and m represents the second hyperparameter. Represents the relation prototype vector of non-truthful categories. This represents the hinge loss term based on the marginal m, used to expand the heterogeneous interval; The triggering marginal loss term used to impose constraints on samples that hit strong semantic triggering rules includes: Using the structure and parameters obtained from the prototype consistency term, a forward computation is performed on the problem intent representation to obtain the score vector for each candidate relation: In the formula, These are all parameters obtained during the prototype consistency term analysis phase. Represents a non-linear activation function; The original scores are corrected by combining relation prototypes and prior information probabilities, and then normalized to obtain a probability distribution. The probability distribution is used to describe the confidence level of the model in that the input question belongs to each relation category. In the formula, Represents a probability distribution. Indicates candidate relationship The predicted score, express and cosine similarity, Indicates candidate relationship The prior probability, where log represents the logarithmic function. Indicates candidate relationship The prior probability, Indicates the correction weight. K represents the temperature coefficient, and K represents the relationship category coefficient. Indicates candidate relationship The predicted score, express and cosine similarity, Indicates incorrect candidate relation The prior probability; The model outputs the following expression for the predicted relationship: In the formula, This indicates the type of predicted relationship in the final output of the model. The function represents the index j with the highest probability value; If the highest confidence level And the interval between the second highest probability and the second highest probability is not less than When the output indicates the type of relationship in the knowledge graph that the question is asking about, the model determines.

[0013] Furthermore, the step of performing a retrieval in the structured knowledge network based on the identified query elements and semantic intent, combined with the semantic matching degree, to obtain initial results includes: Based on the query elements, the deep semantic intent, and the highly relevant answer set, the entity, relationship, and constraints to be queried are determined; the highly relevant answer set is composed of candidate answers selected from the structured knowledge network whose semantic matching degree is higher than a preset threshold. Based on a predefined query template, a structured query statement containing the entities, relationships, and constraints is generated, including: Based on the graph database schema, select the corresponding query template; fill the selected query template with the entity, the relation type corresponding to the deep semantic intent, and the constraint conditions to form an initial query statement; perform syntax validation and parameterization on the initial query statement to obtain an executable structured query statement; The structured query statement is submitted to the graph database for execution, and the original search results are used as the initial results.

[0014] Furthermore, the step of structurally reorganizing and generating natural language from the initial result to output a readable answer includes: The entities, relationships, and attributes in the initial results are deduplicated, classified, and merged. The numerical units and time formats in the initial results are standardized. Key information related to the query elements is extracted from the processed results to generate a structured data table. The structured data table includes main result items, auxiliary fields, and confidence scores. Based on the deep semantic intent, select the corresponding answer template and fill the answer template with the content of the structured data table to generate preliminary answer text; The preliminary answer text is subjected to referential resolution, format standardization, and numerical verification. Based on the confidence score in the structured data table, the content in the preliminary answer text is filtered or merged to generate user-oriented natural language text as the readable answer.

[0015] The present invention has the following beneficial effects: This invention provides a personalized question-answering recommendation method based on knowledge graphs and two-layer attention. This method systematically solves core problems in the education field, such as fragmented resources, superficial intent understanding, and low-precision recommendation matching, by organically combining structured knowledge representation, deep semantic understanding, graph reasoning retrieval, and natural language generation. Its core lies in the deep integration of the structured advantages of knowledge graphs with the semantic understanding capabilities of deep learning / NLP, forming an intelligent question-answering recommendation paradigm that can both understand complex queries and utilize rich knowledge associations, providing an effective technical path for the intelligent upgrading of the online education field.

[0016] Specifically, firstly, the structured knowledge network construction organizes discrete educational resources (courses, articles, concepts) into a graph structure, with entities as nodes and relationships as edges, forming a systematic knowledge representation. This facilitates knowledge integration and redundancy removal, provides a computable foundation for knowledge associations, and supports multiple inference paths and path discovery. Secondly, natural language query parsing and query element identification extract core entities, relationships, question types, and other elements from the query using NLP technology. This helps to initially understand the explicit requirements of the query, reduces retrieval bias caused by differences in expression, and provides structured input for subsequent in-depth understanding. Thirdly, semantic matching calculation calculates the semantic similarity between the query and candidate answers in a semantic space (such as a vector space), going beyond literal matching. This improves the semantic accuracy of matching and can identify synonyms. The system employs several methods: 1) Synonymous expressions to alleviate data sparsity; 2) Deep semantic intent recognition, which identifies the true purpose of a query through intent classification models or rules, mapping it to specific relationship types in the knowledge network. This facilitates understanding the deeper meaning of user queries and supports complex query types, thereby achieving precise intent-driven retrieval; 3) Intent-driven retrieval in the knowledge network, which uses query elements, semantic intent, and matching degree to perform path search or subgraph matching within the graph structure. This facilitates precise answer location based on semantics and associations and supports multi-step reasoning to provide personalized answer ranking; 4) Result reorganization and natural language generation, which converts the retrieved structured information into coherent natural language text. This not only improves user experience and generates answers that conform to cognitive habits but also supports interpretable answer presentation. Attached Figure Description

[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the steps of a personalized question-answering recommendation method based on knowledge graphs and two-layer attention, as an embodiment of the present invention. Figure 2 A schematic diagram for constructing a knowledge graph; Figure 3 This is an overall framework diagram of a personalized question-answering recommendation method based on knowledge graphs and two-layer attention, as an embodiment of the present invention. Detailed Implementation

[0019] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the technical solution proposed according to the present invention are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0021] The application scenarios targeted by this invention can be: In online education and intelligent question-answering scenarios, existing recommendation methods often rely on keyword matching or collaborative filtering, lacking comprehensive utilization of knowledge graph structure and semantic information. This makes it difficult to meet learners' personalized needs, resulting in poor question-answering recommendation performance. This invention combines knowledge graphs with a two-layer attention mechanism, enabling the capture of question semantics while simultaneously mining the relationships between entities. This leads to more accurate question-answering recommendations and is applicable to intelligent question-answering systems, personalized learning recommendations, and smart education platforms.

[0022] One embodiment of the present invention provides a personalized question-answering recommendation method based on knowledge graphs and two-layer attention, such as... Figure 1 As shown, it includes the following steps: S1, construct and store a structured knowledge network containing several entities and their relationships.

[0023] Here, the structured knowledge network is an educational knowledge system represented by a graph structure. Nodes in the graph structure represent at least one entity from courses, articles, and knowledge concepts, while edges represent the relationships between entities. Entity information can be derived from the MOOCCube dataset.

[0024] As an example, building and storing a structured knowledge network includes: The first step is to obtain course, article, and knowledge concept entity information from the pre-set educational dataset, and then clean and index the various entity information to form corresponding entity data files.

[0025] In this embodiment, firstly, entity information such as courses, articles, and knowledge concepts are obtained from the MOOCCube dataset and stored in files such as cs_course_cleaned.jsonl, cs_paper_cleaned.jsonl, and cs_concept_cleaned.jsonl, respectively. Secondly, after cleaning and filtering the entity information, indexes are built for courses, articles, and knowledge concepts, and the indexed data is output in a specific format. For example, course entity information is written to course.txt as a course index in the form of course ID; article entity information is written to paper.txt as an article index in the form of article ID; and knowledge concept entity information is written to concept.txt as a knowledge concept index in the form of knowledge concept ID.

[0026] The second step is to extract the hierarchical relationships and cross-node associations between entities from the relationship definition file in the education dataset, and generate a relationship data file.

[0027] In this embodiment, the prior-dependency relationship is extracted from the prior-dependency.json file and stored in parent.json. A prior-post-precedence relationship is then established in parent-son.json and stored in parent-son.json, thereby obtaining the hierarchical structure of courses and concepts. This hierarchical information is stored as node indexes for subsequent construction of parent-child relationships in the knowledge graph. The association between knowledge concepts and articles is extracted from the concept-paper.json file and stored in concept_paper_relations.json. Similarly, the association between courses and knowledge concepts is extracted from the course-concepts.json file and stored in course-concept_relations.json. All the aforementioned cross-node relationships are saved as index pairs (source, object) in the corresponding relationship files.

[0028] The third step is to construct and store a graph structure using entity identifiers in the entity data file as nodes and associations in the relation data file as edges.

[0029] In this embodiment, when constructing the knowledge graph, an empty graph is first created, and course IDs, article IDs, and knowledge concept IDs are added to the graph sequentially as nodes of the knowledge graph. Then, based on the aforementioned hierarchical relationships and cross-node relationship files, triplet relationships (i.e., relationships between head entities, relations, and tail entities) are gradually established between nodes. The knowledge graph construction diagram is shown below. Figure 2 As shown.

[0030] Thus, this implementation has constructed a knowledge graph consisting of three types of entities: courses, articles, and knowledge concepts, and their relationships.

[0031] It should be noted that the structured knowledge network construction in step S1 above can solve the defects of resource redundancy, knowledge fragmentation, and lack of systematic association. Specifically, it organizes discrete educational resources (courses, articles, concepts) into a graph structure, with entities as nodes and relationships as edges, forming a systematic knowledge representation. This facilitates knowledge integration and redundancy removal, provides a computable knowledge association foundation, and supports multiple inferences and path discovery.

[0032] S2 parses the input natural language query and identifies the query elements.

[0033] Here, query elements are the core information elements extracted from natural language queries that reflect the query intent. Natural language queries are essentially natural language questions. Preprocessing natural language questions allows for the extraction of core semantic information, including the question text sequence, word segmentation results, and part-of-speech tagging results.

[0034] As an example, the input natural language query is parsed to identify the query elements, including: The first step is to use a word segmentation tool to convert the natural language query into a word sequence.

[0035] In this embodiment, the jieba tool is used to segment the input question. For the input question text Q, the word sequence obtained after segmentation is as follows: In the formula, This represents the nth word after word segmentation. The word segmentation process performed by the jieba tool is existing technology and will not be elaborated upon here.

[0036] The second step is to tag the words in the word sequence with their parts of speech.

[0037] In this embodiment, part-of-speech tagging functions are used. Identify parts of speech.

[0038] The third step is to filter the word sequences labeled with part-of-speech tags based on the predefined set of stop words and the set of allowed part-of-speech categories, and extract the core keyword set as the query elements.

[0039] In this embodiment, a predefined set of stop words is used. After filtering out irrelevant terms from the allowed part-of-speech categories, the core keyword set is obtained. The expression for the i-th word in the part-of-speech-tagged word sequence as the core keyword is: In the formula, This represents the i-th core keyword in the core keyword set. Let Q represent the i-th word in the word sequence, and let Q represent the word sequence. This indicates that it does not belong to [the group / organization]. Indicates belonging to, Represents a set of stop words. Let represent the i-th word with part-of-speech tagging, and P represent the set of allowed part-of-speech categories.

[0040] After the above filtering process, the core keyword set can be obtained, specifically represented as follows: To clarify the user's query needs.

[0041] In another embodiment, a stop word list is first used. After filtering out irrelevant terms from the allowed part-of-speech categories, we obtain the candidate keyword set K: ;in, This is the set of allowed parts of speech for candidate keywords.

[0042] Secondly, weights are assigned to each word by combining word frequency and part-of-speech priority: ;in, and All are adjustable parameters. Indicate word frequency, This represents a part-of-speech weighting function.

[0043] Finally, select the top-scoring words as the core keyword set K* for the question: ;in, This represents the operation of selecting the top m elements with the highest scores.

[0044] Thus, this embodiment has obtained keyword information for natural language problems, providing input for subsequent semantic modeling.

[0045] It should be noted that the natural language query parsing and query element identification in step S2 above can overcome the difficulty of understanding the user's true intent by traditional methods. Specifically, it uses NLP technology to extract core entities, relationships, question types and other elements from the query, which helps to initially understand the explicit needs of the query, reduce retrieval bias caused by differences in expression, and provide structured input for subsequent in-depth understanding.

[0046] S3, based on semantic understanding, calculates the semantic matching degree between query elements and candidate answers extracted from a structured knowledge network.

[0047] As an example, based on semantic understanding, the semantic matching degree between query elements and candidate answers extracted from a structured knowledge network is calculated, including: The first step is to input the query elements into a pre-trained language model to obtain the question semantic vector.

[0048] The second step is to input the text description of the candidate answer into the pre-trained language model to obtain the semantic vector of the answer.

[0049] In this embodiment, the query elements are input into the BERT pre-trained model to obtain the corresponding vectors. , Simultaneously, the textual descriptions of the candidate answers are also input into the pre-trained language model and encoded as vectors. , ;in, All are d-dimensional semantic representation vectors.

[0050] It should be noted that, since the candidate answer object e is an abstract object, it cannot be directly input into the model for encoding. Therefore, this invention uses a textual description of the candidate answer object. As a carrier, it is input into the BERT pre-trained model to obtain a vector. , which are used in turn as semantic information for candidate answer object e.

[0051] The third step is to calculate the semantic matching degree based on the semantic vector of the question and the semantic vector of the answer.

[0052] The first sub-step is to calculate the cosine similarity between the question semantic vector and the answer semantic vector. The expression for cosine similarity is: In the formula, Represents cosine similarity. Represents the semantic vector of the problem. Represents the semantic vector of the answer. This indicates finding the magnitude of a vector.

[0053] It should be noted that since cosine similarity primarily measures the consistency of vector directions and ignores the magnitude of the vectors, this embodiment introduces dot product similarity to more comprehensively measure the semantic relevance between the question and the candidate answer.

[0054] The second sub-step involves calculating the dot product similarity between the question semantic vector and the answer semantic vector. The expression for the dot product similarity is: In the formula, Represents dot product similarity. This represents the transpose of the problem semantic vector.

[0055] The third sub-step involves non-linear normalization of the dot product similarity.

[0056] In this embodiment, the range of values ​​for the dot product result is: Inconsistent numerical scales may lead to weight imbalance during fusion. The dot product similarity can be normalized by using the min-max normalization method.

[0057] In another embodiment, the result of the dot product can be non-linearly transformed by introducing the Sigmoid function, mapping it to... This allows for the establishment of intervals, thereby achieving consistency and numerical stability across different similarity metrics.

[0058] It should be noted that, in order to retain the advantage of directional consistency of cosine similarity and to introduce modulus-related information through dot product similarity, the cosine similarity and dot product similarity are weighted and fused to obtain the final score.

[0059] The fourth sub-step involves weighted fusion of the cosine similarity and the normalized dot product similarity to obtain the semantic matching score. The expression for the semantic matching score is: In the formula, Indicates semantic matching degree. and All are preset weights, and the sum of two preset weights is 1.

[0060] It should be noted that, through parameters and The adjustment can achieve a balance between semantic direction consistency and semantic intensity relevance. Furthermore, the weighted fusion mechanism can comprehensively utilize both similarity features, improving the accuracy and robustness of semantic matching between questions and candidate answers, and providing a more reliable basis for subsequent candidate answer selection and knowledge retrieval.

[0061] If semantic matching degree If the value exceeds the threshold, the candidate answer is determined to be a highly relevant answer entity, and the final selection set can be represented as: In the formula, This represents the threshold parameter, used to determine whether the matching degree is satisfied; This represents the set of highly correlated answer entities.

[0062] Thus, this embodiment has obtained the semantic matching degree between the query elements and the candidate answers, and obtained the set of candidate answer objects with the highest question relevance.

[0063] It should be noted that step S3 above calculates semantic matching degree, which can overcome the recommendation bias caused by shallow keyword matching. Specifically, it calculates the semantic similarity between the query and the candidate answer in the semantic space (such as the vector space), which goes beyond literal matching, helps to improve the semantic accuracy of matching, can identify synonyms and near-synonyms, and alleviate the problem of data sparsity.

[0064] S4 identifies the deep semantic intent of natural language queries.

[0065] Here, deep semantic intent refers to the true purpose of a query that goes beyond the literal meaning of a natural language query and points to a specific type of relationship within a structured knowledge network.

[0066] As an exemplary implementation, identifying the deep semantic intent of a natural language query includes: The first step is to perform semantic encoding on the natural language query to obtain a contextual representation; based on a predefined prototype set of interrogative words, trigger phrases, and domain cue words, the semantic cue strength at each position in the contextual representation is calculated.

[0067] In this embodiment, the natural language query used to characterize the question features is first used as a separate input, and the question text information is semantically encoded in context to obtain sequence-level and sentence-level representations. Secondly, the relation classifier model does not rely on word-by-word matching of keywords, but rather performs flexible semantic identification at the semantic level based on the context of the question, identifying possible interrogative words, relation trigger phrases, and domain hint words, and determining the semantic cue strength at each position in the context representation.

[0068] As an example, the semantic cue strength is calculated as follows: In the formula, This represents the semantic cue strength of the semantic vector of the t-th question. The weighting coefficients representing questionable clues. Let W represent the function for finding the maximum value, and let W represent the set of interrogative word vectors. This represents the semantic vector of the t-th question. Let represent each vector in the question word vector set, and cos represent the cosine similarity. This represents the weight coefficient of the relation-triggered phrase. This represents a set of phrase vectors that trigger a relation. Each vector in the set of relation-triggered phrase vectors represents a relation; The weight coefficient representing the domain suggestion keyword. This represents a set of domain-specific word vectors. This represents each vector in the set of domain cue word vectors.

[0069] The second step is to combine semantic cue strength and semantic attention to perform weighted aggregation of contextual representations to generate a representation of the question intent.

[0070] In this embodiment, a joint attention mechanism that takes into account both semantic score and cue strength is constructed to perform weighted aggregation on the sequence to obtain the core fragment representation of the question, and this representation is concatenated with sentence-level vectors to form a unified "question intent" representation.

[0071] As an example, the problem intent representation is calculated as follows: ; ; In the formula, Let represent the attention weight of the semantic vector of the t-th question, and exp represent an exponential function with the natural constant e as the base. This represents the transpose of the semantic scoring vector. This represents the clue strength fusion coefficient, where n represents the number of question semantic vectors. This represents the semantic vector of the j-th question. The semantic cue strength of the semantic vector of the j-th question is represented; This represents the core question fragment vector obtained by attention weighting. This indicates the intended representation of the problem. Represents a sentence-level vector.

[0072] The third step involves using a pre-trained relation classifier model to infer the intent representation of the problem, and then correcting the inference results by combining relation prototype similarity and prior probability to determine the deep semantic intent.

[0073] In this embodiment, based on the problem intent representation, prototype consistency and triggering marginal constraints are introduced to enable the relation classifier model to learn the ability to determine the relationship from the problem, that is, to assign each problem to a different relationship through cross-entropy.

[0074] As an example, a relation classifier model can be obtained through unsupervised training, and its overall loss function during training includes: The cross-entropy loss term is used to optimize relation category determination. The calculation of the cross-entropy loss term is as follows: In the formula, This represents the cross-entropy loss, where N represents the number of samples. Indicates category weight, Represents a logarithmic function; The model determines the input problem using the following formula as belonging to the first... The posterior probability of each relation category. Represents the i-th truth relation. Let i represent the i-th question.

[0075] Based on cross-entropy, the overall optimization objective is calculated as follows: In the formula, Let represent the overall optimization objective function of the relation classifier training process. express Preset weights, This represents a prototype consistency term, used to drive the problem representation of the same relation to be closer to the corresponding relation prototype and further away from other prototypes; express Preset weights, This represents the triggering margin term, which imposes a minimum margin constraint on samples that hit strong triggering semantics; express The weight, This represents the L2 regularization constraint term of the model, used to prevent overfitting.

[0076] In this embodiment, in order for the user's question to be correctly classified, it is necessary to first calculate the relation prototype. , belonging to The sample representation is used as a basis for mean initialization and continuous updating during training. A relation label set is set. For the j-th relation, define its prototype vector. . The method for obtaining the data is specified as follows: First, the data is obtained by labeling the training sample set as... Problem Set For each sample, we take its encoded and weighted aggregation problem representation. According to category weight The initial value of the prototype vector after weighted averaging.

[0077] A prototype consistency loss term is used to aggregate the problem intent representation toward the corresponding prototype vector. The prototype consistency loss term is calculated as follows: In the formula, Let represent the initial value of the prototype vector for the j-th relation category, and q represent the training sample index. The training sample set is labeled as a relation. Problem sample set, This represents the class weight of sample q. It can be set according to the sample frequency; This indicates the intended representation of the problem.

[0078] Subsequently, during the training process of the relation classifier model, Using exponential sliding updates, the update formula is as follows: In the formula, Let represent the relation prototype vector after the t-th iteration update. This represents the update coefficient, and its value range is... .

[0079] Will As a learning parameter, combined with the minimization of the prototype consistency term, the expression for the prototype consistency term is: In the formula, The prototype vector representing the truth relation category to which sample q belongs. The squared Euclidean distance between the problem's intended representation and the corresponding truth relation prototype is expressed as . Indicates the first hyperparameter. The index represents the category of non-truthful relations, and m represents the second hyperparameter. Represents the relation prototype vector of non-truthful categories. This represents the hinge loss term based on the margin m, used to expand the heterogeneous interval.

[0080] The aforementioned prototype consistency term can narrow the distance between similar samples and the prototype, and widen the gap between dissimilar samples. To improve convergence speed, It can be initialized by the mean of the trigger phrase or descriptive embedding of the prototype consistency item, which ensures that the prototype vector corresponding to each relation maintains a stable position in space for subsequent relation category determination.

[0081] The set of parameters obtained after training convergence With the set of relation prototypes It will be used in subsequent steps for relation confidence calculation and final inference correction.

[0082] In this embodiment, based on the trained relation classifier model, the semantic representation of the proposed question is forward reasoned on a predefined set of relations. The classification results are corrected by combining rules and prior information, so as to obtain the confidence or probability relation of each relation category, thereby determining the intention relation of the question, that is, determining the relation type that the question should query in the knowledge graph.

[0083] As an example, the triggering marginal loss term used to impose constraints on samples that hit strong semantic triggering rules includes: Using the structure and parameters obtained from the prototype consistency term, a forward computation is performed on the problem intent representation to obtain the score vector for each candidate relation: In the formula, These are all parameters obtained during the prototype consistency term analysis phase. This represents a non-linear activation function.

[0084] The original scores are corrected by combining relation prototypes and prior information probabilities, and then normalized to obtain a probability distribution. The probability distribution is used to describe the confidence level of the model in that the input question belongs to each relation category. In the formula, Represents a probability distribution. Indicates candidate relationship The predicted score, express and cosine similarity, Indicates candidate relationship The prior probability, where log represents the logarithmic function. Indicates candidate relationship The prior probability, Indicates the correction weight. K represents the temperature coefficient, and K represents the relationship category coefficient. Indicates candidate relationship The predicted score, express and cosine similarity, Let represent the prior probability of an incorrect candidate relation γ_j.

[0085] The model outputs the following expression for the predicted relationship: In the formula, This indicates the type of predicted relationship in the final output of the model. The function represents the index j with the highest probability value.

[0086] If the highest confidence level And the interval between the second highest probability and the second highest probability is not less than When the query is successful, the output indicates the type of relationship in the knowledge graph that the model is asking about; otherwise, the output is "no relationship," meaning the model cannot determine the user's explicit query intent. and Determined by the validation set, it is used to implement the rejection strategy in low-confidence samples to ensure the reliability of the inference results.

[0087] Thus, this embodiment obtains the semantic intent of the user's question and its determination result on the predefined set of relations, thereby clarifying the content actually asked by the user.

[0088] It should be noted that the above step S4, deep semantic intent recognition, takes into account the difficulty in capturing the implicit intent of user queries (such as comparison, causality, reasoning, etc.). Specifically, it identifies the true purpose of the query through intent classification models or rules, and maps it to specific relationship types in the knowledge network. This is conducive to understanding the "implied meaning" of user queries and supports complex query types, thereby achieving precise intent-oriented retrieval.

[0089] S5, based on the identified query elements and semantic intent, combined with semantic matching degree, performs retrieval in the structured knowledge network to obtain initial results.

[0090] As an example, based on the identified query elements and semantic intent, combined with semantic matching degree, a retrieval is performed in a structured knowledge network to obtain initial results, including: The first step is to determine the entities, relationships, and constraints to be queried based on the query elements, deep semantic intent, and highly relevant answer set.

[0091] Here, the highly relevant answer set consists of candidate answers selected from the structured knowledge network whose semantic matching degree is higher than a preset threshold.

[0092] In this embodiment, the specific implementation of combining the highly relevant answer set, query elements, and deep semantic intent is as follows: core keywords from the query elements are used to retrieve and initially lock candidate entities in a structured knowledge network; the relationship classification results corresponding to the deep semantic intent are mapped to specific relationship labels in the graph as retrieval paths; the highly relevant answer set is used to perform semantic disambiguation and association filtering on the candidate entities to determine the final query entity and its associated relationships; simultaneously, modifiers and limiting words are extracted from the original user question as constraints for attribute filtering.

[0093] The second step is to generate a structured query statement containing entities, relationships, and constraints based on a predefined query template.

[0094] In this embodiment, a corresponding query template is selected according to the graph database pattern; the relation types and constraints corresponding to entities and deep semantic intents are filled into the query template to form an initial query statement; the initial query statement is subjected to syntax validation and parameterization to obtain an executable structured query statement, i.e., the initial Cypher query.

[0095] The third step is to submit the structured query statement to the graph database for execution and obtain the raw search results as the initial results.

[0096] In this embodiment, the initial query is processed by integrity constraint completion, syntax verification and parameterization to obtain an executable query, which is then submitted to the graph database query engine for execution to obtain the original search results as the initial results.

[0097] Thus, this embodiment has obtained the original search results corresponding to the Cypher query statement.

[0098] It should be noted that the intent-driven retrieval in the knowledge network of step S5 above can overcome the shortcomings of traditional recommendation systems that cannot use knowledge association for accurate recommendations. Specifically, it combines query elements, semantic intent, and matching degree to perform path search or subgraph matching in the graph structure, which is conducive to achieving accurate answer location based on semantics and association, and supports multi-step reasoning to provide personalized answer ranking.

[0099] S6 performs structured reorganization and natural language generation on the initial results, outputting readable answers.

[0100] As an exemplary implementation, the initial results are structurally reorganized and natural language generated to output a readable answer, including: The first step is to deduplicate, classify, and merge the entities, relationships, and attributes in the initial results, and unify the numerical units and time formats in the initial results. Then, extract the key information related to the query elements from the processed results to generate a structured data table.

[0101] Here, the structured data table contains main result items, auxiliary fields, and confidence scores.

[0102] The second step is to select the corresponding answer template based on the deep semantic intent, and fill the answer template with the content of the structured data table to generate the preliminary answer text.

[0103] The third step involves dereferencing, standardizing the format, and verifying the values ​​in the preliminary answer text. Based on the confidence score in the structured data table, the content in the preliminary answer text is filtered or merged to generate a user-friendly natural language text as a readable answer.

[0104] Thus, this example yields structured results and readable natural language answers.

[0105] It should be noted that the result of step S6 above, which involves reorganization and natural language generation, overcomes the limitation that structured knowledge is difficult to present directly as readable answers. Specifically, it converts the retrieved structured information into coherent natural language text, which not only improves user experience and generates answers that conform to cognitive habits, but also supports the presentation of interpretable answers.

[0106] This invention provides a personalized question-answering recommendation method based on knowledge graphs and two-layer attention, the overall framework of which is shown in the figure below. Figure 3 As shown, this method employs a semantic structure joint encoding mechanism, effectively integrating entity text descriptions and multi-level neighborhood structure features to achieve accurate identification of user question intent and reliable determination of relationship types. Based on this, by combining adaptive contrastive learning optimization and negative sample augmentation strategies, the discriminative ability of entity and relationship representations is significantly improved, exhibiting good training stability and generalization ability. Compared to existing schemes that rely solely on semantics or structure, this invention achieves higher question-answering matching accuracy and query generation quality in scenarios with sparse data and complex relationships. It also possesses good scalability and application prospects, and can be widely applied in fields such as educational question answering, intelligent recommendation, and knowledge retrieval.

[0107] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A personalized question and answer recommendation method based on a knowledge graph and two-layer attention, characterized in that, Includes the following steps: Construct and store a structured knowledge network containing several entities and their relationships. The structured knowledge network is an educational knowledge system represented by a graph structure. The nodes of the graph structure represent at least one entity among courses, articles, and knowledge concepts, and the edges represent the relationships between the entities. The input natural language query is parsed to identify query elements, which are core information elements extracted from the natural language query to reflect the query intent; Based on semantic understanding, the semantic matching degree between the query element and the candidate answer extracted from the structured knowledge network is calculated. The semantic matching degree is an indicator used to quantify the relevance between the query element and the candidate answer in the semantic space. Identify the deep semantic intent of the natural language query, which is a query purpose that goes beyond the literal meaning of the natural language query and points to a specific relation type in the structured knowledge network; Based on the identified query elements and semantic intent, and combined with the semantic matching degree, a retrieval is performed in the structured knowledge network to obtain initial results; The initial results are then restructured and natural language generated to output a readable answer.

2. The personalized question and answer recommendation method based on a knowledge graph and a two-layer attention according to claim 1, characterized in that, Constructing and storing structured knowledge networks, including: The system extracts course, article, and knowledge concept entity information from a pre-defined educational dataset, cleans and indexes various types of entity information, and constructs corresponding entity data files. Based on the relation definition file in the educational dataset, the hierarchical relationships and cross-node associations between entities are extracted to generate a relation data file; A graph structure is constructed and stored using entity identifiers in the entity data file as nodes and associations in the relation data file as edges.

3. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 1, characterized in that, The process of parsing the input natural language query and identifying query elements includes: The natural language query was converted into a word sequence using a word segmentation tool; Part-of-speech tagging is performed on the words in the word sequence; Based on a predefined set of stop words and a set of allowed part-of-speech categories, the word sequences labeled with part-of-speech are filtered to extract a set of core keywords as the query elements.

4. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 3, characterized in that, The expression for the i-th word in the word sequence labeled with part-of-speech tags as the core keyword is: In the formula, This represents the i-th core keyword in the core keyword set. Let Q represent the i-th word in the word sequence, and let Q represent the word sequence. This indicates that it does not belong to [the group / organization]. Indicates belonging to, Represents a set of stop words. Let represent the i-th word with part-of-speech tagging, and P represent the set of allowed part-of-speech categories.

5. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 1, characterized in that, The step of calculating the semantic matching degree between the query element and the candidate answers extracted from the structured knowledge network based on semantic understanding includes: Input the query elements into a pre-trained language model to obtain the question semantic vector; Input the text description of the candidate answer into the pre-trained language model to obtain the answer semantic vector; The semantic matching degree is calculated based on the semantic vector of the question and the semantic vector of the answer.

6. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 5, characterized in that, The calculation of the semantic matching degree includes: Calculate the cosine similarity between the question semantic vector and the answer semantic vector. The expression for the cosine similarity is: In the formula, Represents cosine similarity. Represents the semantic vector of the problem. Represents the semantic vector of the answer. This indicates finding the magnitude of a vector; Calculate the dot product similarity between the question semantic vector and the answer semantic vector. The expression for the dot product similarity is: In the formula, Represents dot product similarity. Represents the transpose of the problem semantic vector; The dot product similarity is then subjected to nonlinear normalization. The semantic matching score is obtained by weighted fusion of the cosine similarity and the normalized dot product similarity. The expression for the semantic matching score is as follows: In the formula, Indicates semantic matching degree. and All are preset weights, and the sum of two preset weights is 1.

7. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 1, characterized in that, The identification of the deep semantic intent of the natural language query includes: The natural language query is semantically encoded to obtain a contextual representation; based on a predefined prototype set of interrogative words, trigger phrases, and domain cue words, the semantic cue strength at each position in the contextual representation is calculated as follows: In the formula, This represents the semantic cue strength of the semantic vector of the t-th question. The weighting coefficients representing questionable clues. Let W represent the function for finding the maximum value, and let W represent the set of interrogative word vectors. This represents the semantic vector of the t-th question. Let represent each vector in the question word vector set, and cos represent the cosine similarity. This represents the weight coefficient of the relation-triggered phrase. This represents a set of phrase vectors that trigger a relation. Each vector in the set of relation-triggered phrase vectors represents a relation; The weight coefficient representing the domain suggestion keyword. This represents a set of domain-specific word vectors. This represents each vector in the set of domain cue word vectors; By combining the semantic cue strength and semantic attention, the context representation is weighted and aggregated to generate a question intent representation. The calculation method for the question intent representation is as follows: ; ; In the formula, Let represent the attention weight of the semantic vector of the t-th question, and exp represent an exponential function with the natural constant e as the base. This represents the transpose of the semantic scoring vector. This represents the clue strength fusion coefficient, where n represents the number of question semantic vectors. This represents the semantic vector of the j-th question. The semantic cue strength of the semantic vector of the j-th question is represented; This represents the core question fragment vector obtained by attention weighting. This indicates the intended representation of the problem. Represents sentence-level vectors; The problem intent representation is inferred using a pre-trained relation classifier model, and the inference results are corrected by combining relation prototype similarity and prior probability to determine the deep semantic intent.

8. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 7, characterized in that, The relation classifier model is obtained through unsupervised training, and its overall loss function during training includes: The cross-entropy loss term is used to optimize relation category determination, and the cross-entropy loss term is calculated as follows: In the formula, This represents the cross-entropy loss, where N represents the number of samples. Indicates category weight, Represents a logarithmic function; The model determines the input problem using the following formula as belonging to the first... The posterior probability of each relation category. Represents the i-th truth relation. This represents the i-th question; Based on cross-entropy, the overall optimization objective is calculated as follows: In the formula, Let represent the overall optimization objective function of the relation classifier training process. express Preset weights, This represents a prototype consistency term, used to drive the problem representation of the same relation to be closer to the corresponding relation prototype and further away from other prototypes; express Preset weights, This represents the triggering margin term, which imposes a minimum margin constraint on samples that hit strong triggering semantics; express The weight, This represents the L2 regularization constraint term of the model, used to prevent overfitting. A prototype consistency loss term is used to aggregate the problem intent representation toward the corresponding prototype vector. The prototype consistency loss term is calculated as follows: In the formula, Let represent the initial value of the prototype vector for the j-th relation category, and q represent the training sample index. The training sample set is labeled as a relation. Problem sample set, This represents the class weight of sample q. , This indicates the intended representation of the problem; During the training process of the relation classifier model, Using exponential sliding updates, the update formula is as follows: In the formula, Let represent the relation prototype vector after the t-th iteration update. This represents the update coefficient, and its value range is... ; Will As a learning parameter, combined with the minimization of the prototype consistency term, the expression for the prototype consistency term is: In the formula, The prototype vector representing the truth relation category to which sample q belongs. The squared Euclidean distance between the problem's intended representation and the corresponding truth relation prototype is expressed as . Indicates the first hyperparameter. The index represents the category of non-truthful relations, and m represents the second hyperparameter. Represents the relation prototype vector of non-truthful categories. This represents the hinge loss term based on the marginal m, used to expand the heterogeneous interval; The triggering marginal loss term used to impose constraints on samples that hit strong semantic triggering rules includes: Using the structure and parameters obtained from the prototype consistency term, a forward computation is performed on the problem intent representation to obtain the score vector for each candidate relation: In the formula, These are all parameters obtained during the prototype consistency term analysis phase. Represents a non-linear activation function; The original scores are corrected by combining relation prototypes and prior information probabilities, and then normalized to obtain a probability distribution. The probability distribution is used to describe the confidence level of the model in that the input question belongs to each relation category. In the formula, Represents a probability distribution. Indicates candidate relationship The predicted score, express and cosine similarity, Indicates candidate relationship The prior probability, where log represents the logarithmic function. Indicates candidate relationship The prior probability, Indicates the correction weight. K represents the temperature coefficient, and K represents the relationship category coefficient. Indicates candidate relationship The predicted score, express and cosine similarity, Indicates incorrect candidate relation The prior probability; The model outputs the following expression for the predicted relationship: In the formula, This indicates the type of predicted relationship in the final output of the model. The function represents the index j with the highest probability value; If the highest confidence level And the interval between the second highest probability and the second highest probability is not less than When the output indicates the type of relationship in the knowledge graph that the question is asking about, the model determines.

9. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 1, characterized in that, The process of performing a retrieval within the structured knowledge network based on the identified query elements and semantic intent, combined with the semantic matching degree, to obtain initial results includes: Based on the query elements, the deep semantic intent, and the highly relevant answer set, the entity, relationship, and constraints to be queried are determined; the highly relevant answer set is composed of candidate answers selected from the structured knowledge network whose semantic matching degree is higher than a preset threshold. Based on a predefined query template, a structured query statement containing the entities, relationships, and constraints is generated, including: Based on the graph database schema, select the corresponding query template; fill the selected query template with the entity, the relation type corresponding to the deep semantic intent, and the constraint conditions to form an initial query statement; perform syntax validation and parameterization on the initial query statement to obtain an executable structured query statement; The structured query statement is submitted to the graph database for execution, and the original search results are used as the initial results.

10. The personalized question-answering recommendation method based on knowledge graph and two-layer attention as described in claim 1, characterized in that, The process of restructuring the initial results and generating natural language to output readable answers includes: The entities, relationships, and attributes in the initial results are deduplicated, classified, and merged. The numerical units and time formats in the initial results are standardized. Key information related to the query elements is extracted from the processed results to generate a structured data table. The structured data table includes main result items, auxiliary fields, and confidence scores. Based on the deep semantic intent, select the corresponding answer template and fill the answer template with the content of the structured data table to generate preliminary answer text; The preliminary answer text is subjected to referential resolution, format standardization, and numerical verification. Based on the confidence score in the structured data table, the content in the preliminary answer text is filtered or merged to generate user-oriented natural language text as the readable answer.

Citation Information

Cited By

  • Vehicle fault named entity recognition method, device, equipment, medium and product

    CN122221859A