Education automatic question and answer method based on text metaphor processing and emotion perception

By introducing methods based on text metaphor processing and emotional perception in the educational automatic question-and-answer system, the problem that existing systems are difficult to understand educational text metaphor and emotional perception abilities is solved, and efficient metaphor understanding and personalized answer generation are achieved, which significantly improves user satisfaction and learning effect.

CN120196731AActive Publication Date: 2025-06-24HEFEI ZHIXUN TECHNOLOGY TRANSFER CONSULTING CO LTD

Patent Information

Application Number
CN202510673081.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-06-24
Estimated Expiration
2045-05-23

AI Technical Summary

Technical Problem

The existing educational automatic question and answer system is difficult to effectively identify and understand metaphorical expressions in educational texts, and its emotional perception abilities are limited, resulting in poor results in interpreting abstract concepts and complex principles and insufficient ability to generate personalized answers.

Method used

An automatic question-and-answer method based on text metaphor processing and emotional perception is proposed. By collecting user's question text, a metaphor understanding ability and emotional state is generated, combining metaphor and emotion for joint modeling, dynamically adjusting the expression and complexity of the answers, and generating personalized answers.

Benefits of technology

Effectively identifying and understanding metaphorical expressions in educational texts improves the quality of interpretation of abstract concepts and complex principles, with an emotional perception accuracy of 85.7%, user satisfaction increased by 23.5%, and learning effect increased by 18.7%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196731A_ABST
    Figure CN120196731A_ABST
Patent Text Reader

Abstract

The invention discloses an education automatic question and answer method based on text metaphor processing and emotion perception, and belongs to the technical field of text processing, and the method comprises the following steps: S1, collecting a question text of a user, and outputting a question processing result; s2, generating a metaphor understanding ability according to a question processing result; s3, generating an emotional state for the user; s4, outputting adapted knowledge according to the understanding ability and the emotional state of the metaphor; s5, generating a metaphor emotion joint set according to the metaphor understanding ability and the emotional state; and S6, according to the adapted knowledge and metaphor emotion joint set, generating a final answer. According to the method, the metaphor knowledge base and the processing model specially oriented to the education field are constructed, and the understanding and generation ability of the system to the education specific metaphor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of text processing, and particularly relates to an educational automatic question-answering method based on text metaphor processing and emotion perception. Background Art

[0002] In today's digital education environment, intelligent education technologies are developing rapidly, providing new possibilities for personalized learning and intelligent tutoring. Especially with the progress of natural language processing and artificial intelligence technologies, educational automatic question-answering systems have become an important part of intelligent education. These systems can understand students' questions, provide relevant answers and explanations, and thus support students' autonomous learning process.

[0003] The automatic question-answering systems in the education field are different from those in general fields. They need to understand educational content, learning processes, and students' cognitive states more deeply. Especially, educational texts often contain a large number of metaphorical expressions, which are crucial for explaining abstract concepts, establishing cognitive connections, and promoting understanding. For example, when explaining the concept of "electric current", "water flow" is often used as a metaphor; when teaching "data structures", metaphors such as "trees" or "graphs" may be used. These metaphorical expressions can help students connect abstract concepts with known experiences, promoting understanding and memory.

[0004] At the same time, emotional factors play a crucial role in the educational process. In different emotional states, students' understanding and performance of the same question may vary significantly. Therefore, an educational system that can perceive and respond to students' emotional states can provide more personalized and effective learning support.

[0005] Currently, there are various technical solutions in the field of educational automatic question-answering, which can be mainly divided into the following categories:

[0006] Retrieval-based question-answering systems: Such as IBM's Watson Education and Microsoft's Project Tuva. These systems mainly retrieve the most relevant answers from a preset knowledge base through keyword matching and semantic similarity calculation. These systems can quickly respond to common questions, but it is difficult for them to handle complex educational concept explanations and metaphorical expressions.

[0007] Knowledge graph-based question-answering systems: By constructing a knowledge graph in the education field, concepts, relationships, and attributes are represented in a structured manner to support more complex reasoning and question-answering. These systems perform well in dealing with structured knowledge, but the support for metaphor understanding and emotion perception is limited.

[0008] Deep learning-based question answering systems: Such as Google's BERT and OpenAI's GPT series models are applied to educational question answering. These systems use large-scale pre-trained language models to understand questions and generate answers. Although these models have powerful language understanding capabilities, they are usually general models and lack specialized processing of educational-specific metaphors and emotional factors.

[0009] Emotion-aware intelligent education systems: By constructing an exercise-knowledge point hypergraph and combining an emotion perception module, they capture and model the emotional state of students to support personalized knowledge tracking. The system has made significant progress in emotion modeling, but mainly focuses on knowledge tracking rather than question answering tasks, and does not specifically handle metaphorical expressions in educational texts.

[0010] Metaphor processing techniques: In the field of natural language processing, there have been some studies specifically for metaphor recognition and understanding. These methods mainly focus on metaphor processing in the general domain and have not been specifically applied to educational question answering systems.

[0011] The existing technologies lack specialized processing of metaphorical expressions in educational texts: Most existing educational question answering systems use general natural language processing technologies and cannot effectively identify and understand metaphorical expressions in educational texts, resulting in poor performance in explaining abstract concepts and complex principles.

[0012] Limited emotion perception ability: Although some systems have begun to pay attention to emotional factors, they usually treat emotions as independent modules and fail to effectively integrate the emotional state with the question answering process, making it difficult to dynamically adjust the answering strategy and content according to the student's emotional state.

[0013] Lack of joint modeling of metaphor and emotion: The existing technologies do not fully consider the mutual influence between metaphorical expressions and emotional states, ignoring the differences in students' understanding of metaphors under different emotional states and the potential impact of metaphorical expressions on emotional states.

[0014] Insufficient personalized answer generation ability: Existing systems mostly use fixed templates or general generation models and are difficult to dynamically adjust the expression mode and complexity of answers according to the student's cognitive level, emotional state, and metaphor understanding ability.

[0015] Lack of a metaphor knowledge base dedicated to the education field: Existing metaphor processing technologies are mostly for the general domain and lack a metaphor knowledge base and processing model specifically for the education field, making it difficult to accurately understand and generate educational-specific metaphorical expressions. Summary of the Invention

[0016] To solve the above problems, the present invention proposes an educational automatic question answering method based on text metaphor processing and emotion perception.

[0017] The technical solution of the present invention is: An educational automatic question answering method based on text metaphor processing and emotion perception includes the following steps:

[0018] S1. Collect the question text of the user and output the question processing result;

[0019] S2. Generate metaphor understanding ability according to the question processing result;

[0020] S3. Generate an emotional state for the user;

[0021] S4. Output the adapted knowledge according to the metaphor understanding ability and the emotional state;

[0022] S5. Generate a metaphor-emotion joint set according to the metaphor understanding ability and the emotional state;

[0023] S6. Generate the final answer according to the adapted knowledge and the metaphor-emotion joint set.

[0024] Furthermore, S1 includes the following sub-steps:

[0025] S11. Collect the question text of the user and perform basic processing on the question text, where the basic processing includes word segmentation processing, stop word removal processing, and part-of-speech tagging processing;

[0026] S12. After completing the basic processing, extract the entities of the question text;

[0027] S13. Extract the question intention of the user according to the entities of the question text;

[0028] S14. Extract the semantic features and context features of the question text according to the question intention of the user, and output the question processing result.

[0029] Furthermore, S2 includes the following sub-steps:

[0030] S21. Generate several metaphor candidates for the question text according to the question processing result, calculate the semantic incoherence degree of each metaphor candidate, and retain the metaphor candidates with a semantic incoherence degree greater than the set threshold;

[0031] S22. Calculate the predicted values of the retained metaphor candidates, retain the metaphor candidates with a predicted value greater than the set probability threshold as the final metaphors;

[0032] S23. Extract the source domain and target domain of the final metaphor, and calculate the mapping relationship between the source domain and the target domain;

[0033] S24. Generate metaphor understanding ability according to the source domain, target domain, and mapping relationship of the final metaphor.

[0034] Further, in S21, a set of part-of-speech collocation patterns is determined, and word pairs whose part-of-speech pairs belong to the set of part-of-speech collocation patterns are used as metaphor candidates;

[0035] In S21, the semantic incoherence degree of the metaphor candidates is calculated by the formula:

[0036] ;

[0037] In the formula, represents the word vector representation of the th word , represents the word vector representation of the th word , represents the vector norm;

[0038] In S22, the predicted value of the retained metaphor candidates is calculated by the formula:

[0039] ;

[0040] In the formula, represents the context, represents the classification model, represents the sigmoid function, represents the metaphor label;

[0041] In S23, the mapping relationship between the source domain and the target domain is expressed as:

[0042] ;

[0043] In the formula, represents the first source domain concept, represents the second source domain concept, represents the first target domain concept, represents the second target domain concept, represents the first mapping relationship type, represents the second mapping relationship type, represents the first mapping intensity, represents the second mapping intensity;

[0044] In S24, the metaphor understanding ability is expressed as:

[0045] ,

[0046] In the formula, represents the vector representation of the source domain, The vector representation of the target domain, The vector representation of the mapping relationship, Denotes the vector concatenation function.

[0047] Furthermore, S3 includes the following sub-steps:

[0048] S31. Extract the linguistic features and semantic features of the question text;

[0049] S32. Extract the feature vectors based on the linguistic features and semantic features of the question text;

[0050] S33. Conduct sentiment classification based on the feature vectors;

[0051] S34. Calculate the intensities of various sentiment categories after classification;

[0052] S35. Obtain the vector representation of the sentiment state as the sentiment state based on the intensities of various sentiment categories.

[0053] Furthermore, in S31, the linguistic features include the frequency of interrogative words, the frequency of vague determiners, the frequency of emphasis words, and syntactic complexity;

[0054] Frequency of interrogative words The calculation formula is:

[0055] ;

[0056] In the formula, Denotes the number of interrogative words, Denotes the total number of words;

[0057] Frequency of vague determiners The calculation formula:

[0058] ;

[0059] In the formula, Denotes the number of vague determiners;

[0060] The calculation formula for the frequency of emphasis words:

[0061] ;

[0062] In the formula, Denotes the number of emphasis words;

[0063] Syntactic complexity The calculation formula is:

[0064] ;

[0065] In the formula, Denotes the number of subordinate clauses, Indicates the number of sentences;

[0066] In S31, the semantic features include the positive sentiment word score, the negative sentiment word score, and the uncertain word score;

[0067] Positive sentiment word score The calculation formula is:

[0068] ;

[0069] In the formula, represents a sentiment word, represents the set of positive sentiment words, represents the weight of the sentiment word;

[0070] Negative sentiment word score The calculation formula is:

[0071] ;

[0072] In the formula, represents the set of negative sentiment words;

[0073] The calculation formula for the uncertain word score is:

[0074] ;

[0075] In the formula, represents the set of uncertainty words;

[0076] In S33, the calculation formula for sentiment classification is:

[0077] ;

[0078] In the formula, represents the probability distribution of the sentiment category under the given feature vector, represents the sentiment category, represents the feature vector, represents the weight matrix, represents the bias term, represents the activation function;

[0079] In S34, the intensity of the sentiment category The calculation formula is:

[0080] ;

[0081] In the formula, represents the th sentiment category, represents the sigmoid function, represents the bias term of the sentiment category;

[0082] In S35, the emotional state is calculated by the formula:

[0083] ;

[0084] In the formula, represents the probability of the first emotional category, represents the probability of the second emotional category, represents the th emotional category, represents the intensity of the first emotional category, represents the intensity of the second emotional category, represents the th emotional category, represents the first emotional category, represents the second emotional category, represents the th emotional category.

[0085] Furthermore, S4 includes the following sub-steps:

[0086] S41. According to the metaphor understanding result, extract the sorting score of the knowledge item, and use the highest sorting score as the answer basis;

[0087] S42. Generate a complete knowledge representation based on the answer basis;

[0088] S43. According to the metaphor understanding result and the emotional state, use the knowledge complexity adjustment function to adjust the representation method and complexity of the complete knowledge representation, and output the adapted knowledge.

[0089] Furthermore, in S41, the sorting score of the knowledge item is calculated by the formula:

[0090] ;

[0091] In the formula, represents the first weight coefficient, represents the second weight coefficient, represents the third weight coefficient, represents the question text, represents the knowledge item, represents the relevance score of the knowledge item, represents the importance score of the knowledge item, represents the timeliness score of the knowledge item;

[0092] In S43, the knowledge complexity adjustment function is calculated by the formula:

[0093] ;

[0094] In the formula, represents the complexity of the original knowledge, represents the emotional state, represents the metaphor understanding ability, represents the adjustment function based on the emotional state and metaphor understanding ability.

[0095] Furthermore, S5 includes the following sub-steps:

[0096] S51. Generate a joint feature representation according to the metaphor understanding result and the emotional state;

[0097] S52. Determine the mutual influence relationship between the metaphor understanding result and the emotional state;

[0098] S53. Generate a metaphor usage strategy and an emotional influence strategy according to the joint feature representation and the mutual influence relationship between the metaphor understanding result and the emotional state;

[0099] S54. Generate a metaphor-emotion joint set according to the metaphor usage strategy and the emotional influence strategy;

[0100] In S51, the joint feature representation has the following calculation formula:

[0101] ;

[0102] In the formula, represents the emotional state, represents the metaphor understanding ability, represents the multi-head attention mechanism;

[0103] In S52, the mutual influence relationship between the metaphor understanding result and the emotional state has the following calculation formula:

[0104] ;

[0105] In the formula, represents the bidirectional control recurrent cell, represents the vector concatenation;

[0106] In S53, the metaphor usage strategy has the following calculation formula:

[0107] ;

[0108] In the formula, represents the metaphor strategy generation function;

[0109] In S53, the emotional influence strategy The calculation formula is as follows:

[0110] ;

[0111] In the formula, represents the emotional strategy generation function;

[0112] In S54, the metaphorical emotional union set The calculation formula is as follows:

[0113] ;

[0114] In the formula, represents the combined feature representation, represents the non-linear mapping function;

[0115] Furthermore, S6 includes the following sub-steps:

[0116] S61. Construct a problem framework based on the metaphorical emotional union set;

[0117] S62. Input the adapted knowledge into the problem framework, perform knowledge selection and knowledge integration to generate the core content of the answer;

[0118] S63. Construct a metaphor selection function according to the metaphor usage strategy;

[0119] S64. Construct an emotional response generation function based on the metaphor selection function and the core content of the answer;

[0120] S65. Generate the final answer according to the emotional response generation function.

[0121] In S61, the problem framework The calculation formula is as follows:

[0122] ;

[0123] In the formula, represents the candidate framework, represents the set of predefined answer frameworks, represents the metaphorical emotional union set, represents, represents the problem intention;

[0124] In S62, the calculation formula for knowledge selection is as follows:

[0125] ;

[0126] In the formula, represents the result of knowledge selection, represents the th knowledge item, Represents the sorting score of knowledge items, Represents the knowledge selection threshold;

[0127] In S62, the calculation formula for knowledge integration is:

[0128] ;

[0129] In the formula, Represents the core content of the answer, Represents the knowledge integration function;

[0130] In S63, the metaphor selection function The calculation formula is:

[0131] ;

[0132] In the formula, Represents the candidate metaphor, Represents the metaphor library, Represents the matching degree calculation function, Represents the metaphor usage strategy;

[0133] In S64, the emotional response generation function The calculation formula is:

[0134] ;

[0135] In the formula, Represents the emotional influence strategy, Represents the function of generating emotional responses based on the emotional influence strategy, the core content of the answer, and the selected metaphor;

[0136] In S65, the final answer The calculation formula is:

[0137] ;

[0138] In the formula, Represents the answer optimization function, Represents the emotional response generation function.

[0139] The beneficial effects of the present invention are:

[0140] (1) The present invention effectively identifies and understands metaphorical expressions in educational texts, improves the quality of explanations for abstract concepts and complex principles, and the metaphor recognition accuracy rate reaches 87.3%;

[0141] (2) The present invention accurately perceives the emotional state of students and deeply integrates emotional factors with the Q&A process, realizing dynamic answer generation with emotional perception, and the emotional classification accuracy rate reaches 85.7%;

[0142] (3) The present invention establishes a joint modeling mechanism for metaphorical expressions and emotional states, taking into account the mutual influence between the two, improving the adaptability and personalization level of the question-answering system, and increasing the user satisfaction by 23.5%;

[0143] (4) The present invention dynamically adjusts the expression mode, metaphor usage strategy and complexity of the answer according to the cognitive level, emotional state and metaphor understanding ability of the students, realizing the generation of truly personalized answers and increasing the learning effect by 18.7%;

[0144] (5) The present invention constructs a metaphor knowledge base and a processing model specifically for the education field, improving the system's understanding and generation ability of education-specific metaphors, and the answer relevance reaches 91.3%. BRIEF DESCRIPTION OF THE DRAWINGS

[0145] Figure 1 is a flowchart of an educational automatic question-answering method based on text metaphor processing and emotion perception;

[0146] Figure 2 is the operation effect diagram of the user input processing module;

[0147] Figure 3 is the operation effect diagram of the metaphor recognition and understanding module;

[0148] Figure 4 is the operation effect diagram of the emotional state perception module;

[0149] Figure 5 is the operation effect diagram of the knowledge retrieval and reasoning module;

[0150] Figure 6 is the operation effect diagram of the metaphor-emotion joint modeling module;

[0151] Figure 7 is the operation effect diagram of the personalized answer generation module;

[0152] Figure 8 is the overall operation effect diagram of processing the complete question. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0153] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0154] As Figure 1 shown, the present invention provides an educational automatic question-answering method based on text metaphor processing and emotion perception, including the following steps:

[0155] S1. Collect the question text of the user and output the question processing result;

[0156] S2. Generate the metaphor understanding ability according to the question processing result;

[0157] S3. Generate an emotional state for the user;

[0158] S4. Output the adapted knowledge according to the metaphor understanding ability and the emotional state;

[0159] S5. Generate a metaphor-emotion joint set according to the metaphor understanding ability and the emotional state;

[0160] S6. Generate a final answer according to the adapted knowledge and the metaphor-emotion joint set.

[0161] In the embodiment of the present invention, S1 includes the following sub-steps:

[0162] S11. Collect the question text of the user and perform basic processing on the question text, where the basic processing includes word segmentation processing, stop word removal processing, and part-of-speech tagging processing;

[0163] S12. After completing the basic processing, extract the entities of the question text;

[0164] S13. Extract the question intention of the user according to the entities of the question text;

[0165] S14. Extract the semantic features and context features of the question text according to the question intention of the user, and output the question processing result.

[0166] In the embodiment of the present invention, S2 includes the following sub-steps:

[0167] S21. Generate several metaphor candidates for the question text according to the question processing result, calculate the semantic incoherence degree of each metaphor candidate, and retain the metaphor candidates whose semantic incoherence degree is greater than the set threshold;

[0168] S22. Calculate the prediction value of the retained metaphor candidates, and retain the metaphor candidates whose prediction value is greater than the set probability threshold as the final metaphor;

[0169] S23. Extract the source domain and target domain of the final metaphor, and calculate the mapping relationship between the source domain and the target domain;

[0170] S24. Generate a metaphor understanding ability according to the source domain, target domain and mapping relationship of the final metaphor.

[0171] In the embodiment of the present invention, in S21, determine a set of part-of-speech collocation patterns, and use the word pairs whose part-of-speech pairs belong to the set of part-of-speech collocation patterns as metaphor candidates;

[0172] In S21, the semantic incoherence degree of the metaphor candidate The calculation formula is:

[0173] ;

[0174] In the formula, Indicates the word vector representation, Indicates the word vector representation, Indicates the vector norm;

[0175] In S22, the predicted value of the retained metaphor candidate The calculation formula is:

[0176] ;

[0177] In the formula, Indicates the context, Indicates the classification model, Indicates the sigmoid function, Indicates the metaphor label;

[0178] In S23, the mapping relationship between the source domain and the target domain The expression is:

[0179] ;

[0180] In the formula, Indicates the first source domain concept, Indicates the second source domain concept, Indicates the first target domain concept, Indicates the second target domain concept, Indicates the first mapping relationship type, Indicates the second mapping relationship type, Indicates the first mapping strength, Indicates the second mapping strength;

[0181] In S24, the metaphor understanding ability The expression is:

[0182] ,

[0183] In the formula, Indicates the vector representation of the source domain, Indicates the vector representation of the target domain, Indicates the vector representation of the mapping relationship, Indicates the vector concatenation function.

[0184] In the embodiments of the present invention, S3 includes the following sub-steps:

[0185] S31. Extract the language features and semantic features of the question text;

[0186] S32. Extract feature vectors according to the language features and semantic features of the question text;

[0187] S33. Perform sentiment classification according to the feature vectors;

[0188] S34. Calculate the intensity of various sentiment categories after classification;

[0189] S35. Obtain the vector representation of the sentiment state according to the intensity of various sentiment categories as the sentiment state.

[0190] In the embodiment of the present invention, in S31, the language features include the frequency of interrogative words, the frequency of vague determiners, the frequency of emphasis words, and syntactic complexity;

[0191] Frequency of interrogative words The calculation formula is:

[0192] ;

[0193] In the formula, represents the number of interrogative words, represents the total number of words;

[0194] Frequency of vague determiners The calculation formula:

[0195] ;

[0196] In the formula, represents the number of vague determiners;

[0197] The calculation formula for the frequency of emphasis words:

[0198] ;

[0199] In the formula, represents the number of emphasis words;

[0200] Syntactic complexity The calculation formula is:

[0201] ;

[0202] In the formula, represents the number of clauses, represents the number of sentences;

[0203] In S31, the semantic features include positive sentiment word scores, negative sentiment word scores, and uncertain word scores;

[0204] Positive sentiment word scores The calculation formula:

[0205] ;

[0206] In the formula, represents an emotional word, represents the set of positive emotional words, represents the weight of the emotional word;

[0207] Score of negative emotional words The calculation formula is:

[0208] ;

[0209] In the formula, represents the set of negative emotional words;

[0210] The calculation formula for the score of uncertain words is:

[0211] ;

[0212] In the formula, represents the set of uncertainty words;

[0213] In S33, the calculation formula for emotional classification is:

[0214] ;

[0215] In the formula, represents the probability distribution of the emotional category under the given feature vector, represents the emotional category, represents the feature vector, represents the weight matrix, represents the bias term, represents the activation function;

[0216] In S34, the intensity of the emotional category The calculation formula is:

[0217]

[0218] In the formula, represents the th emotional category, represents the sigmoid function, represents the bias term of the emotional category;

[0219] In S35, the emotional state The calculation formula is:

[0220] ;

[0221] In the formula, represents the probability of the first emotional category, represents the probability of the second emotional category, represents the probability of the th emotional category, represents the intensity of the first emotional category, represents the intensity of the second emotional category, represents the th emotional category intensity, represents the first emotional category, represents the second emotional category, represents the th emotional category.

[0222] In the embodiment of the present invention, S4 includes the following sub-steps:

[0223] S41. According to the metaphor understanding result, extract the sorting score of the knowledge item, and use the highest sorting score as the answer basis;

[0224] S42. Generate a complete knowledge representation according to the answer basis;

[0225] S43. According to the metaphor understanding result and the emotional state, use the knowledge complexity adjustment function to adjust the representation method and complexity of the complete knowledge representation, and output the adapted knowledge.

[0226] In the embodiment of the present invention, in S41, the sorting score of the knowledge item is calculated by the formula:

[0227] ;

[0228] In the formula, represents the first weight coefficient, represents the second weight coefficient, represents the third weight coefficient, represents the question text, represents the knowledge item, represents the relevance score of the knowledge item, represents the importance score of the knowledge item, represents the timeliness score of the knowledge item;

[0229] In S43, the knowledge complexity adjustment function is calculated by the formula:

[0230] ;

[0231] In the formula, represents the complexity of the original knowledge, represents the emotional state, represents the metaphor understanding ability, represents the adjustment function based on the emotional state and metaphor understanding ability.

[0232] In an embodiment of the present invention, S5 includes the following sub-steps:

[0233] S51. Generate a joint feature representation according to the metaphor understanding result and the emotional state;

[0234] S52. Determine the mutual influence relationship between the metaphor understanding result and the emotional state;

[0235] S53. Generate a metaphor usage strategy and an emotional influence strategy according to the joint feature representation and the mutual influence relationship between the metaphor understanding result and the emotional state;

[0236] S54. Generate a metaphor-emotion joint set according to the metaphor usage strategy and the emotional influence strategy;

[0237] In S51, the joint feature representation has the following calculation formula:

[0238] ;

[0239] In the formula, represents the emotional state, represents the metaphor understanding ability, represents the multi-head attention mechanism;

[0240] In S52, the mutual influence relationship between the metaphor understanding result and the emotional state has the following calculation formula:

[0241] ;

[0242] In the formula, represents the bidirectional control recurrent cell, represents the vector concatenation;

[0243] In S53, the metaphor usage strategy has the following calculation formula:

[0244] ;

[0245] In the formula, represents the metaphor strategy generation function;

[0246] In S53, the emotional influence strategy has the following calculation formula:

[0247] ;

[0248] In the formula, represents the emotion strategy generation function;

[0249] In S54, the metaphor-emotion joint set The calculation formula is:

[0250] ;

[0251] In the formula, represents the joint feature representation, represents the non-linear mapping function;

[0252] In the embodiment of the present invention, S6 includes the following sub-steps:

[0253] S61. Construct a problem framework according to the metaphorical emotion joint set;

[0254] S62. Input the adapted knowledge into the problem framework, perform knowledge selection and knowledge integration, and generate the core content of the answer;

[0255] S63. Construct a metaphor selection function according to the metaphor usage strategy;

[0256] S64. Construct an emotion response generation function according to the metaphor selection function and the core content of the answer;

[0257] S65. Generate the final answer according to the emotion response generation function.

[0258] In S61, the calculation formula of the problem framework is:

[0259] ;

[0260] In the formula, represents the candidate framework, represents the set of predetermined answer frameworks, represents the metaphorical emotion joint set, represents, represents the problem intention;

[0261] In S62, the calculation formula for knowledge selection is:

[0262] ;

[0263] In the formula, represents the result of knowledge selection, represents the th knowledge item, represents the sorting score of the knowledge item, represents the knowledge selection threshold;

[0264] In S62, the calculation formula for knowledge integration is:

[0265] ;

[0266] In the formula, Represents the core content of the answer, represents the knowledge integration function;

[0267] In S63, the metaphor selection function The calculation formula is:

[0268] ;

[0269] In the formula, represents the candidate metaphor, represents the metaphor library, represents the matching degree calculation function, represents the metaphor usage strategy;

[0270] In S64, the emotional response generation function The calculation formula is:

[0271] ;

[0272] In the formula, represents the emotional influence strategy, represents the function of generating an emotional response based on the emotional influence strategy, the core content of the answer, and the selected metaphor;

[0273] In S65, the final answer The calculation formula is:

[0274] ;

[0275] In the formula, represents the answer optimization function.

[0276] In the embodiment of the present invention, the education automatic question answering method is implemented based on the education automatic question answering method system, and the system mainly includes the following six modules: user input processing module, metaphor recognition and understanding module, emotional state perception module, knowledge retrieval and reasoning module, metaphor-emotion joint modeling module, and personalized answer generation module.

[0277] Figure 2 Shows the operation effect of the user input processing module. For the input text "Please explain why DNA can be called the blueprint of life? I don't quite understand this metaphor.", the system performs word segmentation and part-of-speech tagging, identifies entities such as DNA, life, and blueprint, analyzes that the main intention is concept explanation (confidence 0.92) and the secondary intention is metaphor understanding (confidence 0.87), and extracts semantic features, including the theme (biology - molecular biology) and complexity (medium).

[0278] Figure 3Shows the running effect of the metaphor recognition and understanding module. For the input text "Please explain why DNA can be called the blueprint of life? I don't quite understand this metaphor.", the system recognized the metaphorical expression "DNA is the blueprint of life", calculated its semantic incoherence degree as 0.73 (higher than the threshold of 0.6), and determined it as a conceptual metaphor. The source domain is the architecture / engineering field (blueprint), and the target domain is molecular biology (DNA). At the same time, the system analyzed the mapping relationships, including the mapping of the design information on the blueprint to the genetic information in DNA (mapping strength 0.92) and the mapping of the construction guidance of the building to the development guidance of the organism (mapping strength 0.88).

[0279] Figure 4 Shows the running effect of the emotional state perception module. For the input text "Please explain why DNA can be called the blueprint of life? I don't quite understand this metaphor.", the system recognized the main emotional type as confusion (intensity 0.68, medium-high), and the secondary emotional type as concentration (intensity 0.45). The system analyzed the linguistic features (high frequency of interrogative words), emotional word features ("don't quite understand" is an indicator of confusion), and syntactic features (combination of interrogative sentence + declarative sentence), and calculated the confusion index as 0.72 and the concentration index as 0.48. Based on these analyses, the system recommended four response strategies: providing a detailed metaphorical explanation, using simplified language, providing visual examples, and adopting a step-by-step explanation method.

[0280] Figure 5 Shows the running effect of the knowledge retrieval and reasoning module. For the problem semantic representation "Metaphorical explanation of DNA as the blueprint of life", the system retrieved four relevant knowledge items: DNA structure and function (correlation score 0.93), storage and transmission of genetic information (correlation score 0.89), gene expression and protein synthesis (correlation score 0.82), and the role of DNA in biological development (correlation score 0.78). Through knowledge reasoning, the system generated three core knowledge points: DNA contains all the genetic information required for the development and function of an organism, DNA controls the synthesis of proteins through gene expression, thereby determining the characteristics of the organism, and changes in the DNA sequence can lead to changes in the characteristics of the organism, similar to how changes in the blueprint lead to changes in the building. Based on the user's confused state, the system adjusted the knowledge adaptively, reduced the knowledge complexity, increased intuitive explanations, and strengthened the metaphorical mapping relationship.

[0281] Figure 6Shows the running effect of the metaphor-emotion joint modeling module. For the input metaphor representation "DNA is the blueprint of life" (conceptual metaphor) and the emotional state "confusion" (intensity 0.68), the system calculates the attention weight of the source domain (blueprint) as 0.72, the attention weight of the target domain (DNA) as 0.65, and the attention weight of the mapping relationship as 0.83 through the attention mechanism. In the interactive feature extraction, the system analyzes the impact of the confusion state on metaphor understanding (the difficulty of metaphor understanding increases, coefficient 0.78) and the impact of metaphor complexity on the emotional state (the degree of confusion increases, coefficient 0.65). Based on these analyses, the system generates a metaphor usage strategy (simplify the metaphor + add specific mapping explanations, confidence 0.91) and an emotional response strategy (provide patient explanations + use intuitive analogies, confidence 0.87), and finally forms a joint strategy: simplify the DNA-blueprint metaphor, provide intuitive mapping explanations, and use visual aids.

[0282] Figure 7 Shows the running effect of the personalized answer generation module. For the question "Please explain why DNA can be called the blueprint of life? I don't quite understand this metaphor." and the joint strategy "simplify the DNA-blueprint metaphor, provide intuitive mapping explanations, and use visual aids", the system constructs an answer framework combining concept explanation and metaphor elaboration, with the framework structure of "introduction → basic concept explanation → detailed metaphor mapping → specific examples → summary". In terms of knowledge integration, the system integrates core knowledge points such as DNA structure and function, genetic information storage, and gene expression mechanism, reduces the use of professional terms, and increases basic concept explanations. In terms of metaphor strategy application, the system selects a simplified metaphorical expression "DNA is like an instruction manual containing all the instructions for building an organism" and clarifies the mapping relationship. In terms of emotional response generation, the system adds patient explanation statements for the user's confused emotion and uses a friendly and encouraging tone. The finally generated personalized answer clearly explains the metaphorical meaning of DNA as the blueprint of life and helps the user understand the function of DNA through the analogy of architectural blueprints.

[0283] Figure 8Shows the overall running effect of the system in processing a complete question. For the user question "Why does the flow of electric current in a circuit resemble the flow of water? I always have trouble understanding how electrons move.", the system first identifies the metaphorical expression "electric current resembles water flow", determines its source domain as the water flow system (fluid mechanics) and the target domain as the circuit system (electronics). At the same time, the system identifies the user's emotional state as confusion (intensity 0.75, high), with characteristics including a high frequency of interrogative words and expressions of uncertainty. In terms of knowledge retrieval, the system retrieves knowledge items such as the basic concept of electric current (relevance 0.92), Ohm's law (relevance 0.85), the movement of electrons in a conductor (relevance 0.89), and the hydraulic circuit analogy model (relevance 0.94). Through metaphor-emotion joint modeling, the system generates a metaphor strategy (simplify the metaphor + add explanations) and a response strategy (detail the mapping relationship), and suggests providing a visual analogy. In the process of answer generation, the system constructs a framework of concept explanation + metaphorical elaboration, integrates the concept of electric current and the water flow analogy model, applies the strategy of simplifying the water flow-electric current metaphor and clarifying the mapping relationship, as well as emotional responses of patient explanation, step-by-step elaboration, and use of intuitive analogies. The final generated system answer clearly explains the analogy between electric current and water flow, and helps the user understand the movement mode of electrons in a circuit through the analogy of a water pipe system.

[0284] Those of ordinary skill in the art will realize that the embodiments described herein are for helping the reader understand the principles of the present invention, and it should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those of ordinary skill in the art can make various other specific deformations and combinations that do not depart from the essence of the present invention based on the technical revelations disclosed in the present invention, and these deformations and combinations are still within the protection scope of the present invention.

Claims

1. An educational automatic question-answering method based on text metaphor processing and emotion perception, characterized in that It includes the following steps: S1. Collect the user's question text and output the question processing result; S2. Generate the metaphor understanding ability according to the question processing result; S3. Generate the emotional state for the user; S4. Output the adapted knowledge according to the metaphor understanding ability and the emotional state; S5. Generate the metaphor-emotion joint set according to the metaphor understanding ability and the emotional state; S6. Generate the final answer according to the adapted knowledge and the metaphor-emotion joint set.

2. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, wherein The S1 includes the following sub-steps: S11. Collect the user's question text and perform basic processing on the question text. Among them, the basic processing includes word segmentation processing, stop word removal processing, and part-of-speech tagging processing; S12. After completing the basic processing, extract the entities of the question text; S13. Extract the user's question intention according to the entities of the question text; S14. Extract the semantic features and context features of the question text according to the user's question intention and output the question processing result.

3. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, characterized in that, The S2 includes the following sub-steps: S21. Generate several metaphor candidates for the question text according to the question processing result, calculate the semantic incoherence degree of each metaphor candidate, and retain the metaphor candidates with a semantic incoherence degree greater than the set threshold; S22. Calculate the prediction value of the retained metaphor candidates, retain the metaphor candidates with a prediction value greater than the set probability threshold as the final metaphor; S23. Extract the source domain and target domain of the final metaphor and calculate the mapping relationship between the source domain and the target domain; S24. Generate the metaphor understanding ability according to the source domain, target domain and mapping relationship of the final metaphor.

4. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 3, characterized in that, In the S21, determine the part-of-speech collocation pattern set, and use the word pairs whose part-of-speech pairs belong to the part-of-speech collocation pattern set as metaphor candidates; In S21, the semantic incoherence degree of the metaphor candidate is calculated by the formula: ; In the formula, represents the word vector representation of the th word ; represents the vector norm. In S22, the predicted value of the retained metaphor candidate The calculation formula is as follows: ; In the formula, represents the context, represents the classification model, represents the sigmoid function, represents the metaphor label; In S23, the mapping relationship between the source domain and the target domain has the following expression: ; In the formula, represents the first source domain concept, represents the second source domain concept, represents the first target domain concept, represents the second target domain concept, represents the first mapping relationship type, represents the second mapping relationship type, represents the first mapping intensity, represents the second mapping intensity; In S24, the metaphor understanding ability is expressed as: , In the formula, represents the vector representation of the source domain, represents the vector representation of the target domain, represents the vector representation of the mapping relationship, represents the vector concatenation function.

5. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, characterized in that The S3 includes the following sub-steps: S31. Extract the language features and semantic features of the question text; S32. Extract the feature vectors according to the language features and semantic features of the question text; S33. Perform emotional classification according to the feature vectors; S34. Calculate the intensity of various emotional categories after classification; S35. Obtain the vector representation of the emotional state according to the intensity of various emotional categories as the emotional state.

6. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 5, characterized in that, In the S31, the language features include the frequency of interrogative words, the frequency of fuzzy determiners, the frequency of emphasizing words, and the syntactic complexity; The frequency of the interrogative word The calculation formula is as follows: ; In the formula, represents the number of interrogative words, represents the total number of words; The frequency of the fuzzy qualifier The calculation formula is as follows: ; In the formula, represents the number of fuzzy determiners; The frequency of the emphasizing word The calculation formula is as follows: ; In the formula, represents the number of emphasis words; The syntactic complexity is calculated by the formula: ; In the formula, represents the number of clauses, represents the number of sentences; In the S31, the semantic features include the score of positive emotional words, the score of negative emotional words, and the score of uncertain words; The score of the positive emotion words Calculation formula: ; In the formula, represents an emotional word, represents a set of positive emotional words, represents the weight of the emotional word; The score of the negative emotion words Calculation formula: ; In the formula, represents the set of negative emotion words; The score of the uncertain word The calculation formula is as follows: ; In the formula, represents the set of uncertainty words; In the S33, the calculation formula for performing emotional classification is: ; wherein, represents the probability distribution of the sentiment category under the condition of a given feature vector, represents the sentiment category, represents the feature vector, represents the weight matrix, represents the bias term, represents the activation function; In S34, the intensity of the emotion category is calculated as follows: ; In the formula, represents the th emotion category, represents the sigmoid function, represents the bias term of the emotion category; In S35, the emotional state is calculated by the formula: ; Wherein, represents the probability of the first emotion category, represents the probability of the second emotion category, represents the probability of the nth emotion category, represents the intensity of the first emotion category, represents the intensity of the second emotion category, represents the intensity of the nth emotion category, represents the first emotion category, represents the second emotion category, represents the nth emotion category.

7. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, characterized in that The S4 includes the following sub-steps: S41. Extract the ranking score of the knowledge item according to the metaphor understanding result, and use the highest ranking score as the answer basis; S42. Generate the complete knowledge representation according to the answer basis; S43. Adjust the representation method and complexity of the complete knowledge representation by using the knowledge complexity adjustment function according to the metaphor understanding result and the emotional state, and output the adapted knowledge.

8. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 7, wherein In S41, the sorting score of the th knowledge item is calculated as follows: ; Wherein, represents the first weight coefficient, represents the second weight coefficient, represents the third weight coefficient, represents the question text, represents the th knowledge item, represents the relevance score of the knowledge item, represents the importance score of the knowledge item, represents the timeliness score of the knowledge item; In S43, the knowledge complexity adjustment function has the following calculation formula: ; In the formula, represents the complexity of the original knowledge, represents the emotional state, represents the metaphor understanding ability, represents the adjustment function based on the emotional state and the metaphor understanding ability.

9. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, characterized in that, The S5 includes the following sub-steps: S51. Generate the joint feature representation according to the metaphor understanding result and the emotional state; S52. Determine the mutual influence relationship between the metaphor understanding result and the emotional state; S53. Generate a metaphor usage strategy and an emotional influence strategy based on the mutual influence relationship between the joint feature representation, the metaphor understanding result, and the emotional state; S54. Generate a metaphor-emotion joint set according to the metaphor usage strategy and the emotional influence strategy; In S51, the combined feature representation has the following calculation formula: ; In the formula, represents the emotional state, represents the metaphor understanding ability, represents the multi-head attention mechanism; In S52, the mutual influence relationship between the metaphor understanding result and the emotional state The calculation formula is as follows: ; In the formula, represents a two-way control loop cell, represents vector concatenation; In S53, the metaphor usage strategy has the following calculation formula: ; In the formula, represents the metaphor strategy generation function; In S53, the emotional influence strategy has the following calculation formula: ; In the formula, represents the emotion strategy generation function; In the S54, the metaphorical emotion combination set The calculation formula is as follows: ; In the formula, represents the joint feature representation, represents the non-linear mapping function.

10. The educational automatic question answering method based on text metaphor processing and emotion perception according to claim 1, characterized in that The said S6 includes the following sub-steps: S61. Construct a problem framework based on the metaphor-emotion joint set; S62. Input the adapted knowledge into the problem framework, perform knowledge selection and knowledge integration, and generate the core content of the answer; S63. Construct a metaphor selection function according to the metaphor usage strategy; S64. Construct an emotional response generation function based on the metaphor selection function and the core content of the answer; S65. Generate the final answer according to the emotional response generation function; In S61, the problem framework has the following calculation formula: ; In the formula, represents a candidate framework, represents a set of predetermined response frameworks, represents a set of metaphorical emotion associations, represents the reasonable probability of selecting a candidate framework under a specific question intention and emotional metaphor background, represents the question intention; In the said S62, the calculation formula for knowledge selection is: ; In the formula, represents the result of knowledge selection, represents the th knowledge item, represents the sorting score of the knowledge item, represents the knowledge selection threshold; In the said S62, the calculation formula for knowledge integration is: ; In the formula, represents the core content of the answer, represents the knowledge integration function; In the above S63, the metaphor selection function has the following calculation formula: ; In the formula, represents a candidate metaphor, represents a metaphor library, represents a matching degree calculation function, represents a metaphor usage strategy; In S64, the calculation formula of the emotional response generation function is as follows: ; In the formula, represents an emotional influence strategy, represents a function for generating an emotional response based on the emotional influence strategy, the core content of the answer, and the selected metaphor; In the above S65, the final answer The calculation formula is as follows: ; In the formula, represents the answer optimization function.

Citation Information

Patent Citations

  • Emotion metaphor recognition method and device based on knowledge extraction and co-evolution reasoning

    CN120011864A

  • Sparse Factor Analysis for Learning Analytics and Content Analytics

    US20140272914A1

Cited By

  • Program content generation method and system combined with natural language processing

    CN120763320A