A multi-round emotional interaction dialogue method and system for an educational robot

By recording and analyzing degree words and sentiment words in learners' speech in educational robots, emotional level values ​​are generated and speech parameters are adjusted. This solves the problems of emotional state transitions and repetitive responses in multi-round emotional interactions, improves the precision of emotional judgment and the continuity of teaching, and enhances the interactive experience.

CN123182707APending Publication Date: 2026-11-27KUNMING MEET ABBY HOUSE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611522352.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies for multi-turn emotional interaction dialogues for educational robots, emotion determination relies on the matching of emotion word categories within a single-turn text. It does not consider the word order distance between degree words and emotion tendency words, or the boundary truncation of punctuation transition words. This results in a single dimension and coarse granularity for dividing emotion intensity, making it impossible to distinguish different levels of expression under the same emotion tendency. Furthermore, the updates of the multi-turn interaction state do not take into account the trend of emotion changes in consecutive turns, leading to large jumps in emotion state, repetition or deviation from the teaching rhythm in responses, abrupt tone switching, and a reduced interactive experience.

Method used

By acquiring the speech-to-text of the learner in the current round of the educational robot, recording the order of degree words, sentiment words, negation words, transition words, and punctuation words, calculating word order distance and boundary positions, generating sentiment level values, combining the sentiment level values ​​of the previous two rounds and the current state number, filtering candidate responses, and adjusting voice parameters to achieve a smooth transition, ensuring the continuity of emotional state and the coherence of teaching.

Benefits of technology

It improves the precision and accuracy of emotion intensity judgment, ensures the smoothness of emotional transition in multi-turn dialogues, matches teaching progress and avoids repetitive responses, realizes a gradual transition of voice tone in multi-turn dialogues, and enhances the naturalness and immersion of interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123182707A_ABST
    Figure CN123182707A_ABST
Patent Text Reader

Abstract

The application discloses a multi-round emotional interaction dialogue method and system for an educational robot, and relates to the technical field of artificial intelligence and intelligent voice interaction. The prior art has the problems of coarse granularity of emotional intensity determination, no transition constraint for multi-round interaction state jump, single dimension of reply matching, and harsh switching of voice tone, and is difficult to adapt to the multi-round emotional interaction requirements of an educational scene. The scheme first acquires learner voice transcription text, marks each word item and punctuation position, and calculates the action span of degree words on emotional tendency words. Five-level emotional grading is completed based on the sectional degree word density, the state jump permission is generated in combination with the difference of three consecutive emotional grades, the reply sequence position is determined through the triple screening of knowledge points, state permission and historical replies, the four voice parameters of speech speed, fundamental frequency, energy and end pause are adjusted according to the jump permission, and output is played, and the tone parameter interval is established. The scheme effectively improves the emotional determination accuracy and the smoothness of multi-round dialogue emotion transition, and guarantees the teaching coherence and the naturalness of interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence and intelligent voice interaction technology, and in particular to a multi-turn emotional interaction dialogue method and system for educational robots. Background Technology

[0002] The field of artificial intelligence and intelligent voice interaction technology encompasses technologies such as voice acquisition, voice activity detection, automatic speech recognition, speech content parsing, speaker emotional state determination, dialogue context recording, user intent recognition, dialogue state tracking, response content generation, and speech synthesis. This field primarily processes the sound and language content during continuous voice interaction. By analyzing the start and end points of speech, pitch, intensity, speech rate, spectral characteristics, recognized text, keywords, sentence structure, contextual referential relationships, and the content of previous and subsequent rounds of dialogue, it determines the current speech content, user intent, emotional category, and dialogue state. Based on the current dialogue state, historical rounds, preset knowledge content, and interaction rules, it determines the subsequent response text. Finally, speech synthesis converts the response text into playable speech. This is an interdisciplinary technical field involving speech perception, language understanding, emotion determination, and continuous dialogue management.

[0003] Among them, multi-turn emotional interactive dialogue for educational robots refers to the continuous determination of the learner's current expression, interaction intention, and emotional state based on the voice content input by the learner in each round and the historical dialogue content during continuous multi-turn communication, and the determination of the interaction mode for subsequent dialogue content accordingly. The technical aspects of this topic cover learner voice start and end position detection, speech-to-text acquisition, pitch change analysis, voice energy analysis, speech rate statistics, emotion word recognition, negation word recognition, degree word recognition, sentence emotion tendency determination, semantic association between previous and subsequent rounds, reference content determination, current dialogue topic determination, user intent classification, emotion category determination, historical emotion state recording, continuous round dialogue status update, response statement selection, and response voice generation. It is usually based on the acoustic characteristics of the current round of speech, words and sentence patterns in the current round of recognized text, previous rounds of dialogue records, preset teaching knowledge content, preset emotion category, and preset dialogue rules to determine the current interaction state, and then determine the response statement from the candidate response content corresponding to the current teaching topic, user intent, and emotion category, and then convert the response statement into voice output.

[0004] Current sentiment assessment methods largely rely on single-round text-based sentiment word category matching, neglecting the word order distance between degree words and sentiment tendency words, as well as the boundary truncation effect of punctuation and transition words. The sentiment intensity classification is singular and coarse-grained, failing to distinguish different levels of expression within the same sentiment tendency. When encountering complex sentences containing transition words and multiple punctuation marks, it easily confuses the sentiment tendencies of different semantic segments, causing sentiment assessment results to deviate from the actual expression. Multi-round interactive state updates are based solely on single-round sentiment assessment results, failing to consider the trend and duration of sentiment changes in consecutive rounds. State transitions lack transition constraint mechanisms, making them prone to errors. Significant shifts in emotional state disrupt the coherence and naturalness of the dialogue. Response filtering is based solely on matching the teaching topic and emotional category, without considering teaching rounds or historical responses for deduplication. This easily leads to repetitive responses or responses deviating from the current teaching rhythm. The voice output uses a fixed mode with parameters corresponding to the emotional category, failing to smoothly transition based on the previous round's output parameters. The tone switching in multiple rounds of dialogue is abrupt, reducing the interactive experience. For example, when learners express complex emotions containing transitions, the judgment results are prone to bias; when emotions gradually change over multiple rounds, the tone of the response is prone to abrupt jumps. Summary of the Invention

[0005] To address the technical problems existing in the prior art, embodiments of the present invention provide a multi-turn emotional interaction dialogue method and system for educational robots. The technical solution is as follows: A multi-turn emotional interaction dialogue method for educational robots includes the following steps: S1: Obtain the speech-to-text of the learner in the current round of the educational robot, record the word order of degree words, sentiment words, negation words, transition words and punctuation words, compare the word order distance and boundary position between degree words and sentiment words, and obtain the effect span value; S2: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the segment and the sentiment direction within the same segment. Calculate the degree word density according to the number of effective degree words and the total number of words in the segment. Divide the density range from zero to one into five segments at 0.2 intervals. Read the segment number corresponding to the current density. Segments after the transition are counted independently, and segments with the same direction are counted together to generate the sentiment level value. S3: Based on the emotion level value, call the emotion level values ​​of the previous two rounds, obtain the difference between adjacent rounds, determine the direction of the two difference between the two rounds and the number of consecutive rounds, and generate a state transition permission value in combination with the current state number of the educational robot; S4: Based on the status transition permission value, call the teaching round marker and candidate reply number, filter the candidates by knowledge point number, status permission number and previous round reply number, and obtain the reply sequence value; S5: Based on the response sequence value, call the response text and emotion level value, read the previous round of speech rate, base frequency, energy, and sentence-end pause, adjust the four values ​​according to the state jump permission value, and play the educational robot's voice to obtain the tone parameter range.

[0006] As a further aspect of the present invention, the step of obtaining S1 is as follows: S101: Obtain the speech-transcribed text of the learner in the current round of the educational robot, number each word item sequentially according to the order of appearance of the text, record the first word item number as 1, and the subsequent word item numbers are incremented by 1, read the degree words, sentiment words, negation words, transition words and punctuation marks in the conversation word item table, compare the consistency of each transcribed word item with the corresponding mark, record the hit word item category number, word order number and punctuation mark number, and generate word item position sequence value; S102: Based on the word position sequence value, call the word order number of each sentiment word and the word order number of the degree words before and after it, read the word order numbers of the negation words, transition words and punctuation between them, calculate the difference between the degree words and the sentiment words, and register two differences when degree words are present before and after them. Register the numbers of the nearest punctuation, negation words and transition words in the order of the text to obtain the word interval value. S103: Based on the term interval value, call the punctuation position, negation word position and transition word position between degree words and sentiment words, compare whether each boundary term falls into the word order interval of the two, and truncate the corresponding word order segment when a period, question mark, exclamation mark or semicolon falls into the interval, and retain the ordinal distance between degree words and sentiment words on the same side of the transition word when the transition word falls into the interval, and obtain the effect span value.

[0007] As a further aspect of the present invention, the step of obtaining S2 is as follows: S201: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the same action segment, and the sentiment direction. Call the degree word sequence number and the start and end numbers of the action segment to calculate the number of degree words falling within the range of the start and end numbers. Register the corresponding sentiment direction according to the position of the sentiment words. The number of the transition word is used as the end number of the segment, and the number of the punctuation mark is used as the boundary number of the word. The effective degree word quantity value is obtained. S202: Based on the effective degree word count value, call the total number of words in the corresponding functional segment and the start and end numbers of the segment, read the number of the transition word and retain the count of independent words in the segment after the transition, calculate the ratio of the number of effective degree words to the total number of words in the corresponding segment, and count the continuous total number of words in the same direction if the direction is consistent and does not cross the transition word segment. Record the numerator count, denominator count and segment number to obtain the degree word density value. S203: Based on the degree word density value, call the density range from zero to one and the interval value of 0.2, and register 0 to 0.2, 0.2 to 0.4, 0.4 to 0.6, 0.6 to 0.8, and 0.8 to 1 as five density segments in sequence. Determine whether the current degree word density value falls into the corresponding segment number of the start and end boundary. If the boundaries coincide, register according to the interval on the right, and record the start and end boundary values ​​and segment number of the corresponding density segment, and obtain the density segment number value; S204: Based on the density segment number value, call the sentiment direction, transition word position and word count of the same direction segment for each function segment. After the transition, the segment retains an independent segment number. The consecutive same direction segments are re-summarized according to the effective degree word count value and the total number of words in the segment. The text order of the summarized density corresponding segment number and the independent segment number is compared. The selected segment number, sentiment direction and current round number are registered according to the segment number corresponding to the end sentiment direction, and the sentiment level value is generated.

[0008] As a further aspect of the present invention, the step of obtaining S3 is as follows: S301: Based on the emotional level value, call the emotional level values ​​of the previous two rounds, read the current round number, the previous round number, and the round number before that from the current conversation round record, arrange the three emotional level numbers in order of round, calculate the difference between the current round and the previous round number and the difference between the previous round and the round before that, and record the positive and negative signs, absolute values, starting round number, and ending round number of the two differences respectively to obtain the level difference value; S302: Based on the grade difference value, call the positive and negative signs of the two differences, the absolute value, the starting round number and the ending round number, read the two signs in the order of adjacent rounds, judge the combination of signs, register the positive positive combination as continuous increase, register the negative negative combination as continuous decrease, register one positive and one negative as direction reversal, register the corresponding holding round when any difference is zero, and register the number of consecutive rounds according to the number of consecutive occurrences of the same direction sign, and generate continuous direction value; S303: Based on continuous direction values, call the current state number of the educational robot and the adjacent legal state numbers, read the number of consecutive rounds in the same direction and the absolute value of the difference between the two levels, compare the sum of the two absolute values ​​with the corresponding values ​​of the two-level state span, register the permission to cross the two levels when the continuous directions are consistent and the sum reaches two, register the permission to maintain the permission or the permission of the adjacent level when the direction is reversed or the sum does not reach two, and obtain the state jump permission value.

[0009] As a further aspect of the present invention, the step of obtaining S4 is as follows: S401: Based on the status transition permission value, call the teaching round marker and candidate reply number, read the knowledge point number and status permission number corresponding to the current teaching round, filter the knowledge point number registered in each candidate reply with the current knowledge point number, retain candidate replies with the same number, register the number of retained candidate replies, candidate reply number and corresponding status permission number, and generate candidate matching quantity value; S402: Based on the candidate matching value, call the retained candidate response number, corresponding status permission number and previous round response number, compare each candidate response status permission number with the status jump permission value, delete candidates with inconsistent permission numbers, and then check the remaining candidate response numbers with the previous round response numbers one by one, register the number of candidates with no duplicate numbers and the order of numbers, and obtain the response selection value; S403: Based on the available response values, retrieve the number of candidate responses with no duplicate numbers, the order of candidate response numbers, the current teaching round marker, and the knowledge point number. Sort the candidate responses according to the response order corresponding to the teaching round marker. For items with the same knowledge point number, assign an order number by incrementing along the original candidate number order. Read the first available order number and its candidate response number to obtain the response order value.

[0010] As a further aspect of the present invention, the step of obtaining S5 is as follows: S501: Based on the response sequence value, call the response text and emotion level value, read the speech rate, average fundamental frequency, average speech energy and sentence-end pause duration from the previous round of speech playback record in the current conversation, read the emotion level number and upper and lower limits of the four parameters in the speech output configuration, compare the emotion level value with the level number, register the upper and lower limits of the parameters with the same number, the measured values ​​of the four parameters in the previous round and the number of characters in the response text, and generate an acoustic reference value; S502: Based on the acoustic reference value, call the state jump permission value, read the speech rate step size, fundamental frequency step size, energy step size and pause step size in the speech output configuration, adjust the four measured values ​​of the previous round according to the number of steps corresponding to the hold permission, adjacent level permission, and cross two level permission, take the corresponding boundary value when the current emotion level parameter exceeds the upper and lower limits, and record the four values ​​and boundary number to obtain the parameter shift value; S503: Based on the parameter movement value, call the reply text and the upper and lower limits of the current emotion level parameter, read the adjusted speech rate, average fundamental frequency, average speech energy and sentence end pause duration, determine whether the four values ​​fall into their respective upper and lower limits, keep the original value within the interval, take the upper limit value for items that exceed the upper limit, take the lower limit value for items that exceed the lower limit, and register the boundary number and reply sequence number of each item at the same time, and obtain the playback control value. S504: Based on the playback control value, call the corresponding reply text, write the speech rate, average fundamental frequency, average speech energy and sentence-end pause duration into the voice output interface of the educational robot and play it, collect the four actual output values ​​in the current playback record, calculate the boundary distance between each actual output value and the upper and lower limits of the current emotion level parameter, register the value range according to the four lower and upper limits, and establish the tone parameter range.

[0011] A multi-turn emotional interaction dialogue system for educational robots, the system comprising:

[0012] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least: a term function localization module, an emotion intensity grading module, a state transition control module, a teaching response selection module, and a voice parameter output module; The word function localization module: acquires the speech-transcribed text of the learner in the current round of the educational robot, records the word order positions of degree words, sentiment words, negation words, transition words and punctuation words, compares the word order distance and boundary positions between degree words and sentiment words, and obtains the function span value; The emotional intensity grading module reads the number of degree words, the position of emotional tendency words, the total number of words in the segment, and the emotional direction within the same functional segment based on the effect span value. It calculates the degree word density according to the number of effective degree words and the total number of words in the segment. The density range of zero to one is divided into five segments at 0.2 intervals. The segment number corresponding to the current density is read. Segments after the transition are counted independently, and segments with the same direction are counted together to generate an emotional level value. The state transition control module: based on the emotion level value, calls the emotion level values ​​of the previous two rounds, obtains the level difference between adjacent rounds, determines the direction of the two level differences and the number of consecutive rounds, and generates a state transition permission value in combination with the current state number of the educational robot; The teaching response selection module: calls the teaching round marker and candidate response number according to the status jump permission value, filters the candidates by knowledge point number, status permission number and previous round response number, and obtains the response sequence value; The voice parameter output module: based on the response sequence value, it calls the response text and emotion level value, reads the previous round of speech rate, fundamental frequency, energy, and sentence-end pause, adjusts the four values ​​according to the state jump permission value, and plays the educational robot's voice to obtain the tone parameter range.

[0013] In this invention, the influence span of degree words on sentiment words is determined by word order position marking and boundary word truncation. A five-level sentiment intensity classification is achieved by combining degree word density within a segment. Independent counting of segments after a transition and merging counting of segments moving in the same direction balance sentence structure integrity and sentiment continuity, improving the precision and accuracy of sentiment intensity judgment. The direction of change and the number of consecutive rounds are determined based on the difference in sentiment levels over three consecutive rounds. A state transition permission is generated based on the current state, constraining the amplitude of sentiment state transitions and ensuring smoothness of sentiment transitions in multi-round dialogues. Candidate responses are filtered through three layers: knowledge point number, state permission number, and previous round response number. The response order is determined by sorting according to teaching rounds, matching teaching progress while avoiding repetitive response content. Based on the previous round's speech parameters, the speech rate, fundamental frequency, energy, and sentence-ending pause parameters are adjusted according to the step size corresponding to the state transition permission. After boundary verification, the output is completed and a parameter range is established, achieving a gradual transition of speech tone in multi-round dialogues, improving the naturalness and immersion of interaction, and providing full-link support for the sentiment adaptability and teaching coherence of multi-round dialogues in educational scenarios. Attached Figure Description

[0014] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0015] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0016] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0017] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0018] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0019] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0020] Please see Figure 1 This invention provides a technical solution: a multi-turn emotional interaction dialogue method for educational robots, comprising the following steps: S1: Obtain the speech-to-text of the learner in the current round of the educational robot, record the word order of degree words, sentiment words, negation words, transition words and punctuation words, compare the word order distance and boundary position between degree words and sentiment words, and obtain the effect span value; S2: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the segment and the sentiment direction within the same segment. Calculate the degree word density according to the number of effective degree words and the total number of words in the segment. Divide the density range from zero to one into five segments at 0.2 intervals. Read the segment number corresponding to the current density. Segments after the transition are counted independently, and segments with the same direction are counted together to generate the sentiment level value. S3: Based on the emotion level value, call the emotion level values ​​of the previous two rounds, obtain the difference between adjacent rounds, determine the direction of the two difference between the two rounds and the number of consecutive rounds, and generate a state transition permission value in combination with the current state number of the educational robot; S4: Based on the status transition permission value, call the teaching round marker and candidate reply number, filter the candidates by knowledge point number, status permission number and previous round reply number, and obtain the reply sequence value; S5: Based on the response sequence value, call the response text and emotion level value, read the previous round of speech rate, base frequency, energy, and sentence-end pause, adjust the four values ​​according to the state jump permission value, and play the educational robot's voice to obtain the tone parameter range.

[0021] Furthermore, the steps to obtain S1 are as follows: S101: Obtain the speech-transcribed text of the learner in the current round of the educational robot, number each word item sequentially according to the order of appearance of the text, record the first word item number as 1, and the subsequent word item numbers are incremented by 1, read the degree words, sentiment words, negation words, transition words and punctuation marks in the conversation word item table, compare the consistency of each transcribed word item with the corresponding mark, record the hit word item category number, word order number and punctuation mark number, and generate word item position sequence value; Retrieve the speech-to-text of the current learner, assign consecutive integer numbers starting from 1 according to the order of word appearance, retrieve the pre-stored set of degree words, sentiment words, negation words, transition words, and punctuation marks, match the transcribed words with the elements in the set word by word, and record the category number, word order number, and punctuation number of the matched items. For example, in transcribing "Is this question really difficult?", "really" matches a degree word, "difficult" matches a negative sentiment word, and the question mark matches a punctuation mark. Record the corresponding numbers and generate word position sequence values.

[0022] S102: Based on the word position sequence value, call the word order number of each sentiment word and the word order number of the degree words before and after it, read the word order numbers of the negation words, transition words and punctuation between them, calculate the difference between the degree words and the sentiment words, and register two differences when degree words are present before and after them. Register the numbers of the nearest punctuation, negation words and transition words in the order of the text to obtain the word interval value. Based on the word position sequence value, the word order number of each sentiment word is extracted, the word order numbers of degree words within its range are retrieved, the word order numbers of negation words, transition words and punctuation between the two types of words are read, the difference between the order numbers of degree words and sentiment words is calculated, and two differences are calculated separately when degree words exist before and after each other, and the corresponding numbers of the nearest punctuation, negation words and transition words are registered according to the text sequence. For example, in "It's really hard but also very interesting", the difference between the order numbers of the two groups of words is calculated separately to obtain the word interval value.

[0023] S103: Based on the term interval value, call the punctuation position, negation word position and transition word position between degree words and sentiment words, compare whether each boundary term falls into the word order interval of the two, and truncate the corresponding word order segment when a period, question mark, exclamation mark or semicolon falls into the interval, and retain the sequence distance between degree words and sentiment words on the same side of the transition word when the transition word falls into the interval, and obtain the effect span value; Based on the word interval value, the word order intervals of degree words and sentiment words are extracted. Each interval is checked to see if it falls within a period, question mark, exclamation mark, semicolon, or transition word. When it falls within a sentence-ending punctuation mark, the corresponding word order segment is truncated. When it falls within a transition word, the order distance between the two types of words on the same side of the transition word is retained. For example, in "Really difficult. But very interesting", the period truncates the first half of the interval, and the transition word separates the second half of the interval to obtain the effect span value.

[0024] Furthermore, the steps to obtain S2 are as follows: S201: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the same action segment, and the sentiment direction. Call the degree word sequence number and the start and end numbers of the action segment to calculate the number of degree words falling within the range of the start and end numbers. Register the corresponding sentiment direction according to the position of the sentiment words. The number of the transition word is used as the end number of the segment, and the number of the punctuation mark is used as the boundary number of the word. The effective degree word quantity value is obtained. Based on the span value, the start and end numbers of each action segment are retrieved, the word numbers within the segment are traversed and degree word markers are matched one by one, the number of matching hits is counted, the sentiment direction markers corresponding to the sentiment tendency words within the segment are read, the transition word number is set as the segment termination boundary, and the sentence end punctuation number is set as the word boundary. For example, if a certain action segment contains 12 words, 3 degree words are matched, the sentiment tendency words correspond to the negative direction, and the transition word is located in the 8th position, the effective degree word count value is obtained.

[0025] S202: Based on the effective degree word count value, call the total number of words in the corresponding functional segment and the start and end numbers of the segment, read the number of the transition word and retain the count of independent words in the segment after the transition, calculate the ratio of the number of effective degree words to the total number of words in the corresponding segment, and count the continuous total number of words in the same direction if the direction is consistent and does not cross the transition word segment. Record the numerator count, denominator count and segment number to obtain the degree word density value. Based on the effective degree word count, the total number of words in the corresponding segment and the start and end numbers are retrieved. The transition word numbers are identified and the number of words in the segment after the transition is counted separately. The number of effective degree words is divided by the total number of words in the corresponding segment. For continuous segments with the same direction and no transition words separating them, the total number of words is calculated by merging them. The numerator, denominator and segment number are recorded. For example, if two consecutive segments in the same direction have 8 and 7 words respectively, and 2 and 2 effective degree words respectively, the total number after merging is 15. The density is calculated to be about 0.267, and the degree word density value is obtained.

[0026] S203: Based on the degree word density value, call the density range from zero to one and the interval value of 0.2, and register 0 to 0.2, 0.2 to 0.4, 0.4 to 0.6, 0.6 to 0.8, and 0.8 to 1 as five density segments in sequence. Determine whether the current degree word density value falls into the corresponding segment number of the start and end boundary. If the boundaries coincide, register according to the interval on the right, and record the start and end boundary values ​​and segment number of the corresponding density segment, and obtain the density segment number value; Based on the density value of the degree word, retrieve the density range from 0 to 1 and the 0.2 interval parameter, and divide it into five consecutive density ranges. The boundary value of the range belongs to the right range. Compare the current density value with the start and end values ​​of each range to determine the range number it falls into. Record the corresponding range boundary and segment number. For example, if the density value is 0.35, it falls into the range of 0.2 to 0.4, and the corresponding segment number is 2. Obtain the density segment number value.

[0027] S204: Based on the density segment number value, call the sentiment direction, transition word position and word count of the same direction segment in each functional segment. After the transition, the segment retains an independent segment number. Continuous same direction segments are re-summed according to the effective degree word count value and the total number of segment words. Compare the text order of the summed density corresponding segment number with the independent segment number. Register the selected segment number, sentiment direction and current round number according to the segment number corresponding to the end sentiment direction to generate the sentiment level value. Based on the density segment number value, the sentiment direction, transition word position and word count of each segment are retrieved. After the transition, the segment retains an independent segment number. For consecutive segments in the same direction, the effective word count and total number of words are summarized and the corresponding segment number is calculated. The text order of the summarized segment number and the independent segment number is compared. The corresponding segment number and round number are registered according to the sentiment direction at the end. For example, after summarizing two consecutive segments in the same direction, the corresponding segment number is 2. The end is positive, and the sentiment level value is generated.

[0028] Furthermore, the steps to obtain S3 are as follows: S301: Based on the emotional level value, call the emotional level values ​​of the previous two rounds, read the current round number, the previous round number, and the round number before that from the current conversation round record, arrange the three emotional level numbers in order of round, calculate the difference between the current round and the previous round number and the difference between the previous round and the round before that, and record the positive and negative signs, absolute values, starting round number, and ending round number of the two differences respectively to obtain the level difference value; Based on the emotional level value, retrieve the round number and corresponding emotional level number of the current round, previous round, and previous round in the current conversation record. Arrange the three sets of numbers in round order. Subtract the previous round's level number from the current round's level number to obtain the first difference, and subtract the previous round's level number from the previous round's level number to obtain the second difference. Record the sign, absolute value, and corresponding start and end round numbers of the two differences. For example, if the current round is level 3, the previous round is level 2, and the previous round is level 1, the differences are +1 and +1 respectively. The corresponding signs are both positive, and the absolute values ​​are both 1, thus obtaining the level difference.

[0029] S302: Based on the grade difference value, call the positive and negative signs of the two differences, the absolute value, the starting round number and the ending round number, read the two signs in the order of adjacent rounds, judge the combination of signs, register the positive positive combination as continuous increase, register the negative negative combination as continuous decrease, register one positive and one negative as direction reversal, register the corresponding holding round when any difference is zero, and register the number of consecutive rounds according to the number of consecutive occurrences of the same direction sign, and generate continuous direction value; Based on the grade difference, retrieve the sign, absolute value, starting round number, and ending round number of the two differences. Read the two symbols in the order of adjacent rounds and compare the symbol combination results. If both are positive, register a continuous increase; if both are negative, register a continuous decrease; if one is positive and the other is negative, register a direction reversal; if any difference is zero, register the corresponding round to be maintained. Count the number of consecutive occurrences of the same direction symbol. For example, if both symbols are positive, the consecutive number is 2, and a continuous direction value is generated.

[0030] S303: Based on continuous direction values, call the current state number of the educational robot and the adjacent legal state numbers, read the number of consecutive rounds in the same direction and the absolute value of the difference between the two levels, compare the sum of the two absolute values ​​with the corresponding value of the span between the two levels, register the permission to cross the two levels when the continuous direction is consistent and the sum of the values ​​reaches two, register the permission to maintain the permission or the permission of the adjacent level when the direction is reversed or the sum of the values ​​does not reach two, and obtain the state jump permission value. Based on continuous direction values, retrieve the current state number and adjacent legal state numbers of the educational robot, read the number of consecutive rounds in the same direction and the absolute value of the difference between the two levels, calculate the sum of the two absolute values, and compare the sum with the corresponding value of 2 for the span between the two levels. If the continuous directions are consistent and the sum reaches 2, register the permission to cross two levels. If the direction is reversed or the sum does not reach 2, register the permission to maintain or the permission of the adjacent level. For example, if the absolute values ​​increase continuously and the sum is 2, register the permission to cross two levels and obtain the state jump permission value.

[0031] Furthermore, the steps to obtain S4 are as follows: S401: Based on the status transition permission value, call the teaching round marker and candidate reply number, read the knowledge point number and status permission number corresponding to the current teaching round, filter the knowledge point number registered in each candidate reply with the current knowledge point number, retain candidate replies with the same number, register the number of retained candidate replies, candidate reply number and corresponding status permission number, and generate candidate matching quantity value; Based on the state transition permission value, retrieve the knowledge point number and state permission number corresponding to the current teaching round, traverse all candidate response knowledge point numbers, compare them one by one with the current knowledge point number, retain candidate responses with the same number value, and count the number of retained items, the corresponding number and state permission number. For example, if the current knowledge point number is 03, there are 8 candidate responses, of which 5 knowledge point numbers match, retain these 5 responses and record the corresponding information, and generate the candidate matching quantity value.

[0032] S402: Based on the candidate matching value, call the retained candidate response number, corresponding status permission number and previous round response number, compare each candidate response status permission number with the status jump permission value, delete candidates with inconsistent permission numbers, and then check the remaining candidate response numbers with the previous round response numbers one by one, register the number of candidates with no duplicate numbers and the order of numbers, and obtain the response selection value; Based on the candidate matching value, retrieve the retained candidate response number, the corresponding status permission number, and the previous round response number. Compare each candidate response status permission number with the status transition permission value, and eliminate items with mismatched numbers. Then, compare the remaining candidate response numbers with the previous round response numbers one by one, and count the number of candidate items with unique numbers and their order. For example, if the status transition permission value is an adjacent level permission, eliminate 2 mismatched items. Of the remaining 3 items, 1 item has the same number as the previous round response number. Keep 2 items and record their order to obtain the response selection value.

[0033] S403: Based on the available response values, retrieve the number of candidate responses without duplicate numbers, the order of candidate response numbers, the current teaching round marker, and the knowledge point number. Sort the candidate responses according to the response order corresponding to the teaching round marker. For items with the same knowledge point number, assign an order number by incrementing along the original candidate number order. Read the first available order number and its candidate response number to obtain the response order value. Based on the selectable response values, retrieve the number of non-duplicate candidate options, the order of candidate response numbers, the current teaching round marker, and the knowledge point number. Sort the candidate responses according to the response order corresponding to the teaching round marker. For items with the same knowledge point number, assign a sequence number in the original candidate number order. Read the sequence number of the first item in the sort and its corresponding candidate response number. For example, if the teaching round marker corresponds to a forward sort, assign sequence number 1 and 2 to the two candidates in the same order. Read the number corresponding to sequence number 1 to obtain the response sequence value.

[0034] Furthermore, the steps to obtain S5 are as follows: S501: Based on the response sequence value, call the response text and emotion level value, read the speech rate, average fundamental frequency, average speech energy and sentence-end pause duration from the previous round of speech playback record in the current conversation, read the emotion level number and upper and lower limits of the four parameters in the speech output configuration, compare the emotion level value with the level number, register the upper and lower limits of the parameters with the same number, the measured values ​​of the four parameters in the previous round and the number of characters in the response text, and generate an acoustic reference value; Based on the response sequence value, the corresponding response text and emotion level value are retrieved. The speech rate, average fundamental frequency, average speech energy, and sentence-end pause duration of the previous round of voice playback are read. The emotion level number and the upper and lower limits of the four parameters in the voice output configuration are retrieved. The emotion level value is compared with each level number one by one. The upper and lower limits of the parameters of the matching item, the measured values ​​of the four parameters in the previous round, and the number of characters in the response text are registered. For example, if the emotion level value is 2, the corresponding level number is matched. The upper and lower limits of the speech rate are 220-260 words / minute. The measured speech rate in the previous round was 240 words / minute. The acoustic reference value is generated.

[0035] S502: Based on the acoustic reference value, call the state jump permission value, read the speech rate step size, fundamental frequency step size, energy step size and pause step size in the speech output configuration, adjust the four measured values ​​of the previous round according to the number of steps corresponding to the hold permission, adjacent level permission, and cross two level permission, take the corresponding boundary value when the current emotion level parameter exceeds the upper and lower limits, and record the four values ​​and boundary number to obtain the parameter shift value; Based on acoustic reference values, retrieve state transition permission values, read speech rate step size, fundamental frequency step size, energy step size, and pause step size from the speech output configuration, adjust the four measured values ​​from the previous round according to the step size corresponding to the transition permission type, replace the adjusted values ​​that exceed the upper and lower limits of the current emotion level parameters with the corresponding boundary values, and record the adjusted values ​​of the four items and the boundary numbers. For example, if the adjacent level permission corresponds to 1 step size and the speech rate step size is 15 words / minute, the speech rate after adjustment is 255 words / minute, which is within the range, and obtain the parameter shift value.

[0036] S503: Based on the parameter movement value, call the reply text and the upper and lower limits of the current emotion level parameter, read the adjusted speech rate, average fundamental frequency, average speech energy and sentence end pause duration, determine whether the four values ​​fall into their respective upper and lower limits, keep the original value within the interval, take the upper limit value for items that exceed the upper limit, take the lower limit value for items that exceed the lower limit, and register the boundary number and reply sequence number of each item at the same time, and obtain the playback control value. Based on the parameter shift value, retrieve the reply text and the upper and lower limits of the current emotion level parameters, read the adjusted speech rate, average fundamental frequency, average speech energy, and sentence-end pause duration, and compare each of the four values ​​with their respective upper and lower limits. Values ​​within the range retain their original values, values ​​exceeding the upper limit are taken as the upper limit value, and values ​​exceeding the lower limit are taken as the lower limit value. Record the boundary numbers and reply sequence numbers of each item. For example, if the adjusted speech rate of 255 words / minute is within the range, retain the original value, and obtain the playback control value.

[0037] S504: Based on the playback control value, call the corresponding reply text, write the speech rate, average base frequency, average speech energy and sentence end pause duration into the voice output interface of the educational robot and play it, collect the four actual output values ​​in the current playback record, calculate the boundary distance between each actual output value and the upper and lower limits of the current emotion level parameter, register the value range according to the four lower and upper limits, and establish the tone parameter range. Based on the playback control value, the corresponding response text is retrieved, and the speech rate, average fundamental frequency, average speech energy, and sentence-end pause duration are written into the voice output interface of the educational robot and played. The four actual output values ​​of this round of playback are collected, and the boundary distance between each actual output value and the corresponding upper and lower limits of the parameters is calculated. The value range is registered according to the lower and upper limits of the four items. For example, if the actual output speech rate is 254 words / minute, the corresponding boundary distance is calculated, and the tone parameter range is established.

[0038] A multi-turn emotional interaction dialogue system for educational robots, the system comprising: The word function localization module acquires the speech-to-text of the learner in the current round of the educational robot, records the word order of degree words, sentiment words, negation words, transition words and punctuation words, compares the word order distance and boundary position between degree words and sentiment words, and obtains the function span value. The emotional intensity grading module reads the number of degree words, the position of emotional tendency words, the total number of words in the segment, and the emotional direction within the same functional segment based on the effect span value. It calculates the degree word density according to the number of effective degree words and the total number of words in the segment, divides the density range from zero to one into five segments at 0.2 intervals, reads the segment number corresponding to the current density, counts segments after the transition independently, and merges segments with the same direction to generate an emotional level value. State transition control module: Based on the emotion level value, call the emotion level values ​​of the previous two rounds, obtain the level difference between adjacent rounds, determine the direction of the two level differences and the number of consecutive rounds, and generate a state transition permission value in combination with the current state number of the educational robot; Teaching response selection module: Based on the status transition permission value, the teaching round marker and candidate response number are called, and the candidates are filtered by knowledge point number, status permission number and previous round response number to obtain the response sequence value; Voice parameter output module: Based on the response sequence value, it calls the response text and emotion level value, reads the previous round of speech rate, fundamental frequency, energy, and sentence-end pause, adjusts the four values ​​according to the state jump permission value, and plays the educational robot's voice to obtain the tone parameter range.

[0039] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A multi-turn emotional interaction dialogue method for educational robots, characterized in that, Includes the following steps: S1: Obtain the speech-to-text of the learner in the current round of the educational robot, record the word order of degree words, sentiment words, negation words, transition words and punctuation words, compare the word order distance and boundary position between degree words and sentiment words, and obtain the effect span value; S2: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the segment and the sentiment direction within the same segment. Calculate the degree word density according to the number of effective degree words and the total number of words in the segment. Divide the density range from zero to one into five segments at 0.2 intervals. Read the segment number corresponding to the current density. Segments after the transition are counted independently, and segments with the same direction are counted together to generate the sentiment level value. S3: Based on the emotion level value, call the emotion level values ​​of the previous two rounds, obtain the difference between adjacent rounds, determine the direction of the two difference between the two rounds and the number of consecutive rounds, and generate a state transition permission value in combination with the current state number of the educational robot; S4: Based on the status transition permission value, call the teaching round marker and candidate reply number, filter the candidates by knowledge point number, status permission number and previous round reply number, and obtain the reply sequence value; S5: Based on the response sequence value, call the response text and emotion level value, read the previous round of speech rate, base frequency, energy, and sentence-end pause, adjust the four values ​​according to the state jump permission value, and play the educational robot's voice to obtain the tone parameter range.

2. The multi-turn emotional interaction dialogue method for educational robots according to claim 1, characterized in that, The steps for obtaining S1 are as follows: S101: Obtain the speech-transcribed text of the learner in the current round of the educational robot, number each word item sequentially according to the order of appearance of the text, record the first word item number as 1, and the subsequent word item numbers are incremented by 1, read the degree words, sentiment words, negation words, transition words and punctuation marks in the conversation word item table, compare the consistency of each transcribed word item with the corresponding mark, record the hit word item category number, word order number and punctuation mark number, and generate word item position sequence value; S102: Based on the word position sequence value, call the word order number of each sentiment word and the word order number of the degree words before and after it, read the word order numbers of the negation words, transition words and punctuation between them, calculate the difference between the degree words and the sentiment words, and register two differences when degree words are present before and after them. Register the numbers of the nearest punctuation, negation words and transition words in the order of the text to obtain the word interval value. S103: Based on the term interval value, call the punctuation position, negation word position and transition word position between degree words and sentiment words, compare whether each boundary term falls into the word order interval of the two, and truncate the corresponding word order segment when a period, question mark, exclamation mark or semicolon falls into the interval, and retain the ordinal distance between degree words and sentiment words on the same side of the transition word when the transition word falls into the interval, and obtain the effect span value.

3. The multi-turn emotional interaction dialogue method for educational robots according to claim 1, characterized in that, The steps for obtaining S2 are as follows: S201: Based on the span value, read the number of degree words, the position of sentiment words, the total number of words in the same action segment, and the sentiment direction. Call the degree word sequence number and the start and end numbers of the action segment to calculate the number of degree words falling within the range of the start and end numbers. Register the corresponding sentiment direction according to the position of the sentiment words. The number of the transition word is used as the end number of the segment, and the number of the punctuation mark is used as the boundary number of the word. The effective degree word quantity value is obtained. S202: Based on the effective degree word count value, call the total number of words in the corresponding functional segment and the start and end numbers of the segment, read the number of the transition word and retain the count of independent words in the segment after the transition, calculate the ratio of the number of effective degree words to the total number of words in the corresponding segment, and count the continuous total number of words in the same direction if the direction is consistent and does not cross the transition word segment. Record the numerator count, denominator count and segment number to obtain the degree word density value. S203: Based on the degree word density value, call the density range from zero to one and the interval value of 0.2, and register 0 to 0.2, 0.2 to 0.4, 0.4 to 0.6, 0.6 to 0.8, and 0.8 to 1 as five density segments in sequence. Determine whether the current degree word density value falls into the corresponding segment number of the start and end boundary. If the boundaries coincide, register according to the interval on the right, and record the start and end boundary values ​​and segment number of the corresponding density segment, and obtain the density segment number value; S204: Based on the density segment number value, call the sentiment direction, transition word position and word count of the same direction segment for each function segment. After the transition, the segment retains an independent segment number. The consecutive same direction segments are re-summarized according to the effective degree word count value and the total number of words in the segment. The text order of the summarized density corresponding segment number and the independent segment number is compared. The selected segment number, sentiment direction and current round number are registered according to the segment number corresponding to the end sentiment direction, and the sentiment level value is generated.

4. The multi-turn emotional interaction dialogue method for educational robots according to claim 1, characterized in that, The steps for obtaining S3 are as follows: S301: Based on the emotional level value, call the emotional level values ​​of the previous two rounds, read the current round number, the previous round number, and the round number before that from the current conversation round record, arrange the three emotional level numbers in order of round, calculate the difference between the current round and the previous round number and the difference between the previous round and the round before that, and record the positive and negative signs, absolute values, starting round number, and ending round number of the two differences respectively to obtain the level difference value; S302: Based on the grade difference value, call the positive and negative signs of the two differences, the absolute value, the starting round number and the ending round number, read the two signs in the order of adjacent rounds, judge the combination of signs, register the positive positive combination as continuous increase, register the negative negative combination as continuous decrease, register one positive and one negative as direction reversal, register the corresponding holding round when any difference is zero, and register the number of consecutive rounds according to the number of consecutive occurrences of the same direction sign, and generate continuous direction value; S303: Based on continuous direction values, call the current state number of the educational robot and the adjacent legal state numbers, read the number of consecutive rounds in the same direction and the absolute value of the difference between the two levels, compare the sum of the two absolute values ​​with the corresponding values ​​of the two-level state span, register the permission to cross the two levels when the continuous directions are consistent and the sum reaches two, register the permission to maintain the permission or the permission of the adjacent level when the direction is reversed or the sum does not reach two, and obtain the state jump permission value.

5. The multi-turn emotional interaction dialogue method for educational robots according to claim 1, characterized in that, The steps for obtaining S4 are as follows: S401: Based on the status transition permission value, call the teaching round marker and candidate reply number, read the knowledge point number and status permission number corresponding to the current teaching round, filter the knowledge point number registered in each candidate reply with the current knowledge point number, retain candidate replies with the same number, register the number of retained candidate replies, candidate reply number and corresponding status permission number, and generate candidate matching quantity value; S402: Based on the candidate matching value, call the retained candidate response number, corresponding status permission number and previous round response number, compare each candidate response status permission number with the status jump permission value, delete candidates with inconsistent permission numbers, and then check the remaining candidate response numbers with the previous round response numbers one by one, register the number of candidates with no duplicate numbers and the order of numbers, and obtain the response selection value; S403: Based on the available response values, retrieve the number of candidate responses with no duplicate numbers, the order of candidate response numbers, the current teaching round marker, and the knowledge point number. Sort the candidate responses according to the response order corresponding to the teaching round marker. For items with the same knowledge point number, assign an order number by incrementing along the original candidate number order. Read the first available order number and its candidate response number to obtain the response order value.

6. The multi-turn emotional interaction dialogue method for educational robots according to claim 1, characterized in that, The steps for obtaining S5 are as follows: S501: Based on the response sequence value, call the response text and emotion level value, read the speech rate, average fundamental frequency, average speech energy and sentence-end pause duration from the previous round of speech playback record in the current conversation, read the emotion level number and upper and lower limits of the four parameters in the speech output configuration, compare the emotion level value with the level number, register the upper and lower limits of the parameters with the same number, the measured values ​​of the four parameters in the previous round and the number of characters in the response text, and generate an acoustic reference value; S502: Based on the acoustic reference value, call the state jump permission value, read the speech rate step size, fundamental frequency step size, energy step size and pause step size in the speech output configuration, adjust the four measured values ​​of the previous round according to the number of steps corresponding to the hold permission, adjacent level permission, and cross two level permission, take the corresponding boundary value when the current emotion level parameter exceeds the upper and lower limits, and record the four values ​​and boundary number to obtain the parameter shift value; S503: Based on the parameter movement value, call the reply text and the upper and lower limits of the current emotion level parameter, read the adjusted speech rate, average fundamental frequency, average speech energy and sentence end pause duration, determine whether the four values ​​fall into their respective upper and lower limits, keep the original value within the interval, take the upper limit value for items that exceed the upper limit, take the lower limit value for items that exceed the lower limit, and register the boundary number and reply sequence number of each item at the same time, and obtain the playback control value. S504: Based on the playback control value, call the corresponding reply text, write the speech rate, average fundamental frequency, average speech energy and sentence-end pause duration into the voice output interface of the educational robot and play it, collect the four actual output values ​​in the current playback record, calculate the boundary distance between each actual output value and the upper and lower limits of the current emotion level parameter, register the value range according to the four lower and upper limits, and establish the tone parameter range.

7. A multi-turn emotional interaction dialogue system for educational robots, characterized in that, The system is used in the multi-turn emotional interaction dialogue method for educational robots according to any one of claims 1-6, and the system includes: a word function localization module, an emotion intensity grading module, a state transition control module, a teaching response selection module, and a voice parameter output module; The word function localization module: acquires the speech-transcribed text of the learner in the current round of the educational robot, records the word order positions of degree words, sentiment words, negation words, transition words and punctuation words, compares the word order distance and boundary positions between degree words and sentiment words, and obtains the function span value; The emotional intensity grading module reads the number of degree words, the position of emotional tendency words, the total number of words in the segment, and the emotional direction within the same functional segment based on the effect span value. It calculates the degree word density according to the number of effective degree words and the total number of words in the segment. The density range of zero to one is divided into five segments at 0.2 intervals. The segment number corresponding to the current density is read. Segments after the transition are counted independently, and segments with the same direction are counted together to generate an emotional level value. The state transition control module: based on the emotion level value, calls the emotion level values ​​of the previous two rounds, obtains the level difference between adjacent rounds, determines the direction of the two level differences and the number of consecutive rounds, and generates a state transition permission value in combination with the current state number of the educational robot; The teaching response selection module: calls the teaching round marker and candidate response number according to the status jump permission value, filters the candidates by knowledge point number, status permission number and previous round response number, and obtains the response sequence value; The voice parameter output module: based on the response sequence value, it calls the response text and emotion level value, reads the previous round of speech rate, fundamental frequency, energy, and sentence-end pause, adjusts the four values ​​according to the state jump permission value, and plays the educational robot's voice to obtain the tone parameter range.