Intelligent question answering method and system for online education based on knowledge graph

By constructing user cognitive state feature vectors and extracting adaptive cognitive constraint subgraphs from educational knowledge graphs, the problem of overly difficult or easy answers in online education intelligent question answering is solved, realizing personalized knowledge delivery and improving the accuracy and efficiency of online education.

CN121835899APending Publication Date: 2026-04-10ZHENGZHOU INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU INST OF TECH
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing online education intelligent question-and-answer solutions cannot dynamically adjust the granularity of knowledge according to students' cognitive level and forgetting curve, resulting in answers that are often too difficult or too easy, failing to achieve personalized tutoring.

Method used

By constructing a feature vector of user cognitive state, and performing adaptive cognitive constraint subgraph extraction and personalized logical reasoning based on the educational knowledge graph, personalized answers are generated.

Benefits of technology

It achieves precise alignment between answers and students' current cognitive level, improving the accuracy of knowledge transfer and the efficiency of personalized tutoring in online education scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835899A_ABST
    Figure CN121835899A_ABST
Patent Text Reader

Abstract

The invention discloses an online education intelligent question and answer method and system based on a knowledge graph, and the method comprises the steps: converting a user learning log and historical performance into a dynamic cognitive state feature vector, and introducing the dynamic cognitive state feature vector into sub-graph extraction and reasoning logic of the education knowledge graph as a core constraint. According to the method, the system and the system, by converting a first repair relation of a teaching outline into a graph topology constraint, the system realizes conversion from static knowledge retrieval to self-adaptive cognitive path optimization, generated answers not only fit questions semantically, but also are accurately aligned with the current cognitive level of a user in knowledge difficulty and granularity, so that the user experience is improved, and the user experience is improved. The defect that answers are too difficult or too easy in a traditional scheme is effectively overcome, and the accuracy of knowledge transmission and personalized tutoring efficiency in an online education scene are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intelligent question answering, and more particularly, to an online education intelligent question answering method and system based on a knowledge graph. BACKGROUND

[0002] With the rapid expansion of online education, learners' demand for high-quality and personalized auxiliary teaching is growing. Building an online education intelligent question answering scheme aims to break through the time and space constraints and provide learners with instant knowledge answers and accurate learning guidance, thereby significantly improving students' self-learning efficiency while reducing the burden on educators.

[0003] However, existing online education intelligent question answering schemes mainly rely on general knowledge graph retrieval or simple semantic matching technology, and cannot dynamically adjust the knowledge granularity of the answer according to the cognitive level and forgetting curve of the student. This lack of cognitive state awareness results in a question answering process that is only based on static knowledge and does not fully consider the current learning progress and cognitive load of the questioner, resulting in answers that are often too difficult or too easy.

[0004] Therefore, an optimized online education intelligent question answering method based on a knowledge graph is expected. SUMMARY

[0005] To solve the above technical problems, the present application provides an online education intelligent question answering method and system based on a knowledge graph.

[0006] According to one aspect of the present application, an online education intelligent question answering method based on a knowledge graph is provided, which comprises: constructing a user cognitive state feature vector based on user learning logs and historical test performance; based on the educational knowledge graph, performing intent mapping and knowledge anchor positioning on the obtained question text to obtain an anchor entity set; based on the user cognitive state feature vector, performing adaptive cognitive constraint subgraph extraction on the anchor entity set in the educational knowledge graph to obtain a cognitive constraint subgraph; performing relationship-aware logical reasoning optimization on the question text and the cognitive constraint subgraph to obtain a reasoning answer set; based on the user cognitive state feature vector, performing individualized processing on the reasoning answer set to obtain a final individualized answer.

[0007] According to another aspect of the present application, an online education intelligent question answering system based on a knowledge graph is provided, which comprises: a user cognitive construction module configured to construct a user cognitive state feature vector based on user learning logs and historical test performance; An intent mapping and knowledge anchor positioning module is configured to perform intent mapping and knowledge anchor positioning on the obtained question text based on the educational knowledge graph to obtain an anchor entity set; An adaptive cognitive constraint subgraph extraction module is configured to perform adaptive cognitive constraint subgraph extraction on the anchor entity set based on the user cognitive state feature vector in the educational knowledge graph to obtain a cognitive constraint subgraph; A logical reasoning optimization module is configured to perform logical reasoning optimization on the question text and the cognitive constraint subgraph based on relationship perception to obtain a reasoning answer set; A personalized answering module is configured to perform personalized processing on the reasoning answer set based on the user cognitive state feature vector to obtain a final personalized answer.

[0008] Compared with the prior art, the online education intelligent question answering method and system based on a knowledge graph provided by the present application can convert a user learning log and historical performance into a dynamic cognitive state feature vector, and introduce the cognitive state feature vector as a core constraint into subgraph extraction and reasoning logic of an educational knowledge graph. By converting prerequisite relationships of a teaching syllabus into graph topology constraints, the system realizes a change from static knowledge retrieval to adaptive cognitive path optimization, and the generated answer not only fits the question in semantics, but also precisely aligns with the current cognitive level of the user in terms of knowledge difficulty and granularity. The online education intelligent question answering method and system based on a knowledge graph provided by the present application effectively overcomes the disadvantages of too difficult or too easy answers in the traditional scheme, and significantly improves the accuracy of knowledge transmission and the efficiency of personalized tutoring in an online education scenario. BRIEF DESCRIPTION OF DRAWINGS

[0009] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of embodiments of the present application taken in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of embodiments of the present application and constitute a part of the specification, which together with the description, serve to explain the present application. The drawings are not intended to limit the present application, and the same reference numerals are generally used to represent the same elements throughout the drawings.

[0010] Figure 1 FIG. 1 is a flowchart of an online education intelligent question answering method based on a knowledge graph according to an embodiment of the present application; Figure 2 FIG. 2 is a data flow diagram of an online education intelligent question answering method based on a knowledge graph according to an embodiment of the present application; Figure 3 FIG. 3 is a block diagram of an online education intelligent question answering system based on a knowledge graph according to an embodiment of the present application. DETAILED DESCRIPTION

[0011] Hereinafter, example embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only a part but not all of the embodiments of the present application, and the present application can be implemented in many different forms. It should be understood that the present application is not limited to the described embodiments.

[0012] As shown in the present application and claims, unless the context clearly indicates otherwise, the words "one", "an", "a", and / or "the" do not mean to specify a single number, but can include a plurality or at least one. Generally, the terms "comprise" and "include" only indicate the inclusion of the steps and elements explicitly identified, and these steps and elements do not constitute an exclusive list, and the method or device can also include other steps or elements.

[0013] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, however, any number of different modules can be used and run on the user terminal and / or server. The modules are only illustrative, and different aspects of the system and method can use different modules.

[0014] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in sequence. On the contrary, various steps can be processed in reverse order or simultaneously as needed. Meanwhile, other operations can be added to these processes, or one or more steps of operations can be removed from these processes.

[0015] In the technical solutions of the present application, an online education intelligent question-answering method based on a knowledge graph is proposed. Figure 1 A flowchart of the online education intelligent question-answering method based on a knowledge graph according to the embodiments of the present application. Figure 2 A system architecture diagram of the online education intelligent question-answering method based on a knowledge graph according to the embodiments of the present application. As shown in Figure 1 and Figure 2 As shown in the online education intelligent question-answering method based on a knowledge graph according to the embodiments of the present application, the method comprises the steps of: S1, constructing a user cognitive state feature vector based on a user learning log and historical performance in doing exercises; S2, performing intent mapping and knowledge anchor positioning on the obtained question text based on an education knowledge graph to obtain an anchor entity set; S3, performing adaptive cognitive constraint subgraph extraction on the anchor entity set based on the user cognitive state feature vector in the education knowledge graph to obtain a cognitive constraint subgraph; S4, performing logical reasoning optimization based on relationship perception on the question text and the cognitive constraint subgraph to obtain a reasoning answer set; and S5, performing individual processing on the reasoning answer set based on the user cognitive state feature vector to obtain a final individual answer.

[0016] Specifically, S1 involves constructing a user cognitive state feature vector based on user learning logs and historical test-taking performance. It should be understood that in online education scenarios, learners exhibit significant differences in cognitive levels, knowledge reserves, and learning progress. Traditional question-answering systems often rely solely on static knowledge retrieval, failing to perceive the questioner's current cognitive load and forgetting curve, resulting in answers that are frequently either too difficult or too easy, hindering personalized learning. Therefore, in the technical solution of this application, by constructing a user cognitive state feature vector, the system can quantify the learner's potential abilities and knowledge distribution, providing crucial navigational constraints for subsequent adaptive subgraph extraction and personalized reasoning within the knowledge graph. Among them, the user learning log refers to data that records the user's behavioral sequence on the online learning platform, which typically includes, but is not limited to, login time, accessed course chapters, viewed teaching video IDs and durations, and e-book page numbers browsed; historical test performance refers to the user's historical records of practice questions, quizzes, or exams completed on the platform, including fields such as question ID, user answers, correct / incorrect indicators, and answering time; the final user cognitive state feature vector is a low-dimensional, continuous numerical vector, where each dimension represents a specific attribute of the user in the cognitive space or their mastery of a certain knowledge cluster. This vector, as the numerical representation of the user model, is the core data carrier for the system to achieve personalization.

[0017] In practice, the system first performs interactive data analysis and extracts basic metrics from user learning logs and historical question-solving performance to obtain the relevant knowledge point set and time factor. Specifically, the system analyzes the user's learning logs, identifies all knowledge point entities recently learned by the user, and extracts time-series behavioral metrics such as the user's average learning time and number of reviews for each knowledge point, which together constitute a basic metric set. Simultaneously, the system analyzes the user's historical question-solving records, statistically analyzes the knowledge point set associated with the questions answered, and calculates the average time spent by the user when answering questions involving specific knowledge points. This average time is then normalized and used as a time factor reflecting the user's problem-solving proficiency.

[0018] Next, user potential parameters are estimated based on the historical test-taking performance and the set of knowledge points involved, using an IRT model to obtain the user's current potential ability parameters. The IRT model is a mathematical psychology model used to assess the non-linear relationship between test-takers' abilities and item characteristics. Specifically, a three-parameter logistic model from Item Response Theory (IRT) is used. This model correlates the user's test-taking performance (correctness or incorrectness) with item difficulty, discrimination, and guessing coefficient, and uses maximum likelihood estimation to infer the user's potential ability parameters.

[0019] Furthermore, based on the knowledge point difficulty map, the system calculates the cognitive level probability distribution of the user's current potential ability parameters. In other words, after obtaining the ability parameters, the system further combines the knowledge point difficulty map to calculate the cognitive level probability distribution of the user's current potential ability parameters, thereby obtaining a distribution curve that reflects the probability of knowledge mastery at different difficulty gradients. Specifically, the system presets multiple discrete cognitive level levels (e.g., beginner, intermediate, advanced) and uses a predefined knowledge point difficulty map (which identifies the difficulty threshold of each knowledge point at different cognitive levels) to map the continuous potential ability parameters obtained in the previous step to the probability distribution at each cognitive level. For example, this can be calculated using the Softmax function.

[0020] Subsequently, a multi-factor fusion of the cognitive level probability distribution and the duration factor is performed to obtain the user's cognitive state feature vector. Specifically, this can be achieved by concatenating or weighting the cognitive level probability distribution and the duration factor. For example, the duration factor can be added as an additional dimension and concatenated with the cognitive level probability vector to form an expanded feature vector. Then, a fully connected neural network layer is used to perform dimensionality reduction or feature transformation on this expanded vector, ultimately outputting a fixed-dimensional, dense user cognitive state feature vector.

[0021] Specifically, S2, based on the educational knowledge graph, performs intent mapping and knowledge anchor point localization on the acquired question text to obtain a set of anchor point entities. It should be understood that user questions in online education scenarios are typically presented in natural language, possessing high flexibility and potential ambiguity. To enable the system to accurately retrieve answers from the structured educational knowledge graph, the unstructured question text needs to be transformed into identifiable knowledge nodes with definite semantics within the graph. Through intent mapping and knowledge anchor point localization, the system can eliminate lexical ambiguity (such as synonyms), identify the knowledge points actually inquired about by students, and thus provide a precise semantic entry point and computational starting point for subsequent logical reasoning and subgraph extraction.

[0022] In practice, the system first performs entity recognition and mention extraction on the question text to obtain a set of entity mentions. Specifically, the system uses named entity recognition technology to analyze the original question text input by the user, identifying and extracting all text fragments that may be related to entities in the educational knowledge graph. For example, for the question "How do you prove the converse of the Pythagorean theorem?", the system will identify and extract the entity mentions "Pythagorean theorem" and "converse theorem" to form a preliminary set of entity mentions. This process mainly relies on a pre-trained NER model or a dictionary-based matching method to initially identify the key concepts mentioned in the question.

[0023] Next, the question text is encoded using deep semantic representation to obtain a question semantic vector. Specifically, the system uses a deep neural network model (such as BERT, ERNIE, or other pre-trained language models) to encode the entire question text. The model takes the entire question sentence as input, performs deep semantic understanding through its multi-layer Transformer structure, and finally outputs a fixed-dimensional, dense vector to represent the global semantic information of the entire question. This vector is the question semantic vector, which can capture the semantic relationships between entity mentions in the question and the true intent of the question.

[0024] Furthermore, based on the educational knowledge graph, graph fuzzy matching and ambiguity resolution are performed on the question semantic vector and the entity mention set to obtain the anchor entity set. Specifically, firstly, for each mention in the entity mention set... The system will search for all possible candidate entities in the educational knowledge graph. For each candidate entity The system will calculate its overall confidence score as a correct anchor for the mention. This process can be expressed by the following formula: in, Candidate entities , To calculate the overall confidence score, Entity references and entity labels in the graph The string similarity function between them For weighted adjustment of hyperparameters, For the semantic vector of the question, Candidate entities in the knowledge graph The system first generates pre-trained node embedding vectors. Then, after calculating the comprehensive confidence score of all candidate entities, it sorts the candidates in descending order based on this score and employs an anchor truncation strategy (e.g., selecting the Top-K entities or selecting all entities with scores exceeding a certain threshold) to finally determine the anchor entity set. This set consists of one or more knowledge anchors, defining the search space for subsequent subgraph extraction. In this way, the system effectively solves the problems of ambiguity and vagueness caused by abbreviations, alternative names, and polysemy.

[0025] Specifically, S3, based on the user's cognitive state feature vector, adaptively extracts a cognitive constraint subgraph from the anchor entity set in the educational knowledge graph to obtain the cognitive constraint subgraph. It should be understood that educational knowledge graphs typically contain extremely complex entities and logical relationships. Directly reasoning on the entire graph would not only incur enormous computational costs but, more importantly, fail to account for individual learner differences. By introducing the user's cognitive state feature vector, the system can filter out knowledge fragments from massive knowledge associations that match the student's current cognitive level, learning progress, and forgetting curve. This adaptive extraction mechanism avoids pushing overly difficult or easy content to students, ensuring that the granularity of the knowledge output by the question-and-answer system accurately aligns with the learner's current cognitive load, thereby opening up a personalized learning path that conforms to educational logic within the complex knowledge network.

[0026] In practice, the first step is to perform multi-hop neighborhood exploration on each anchor entity in the anchor entity set within the educational knowledge graph to obtain a set of candidate paths. Specifically, the system uses each entity in the anchor entity set as a starting point and performs a breadth-first or depth-first traversal along the relational edges on the educational knowledge graph, exploring all nodes within its multi-hop range (e.g., 2-hop or 3-hop) and the paths connecting these nodes. For example, starting from an anchor entity "Pythagorean theorem," it may explore directly connected nodes such as "right triangle" and "cosine theorem," as well as the paths formed through these relational edges. After merging the paths explored from all anchor entities, an initial, potentially large, set of candidate paths is formed, encompassing all relevant knowledge paths that may be reached starting from entities directly related to the problem.

[0027] Next, a path matching degree calculation based on cognitive space projection is performed on the candidate path set and the user's cognitive state feature vector to obtain a path cognitive score mapping table. Specifically, the logical difficulty of the candidate path and the user's cognitive ability are projected onto the same high-dimensional semantic space. By calculating the matching degree score between the two, the applicability of each knowledge path to the specific user is quantified. This matching degree score is the cognitive score of the path. The system calculates the matching degree score for each path in the candidate path set, ultimately forming the path cognitive score mapping table.

[0028] Furthermore, adaptive cognitive constraint filtering and subgraph reconstruction are performed on the candidate path set and the path cognitive score mapping table to obtain a cognitive constraint subgraph. Specifically, the system filters the candidate path set according to the path cognitive score mapping table. For example, a threshold is set to retain only paths with cognitive scores higher than the threshold; or a Top-K strategy is adopted to retain the K highest-scoring paths, eliminating those paths whose overall difficulty far exceeds the user's current cognitive level (low scores), while retaining those paths that match the user's cognitive state (high scores). After completing the path filtering, the system extracts all nodes and relational edges involved in these retained paths from the original educational knowledge graph and recombines them into a connected or meaningful subgraph, namely the cognitive constraint subgraph. This subgraph serves as the search space for subsequent logical reasoning optimization, and its scope and quality are directly driven by the user's cognitive state feature vector.

[0029] Specifically, in step S4, relation-aware logical reasoning is used to optimize the question text and the cognitive constraint subgraph to obtain a set of reasoned answers. This step aims to deeply interact the user's question semantics with the personalized, filtered cognitive constraint subgraph. By simulating the process of human logical reasoning, all possible solution paths are searched and evaluated in the subgraph, ultimately selecting the answer that best matches the question's intent and is logically rigorous. This process directly determines the accuracy and reliability of the system's generated answers and is the core technology of the entire intelligent question-answering process.

[0030] In practice, the first step is to perform subgraph feature aggregation based on a graph attention network on the cognitively constrained subgraph to obtain an updated node feature matrix. Specifically, the system utilizes a graph attention network, a deep learning model, to process the cognitively constrained subgraph. Through an attention mechanism, the graph attention network allows each node in the graph to perform differentiated weighted aggregation of the features of its neighboring nodes, thereby generating updated node features that include graph structure information and neighborhood semantic information. Each node's updated feature vector not only contains its own original information but also incorporates contextual information about its neighboring nodes and relationships. All the updated feature vectors of the nodes together constitute the updated node feature matrix. This step provides richer, more context-aware node representations for subsequent path evaluation.

[0031] Next, based on the updated node feature matrix, a logical matching score is calculated for all inference path sets to be evaluated in the subgraph and the semantic vector of the question in the text, to obtain the logical matching score distribution of each path. It should be understood that relational edges in educational knowledge graphs have different logical strengths. For example, a² + b² = c² has a close derivational relationship with the Pythagorean theorem, constituting a strong logical edge; while the Pythagorean theorem has a broad inclusion relationship with a triangle, belonging to a weak descriptive edge. Traditional LSTM or average pooling methods treat all nodes equally, causing minor logical deviations in intermediate steps to be averaged out by subsequent strong correlations, producing seemingly relevant but logically flawed answers. To overcome the above problems, this application proposes a path encoding method based on logical gating perception and causal integrity verification. This method transforms the path encoding process from simple information accumulation to a step-by-step verification of logical validity, ensuring the rigor of the inference chain and meeting the stringent requirements for knowledge accuracy in educational scenarios.

[0032] In this process, firstly, based on the relation embedding matrix, a relational logic strength tensor mapping is performed on the inference path set to obtain the logic strength sequence of the paths. This step aims to quantify and distinguish relations of different properties in the graph, so that the subsequent model can identify which inference steps are inviolable rigid logic. During this process, the system constructs a dedicated logic projection layer for learning relation rigor, for each relation in the inference path... Using its pre-trained feature vectors, a logistic strength scalar is calculated through this projection layer. The process can be expressed by the following formula: in, The scalar representing the logical strength of the relation at step t. This represents the Sigmoid activation function, which normalizes the output values ​​to the (0,1) interval; Representing relations The transpose of the eigenvectors; The dot product operation represents a vector or matrix. This represents a learnable rigor projection matrix used to determine the logical strength of the mapping relationship; Indicates the bias term. This represents a very small positive number, used to prevent gradient vanishing due to the calculation result being zero.

[0033] In particular, The first one was directly quantified The logical rigidity of the reasoning relationship is determined by the value. When this value approaches 1, it indicates that the step belongs to a rigorous mathematical derivation or physical law (such as leading to or defining), and any deviation is intolerable; when the value approaches 0, it indicates that the step is a loose semantic association (such as being related to or applied to). In this way, each relation is assigned a calculable weight that characterizes its importance and inviolability in the educational reasoning chain, providing a key basis for subsequent logical verification.

[0034] Secondly, causal-gated recursive feature evolution is performed on the logical strength sequence, node feature sequence, and relation feature sequence of the path to obtain the final evolution state vector of the path. That is, the logical strength of the path is used to dynamically verify the validity of its reasoning at each step. In this process, an improved recurrent neural network structure called a logical verification unit is employed. At each reasoning step... Calculate the current inference jump (i.e., from node t−1 through relation t−1). Reaching the node The degree of reasoning violation in vector space, combined with logical strength. Generate a reasoning validity gate. If a strong logical step commits a significant reasoning violation, the gate will close, thus cutting off further propagation of information. This process can be expressed by the following formula: in, Let be the local reasoning violation degree at step t. The L2 norm (Euclidean distance) of a vector. This represents the feature vector of the t-th node on the path. This represents the eigenvector of the t-th relation. This represents the inference validity gate, and its value is in the interval (0,1]. This represents the natural exponential function. This represents a positive hyperparameter used to adjust the severity of the penalty; This represents the cumulative state vector of the path at step t. This represents the hyperbolic tangent activation function. This represents the weight matrix of the encoder layer. This represents the vector concatenation operation.

[0035] In particular, Based on the assumption of knowledge graph representation learning, the degree of violation in local reasoning is quantified; when a logical strength Highly rigorous steps, its reasoning violation rate When the value is very large, the exponent term will become a negative number with a very large absolute value, causing the gating value to become too large. Approaching zero. This process simulates the veto principle in educational and scientific reasoning, where a critical logical deduction error invalidates the entire subsequent reasoning chain; conversely, the model exhibits greater tolerance for weak associations with lower logical strength. The final accumulated state of the path is then obtained. It is a reliable flow of information that has survived the logical validity screening at each step. In this way, it ensures that the evolution of the path state vector strictly follows causal logic and can dynamically punish breakpoints in the logical chain.

[0036] Furthermore, based on the set of validity gating values ​​at each step, the final path evolution state vector is weighted globally for logical integrity to obtain the path representation vector. That is, the local verification results at each step are aggregated into an overall evaluation of the logical completeness of the entire path and incorporated into the final path representation. In this process, the final path evolution state vector is multiplied element-wise by the geometric mean of the validity gating values ​​of all steps. This process is expressed by the formula: in, The final representation vector of the path. The vector representing the final evolutionary state of the path. This represents a series of multiplication operations. This represents the total number of steps on the path. This represents the inference validity gating value at step t on the path.

[0037] In particular, the multiplicative terms This ensures that as long as any logical breakpoint exists in the path (i.e., at any step), When the value approaches zero, the logical integrity weight of the entire path collapses to zero. This causes the final generated path representation vector to... It possesses self-falsification: a path that is logically flawed in education will have its vector magnitude severely compressed, naturally resulting in extremely low weighting in subsequent attention scoring. This generates a final path representation that not only encodes the path's semantics but also inherently contains its logical credibility, fundamentally solving the problem of erroneous reasoning paths being selected with high scores.

[0038] In summary, this improved mechanism, by introducing logical strength perception and causal gating verification, achieves more refined and accurate encoding of knowledge graph reasoning paths. This allows intelligent question-answering systems to not only focus on the semantic relevance of knowledge points during answer reasoning but also strictly adhere to the logical reasoning paradigms within the discipline. The resulting path representation vectors inherently and structurally reflect the logical integrity of the path. Specifically, the magnitude of the output vector of a logically flawed reasoning path is significantly suppressed, thus naturally filtering it out during the matching and ranking stage. This fundamentally overcomes the technical defect of traditional encoding methods that easily misjudge logically flawed paths as preferred paths. It greatly improves the accuracy, reliability, and interpretability of the answers output by the question-answering system in the education field, ensuring that the knowledge conveyed to learners is not only relevant but also logically rigorous and correct.

[0039] Subsequently, the logical matching degree of the path representation vector and the question semantic vector is scored to obtain the logical matching score distribution of each path. In this process, the cosine similarity between the path representation vector and the question semantic vector is calculated. Specifically, the system traverses all reasoning paths to be evaluated and performs the above calculation once for each path, thereby obtaining a mapping table containing all paths and their corresponding scores, that is, the logical matching score distribution of each path.

[0040] Furthermore, the optimal inference path is selected based on the logical matching score distribution of each path to obtain the inference answer set. That is, through a clear and definable selection rule, the score distribution is transformed into a specific set of answer nodes, completing the final transformation from path evaluation to answer determination. This ensures that the system outputs a high-quality set of answers based on the most reliable inference paths, thereby meeting users' needs for answer accuracy and usability. In this process, for scenarios prioritizing answer uniqueness and certainty, the single path with the highest logical matching score is directly selected, and its endpoint is used as the unique inference answer. For scenarios requiring multiple related answers or alternative solutions, the K paths with the highest logical matching scores (K being an integer greater than 1) are selected, and their endpoints are deduplicated to form an inference answer set. Additionally, for scenarios requiring dynamic control of the number and quality of answers to ensure all output answers have high confidence, a logical matching score threshold can be set, selecting all paths with scores exceeding that threshold, and their endpoints are deduplicated to form the inference answer set. During execution, the system will select one or more of these strategies in combination based on the specific application scenario configuration. The execution process can be summarized as follows: First, the system reads and parses the logical matching score distribution of each path, and processes the mapping table according to the preset selection strategy (such as Top-1, Top-K or threshold filtering) to filter out the set of path identifiers that meet the conditions; finally, based on these selected path identifiers, the system finds the endpoint node corresponding to each path, collects these nodes, and may perform deduplication operations to form the final set of reasoning answers.

[0041] Specifically, S5, based on the user's cognitive state feature vector, personalizes the set of reasoning answers to obtain a final personalized answer. It should be understood that although the aforementioned steps have obtained an accurate set of answers at the knowledge level through logical reasoning, the unprocessed original reasoning results often have a high degree of professionalism and logical rigidity, which may not suit the comprehension ability of a particular learner. Through personalization, the system can transform rigorous knowledge logic into interactive content that matches the learner's current cognitive load, language preferences, and learning progress. This step aims to overcome the drawbacks of the "one-size-fits-all" approach in existing technologies, preventing students from feeling frustrated due to overly difficult answers or reduced learning efficiency due to overly easy answers, thereby achieving precise teaching guidance while ensuring the accuracy of knowledge.

[0042] In practice, the system first constructs structured prompts based on the user's cognitive state feature vector and the set of inference answers. Specifically, the system designs a specific prompt template, which incorporates information from the user's cognitive state feature vector (such as estimated potential ability parameters, cognitive level probability distribution, etc.) and the set of inference answers (one or more entity identifiers) as input variables. This structured prompt may include the following parts: first, a role setting, such as "You are a patient high school math teacher"; second, a user background description, such as "For a learner with a basic understanding of geometric proofs"; third, core task instructions, such as "Please explain the following mathematical proof method in an easy-to-understand way: [insert entity from the inference answer set here, such as 'Euclidean proof'], avoiding advanced terminology"; and fourth, additional constraints, such as "The answer length should be limited to 150 characters." In this way, personalized user cognitive states and predetermined answer content are transformed into structured generation instructions that a large language model can accurately understand.

[0043] Next, the structured prompts are input into a pre-trained large language model to obtain candidate response text. Specifically, a pre-trained large language model service (such as the GPT series, ChatGLM, or other application programming interfaces) is invoked, and the complete structured prompts containing personalized information, constructed in the previous sub-step, are submitted as input text (Prompt) to the large language model. Based on its massive number of parameters and powerful language generation capabilities, the large language model automatically generates a fluent, natural, and personalized candidate response text according to the role, user background, task, and constraints in the prompts.

[0044] Furthermore, based on the cognitive constraint subgraph, the logical fidelity of the candidate answer text is verified to obtain the final personalized answer. To prevent the large language model from generating "illusions" or omitting key logic, the system compares the generated text with the previously extracted cognitive constraint subgraph to ensure that the final output answer is linguistically personalized and logically rigorous and faithful to the educational knowledge graph. Specifically, the candidate answer text is checked for content alignment with the cognitive constraint subgraph. For example, key entities and relationships are extracted again from the candidate answer text to check whether they exist in the cognitive constraint subgraph or whether their descriptions are consistent with the relationships defined in the subgraph. If discrepancies are found, a correction process may be triggered, such as replacing potentially ambiguous or erroneous segments in the generated text with standard descriptions from the subgraph, or directly rejecting the candidate text and requiring the model to regenerate it, until the generated text passes the verification. The candidate answer text that passes the verification is determined as the final personalized answer.

[0045] Taking the scheme of this application as an example, assuming the set of reasoning answers is {“Euclidean proof”}, the user's cognitive state feature vector indicates that the user is a beginner. The structured prompt words constructed by the system may be: "Role: Junior high school math teaching assistant. User background: A junior high school student who has just learned the Pythagorean theorem, with average foundation. Task: Briefly explain the core idea of ​​'Euclidean proof’ in the most intuitive and easy-to-understand way, avoiding the use of formula derivation and using more metaphors. Constraint: No more than 100 words." After inputting this prompt word into the large language model, the candidate answer text may be obtained: "Imagine 'laying tiles' (making a square) on the three sides of a right triangle, and then by moving and splicing these 'tiles', The system discovered that the total area of ​​the 'tiles' on the two shorter sides is exactly equal to the area of ​​the 'tiles' on the longer side, thus proving the Pythagorean theorem. Euclid's method is like a clever jigsaw puzzle! Following this, the system performs a logical fidelity check, comparing the key information in the candidate text ("tiles" corresponds to "constructing a square," and "equal areas" corresponds to the core conclusion) with the attributes of the "Euclidean proof" entity in the cognitive constraint subgraph and its relationship to the "Pythagorean theorem." Once the statement is confirmed to be correct, the text is output as the final personalized answer to the user.

[0046] In summary, the knowledge graph-based intelligent question-answering method for online education according to the embodiments of this application is explained. It transforms user learning logs and historical performance into dynamic cognitive state feature vectors, and introduces these vectors as core constraints into the subgraph extraction and reasoning logic of the educational knowledge graph. By transforming the prerequisite relationships of the teaching syllabus into graph topological constraints, the system achieves a shift from static knowledge retrieval to adaptive cognitive path optimization. The generated answers not only semantically match the questions but also precisely align with the user's current cognitive level in terms of knowledge difficulty and granularity. This effectively overcomes the drawbacks of traditional solutions where answers are either too difficult or too easy, significantly improving the accuracy of knowledge transfer and the efficiency of personalized tutoring in online education scenarios.

[0047] Furthermore, an online education intelligent question-and-answer system based on knowledge graphs is also provided.

[0048] Figure 3 This is a block diagram of a knowledge graph-based intelligent question-answering system for online education, according to an embodiment of this application. Figure 3As shown, the knowledge graph-based online education intelligent question-answering system 300 according to an embodiment of this application includes: a user cognition construction module 310, used to construct a user cognitive state feature vector based on user learning logs and historical question-answering performance; an intent mapping and knowledge anchor point positioning module 320, used to perform intent mapping and knowledge anchor point positioning on the acquired question text based on the educational knowledge graph to obtain an anchor point entity set; an adaptive cognitive constraint subgraph extraction module 330, used to perform adaptive cognitive constraint subgraph extraction on the anchor point entity set in the educational knowledge graph based on the user cognitive state feature vector to obtain a cognitive constraint subgraph; a logical reasoning optimization module 340, used to perform relation-aware logical reasoning optimization on the question text and the cognitive constraint subgraph to obtain a set of reasoning answers; and a personalized answering module 350, used to perform personalized processing on the set of reasoning answers based on the user cognitive state feature vector to obtain a final personalized answer.

[0049] As described above, the knowledge graph-based online education intelligent question-answering system 300 according to the embodiments of this application can be implemented in various wireless terminals, such as servers with knowledge graph-based online education intelligent question-answering algorithms. In one possible implementation, the knowledge graph-based online education intelligent question-answering system 300 according to the embodiments of this application can be integrated into the wireless terminal as a software module and / or hardware module. For example, the knowledge graph-based online education intelligent question-answering system 300 can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the knowledge graph-based online education intelligent question-answering system 300 can also be one of many hardware modules of the wireless terminal.

[0050] Alternatively, in another example, the knowledge graph-based online education intelligent question-and-answer system 300 and the wireless terminal can also be separate devices, and the knowledge graph-based online education intelligent question-and-answer system 300 can be connected to the wireless terminal via wired and / or wireless networks, and transmit interactive information in accordance with an agreed data format.

[0051] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A knowledge graph-based intelligent question-answering method for online education, characterized in that, include: Based on user learning logs and historical test-taking performance, construct a user cognitive state feature vector; Based on the educational knowledge graph, the acquired question text is subjected to intent mapping and knowledge anchor point localization to obtain the anchor point entity set; Based on the user's cognitive state feature vector, an adaptive cognitive constraint subgraph is extracted from the anchor entity set in the educational knowledge graph to obtain the cognitive constraint subgraph. The query text and the cognitive constraint subgraph are optimized using relation-aware logical reasoning to obtain a set of reasoning answers; Based on the user's cognitive state feature vector, the set of reasoning answers is personalized to obtain the final personalized answer.

2. The online education intelligent question-answering method based on knowledge graphs according to claim 1, characterized in that, Based on user learning logs and historical test-taking performance, a user cognitive state feature vector is constructed, including: Interactive data analysis and basic indicator extraction are performed on user learning logs and historical test performance to obtain the set of knowledge points involved and duration factors; Based on the IRT model, the user's current potential ability parameters are estimated by analyzing the user's historical test performance and the set of knowledge points involved. Based on the knowledge point difficulty map, the cognitive level probability distribution of the user's current potential ability parameters is calculated to obtain the cognitive level probability distribution. Multi-factor fusion of cognitive level probability distribution and duration factor is performed to obtain the user's cognitive state feature vector.

3. The online education intelligent question-answering method based on knowledge graphs according to claim 1, characterized in that, Based on educational knowledge graphs, intent mapping and knowledge anchor point localization are performed on the acquired question text to obtain a set of anchor point entities, including: Entity recognition and mention extraction are performed on the query text to obtain a set of entity mentions; The question text is encoded with deep semantic representation to obtain a question semantic vector; Based on the educational knowledge graph, graph fuzzy matching and ambiguity resolution are performed on the semantic vector of the question and the set of entity mentions to obtain the anchor entity set.

4. The knowledge graph-based intelligent question-answering method for online education according to claim 3, characterized in that, Based on educational knowledge graphs, graph fuzzy matching and disambiguation are performed on the question semantic vector and the entity mention set to obtain the anchor entity set, including: The overall confidence score of each candidate entity in the educational knowledge graph as a target anchor point is calculated using the following formula: in, Candidate entities , To calculate the overall confidence score, Entity references and entity labels in the graph The string similarity function between them For weighted adjustment of hyperparameters, For the semantic vector of the question, Candidate entities in the knowledge graph Pre-trained node embedding vectors; and Candidate entities are sorted in descending order and anchor points are truncated based on the comprehensive confidence scores of the target anchor points to obtain the anchor point entity set.

5. The online education intelligent question-answering method based on knowledge graphs according to claim 1, characterized in that, Based on user cognitive state feature vectors, adaptive cognitive constraint subgraph extraction is performed on the anchor entity set in the educational knowledge graph to obtain the cognitive constraint subgraph, including: In the educational knowledge graph, multi-hop neighborhood exploration is performed on each anchor entity in the anchor entity set to obtain a set of candidate paths; A path matching degree based on cognitive space projection is calculated on the candidate path set and the user cognitive state feature vector to obtain a path cognitive score mapping table; Adaptive cognitive constraint filtering and subgraph reconstruction are performed on the candidate path set and path cognitive score mapping table to obtain a cognitive constraint subgraph.

6. The online education intelligent question-answering method based on knowledge graphs according to claim 1, characterized in that, A set of reasoning answers is obtained by performing relation-aware logical reasoning optimization on the question text and the cognitive constraint subgraph, including: The cognitively constrained subgraph is subjected to subgraph feature aggregation based on graph attention network to obtain the updated node feature matrix; Based on the updated node feature matrix, the logical matching degree score is calculated for all inference path sets to be evaluated in the subgraph and the question semantic vector of the question text to obtain the logical matching score distribution of each path. The optimal reasoning path is selected based on the logical matching score distribution of each path to obtain the set of reasoning answers.

7. The online education intelligent question-answering method based on knowledge graphs according to claim 6, characterized in that, Based on the updated node feature matrix, a logical matching score is calculated for all inference paths to be evaluated in the subgraph and the semantic vector of the question in the text, to obtain the logical matching score distribution for each path, including: Based on the relation embedding matrix, a relation logic strength tensor mapping is performed on the inference path set to obtain the logic strength sequence of the path; Causal-gated recursive feature evolution is performed on the logical strength sequence of the path, the node feature sequence of the path, and the relation feature sequence of the path to obtain the final evolution state vector of the path; Based on the set of validity gate values ​​for each step, the final evolution state vector of the path is weighted by global logical integrity to obtain the path representation vector; Logical matching scores are calculated for the path representation vector and the question semantic vector to obtain the logical matching score distribution for each path.

8. The online education intelligent question-answering method based on knowledge graphs according to claim 1, characterized in that, Based on the user's cognitive state feature vector, the set of reasoning answers is personalized to obtain the final personalized answer, including: Based on the user's cognitive state feature vector and the set of inference answers, structured prompt words are constructed; Structured prompts are input into a pre-trained large language model to obtain candidate response texts; Based on the cognitive constraint subgraph, the logical fidelity of candidate response texts is verified to obtain the final personalized response.

9. A knowledge graph-based intelligent question-answering system for online education, characterized in that, include: The user cognition construction module is used to construct a user cognitive state feature vector based on user learning logs and historical test performance. The intent mapping and knowledge anchor localization module is used to perform intent mapping and knowledge anchor localization on the acquired question text based on the educational knowledge graph to obtain a set of anchor entities. The adaptive cognitive constraint subgraph extraction module is used to extract cognitive constraint subgraphs from the set of anchor entities in the educational knowledge graph based on the user's cognitive state feature vector. The logical reasoning optimization module is used to perform relation-aware logical reasoning optimization on the question text and the cognitive constraint subgraph to obtain a set of reasoning answers; The personalized answer module is used to personalize the set of reasoning answers based on the user's cognitive state feature vector to obtain the final personalized answer.