A robot adaptive interaction method and system
By extracting and updating semantic feature vectors through the dialogue text generation model and combining it with emotion change analysis, the robot can achieve adaptive interaction, solving the problem that the existing system cannot be personalized and improving the user experience.
Patent Information
- Application Number
- CN202510804084.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-06-17
AI Technical Summary
Existing robot voice interaction systems fail to make adaptive adjustments based on individual differences among users, resulting in an inability to provide personalized voice styles and communication methods, affecting the user's interactive experience.
By obtaining user voice data, using the dialogue text generation model to extract semantic feature vectors, and updating the feature vectors in multiple rounds of dialogue, dialogue text data that conforms to the user's speaking habits is generated. Combined with the emotion change analysis model to optimize model updates, the robot can achieve adaptive interaction.
It improves the user experience during interaction and makes the robot interaction more in line with the user's personalized needs by adaptively adjusting the voice style and communication method.
Smart Images

Figure CN120340498B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent robots, and in particular to a robot adaptive interaction method and system. Background Art
[0002] With the continuous development of artificial intelligence (AI) technology, robots are increasingly being used in various fields. In particular, voice interaction between robots and users has become a crucial method of interaction in scenarios such as intelligent assistants, customer service, and education. Existing robot voice interaction systems often rely on pre-set speech recognition and generation models. These models are typically trained on generic speech data and can recognize and synthesize standard speech output. However, existing technologies generally ignore individual user differences, particularly in terms of voice style, tone, speaking speed, and language habits.
[0003] Specifically, existing robot systems typically interact with users according to fixed speech patterns and fail to adapt to individual user preferences or habits. For example, some users prefer slower, softer speech, while others may prefer faster, more concise interactions. However, most existing systems fail to account for this, resulting in robots often failing to provide personalized voice styles and communication methods when interacting with different users, thus affecting the user experience. Summary of the Invention
[0004] In the process of interaction between a robot and a person, the present invention obtains the user's voice data, and processes the text data converted from the voice data through a dialogue text generation model to generate dialogue text data for constructing dialogue voice data. The robot replies based on the dialogue voice data to realize the interaction of the robots. In the dialogue text generation model, semantic feature vectors are extracted based on the user's speaking style, and the semantic feature vectors are further updated through multiple rounds of dialogue, so that the dialogue text data generated by the text data and the standard semantic feature vectors can conform to the user's speaking habits, thereby improving the user experience during interaction.
[0005] The present invention provides a robot adaptive interaction method, comprising:
[0006] During the robot's voice interaction, it obtains voice data input by the user, converts the voice data into text data using voice recognition technology, then feeds the text data into a conversation text generation model for processing to generate conversation text data. The conversation text data is then converted into conversation voice data using speech synthesis technology, and the conversation voice data is played through the robot's speakers to enable robot interaction. The conversation text generation model is then updated based on the voice data obtained in the next conversation round.
[0007] The conversation text generation model includes a semantic feature extraction layer, a semantic feature update layer, and a conversation text data construction layer. The semantic feature extraction layer is used to extract semantic features from text data to construct a semantic feature vector; the semantic feature update layer is used to update the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector; the conversation text data construction layer is used to perform conversation text analysis on text data and standard semantic feature vectors to construct conversation text data.
[0008] As a preferred aspect, updating the dialogue text generation model based on the voice data obtained in the next dialogue round specifically includes the following steps:
[0009] The speech data obtained in the current conversation round is recorded as the front speech data, and the speech data obtained in the next conversation round is recorded as the back speech data. The front speech data and the back speech data are then sent to the emotion change analysis model for processing and the emotion change value is output;
[0010] A semantic feature extraction layer and a semantic feature update layer are added to the end of the dialogue text generation model in sequence. The added semantic feature extraction layer is consistent with the semantic feature extraction layer in the dialogue text generation model, and the added semantic feature update layer is consistent with the semantic feature update layer in the dialogue text generation model. The dialogue text data output by the dialogue text data construction layer of the current dialogue round is processed by the semantic feature extraction layer and the semantic feature update layer added at the end in sequence to output a target semantic feature vector. The mean square error between the target semantic feature vector and the standard semantic feature vector in the dialogue text generation model of the current dialogue round is recorded as the semantic analysis loss value. The semantic analysis loss value and the inverse of the emotion change value are weighted and summed to construct a comprehensive loss value in the direction of minimizing the comprehensive loss value. The parameters of the dialogue text data construction layer in the dialogue text generation model with the semantic feature extraction layer and the semantic feature update layer added at the end are adjusted by the gradient descent method to achieve the update of the dialogue text generation model.
[0011] As a preferred aspect, the emotion change analysis model includes a speech data processing layer and an emotion change value output layer, wherein the speech data processing layer is used to perform time domain feature extraction and frequency domain feature extraction on the front speech data to obtain the front speech time domain feature vector and the rear speech time domain feature vector, and perform time domain feature extraction and frequency domain feature extraction on the rear speech data to obtain the rear speech time domain feature vector and the rear speech time domain feature vector, and then the front speech time domain feature vector and the rear speech time domain feature vector are combined into a front speech feature vector, and the rear speech time domain feature vector and the rear speech time domain feature vector are combined into a rear speech feature vector, and finally the front speech feature vector and the rear speech feature vector are differentially operated to construct an emotion change analysis vector; the emotion change value output layer is used to process the emotion change analysis vector and output the emotion change value.
[0012] As a preferred aspect, the semantic feature update layer updates the semantic feature vector based on multiple conversation turns of the user to construct a standard semantic feature vector, which specifically includes the following steps:
[0013] After each conversation round is completed, the standard semantic feature vector output by the conversation text generation model is stored in the user semantic feature library;
[0014] The standard semantic feature vectors in the user semantic feature library are traversed, and for each selected standard semantic feature vector, the following operation is performed to calculate the semantic similarity between the selected standard semantic feature vector and the semantic feature vector; until the standard semantic feature vectors in the user semantic feature library are traversed, all semantic similarities are normalized and mapped to all standard semantic feature vectors in the user semantic feature library respectively, and the weight coefficient corresponding to each standard semantic feature vector is obtained. The standard semantic feature vectors in the user semantic feature library are weighted averaged according to the corresponding weight coefficients and then a nonlinear activation operation is performed to obtain a fused semantic feature vector; then, based on the fused semantic feature vector, a self-attention operation is performed on the semantic feature vector to obtain a standard semantic feature vector to update the semantic feature vector; and when the standard semantic feature vector does not exist in the user semantic feature library, the fused semantic feature vector that has undergone the self-attention operation is replaced with the semantic feature vector itself.
[0015] As a preferred aspect, a self-attention operation is performed on the semantic feature vector based on the fused semantic feature vector to obtain a standard semantic feature vector, which specifically includes the following steps:
[0016] Multiply the semantic feature vector with the value weight matrix and the key weight matrix respectively to construct the semantic feature value vector V and the semantic feature key vector K. Multiply the fused semantic feature vector with the query weight matrix to construct the fused semantic feature query vector Q. Calculate the self-attention weight matrix ATT=softmax(QKT / (D) 0.5 ), where D is the dimension of the semantic feature vector, and then the self-attention weight matrix ATT is multiplied by the semantic feature value vector V to obtain the standard semantic feature vector.
[0017] As a preferred aspect, in the process of performing semantic feature extraction on text data through the semantic feature extraction layer, the text data is first preprocessed, and the first preprocessing operation specifically includes the following contents: performing a word segmentation operation on the text data to construct a number of text words, and then constructing each text word into a text word vector through a word embedding operation, and then splicing all the text word vectors from top to bottom according to the word order of the text words to construct a text data feature map, and the text data feature map is used for subsequent semantic feature extraction;
[0018] In the process of performing conversation text analysis on text data and standard semantic feature vectors through the conversation text data construction layer, the text data and standard semantic feature vectors are first preprocessed for the second time. The second preprocessing specifically includes the following: adding the standard semantic feature vector to the end of each row of the text data feature map to construct the feature map of the text data to be analyzed. The feature map of the text data to be analyzed is used for subsequent conversation text analysis.
[0019] As a preferred aspect, training the dialogue text generation model specifically includes the following steps:
[0020] Acquire dialogue text generation training samples, where the dialogue text generation training samples include one-to-one corresponding text data and dialogue text data, form all dialogue text generation training samples into a dialogue text generation training set, train a dialogue text generation model using the dialogue text generation training set, calculate a dialogue text generation loss value, and determine whether the dialogue text generation loss value is within a first preset range. If the dialogue text generation loss value is within the first preset range, output the trained dialogue text generation model; otherwise, continue to train the dialogue text generation model using the dialogue text generation training set.
[0021] As a preferred aspect, training the emotion change analysis model specifically includes the following steps:
[0022] Obtain several emotion change analysis training samples, which include speech data of two adjacent conversation rounds. All labeled emotion change analysis training samples are combined into an emotion change analysis training set. The emotion change analysis model is trained through the emotion change analysis training set. The emotion change analysis loss value is calculated, and it is determined whether the emotion change analysis loss value is within a second preset range. If the emotion change analysis loss value is within the second preset range, the trained emotion change analysis model is output; otherwise, the emotion change analysis model continues to be trained through the emotion change analysis training set.
[0023] The present invention also provides a robot adaptive interactive system, comprising:
[0024] The voice data acquisition module is used to obtain the voice data input by the user during the robot's voice interaction;
[0025] The conversational speech data construction module is used to convert speech data into text data through speech recognition technology, then feed the text data into the conversational text generation model for processing to generate conversational text data, and then use speech synthesis technology to generate conversational speech data from the conversational text data. The conversational speech data is played through the robot's speaker to achieve robot interaction;
[0026] A dialogue text generation model update module, configured to update the dialogue text generation model based on the speech data obtained in the next dialogue round;
[0027] The conversation text generation model includes a semantic feature extraction layer, a semantic feature update layer, and a conversation text data construction layer. The semantic feature extraction layer is used to extract semantic features from text data to construct a semantic feature vector; the semantic feature update layer is used to update the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector; the conversation text data construction layer is used to perform conversation text analysis on text data and standard semantic feature vectors to construct conversation text data.
[0028] The present invention has the following advantages:
[0029] In the process of interaction between a robot and a person, the present invention obtains the user's voice data, and processes the text data converted from the voice data through a dialogue text generation model to generate dialogue text data for constructing dialogue voice data. The robot replies based on the dialogue voice data to realize the interaction of the robots. In the dialogue text generation model, semantic feature vectors are extracted based on the user's speaking style, and the semantic feature vectors are further updated through multiple rounds of dialogue, so that the dialogue text data generated by the text data and the standard semantic feature vectors can conform to the user's speaking habits, thereby improving the user experience during interaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 Schematic diagram of the structure of the dialogue text generation model adopted in an embodiment of the present invention.
[0031] Figure 2 This is a schematic diagram of the structure of the robot adaptive interactive system used in an embodiment of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0033] Example 1, a robot adaptive interaction method, comprising:
[0034] During voice interaction, the robot obtains user-input voice data and converts it into text data using speech recognition technology. Speech recognition technologies such as Google Speech-to-Text, Microsoft Azure Speech Recognition, and DeepSpeech are used to map voice data to text data. The text data is then fed into a conversational text generation model for processing to generate conversational text data. The conversational text data is then converted into conversational voice data using speech synthesis technologies such as Google TTS and Amazon Polly. The conversational voice data is played through the robot's speakers to enable robot interaction. The conversational text data here refers to the robot's response to the user's voice input. The conversational text generation model is then updated based on the voice data obtained in the next conversation round.
[0035] See also Figure 1The dialogue text generation model includes a semantic feature extraction layer, a semantic feature update layer and a dialogue text data construction layer, wherein the semantic feature extraction layer is established based on the Transformer model, and is used to extract semantic features from text data to construct a semantic feature vector. The semantic feature vector can express the user's speaking style during the conversation, such as speaking speed, word usage habits and word order habits, such as the inverted word order of Northeastern people; the semantic feature update layer is used to update the semantic feature vector based on the user's multiple dialogue rounds to construct a standard semantic feature vector. It should be noted that with the assistance of multiple dialogue rounds of the same user, the current semantic features are updated in combination with the dialogues of the remaining rounds, which can make the obtained standard semantic feature vector more in line with the user's speaking style, and thus make the subsequently generated dialogue text data also conform to the user's speaking habits, improve the user's experience during interaction, and realize the robot's adaptive interaction according to the user's speaking style; the dialogue text data construction layer is also established based on the Transformer model, and is used to perform dialogue text analysis on text data and standard semantic feature vectors to construct dialogue text data;
[0036] It should be added that in the process of extracting semantic features from text data through the semantic feature extraction layer, the text data is first preprocessed. The first preprocessing operation specifically includes the following: performing word segmentation on the text data. The word segmentation operation can use the Jieba tool to construct several text words, and then construct each text word into a text word vector through the word embedding operation. The word embedding operation can use the word2vec model, and then all text word vectors are spliced from top to bottom according to the word order of the text words to construct a text data feature map. The text data feature map is used for subsequent semantic feature extraction. It should be noted that the subsequent semantic feature extraction process is based on the encoder and decoder of the Transformer model. The specific parameter settings and operations refer to the Transformer model.
[0037] In the process of performing conversational text analysis on text data and standard semantic feature vectors through the conversational text data construction layer, the text data and standard semantic feature vectors are first preprocessed for the second time. The second preprocessing specifically includes the following: adding the standard semantic feature vector to the end of each row of the text data feature map to construct the feature map of the text data to be analyzed. The feature map of the text data to be analyzed is used for subsequent conversational text analysis. The subsequent conversational text analysis is also based on the encoder and decoder of the Transformer model. The specific parameter settings and operations are based on the Transformer model. The difference is that semantic feature extraction outputs vector data, while conversational text analysis outputs text data.
[0038] During the interaction between a robot and a person, this application obtains the user's voice data, and processes the text data converted from the voice data through a dialogue text generation model to generate dialogue text data for constructing dialogue voice data. The robot replies based on the dialogue voice data to achieve robot interaction. In the dialogue text generation model, semantic feature vectors are extracted based on the user's speaking style, and the semantic feature vectors are further updated through multiple rounds of dialogue, so that the dialogue text data generated by the text data and the standard semantic feature vectors can conform to the user's speaking habits, thereby improving the user experience during interaction.
[0039] The conversation text generation model is updated based on the speech data obtained from the next conversation round. The specific steps include:
[0040] The speech data obtained in the current conversation round is recorded as the front speech data, and the speech data obtained in the next conversation round is recorded as the back speech data. The front and back speech data are then fed into the emotion change analysis model for processing, and the output is the emotion change value. The emotion change value here is analyzed based on the tone, pitch, and speaking speed of the speech data obtained in the current conversation round and the speech data obtained in the next conversation round. It can reflect the user's emotional changes. For example, if the mood changes from depressed to relaxed, the speaking speed will increase and the tone will also increase.
[0041] A semantic feature extraction layer and a semantic feature update layer are added at the end of the dialogue text generation model in sequence. The added semantic feature extraction layer is consistent with the semantic feature extraction layer in the dialogue text generation model, and the added semantic feature update layer is consistent with the semantic feature update layer in the dialogue text generation model. The dialogue text data output by the dialogue text data construction layer of the current dialogue round is processed in sequence by the semantic feature extraction layer and the semantic feature update layer added at the end to output the target semantic feature vector. The mean square error between the target semantic feature vector and the standard semantic feature vector in the dialogue text generation model of the current dialogue round is recorded as the semantic analysis loss value. The semantic analysis loss value represents the dialogue generated by the dialogue text generation model. The difference between the speaking style of the text data and the speaking style of the user is calculated, and the semantic analysis loss value and the inverse of the emotion change value are weightedly summed to construct a comprehensive loss value. It should be noted that in the process of weighted summation of the semantic analysis loss value and the inverse of the emotion change value, the weight is set by the developer to minimize the direction of the comprehensive loss value. The dialogue text data construction layer in the dialogue text generation model with the semantic feature extraction layer and the semantic feature update layer added at the end is adjusted by the gradient descent method to realize the update of the dialogue text generation model. In the process of updating the dialogue text generation model, the dialogue text data generated by the dialogue text generation model can be further made to conform to the user's speaking habits.
[0042] The emotion change analysis model includes a speech data processing layer and an emotion change value output layer, wherein the speech data processing layer is used to perform time domain feature extraction and frequency domain feature extraction on the front speech data to obtain the front speech time domain feature vector and the back speech time domain feature vector, and perform time domain feature extraction and frequency domain feature extraction on the back speech data to obtain the back speech time domain feature vector and the back speech time domain feature vector. It should be noted that time domain feature extraction refers to directly extracting statistical features from speech data, such as mean, variance, skewness and kurtosis, while frequency domain feature extraction refers to converting speech data into frequency domain, and frequency domain conversion generally adopts short-time Fourier transform. The method further comprises the following steps: converting the frequency domain data into a frequency domain data, and then extracting statistical features such as spectral centroid, spectral flatness and spectral slope from the frequency domain data after the frequency domain conversion; then combining the front speech time domain feature vector and the rear speech time domain feature vector into a front speech feature vector, and combining the rear speech time domain feature vector and the rear speech time domain feature vector into a rear speech feature vector; finally, performing a differential operation on the front speech feature vector and the rear speech feature vector to construct an emotion change analysis vector; the emotion change value output layer is established based on the BP neural network, which generally includes an input layer, a hidden layer and an output layer; the emotion change value output layer is used to process the emotion change analysis vector and output the emotion change value.
[0043] The semantic feature update layer updates the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector. The specific steps include the following:
[0044] After each conversation round is completed, the standard semantic feature vector output by the conversation text generation model is stored in the user semantic feature library;
[0045] Traverse the standard semantic feature vectors in the user semantic feature library, and for each selected standard semantic feature vector, perform the following operations to calculate the semantic similarity between the selected standard semantic feature vector and the semantic feature vector; until the standard semantic feature vectors in the user semantic feature library are traversed, all semantic similarities are normalized and mapped to all standard semantic feature vectors in the user semantic feature library respectively, and the weight coefficient corresponding to each standard semantic feature vector is obtained. Assume that the semantic similarity corresponding to one of the standard semantic feature vectors is H x , the sum of all semantic similarities is HT, then the weight coefficient corresponding to this standard semantic feature vector is H x / HT, performs a weighted average operation on the standard semantic feature vectors in the user semantic feature library according to the corresponding weight coefficients, and then performs a nonlinear activation operation. The nonlinear activation operation includes convolution and activation function processing. The activation function generally uses ReLU to obtain a fused semantic feature vector. The fused semantic feature vector includes the user's speaking style in multiple dialogue rounds and can provide a reference for updating the semantic feature vector; then, based on the fused semantic feature vector, a self-attention operation is performed on the semantic feature vector to obtain a standard semantic feature vector to achieve the update of the semantic feature vector; and when the standard semantic feature vector does not exist in the user semantic feature library, the fused semantic feature vector that undergoes the self-attention operation is replaced with the semantic feature vector itself.
[0046] Based on the fused semantic feature vector, a self-attention operation is performed on the semantic feature vector to obtain a standard semantic feature vector, which specifically includes the following steps:
[0047] Multiply the semantic feature vector with the value weight matrix and the key weight matrix respectively to construct the semantic feature value vector V and the semantic feature key vector K. Multiply the fused semantic feature vector with the query weight matrix to construct the fused semantic feature query vector Q. Calculate the self-attention weight matrix ATT=softmax(QK T / (D) 0.5 ), where D is the dimension of the semantic feature vector, and then the self-attention weight matrix ATT is multiplied by the semantic feature value vector V to obtain the standard semantic feature vector; the value weight matrix, key weight matrix, and query weight matrix are set based on the self-attention mechanism in the Transformer model, and the parameters of the value weight matrix, key weight matrix, and query weight matrix are set following the training of the dialogue text generation model.
[0048] Training the conversation text generation model includes the following steps:
[0049] Acquire conversation text generation training samples, which include one-to-one corresponding text data and conversation text data. The one-to-one corresponding text data and conversation text data are acquired by developers based on actual conversations, and both parties in the conversation give high evaluations. A method of setting up actual conversations can issue tasks on a crowdsourcing platform to simulate actual conversation scenarios, and form all conversation text generation training samples into a conversation text generation training set. The conversation text generation model is trained using the conversation text generation training set, and a conversation text generation loss value is calculated to determine whether the conversation text generation loss value is within a first preset range. The first preset range is set by the developer. If the conversation text generation loss value is within the first preset range, the trained conversation text generation model is output; otherwise, the conversation text generation model continues to be trained using the conversation text generation training set.
[0050] Training the emotion change analysis model includes the following steps:
[0051] Several emotion change analysis training samples are obtained. The emotion change analysis training samples include speech data from two adjacent conversation turns. It should be noted that the speech data from two adjacent conversation turns here is also obtained by developers based on actual conversations. The emotion change analysis training samples are labeled with emotion change values. One labeling method is to directly label the emotion expressed by the speech data from two adjacent conversation turns as positive feedback, such as depression turning into happiness or relaxation, with an emotion change value of 1; otherwise, it is labeled as 0. If more detailed emotion change value classification is required, the assistance of psychology experts is required. Based on experience, the degree of emotion change is classified. All labeled emotion change analysis training samples are composed into an emotion change analysis training set. The emotion change analysis model is trained using the emotion change analysis training set, and the emotion change analysis loss value is calculated to determine whether the emotion change analysis loss value is within a second preset range. The second preset range is also set by the developer. If the emotion change analysis loss value is within the second preset range, the trained emotion change analysis model is output; otherwise, the emotion change analysis model is further trained using the emotion change analysis training set.
[0052] Example 2, a robot adaptive interactive system, such as Figure 2 Shown, including:
[0053] The voice data acquisition module is used to obtain the voice data input by the user during the robot's voice interaction;
[0054] The conversational speech data building module is used to convert speech data into text data using speech recognition technology. Speech recognition technology can adopt Google Speech-to-Text, Microsoft Azure speech recognition, and DeepSpeech to achieve the mapping of speech data to text data. The text data is then fed into the conversational text generation model for processing to generate conversational text data. The conversational text data is then converted into conversational speech data using speech synthesis technology. Speech synthesis technology can adopt Google TTS and Amazon Polly. The conversational speech data is played through the robot's speakers to realize robot interaction. The conversational text data here refers to the robot's response to the user's speech input;
[0055] A dialogue text generation model update module is used to update the dialogue text generation model based on the speech data obtained in the next dialogue round;
[0056] The conversation text generation model includes a semantic feature extraction layer, a semantic feature update layer, and a conversation text data construction layer. The semantic feature extraction layer is established based on the Transformer model and is used to extract semantic features from text data to construct a semantic feature vector. The semantic feature vector can express the user's speaking style during the conversation, such as speaking speed, word usage habits, and word order habits, such as the inverted word order of Northeastern people. The semantic feature update layer is used to update the semantic feature vector based on the user's multiple conversation rounds to construct a standard semantic feature vector. It should be noted that with the assistance of multiple conversation rounds of the same user, the current semantic features are updated in combination with the conversations of the remaining rounds, which can make the obtained standard semantic feature vector more in line with the user's speaking style, and thus make the subsequently generated conversation text data also conform to the user's speaking habits, improve the user experience during interaction, and realize the robot's adaptive interaction according to the user's speaking style. The conversation text data construction layer is also established based on the Transformer model and is used to perform conversation text analysis on text data and standard semantic feature vectors to construct conversation text data.
[0057] It should be understood that those skilled in the art may make improvements or modifications based on the above description, and all such improvements and modifications shall fall within the scope of protection of the appended claims. Any portion of this specification not described in detail is prior art known to those skilled in the art.
Claims
1. A robot adaptive interaction method, characterized in that: include: During the robot's voice interaction, it obtains voice data input by the user, converts the voice data into text data using voice recognition technology, then feeds the text data into a conversation text generation model for processing to generate conversation text data. The conversation text data is then converted into conversation voice data using speech synthesis technology, and the conversation voice data is played through the robot's speakers to enable robot interaction. The conversation text generation model is then updated based on the voice data obtained in the next conversation round. The conversation text generation model includes a semantic feature extraction layer, a semantic feature update layer, and a conversation text data construction layer. The semantic feature extraction layer is used to extract semantic features from text data to construct a semantic feature vector. The semantic feature update layer is used to update the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector; The conversation text data construction layer is used to perform conversation text analysis on text data and standard semantic feature vectors to construct conversation text data; Semantic feature vectors are used to characterize the user's speaking style during conversation; The conversation text generation model is updated based on the speech data obtained from the next conversation round. The specific steps include: The speech data obtained in the current conversation round is recorded as the front speech data, and the speech data obtained in the next conversation round is recorded as the back speech data. The front speech data and the back speech data are then sent to the emotion change analysis model for processing and the emotion change value is output; A semantic feature extraction layer and a semantic feature update layer are added to the end of the dialogue text generation model in sequence. The added semantic feature extraction layer is consistent with the semantic feature extraction layer in the dialogue text generation model, and the added semantic feature update layer is consistent with the semantic feature update layer in the dialogue text generation model. The dialogue text data output by the dialogue text data construction layer of the current dialogue round is processed by the semantic feature extraction layer and the semantic feature update layer added at the end in sequence to output a target semantic feature vector. The mean square error between the target semantic feature vector and the standard semantic feature vector in the dialogue text generation model of the current dialogue round is recorded as the semantic analysis loss value. The semantic analysis loss value and the inverse of the emotion change value are weighted and summed to construct a comprehensive loss value in the direction of minimizing the comprehensive loss value. The parameters of the dialogue text data construction layer in the dialogue text generation model with the semantic feature extraction layer and the semantic feature update layer added at the end are adjusted by the gradient descent method to achieve the update of the dialogue text generation model.
2. A robot adaptive interaction method according to claim 1, characterized in that: The semantic feature update layer updates the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector. The specific steps include the following: After each conversation round is completed, the standard semantic feature vector output by the conversation text generation model is stored in the user semantic feature library; The standard semantic feature vectors in the user semantic feature library are traversed, and for each selected standard semantic feature vector, the following operation is performed to calculate the semantic similarity between the selected standard semantic feature vector and the semantic feature vector; until the standard semantic feature vectors in the user semantic feature library are traversed, all semantic similarities are normalized and mapped to all standard semantic feature vectors in the user semantic feature library respectively, and the weight coefficient corresponding to each standard semantic feature vector is obtained. The standard semantic feature vectors in the user semantic feature library are weighted averaged according to the corresponding weight coefficients and then a nonlinear activation operation is performed to obtain a fused semantic feature vector; then, based on the fused semantic feature vector, a self-attention operation is performed on the semantic feature vector to obtain a standard semantic feature vector to update the semantic feature vector; and when the standard semantic feature vector does not exist in the user semantic feature library, the fused semantic feature vector that has undergone the self-attention operation is replaced with the semantic feature vector itself.
3. A robot adaptive interaction method according to claim 2, characterized in that: Based on the fused semantic feature vector, a self-attention operation is performed on the semantic feature vector to obtain a standard semantic feature vector, which specifically includes the following steps: Multiply the semantic feature vector with the value weight matrix and the key weight matrix respectively to construct the semantic feature value vector V and the semantic feature key vector K. Multiply the fused semantic feature vector with the query weight matrix to construct the fused semantic feature query vector Q. Calculate the self-attention weight matrix ATT=softmax(QK T / (D) 0.5 ), where D is the dimension of the semantic feature vector, and then the self-attention weight matrix ATT is multiplied by the semantic feature value vector V to obtain the standard semantic feature vector.
4. A robot adaptive interaction method according to claim 3, characterized in that: In the process of extracting semantic features from text data through the semantic feature extraction layer, the text data is first preprocessed. The first preprocessing operation specifically includes the following: performing a word segmentation operation on the text data to construct a number of text words, then constructing each text word into a text word vector through a word embedding operation, and then splicing all the text word vectors from top to bottom according to the word order of the text words to construct a text data feature map. The text data feature map is used for subsequent semantic feature extraction; In the process of performing conversation text analysis on text data and standard semantic feature vectors through the conversation text data construction layer, the text data and standard semantic feature vectors are first preprocessed for the second time. The second preprocessing specifically includes the following: adding the standard semantic feature vector to the end of each row of the text data feature map to construct the feature map of the text data to be analyzed. The feature map of the text data to be analyzed is used for subsequent conversation text analysis.
5. A robot adaptive interaction method according to claim 4, characterized in that: Training the conversation text generation model includes the following steps: Acquire dialogue text generation training samples, where the dialogue text generation training samples include one-to-one corresponding text data and dialogue text data, form all dialogue text generation training samples into a dialogue text generation training set, train a dialogue text generation model using the dialogue text generation training set, calculate a dialogue text generation loss value, and determine whether the dialogue text generation loss value is within a first preset range. If the dialogue text generation loss value is within the first preset range, output the trained dialogue text generation model; otherwise, continue to train the dialogue text generation model using the dialogue text generation training set.
6. A robot adaptive interaction method according to claim 5, characterized in that: Training the emotion change analysis model includes the following steps: Obtain several emotion change analysis training samples, which include speech data of two adjacent conversation rounds. All labeled emotion change analysis training samples are combined into an emotion change analysis training set. The emotion change analysis model is trained through the emotion change analysis training set. The emotion change analysis loss value is calculated, and it is determined whether the emotion change analysis loss value is within a second preset range. If the emotion change analysis loss value is within the second preset range, the trained emotion change analysis model is output; otherwise, the emotion change analysis model continues to be trained through the emotion change analysis training set.
7. A robot adaptive interactive system, characterized in that: The system applies a robot adaptive interaction method according to any one of claims 1 to 6, including: The voice data acquisition module is used to obtain the voice data input by the user during the robot's voice interaction; The conversational speech data construction module is used to convert speech data into text data through speech recognition technology, then feed the text data into the conversational text generation model for processing to generate conversational text data, and then use speech synthesis technology to generate conversational speech data from the conversational text data. The conversational speech data is played through the robot's speaker to achieve robot interaction; A dialogue text generation model update module is used to update the dialogue text generation model based on the speech data obtained in the next dialogue round; The conversation text generation model includes a semantic feature extraction layer, a semantic feature update layer, and a conversation text data construction layer. The semantic feature extraction layer is used to extract semantic features from text data to construct a semantic feature vector; the semantic feature update layer is used to update the semantic feature vector based on the user's multiple conversation turns to construct a standard semantic feature vector; the conversation text data construction layer is used to perform conversation text analysis on text data and standard semantic feature vectors to construct conversation text data.
Citation Information
Patent Citations
Conversation management method and device
CN106777013A
Intention recognition method for voice question answering based on large-model multi-agent
CN119831043A