Method and device for intelligently interrupting conversation of voice robot based on intention recognition
Through real-time intention recognition technology, intelligent voice robots can accurately judge the user's intentions, solve the problem of playback pause caused by short sound or background noise in the prior art, and improve the interactive experience and dialogue fluency.
Patent Information
- Application Number
- CN202411633398.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-04
AI Technical Summary
When playing voice, existing intelligent voice robots rely on detection of user voice pause playback, resulting in poor interaction experience, especially sensitive to short-term tone words and background noise, affecting the fluency of conversation.
Using a method based on real-time intent recognition, real-time voice recognition and intent recognition are performed by receiving user voice data, to determine whether the interruption intention is included, and then the voice robot is controlled to pause or continue playing.
Improve the interactive experience of intelligent voice robot dialogue, avoid unnecessary pauses caused by short sound or background noise, and enhance user experience and dialogue fluency.
Smart Images

Figure CN119559941A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a method and device for intelligently interrupting a voice robot conversation based on intent recognition. Background Art
[0002] With the development of artificial intelligence technology, intelligent voice robots have been widely used in various fields. For example, in scenarios such as intelligent customer service and intelligent marketing, intelligent voice robots can interact with users through natural language.
[0003] In the prior art, when playing voice, intelligent voice robots usually rely on pausing the playback when detecting the user's voice. However, this approach has great limitations. On the one hand, for users' common short interjections (such as "um", "ah"), coughs, etc., the intelligent voice robot will also pause the voice, affecting the fluency of the conversation; on the other hand, since the specific intention of the user's voice is not considered, even if the user does have the need to interrupt, it may not be able to pause because the voice is too small or disturbed by background noise, affecting the user experience.
[0004] Therefore, how to achieve intelligent interruption based on real-time intent recognition and improve the interactive experience of intelligent voice robot conversation has become an urgent problem to be solved by technical personnel in this field. Summary of the invention
[0005] In view of this, the present application provides a method and device for intelligently interrupting a voice robot conversation based on real-time intent recognition, so as to solve the technical problems of the rigid pause playback mechanism and poor user experience of the intelligent voice robot in the prior art.
[0006] In a first aspect, the present application provides a method for intelligently interrupting a voice robot conversation based on real-time intent recognition, the method comprising:
[0007] Receiving voice data generated by a user;
[0008] Sending the voice data to a voice recognition server for real-time voice recognition to obtain text data;
[0009] Sending the text data to an intention recognition server for real-time intention recognition to determine whether the text data contains an interruption intention;
[0010] If the text data contains an interruption intention, controlling the voice robot to pause the current voice playback;
[0011] If the text data does not contain an interruption intention, the voice robot is controlled to continue playing the current voice.
[0012] In some possible implementations, after the voice robot pauses the current voice playback, it also includes: recording the pause position of the current voice playback; performing voice recognition and intent recognition on the user's subsequent voice data to obtain the intention corresponding to the user's complete voice; and judging whether to continue playing the original voice from the pause position or play other voices based on the intention corresponding to the complete voice.
[0013] In some possible implementations, whether to continue playing the original voice from the pause position or to play other voices includes: playing the original voice from the most recent complete sentence; or, playing a voice matching the intent corresponding to the complete voice.
[0014] In some possible implementations, sending the text data to an intent recognition server for real-time intent recognition includes:
[0015] Performing word segmentation processing on the text data to obtain a word sequence;
[0016] Based on a pre-trained intent classification model, the word sequence is classified into intent categories to obtain multiple candidate intents and their corresponding scores;
[0017] sorting the candidate intentions according to the scores;
[0018] Extract the top N candidate intents with the highest scores, where N is a preset positive integer;
[0019] Determine whether the first N candidate intentions include an interruption intention.
[0020] In some possible implementations, the pre-trained intent classification model is used to classify the word sequence to obtain multiple candidate intents and their corresponding scores, including:
[0021] Performing word vector mapping on the word sequence to obtain a word vector sequence;
[0022] Process the word vector sequence using a bidirectional long short-term memory network to obtain a hidden layer state sequence;
[0023] Calculate a text representation vector based on the hidden layer state sequence and the attention mechanism;
[0024] Inputting the text representation vector into a fully connected layer to obtain a classification score for each predefined intent category;
[0025] The classification scores are normalized based on the Softmax function to obtain a probability score for each intent category.
[0026] In some possible implementations, before receiving the voice data generated by the user, training an intent classification model is also included, including:
[0027] Construct a training sample set, each training sample includes text data and its corresponding intent annotation;
[0028] Using a large language model to extract features from the text data in the training sample set to obtain semantic features;
[0029] Based on the semantic features and intent annotations, training parameters of the intent classification model;
[0030] Using the validation set to evaluate the intent classification model, and obtaining a model evaluation index;
[0031] When the model evaluation index reaches a preset threshold, the model training is completed.
[0032] In some possible implementations, the extracting features of the text data in the training sample set using a large language model to obtain semantic features includes:
[0033] Build a pre-trained Transformer encoder, including multi-layer self-attention mechanism and feed-forward neural network;
[0034] Inputting text data in the training sample set into the Transformer encoder to obtain a contextual representation of the text;
[0035] Performing pooling processing on the context representation to obtain a text vector of fixed dimension;
[0036] Mapping the text vector to a semantic feature space through a linear layer;
[0037] Based on the contrastive learning approach, the distance between semantic features of similar intents is shortened, and the distance between semantic features of different intents is increased.
[0038] In some possible implementations, after evaluating the intent classification model using the validation set, the method further includes:
[0039] Construct a spiking neural network with LIF neurons, where the membrane potential of each layer of neurons decays over time;
[0040] Convert the parameters of the intent classification model into weights of the spiking neural network;
[0041] Input the semantic features in the validation set in the form of a pulse train to obtain the firing time of each neuron;
[0042] Based on the time-series back-propagation algorithm, the parameter gradient is calculated according to the pulse emission time;
[0043] The model parameters are updated using an adaptive learning rate optimizer until the model converges.
[0044] In some possible implementations, before sending the voice data to a voice recognition server for real-time voice recognition, the method further includes:
[0045] Acquire volume characteristics of the voice data;
[0046] Detecting whether the voice data contains human voice features;
[0047] Determining whether the volume of the voice data exceeds a preset threshold based on the volume feature;
[0048] When the voice data contains human voice features and the volume exceeds a preset threshold, performing noise reduction processing on the voice data;
[0049] The noise-reduced speech data is sent to the speech recognition server.
[0050] In a second aspect, the present application also provides an intelligent voice robot device, comprising:
[0051] A voice collection unit, used to collect voice data of users;
[0052] A speech processing unit, used for preprocessing the speech data;
[0053] An intention recognition unit, used to perform intention recognition on the preprocessed voice data to determine whether it contains an interruption intention;
[0054] The voice playback unit is used to control the pause and continuation of voice playback according to the intention recognition result;
[0055] The storage unit is used to store the pause position of the voice playback.
[0056] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0057] 1) By introducing a real-time intent recognition mechanism, the problem of poor interactive experience caused by the mechanism of pausing playback only by detecting the user's voice is avoided;
[0058] 2) The accuracy of intent recognition is improved by preprocessing speech data and using multiple deep learning models;
[0059] 3) By recording the pause position and determining the subsequent playback content based on the user's complete voice intention, a more intelligent and smooth human-computer dialogue is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0061] Figure 1 It is a flowchart of a method for intelligently interrupting a voice robot conversation based on real-time intent recognition provided by an embodiment of the present application;
[0062] Figure 2 It is a schematic diagram of the system architecture provided by the embodiment of the present application;
[0063] Figure 3 is a schematic diagram of a process for preprocessing voice data provided in an embodiment of the present application;
[0064] Figure 4 is a schematic diagram of the structure of the intent recognition model provided in the embodiment of the present application;
[0065] Figure 5 It is a schematic diagram of the structure of the intelligent voice robot device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to enable those skilled in the art to better understand the inventive concept, working principle and advantages of the embodiments of this specification, the schemes in the embodiments of this specification are described in detail below.
[0067] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0068] Automatic Speech Recognition (ASR)
[0069] Explanation: Automatic speech recognition technology refers to the use of algorithms by computers to convert human voice into readable text through audio data. In this field, ASR is usually used to transcribe user audio information.
[0070] Intent Recognition (IR)
[0071] Interpretation: It is a key task in the field of natural language processing (NLP) that aims to identify the intent or intent category from the user's input. It is often used in applications such as dialogue systems, voice assistants, and chatbots to understand what the user wants to express and provide appropriate responses.
[0072] Intelligent voice robot:
[0073] Explanation: Computer programs or devices that use natural language processing (NLP), speech recognition and synthesis technologies to interact with users. They can understand and process human language and generate natural voice responses, and are usually used in scenarios such as customer service, virtual assistants, and smart home control.
[0074] See also Figure 1 , the embodiment of the present application includes the following steps:
[0075] S1: receiving voice data generated by the user;
[0076] In S1, in the voice robot dialogue system, receiving the voice data generated by the user is the input link of the entire system. This link is mainly implemented by the voice acquisition unit, which specifically includes the following technical details:
[0077] The voice collection unit can use a microphone array to collect voice signals. The microphone array usually contains multiple omnidirectional microphones, which are distributed in a specific geometric arrangement to capture sound signals from different directions. For example, 4 microphones can be used to form a square array with an array aperture of 10 cm, a sampling rate of 16 kHz, and a sampling accuracy of 16 bits.
[0078] In the specific implementation, the voice collection process includes the following steps: first, initialize the audio device through the audio driver and set the sampling parameters; then, establish an audio buffer for temporarily storing the collected audio data; then, start the audio stream and receive the audio data in real time. For example, you can obtain the audio stream through the getUserMedia API of WebRTC, or use the underlying ALSA (Advanced Linux Sound Architecture) interface to directly collect audio data.
[0079] In order to ensure the quality of voice data, the system will also perform preliminary processing on the collected original audio signal, including signal amplification, DC offset elimination, etc. These processes can be implemented through digital signal processing chips (DSP) or software algorithms.
[0080] S2: Send the voice data to the voice recognition server for real-time voice recognition to obtain text data;
[0081] In S2, the process of sending voice data to the voice recognition server for real-time voice recognition involves two key technical points: data transmission and voice recognition.
[0082] In terms of data transmission, the system uses the WebSocket protocol to establish a full-duplex communication connection between the client and the speech recognition server. The WebSocket protocol is based on the TCP protocol and uses the HTTP handshake mechanism to establish a connection. After the connection is established, two-way data transmission can be performed. Compared with the traditional HTTP polling method, WebSocket has the advantages of good real-time performance and low resource consumption. The system divides the collected audio data into frames according to a fixed size (such as 200ms) and sends the audio frames to the server in real time.
[0083] After receiving the audio data, the speech recognition server first decodes the audio data and converts it into PCM (Pulse Code Modulation) format. Then, it extracts features from the audio data, including calculating Mel-frequency cepstral coefficients (MFCC) and filter bank energy features. These acoustic features reflect the time-frequency characteristics of the speech signal and are important inputs for speech recognition.
[0084] Speech recognition uses ASR technology. For example, an end-to-end model based on deep learning can be used, specifically using the Transformer encoder-decoder architecture. The encoder maps the acoustic feature sequence to a high-level representation, and the decoder gradually generates a text sequence based on these representations. In order to improve the real-time performance of recognition, the system adopts a streaming decoding strategy, that is, the decoding process starts after receiving part of the speech data, without waiting for the complete speech input. At the same time, by integrating the language model and introducing prior language knowledge, the recognition accuracy is improved.
[0085] For the recognized text, the system will perform post-processing, including adding punctuation marks, normalizing numbers and units, etc., and finally obtain normalized text data. In order to deal with noise problems in practical applications, the system also integrates technologies such as acoustic model adaptation and noise robustness enhancement.
[0086] S3: Send the text data to the intent recognition server for real-time intent recognition to determine whether the text data contains an interruption intent;
[0087] like Figure 4As shown in the figure, the intent recognition model adopts a multi-level deep learning architecture. The text data is first converted into a vector representation through the word embedding layer, and then the context features are extracted through the Transformer encoder. The bidirectional LSTM network is then used to capture the sequence dependencies. The features at different positions are then weighted and fused through the attention mechanism, and finally the final intent classification result is obtained through the fully connected layer and the Softmax layer. This model structure makes full use of the parallel computing capability of the Transformer and the sequence modeling capability of the LSTM.
[0088] In S3, the system performs the core steps of real-time intent recognition, which also uses a client-server architecture. The intent recognition server receives text data from speech recognition, which is encapsulated in JSON format and contains meta information such as timestamps and session IDs.
[0089] Text data is processed through word segmentation to obtain word sequences. The system uses a word segmentation model based on deep learning, which comprehensively considers character-level features and contextual information. The word segmentation process also includes functions such as proper noun recognition and new word discovery to improve the accuracy of word segmentation in specific fields. For example, for user input such as "help me turn up the volume", the system can correctly segment the word sequence "help / me / turn up / a little / volume".
[0090] The system's intent classification model adopts a multi-stage training strategy. The first is the pre-training stage of the model, which uses large-scale general corpus for self-supervised learning to allow the model to learn basic language knowledge. Then there is the domain adaptation stage, which uses conversation data related to voice robots for fine-tuning to give the model domain-specific semantic understanding capabilities. Finally, there is the intent recognition stage, where the model can accurately identify the user's interruption intention.
[0091] The ASR transcription result is sent to the intent analysis model to obtain the intent. By judging whether there is an interruption intention, it is determined whether the voice robot output needs to be paused. For example, the user says "Let me ask, what is the interest rate?" As soon as the user finishes saying "Let me ask", the real-time intent analysis model outputs two high-scoring intents, "I have a question" and "I want to interrupt." At this time, because of the "interrupt" intent, the voice robot will pause the playback and wait for the user to finish. When the user finishes the sentence, the intent is corrected in real time to "Ask about the interest rate" and "I have a question," and the voice robot will start playing voice related to the interest rate.
[0092] Specific application scenarios:
[0093] For example, a user is talking to a voice robot, and the intelligent voice robot is introducing a product. The user habitually answers: "Hmm, hmm", and the ASR transcribes the audio into text "Hmm, hmm", and determines the user's intention to "please continue" through intent recognition, and decides not to pause the voice output. At this time, the user says "I want to ask a question", and the ASR transcribes the audio into text "I want to ask a question", and through intent recognition, it is considered that the user has the intention to "interrupt", and the intelligent voice robot will pause the voice output and record the current paused voice position, wait for the user to finish speaking, and decide whether to continue playing the original voice (starting from the most recent complete sentence) or other voices based on the user's intention.
[0094] S3.1: Perform word segmentation on the text data to obtain a word sequence;
[0095] In S3.1, word segmentation processing uses a sequence labeling model based on BiLSTM-CRF. The model first uses a word vector to represent each character, then extracts context features through a bidirectional LSTM, and finally uses a conditional random field (CRF) layer for sequence labeling to obtain the optimal word segmentation result. The system also maintains a domain dictionary that contains professional terms and common expressions in specific scenarios to improve the accuracy of word segmentation.
[0096] S3.2: Based on the pre-trained intent classification model, the word sequence is classified into intents to obtain multiple candidate intents and their corresponding scores;
[0097] For the implementation of S3.2, the core of the intent classification model is the deep learning network structure. The word vector mapping uses a pre-trained word embedding model, such as Word2Vec or GloVe, to map each word into a dense vector of a fixed dimension (such as 300 dimensions). These word vectors contain the semantic information of the word, and words with similar semantics are closer in the vector space.
[0098] The bidirectional LSTM network contains two LSTM layers, the forward and backward layers. Each LSTM unit contains an input gate, a forget gate, and an output gate, through which historical information can be selectively memorized or forgotten. For example, for a phrase like "Please stop", LSTM can capture the dependency between "please" and "stop".
[0099] S3.2.1: Map the word sequence to word vectors to obtain a word vector sequence;
[0100] In S3.2.1, the word vector mapping also takes into account the position information of the word. The system uses positional encoding technology to encode the position information of the word into the word vector. Positional encoding uses sine and cosine functions, and words in different positions have different encodings, which enables the model to perceive the position relationship in the word sequence.
[0101] The implementation of the attention mechanism adopts a multi-head self-attention structure, which contains multiple attention heads, and each attention head independently calculates the attention weight. In this way, the model can pay attention to different semantic features in the sequence at the same time. The calculation of the attention weight is based on the similarity between the query vector, the key vector, and the value vector, and is normalized using the Softmax function.
[0102] The final text representation vector is a weighted combination of the outputs of each attention head. This vector is input to the fully connected layer, which uses the ReLU activation function to map the features to the intent space through multiple layers of transformation. Finally, the Softmax function is used to calculate the probability score of each predefined intent category.
[0103] S3.2.2: Use a bidirectional long short-term memory network to process the word vector sequence and obtain the hidden state sequence;
[0104] When processing word vector sequences, the system uses a bidirectional long short-term memory network (Bi-LSTM) to extract contextual features of the sequence. Specifically, the bidirectional long short-term memory network contains two LSTM layers, forward and backward, which process the word vectors from the forward and backward directions of the sequence respectively. Each LSTM unit contains three gating structures: input gate, forget gate, and output gate. These gating structures control the flow of information through sigmoid functions. For example, when processing a sequence like "Please help me pause for a moment", the forward LSTM can capture the effect of "Please help me" on "pause", while the backward LSTM can capture the effect of "a moment" on "pause". When processing each word vector, the LSTM unit updates its internal state and outputs the hidden state at the current moment. In this way, for a word vector sequence of length n, the bidirectional LSTM will eventually obtain 2n hidden states, with each word corresponding to a forward state and a backward state.
[0105] S3.2.3: Calculate the text representation vector based on the hidden state sequence and attention mechanism;
[0106] After obtaining the hidden state sequence, the system introduces the attention mechanism to dynamically adjust the importance weights of different positions. The core idea of the attention mechanism is that different words contribute differently to the expression of intent. For example, in interruption intent recognition, keywords such as "stop" and "wait a minute" often have higher importance. In specific implementation, the system first converts the hidden state sequence into a query vector, a key vector, and a value vector. Then, the attention scores are calculated by the dot product operation of the query vector and the key vector. These scores reflect the degree of association between each position in the sequence. Next, the softmax function is used to normalize the attention scores to obtain the attention weights. Finally, the attention weights are weighted and summed with the value vector to obtain a text representation vector that incorporates global context information.
[0107] S3.2.4: Input the text representation vector into the fully connected layer to obtain the classification score for each predefined intent category;
[0108] Inputting the text representation vector into the fully connected layer is a key step in intent classification. The fully connected layer consists of multiple neurons, which form a complex feature transformation network through weighted connections. In the specific implementation, the system adopts a multi-layer fully connected structure, and the ReLU activation function is used between each layer to introduce nonlinear transformations. For example, the first layer of full connection may map the 512-dimensional text representation vector to a 256-dimensional intermediate feature, the second layer maps it to 128 dimensions, and the last layer maps the feature to the space of predefined intent categories. This hierarchical feature transformation enables the model to learn feature representations at different levels of abstraction, thereby improving the accuracy of classification.
[0109] S3.2.5: Normalize the classification scores based on the Softmax function to obtain the probability score of each intent category;
[0110] Finally, the system uses the Softmax function to normalize the classification scores output by the fully connected layer and convert them into probability distributions. The characteristic of the Softmax function is that it maps any real number to the interval (0,1), and the sum of the probabilities of all categories is 1. In this way, for each predefined intent category, the system can get a probability score. For example, for the input "please pause", the system may output a probability of 0.92 for interruption intent, 0.05 for continuation intent, and 0.03 for other intents. By setting a suitable probability threshold, the system can determine whether the current input contains an interruption intent and make corresponding response decisions. It should be noted that the model will use the cross entropy loss function during the training phase to optimize these probability predictions to make them as close to the true intent distribution as possible.
[0111] S3.3: Sort candidate intents by score;
[0112] After obtaining the probability score for each intent category, the system needs to effectively screen and judge these candidate intents. First, the system uses a quick sort algorithm to sort all candidate intents in descending order according to their probability scores. During the sorting process, the system maintains an ordered list of intent identifiers and corresponding probability scores. For example, when the system recognizes that the user says "Wait a minute, this sound is too loud", the following sorting results may be obtained: the probability of "interrupt-adjust volume" intent is 0.85, the probability of "pure interruption" intent is 0.72, the probability of "query" intent is 0.15, and the probability of "end conversation" intent is 0.08. This sorting mechanism ensures that the system can prioritize the most likely user intents.
[0113] S3.4: extract the top N candidate intents with the highest scores, where N is a preset positive integer;
[0114] After the sorting is completed, the system sets an appropriate N value (usually 3 or 5) and extracts the top N highest-scoring candidate intents from the top of the sorted list. The selection of this N value requires a trade-off between accuracy and efficiency: a value that is too small may miss the correct intent, while a value that is too large may introduce too many noisy intents. The system dynamically adjusts this threshold based on the actual application scenario and performance requirements. For example, in a noisy environment, the N value can be appropriately increased to improve the system's fault tolerance; in a quieter environment, a smaller N value can be used to increase the system's response speed.
[0115] S3.5: Determine whether the first N candidate intentions include an interruption intention;
[0116] Subsequently, the system will analyze these N high-confidence candidate intents, focusing on checking whether they contain interruption-type intents. This process is not just a simple intent type matching, but also needs to consider the semantic relevance between intents. The system will maintain an interruption intent family, including multiple subcategories such as "pure interruption", "interruption and questioning", and "interruption and adjustment". For example, when it is detected that the user says "stop, I want to ask a question", even if the probability of the "questioning" intent is slightly higher than the "interrupting" intent, the system can correctly identify that this is a composite intent containing an interruption intent. At the same time, the system will also consider the confidence threshold of the intent. Only when the highest confidence exceeds the preset threshold (for example, 0.6) will the corresponding interruption operation be triggered. This multi-level judgment mechanism can effectively reduce the system's false trigger rate and improve the user experience. In addition, the system will also record these high-confidence intents for subsequent dialogue management and intent tracking to ensure the coherence and naturalness of the dialogue.
[0117] S4: If the text data contains an interruption intention, the voice robot is controlled to pause the current voice playback;
[0118] In S4, the system implements an intelligent voice playback control mechanism. When an interruption intention is detected, the system will immediately interrupt the current voice playback and record the timestamp and context information of the interruption point. This information is stored in the system's context manager for subsequent playback control decisions.
[0119] The system achieves smooth voice interruption through audio buffer management. When the playback needs to be interrupted, the system will wait for the current audio frame to be played and then clear the audio buffer, which can avoid abrupt interruption effects. At the same time, the system will save the voice content before and after the interruption position, so that it is convenient to continue playing from the appropriate position later.
[0120] To enhance the user experience, the system plays a gentle prompt tone after the voice is interrupted, indicating that the user's interruption request has been received. The volume and duration of the prompt tone are carefully designed to allow users to perceive the system's response without causing interference.
[0121] S4.1: Record the pause position of the current voice playback;
[0122] S4.2: Perform speech recognition and intent recognition on the user's subsequent speech data to obtain the intent corresponding to the user's complete speech;
[0123] S4.3: According to the intent corresponding to the complete speech, determine whether to continue playing the original speech from the pause position or play other speech;
[0124] S4.3.1: Play the original speech starting from the most recent complete sentence;
[0125] S4.3.2: Play the speech that matches the intent corresponding to the complete speech;
[0126] S4.1 to S4.3 implement a context-aware playback control strategy. The pause position recorded by the system includes not only the timestamp but also the semantic breakpoint information. Through semantic analysis, the system can find the nearest complete sentence boundary and ensure that playback continues from the semantically complete position.
[0127] When the user expresses a new intention after an interruption, the system will compare the priority of the intention. If the priority of the new intention is higher than the original conversation flow, the system will switch to the new conversation branch; if the priority is equal or lower, the system will provide selection suggestions to let the user decide whether to continue the original conversation.
[0128] S5: If the text data does not contain an interruption intention, control the voice robot to continue playing the current voice;
[0129] S6: Before receiving the voice data generated by the user, it also includes training the intent classification model:
[0130] In S6, the model training process adopts a multi-task learning framework. In addition to the main intent classification task, the system also introduces auxiliary tasks such as semantic similarity prediction and sentence completeness judgment. These auxiliary tasks help the model learn better text representation.
[0131] The construction of training samples adopts an active learning strategy. The system will identify samples that the model is uncertain about and hand them over to manual labeling, so that the most valuable training data can be obtained with the least labeling cost. At the same time, the system also uses data enhancement technology to expand training samples through methods such as synonym replacement and sentence transformation.
[0132] During the feature extraction process, the Transformer encoder adopts a multi-layer structure, each layer of which contains a multi-head self-attention module and a feedforward neural network. In order to improve the training efficiency, the system uses gradient accumulation and mixed precision training techniques. At the same time, by adding residual connections and layer normalization, the convergence of the model is improved.
[0133] S6.1: Construct a training sample set, each training sample includes text data and its corresponding intent annotation;
[0134] S6.2: Use the large language model to extract features from the text data in the training sample set to obtain semantic features;
[0135] S6.2.1: Build a pre-trained Transformer encoder, including a multi-layer self-attention mechanism and a feed-forward neural network;
[0136] When building the pre-trained Transformer encoder, the system adopts a multi-layer stacked structure design. Each layer of the Transformer encoder contains two core sub-layers: a multi-head self-attention layer and a feedforward neural network layer. The multi-head self-attention mechanism usually uses 8 attention heads, each with a dimension of 64, which enables the model to simultaneously focus on different semantic features of the input sequence. In the self-attention calculation, the system maps the input sequence into a query matrix, a key matrix, and a value matrix at the same time, and calculates the attention weights through a scaled dot product attention mechanism. Each layer also contains residual connections and layer normalization, which helps prevent gradient vanishing and speeds up the training process. The feedforward neural network adopts a two-layer structure. The first layer uses the ReLU activation function, and the dimension of the middle layer is usually set to 4 times the input dimension. This design enhances the nonlinear expression ability of the model.
[0137] S6.2.2: Input the text data in the training sample set into the Transformer encoder to obtain the contextual representation of the text;
[0138] When the training sample is input into the Transformer encoder, the system first performs word segmentation and encoding on the text. Each word is converted into a word embedding vector, and the position encoding information is superimposed. The position encoding is generated using sine and cosine functions, which enables the model to perceive the relative position relationship of words in the input sequence. During the encoding process, the system generates a context-dependent representation vector for each position. These vectors not only contain the semantic information of the word itself, but also incorporate its contextual information in the sentence. For example, for a sentence like "turn down the sound", the system can understand that "turn down" in this context is an operation on "sound", not other meanings.
[0139] S6.2.3: Pool the context representation to obtain a text vector of fixed dimension;
[0140] In order to obtain a text vector of fixed dimension, the system performs pooling on the context representation. Common pooling strategies include average pooling and maximum pooling, and the system adopts a combination of these two strategies. Specifically, the representation vectors of all positions in the sequence are first weighted averaged, and the weights are calculated through the attention mechanism. Then, the maximum pooling operation is used to extract the most significant features in the sequence. This dual pooling mechanism can effectively capture the global semantic information of the sequence while retaining important local features. The final text vector dimension is usually 768 or 1024. The choice of this dimension requires a balance between expressiveness and computational efficiency.
[0141] S6.2.4: Map the text vector to the semantic feature space through a linear layer;
[0142] The process of mapping text vectors to semantic feature space through linear layers is actually a process of dimensionality reduction and feature extraction. The linear layer consists of a weight matrix and a bias vector, which projects the text vectors in the high-dimensional space to the lower-dimensional semantic feature space through learnable parameters. The dimension of this space is usually set to 256 or 512. In this space, semantically similar texts are mapped to similar areas. In order to enhance the expressiveness of features, the system also uses LayerNormalization for normalization after linear mapping, which can reduce the offset and scale change of feature distribution.
[0143] S6.2.5: Based on contrastive learning, the distance between semantic features of similar intents is reduced, and the distance between semantic features of different intents is increased;
[0144] In the contrastive learning phase, the system uses a contrastive loss function to optimize the structure of the feature space. For each training sample, the system constructs a positive sample pair and a negative sample pair. A positive sample pair refers to different expressions with the same intention, such as "pause" and "stop for a while"; a negative sample pair refers to expressions with different intentions, such as "pause" and "the sound is too quiet". By minimizing the distance between positive sample pairs and maximizing the distance between negative sample pairs, the system gradually optimizes the distribution of the feature space. In specific implementation, the InfoNCE loss function is used, and the temperature parameter is usually set to 0.07. In addition, the system also adopts a difficult negative sample mining strategy, giving priority to those negative samples that are easy to cause confusion for training, which can improve the model's discrimination ability. During the training process, the momentum contrastive learning method is used to maintain the feature memory library, which can utilize more negative samples and improve training efficiency.
[0145] S6.3: Based on semantic features and intent annotations, train the parameters of the intent classification model;
[0146] When training the intent classification model based on semantic features and intent annotations, the system adopts an end-to-end training strategy. First, the system divides the training data into a training set and a validation set, usually in a ratio of 8:2. The training process uses a small batch stochastic gradient descent method, and the size of each batch is set to 32 or 64. This setting can achieve a good balance between training efficiency and memory consumption. The loss function uses cross entropy loss, and introduces label smoothing technology to convert hard labels into soft labels, which can improve the generalization ability of the model and prevent overfitting. During the training process, the system uses the Adam optimizer to update the model parameters, the initial learning rate is set to 0.0001, and the cosine annealing strategy is used to dynamically adjust the learning rate.
[0147] S6.4: Use the validation set to evaluate the intent classification model and obtain the model evaluation indicators;
[0148] In order to improve the robustness of the model, the system also uses a variety of regularization techniques during the training process. The first is the Dropout layer, which adds a Dropout with a probability of 0.1 between the fully connected layers to randomly discard the outputs of some neurons, which can reduce the co-adaptation between neurons. The second is L2 regularization, which adds a weight decay term to the loss function with a coefficient set to 0.01 to control the scale of the model parameters. In addition, the system also uses gradient clipping technology to limit the norm of the gradient to a predetermined threshold, which can prevent the gradient explosion problem. During the training process, the system regularly evaluates the model performance on the validation set and calculates indicators such as accuracy, precision, recall, and F1 score.
[0149] S6.5: When the model evaluation index reaches the preset threshold, the model training is completed;
[0150] The model evaluation adopts a comprehensive evaluation system. The first is the accuracy index, which reflects the overall classification accuracy of the model; the second is the precision and recall of each intent category, which is particularly important for evaluating the performance of the model on each intent. In particular, for key categories such as interruption intent, the system will set higher evaluation requirements. For example, the precision of interruption intent needs to reach above 0.95, which is to reduce the negative experience caused by false triggers. The system also calculates the macro-average F1 score and the micro-average F1 score. The former takes into account the balance of each category, and the latter reflects the overall performance at the sample level. In addition, the system will also evaluate the latency performance of the model to ensure that the response time of intent recognition is controlled within 100 milliseconds.
[0151] It is necessary to consider multiple indicators comprehensively to determine whether the model training is complete. The system sets a series of preset thresholds: the overall accuracy needs to reach above 0.92, the F1 score of each intent category needs to reach above 0.85, and the precision of interruption intent needs to reach above 0.95. At the same time, the system will monitor the trend of the loss value on the validation set. If the validation loss does not decrease significantly (the change is less than 0.001) for 5 consecutive epochs, the early stopping mechanism will be triggered. In addition, the system will analyze the error types of the model through the confusion matrix to ensure that there is no systematic classification bias. Model training is considered complete when all these indicators meet the requirements. Even if the preset threshold is reached, the system will save the model checkpoints of the last few epochs so that the optimal model version can be selected in actual deployment. After training is completed, the system will also use additional test sets for final performance verification to ensure that the model can run stably in real scenarios.
[0152] S6.6: Construct a spiking neural network with LIF neurons, where the membrane potential of each layer of neurons decays over time;
[0153] When constructing a spiking neural network, the system uses the bio-inspired LIF (Leaky Integrate-and-Fire) neuron model. Each LIF neuron maintains a membrane potential variable, which decays exponentially over time. The dynamic equation of the membrane potential is: τ(dV / dt)=-(V-V_rest)+RI(t), where τ is the membrane time constant (usually set to 20ms), V_rest is the resting potential (set to -65mV), R is the membrane resistance, and I(t) is the input current. When the membrane potential exceeds the firing threshold (usually set to -55mV), the neuron generates a pulse, then enters a refractory period, and the membrane potential is reset to the resting potential. The system sets up hundreds of such LIF neurons in each layer of the network, which are connected in a feedforward manner to form a multi-layer spiking neural network structure. S6.7: Convert the parameters of the intent classification model into weights of the spiking neural network;
[0154] S6.8: Input the semantic features in the validation set in the form of a pulse train to obtain the firing time of each neuron;
[0155] Converting the traditional intent classification model parameters into the weights of the spiking neural network is a key step. The system first normalizes the weights of the original model so that they are distributed within a suitable range. Then, the continuous-valued weights are converted into discrete weights suitable for pulse transmission using a rescaling method. Specifically, for each synaptic connection, its weight determines the current intensity when the subsequent neuron receives a pulse from the previous layer of neurons. For example, if the previous layer of neurons emits a pulse at time t, then the next layer of neurons will superimpose a current pulse proportional to the synaptic weight on its membrane potential. The system also introduces a synaptic delay mechanism so that different synaptic connections have different transmission delays. This time encoding method can increase the information processing capability of the network.
[0156] In the input processing stage, the system needs to convert the semantic features in the validation set into pulse sequences. The rate encoding method is used to map the size of the feature value to the frequency of pulse emission. For example, for a feature component with a value range of [0,1], it can be mapped to a firing frequency of [0,100] Hz. Each input neuron will emit pulses at the corresponding frequency within a fixed time window (usually 100ms). The system uses an event-driven simulation method to process these pulse sequences, and only updates the network state when the pulse occurs. This method can significantly improve computing efficiency. By recording the firing time of each neuron in the network, the system obtains a pulse emission pattern that contains complete timing information.
[0157] S6.9: Based on the time-series back propagation algorithm, the parameter gradient is calculated according to the pulse emission time;
[0158] The implementation of the sequential back propagation algorithm (STBP) is the core of training spiking neural networks. Since the pulse function is discontinuous and cannot be directly derived, the system uses a surrogate gradient method to approximate the gradient of the pulse function. Specifically, the framework of back propagation through time (BPTT) is adopted to discretize time into several time steps, and the error gradient is calculated at each time step. For each neuron, its gradient consists of two parts: one part comes from direct error propagation, and the other part comes from the cumulative effect of membrane potential over time. The system uses a custom gradient function, for example, in the following form: gradient = 1 / (1+|V-V_th|), where V is the membrane potential and V_th is the firing threshold. This gradient function has a larger gradient in the critical area and a smaller gradient away from the critical area, which is conducive to the training convergence of the network.
[0159] S6.10: Update model parameters using an adaptive learning rate optimizer until the model converges;
[0160] In the parameter update phase, the system uses a variant of the Adam optimizer to handle the special needs of the spiking neural network. The learning rate of the optimizer adopts an adaptive adjustment strategy, with the initial value set to 0.001, and then dynamically adjusted according to the gradient changes during training. In order to improve the stability of training, the system introduces a gradient clipping mechanism to limit the norm of the gradient to [0.01, 1]. At the same time, an exponential moving average is used to smooth parameter updates to avoid violent oscillations caused by the discrete characteristics of the pulse. The system also sets multiple convergence criteria, including the stability of the average firing rate and the degree of convergence of the classification accuracy. When these indicators remain stable for multiple epochs in a row, the model is considered to have reached convergence. In the end, the model optimized by the spiking neural network not only maintains a high classification accuracy, but also has lower energy consumption and faster response speed, which is of great significance for actual deployment.
[0161] In S6.6 to S6.10, the implementation of the spiking neural network uses a discrete neuron model. Each LIF (Leaky Integrate-and-Fire) neuron maintains a membrane potential variable and generates a pulse when the membrane potential exceeds the threshold. The pulse emission moment carries important timing information, and the system uses this information through the timing back propagation algorithm.
[0162] The parameter optimization process uses the Adam optimizer and adopts a learning rate decay strategy. To prevent overfitting, the system uses techniques such as Dropout and weight regularization. At the same time, by introducing an early stopping strategy, training is stopped in time when the performance of the validation set no longer improves.
[0163] S7: Before sending the voice data to the voice recognition server for real-time voice recognition, the process further includes:
[0164] In S7, the system implements a high-quality speech preprocessing process. The volume feature is extracted using short-time energy analysis. The system calculates the signal energy within a fixed-length window and compares it with a preset threshold. The human voice feature detection uses a deep learning-based voice activity detection (VAD) model, which can effectively distinguish between human voice, background music, and environmental noise.
[0165] When valid human voice input is detected, the system will start adaptive noise reduction processing. The noise reduction algorithm uses a combination of spectral subtraction and Wiener filtering to effectively suppress various types of noise while maintaining the naturalness of the speech signal. The system will also dynamically adjust the noise reduction parameters and select the most suitable noise reduction strategy based on the characteristics of the ambient noise.
[0166] like Figure 3As shown in the figure, the preprocessing process of speech data mainly includes the following steps: first, the volume characteristics of the speech data are obtained, then whether the human voice characteristics are contained, when it is confirmed that the human voice is contained and the volume exceeds the preset threshold, the speech data is subjected to noise reduction processing, and finally the processed speech data is sent to the speech recognition server. This process ensures the quality of the input speech and effectively improves the accuracy of subsequent speech recognition.
[0167] S7.1: Obtain volume characteristics of voice data;
[0168] S7.2: Detect whether the speech data contains human voice features;
[0169] S7.3: Determine whether the volume of the voice data exceeds a preset threshold based on the volume feature;
[0170] S7.4: When the speech data contains human voice features and the volume exceeds a preset threshold, noise reduction processing is performed on the speech data;
[0171] S7.5: Send the noise-reduced speech data to the speech recognition server.
[0172] The above are the detailed implementation principles and technical details of each technical feature of this application. The organic combination of these technical features forms a complete intelligent interruption voice robot dialogue system based on real-time intention recognition, which can provide users with a smooth and natural human-computer interaction experience.
[0173] In practical applications, the technical solution of this application can be applied to the following scenarios:
[0174] Scenario 1: Intelligent Customer Service
[0175] User: "Hmm" (the system continues playing)
[0176] System: "Our products have the following features..."
[0177] User: "Wait a minute, what is the down payment?" (The system detects the interruption intention and pauses the playback)
[0178] System: (Play instructions about down payment)
[0179] Scenario 2: Product Introduction
[0180] System: "The fund's historical rate of return..."
[0181] User: "cough cough" (the system continues to play)
[0182] User: "I want to know the risk level" (the system detects the interruption intention and pauses the playback)
[0183] System: (play risk level related content)
[0184] The technical solution of the embodiment of the present application uses real-time intent recognition to intelligently control the playback behavior of the voice robot, avoiding the problem of poor interactive experience caused by relying solely on sound triggering in traditional solutions. At the same time, the accuracy of intent recognition is improved through a deep learning model, and more intelligent dialogue control is achieved through context perception.
[0185] The embodiment of the present invention also provides an intelligent voice robot system, such as Figure 2 As shown in the figure, the system architecture is divided into three layers: user interaction layer, business logic layer and data layer. The user interaction layer is responsible for voice interaction with users; the business logic layer includes core functional modules such as speech recognition, intent recognition, dialogue management and speech synthesis, as well as a unified context management module; the data layer stores basic data resources such as intent classification models, dialogue strategy libraries and knowledge bases. Data interaction between layers is carried out through standard interfaces, ensuring the modularity and scalability of the system.
[0186] The embodiment of the present invention further provides an intelligent voice robot device, comprising:
[0187] A voice collection unit, used to collect voice data of users;
[0188] A speech processing unit, used for preprocessing the speech data;
[0189] An intention recognition unit, used to perform intention recognition on the preprocessed voice data to determine whether it contains an interruption intention;
[0190] The voice playback unit is used to control the pause and continuation of voice playback according to the intention recognition result;
[0191] The storage unit is used to store the pause position of the voice playback.
[0192] like Figure 5 As shown in the figure, the intelligent voice robot device is mainly composed of five functional units: the voice collection unit is responsible for collecting user voice through the microphone array; the voice processing unit performs signal preprocessing; the intention recognition unit includes feature extraction and classification decision modules; the voice playback unit is responsible for audio buffer management and playback control; the storage unit is used to record pause position information. Each unit is connected through a data bus and works together to realize the intelligent human-computer dialogue function.
[0193] The embodiment of this specification also provides an electronic device suitable for implementing an intelligent interruption voice method, wherein the electronic device includes a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage part to a random access memory (RAM), such as executing the method described in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other via a bus. The input / output (I / O) interface is also connected to the bus.
[0194] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. The drive 310 is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0195] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), various functions defined in the system of the present application are executed.
[0196] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0197] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0198] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0199] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0200] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above-mentioned various optional implementations.
[0201] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0202] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0203] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0204] Although the embodiments of this specification are disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A method for intelligently interrupting a voice robot conversation based on intention recognition, characterized in that: include: Receiving voice data generated by a user; Sending the voice data to a voice recognition server for real-time voice recognition to obtain text data; Sending the text data to an intention recognition server for real-time intention recognition to determine whether the text data contains an interruption intention; If the text data contains an interruption intention, controlling the voice robot to pause the current voice playback; If the text data does not contain an interruption intention, the voice robot is controlled to continue playing the current voice.
2. The method according to claim 1, characterized in that After the voice robot pauses the current voice playing, the method further includes: Record the pause position of the current voice playback; Perform speech recognition and intent recognition on the user's subsequent voice data to obtain the intent corresponding to the user's complete voice; According to the intention corresponding to the complete speech, it is determined whether to continue playing the original speech from the pause position or to play other speech.
3. The method according to claim 2, characterized in that The step of continuing to play the original voice from the pause position or playing other voices includes: Play the original voice starting from the most recent complete sentence; or, According to the intent corresponding to the complete speech, a speech matching the intent is played.
4. The method according to claim 1, characterized in that: The sending the text data to the intent recognition server for real-time intent recognition includes: Performing word segmentation processing on the text data to obtain a word sequence; Based on a pre-trained intent classification model, the word sequence is classified into intent categories to obtain multiple candidate intents and their corresponding scores; sorting the candidate intentions according to the scores; Extract the top N candidate intents with the highest scores, where N is a preset positive integer; Determine whether the first N candidate intentions include an interruption intention.
5. The method according to claim 4, characterized in that The pre-trained intent classification model is used to classify the word sequence to obtain multiple candidate intents and their corresponding scores, including: Performing word vector mapping on the word sequence to obtain a word vector sequence; Process the word vector sequence using a bidirectional long short-term memory network to obtain a hidden layer state sequence; Calculate a text representation vector based on the hidden layer state sequence and the attention mechanism; Inputting the text representation vector into a fully connected layer to obtain a classification score for each predefined intent category; The classification scores are normalized based on the Softmax function to obtain a probability score for each intent category.
6. The method according to claim 1, characterized in that Before receiving the voice data generated by the user, the method further includes training an intention classification model, including: Construct a training sample set, each training sample includes text data and its corresponding intent annotation; Using a large language model to extract features from the text data in the training sample set to obtain semantic features; Based on the semantic features and intent annotations, training parameters of the intent classification model; Using the validation set to evaluate the intent classification model, and obtaining a model evaluation index; When the model evaluation index reaches a preset threshold, the model training is completed.
7. The method according to claim 6, characterized in that The use of the large language model to extract features from the text data in the training sample set to obtain semantic features includes: Build a pre-trained Transformer encoder, including multi-layer self-attention mechanism and feed-forward neural network; Inputting text data in the training sample set into the Transformer encoder to obtain a contextual representation of the text; Performing pooling processing on the context representation to obtain a text vector of fixed dimension; Mapping the text vector to a semantic feature space through a linear layer; Based on the contrastive learning approach, the distance between semantic features of similar intents is shortened, and the distance between semantic features of different intents is increased.
8. The method according to claim 6, characterized in that After evaluating the intent classification model using the validation set, it also includes: Construct a spiking neural network with LIF neurons, where the membrane potential of each layer of neurons decays over time; Convert the parameters of the intent classification model into weights of the spiking neural network; Input the semantic features in the validation set in the form of a pulse train to obtain the firing time of each neuron; Based on the time-series back-propagation algorithm, the parameter gradient is calculated according to the pulse emission time; The model parameters are updated using an adaptive learning rate optimizer until the model converges.
9. The method according to claim 1, characterized in that: Before sending the voice data to a voice recognition server for real-time voice recognition, the method further includes: Acquire volume characteristics of the voice data; Detecting whether the voice data contains human voice features; Determining whether the volume of the voice data exceeds a preset threshold based on the volume feature; When the voice data contains human voice features and the volume exceeds a preset threshold, performing noise reduction processing on the voice data; The noise-reduced speech data is sent to the speech recognition server.
10. An intelligent voice robot device, characterized in that: include: A voice collection unit, used to collect voice data of users; A speech processing unit, used for preprocessing the speech data; An intention recognition unit, used to perform intention recognition on the preprocessed voice data to determine whether it contains an interruption intention; The voice playback unit is used to control the pause and continuation of voice playback according to the intention recognition result; The storage unit is used to store the pause position of the voice playback.
Citation Information
Cited By
Voice interaction optimization method and system based on multi-modal large model
CN120496511A
Voice interruption processing method and device, electronic equipment and storage medium
CN120748401A
Voice interrupt processing method and device, electronic equipment, and storage medium
CN120748401B
Outbound call real-time interruption processing method and device, computer equipment and storage medium
CN122001982A