Voice receiving recognition error correction method for voice robot
By constructing an intent stability-aware unit and multi-granular semantic coding, combined with a lightweight intent matcher and dynamic context pruning strategy, the problems of intent discrimination bias and high memory consumption in multi-intent parallel dialogue of voice robots are solved, and efficient and robust semantic understanding and intent recognition are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-27
AI Technical Summary
Existing voice robots are prone to intention discrimination bias in complex dialogues with multiple intentions due to excessive contextual semantic noise and historical dependency information. Furthermore, they suffer from high memory consumption and algorithm latency when processing long dialogue sequences, making them difficult to adapt to real-time interaction and low-resource environments.
An intent stability perception unit is constructed, and a historical consistency score is generated through a pre-trained semantic alignment model. Combining multi-granular semantic encoding and a lightweight intent matcher, a learnable gating network is constructed using sliding window variance analysis and dynamic context pruning strategies to optimize intent selection, thereby achieving dynamic characterization and efficient recognition of user intent.
It improves the semantic understanding robustness of voice robots in complex interaction scenarios, reduces computational overhead, ensures time sensitivity and logical coherence, is suitable for service robot application scenarios with strict response latency requirements, adapts to open domain dialogue and reduces resource consumption.
Smart Images

Figure CN121747548A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of voice interaction and natural language understanding technology, and in particular to a method for voice robot voice reception, recognition and error correction. Background Technology
[0002] In recent years, voice interaction and natural language understanding technologies have developed rapidly, and voice robots have been widely used in intelligent services, customer question answering, and human-computer assistance. With the gradual maturation of multi-turn dialogue technology, existing systems generally employ modules such as semantic parsing, multi-intent recognition, and context tracking to improve their ability to understand user needs in complex contexts. Mainstream technical approaches largely rely on large-scale pre-trained language models (such as BERT and ERNIE), RNN / LSTM structures based on dialogue context sequence modeling, and intent recognition mechanisms driven by knowledge bases or business rules. In multi-turn dialogue scenarios, semantic coherence and intent are typically maintained through long-sequence context tracking, global semantic slot filling, and rule engine switching. Figure 1 To; Currently, existing technologies generally face two core bottlenecks. First, in complex dialogues involving multiple intentions in parallel, methods are prone to intention graph discrimination bias due to contextual semantic noise, local semantic jumps, or excessive historical dependency information, resulting in intention drift and affecting the final interactive experience and task accuracy. Second, when processing long dialogue sequences, traditional methods often need to store the complete dialogue history or build complex graph structures to track semantic changes, leading to high memory consumption and algorithm latency, making them unsuitable for real-time interaction and low-resource environments. Especially in scenarios such as service robots and mobile voice terminals, the demand for real-time performance, lightweight recognition, and high accuracy urgently requires new technological breakthroughs. Summary of the Invention
[0003] In order to solve the above-mentioned technical problems, the present invention provides a method for voice robot voice reception, recognition and error correction.
[0004] The technical solution of this invention is implemented as follows: A method for voice robot voice reception, recognition, and error correction, comprising: S1: Construct an intent stability perception unit and generate a historical consistency score based on a pre-trained semantic alignment model. The intent stability perception unit includes an input layer, a semantic encoding layer and an intent state evaluation layer. The input layer receives the original semantic vector of the current round and the historical dialogue state vector. The semantic encoding layer uses a multi-head attention mechanism to perform cross-modal feature fusion. The intent state evaluation layer outputs a sequence of stability scores for candidate intents. S2: Perform multi-granular semantic encoding on the current input text, and generate a joint semantic representation based on the BERT-wwm model, which includes lexical feature vectors, dependency syntactic graph structures and discourse behavior labels. The dependency syntactic graph structure is extracted for topological features through a graph convolutional network, and the discourse behavior labels are mapped to multiple categories through a pre-annotated dialogue behavior ontology. S3: Input the joint semantic representation of the current round into the intent stability perception unit, calculate the historical consistency score sequence between the current dialogue round and the previous N rounds of dialogue, and use the sliding window variance analysis method to detect the stability of the score sequence. When the window variance is lower than the preset threshold, it is marked as the main intent continuation state; otherwise, the multi-intent competition analysis process is triggered. S4: In the multi-intent competition analysis process, lightweight intent matchers with predefined high-frequency intent categories are run in parallel. Each intent matcher contains a bidirectional LSTM encoder and an intent feature projection layer, and outputs the confidence vector and semantic offset matrix of the candidate intent. The semantic offset matrix is calculated by cosine similarity to calculate the degree of deviation between the current semantic representation and the intent prototype vector. S5: Construct a context saliency weight function, and calculate the weighted calculation of historical dialogue segments based on semantic relevance score and time decay factor. The semantic relevance score uses max pooling to extract key semantic features in historical rounds, and the time decay factor decays exponentially according to the dialogue round interval to generate a dynamic context memory vector. S6: Execute a dynamic context pruning strategy, calculate the contextual saliency weight of each historical segment, retain the K historical segments with weights higher than the dynamic threshold, and compress the remaining low-weight segments through singular value decomposition to generate an aggregated summary vector. The dynamic threshold is adaptively adjusted based on the semantic entropy value of the current dialogue round. S7: Construct a learnable gating network that integrates three indicators: confidence of candidate intent, semantic continuity score, and historical activation frequency. Generate an intent optimization weight vector through a gating mechanism. The semantic continuity score is calculated based on the temporal correlation coefficient of the historical intent state vector, and the historical activation frequency is dynamically updated using the exponential weighted moving average method. S8: Based on the intention optimization weight vector, candidate intentions are weighted and fused to output the final intention graph recognition result. At the same time, the state transition matrix of the intention stability perception unit is updated. The parameters of the gating network are incrementally optimized through an online learning mechanism. The optimization objective function includes a weighted loss term of intention recognition accuracy and context memory overhead.
[0005] The present invention provides a voice robot voice reception, recognition and error correction method, which has the following beneficial effects: (1) This invention introduces an intent stability perception unit and a multi-granularity semantic encoding mechanism to achieve a fine characterization of the dynamic evolution of user intent, which significantly improves the semantic understanding robustness of the dialogue system in complex interaction scenarios. Based on the historical consistency score sequence, a sliding window variance criterion is constructed, which can adaptively distinguish between the main graph continuation state and the multi-intent competition state, effectively avoiding the erroneous switching phenomenon caused by local semantic fluctuations. Without relying on a large-scale pre-trained model, this mechanism completes the cross-round intent continuity modeling through a small-scale semantic alignment model, which greatly reduces the computational overhead while ensuring the time sensitivity and logical coherence of intent judgment, and is especially suitable for service robot application scenarios with strict response latency requirements; (2) This invention proposes a dynamic memory management strategy based on contextual saliency weighting function. Combining an adjustable pruning mechanism and aggregated summary representation, it achieves selective retention of high-value dialogue fragments and compact compression of low-relevance historical content. By dynamically calculating the importance weight of each historical fragment by fusing semantic relevance and time decay factor, and limiting the retention to only K contextual units with the highest saliency, it ensures that the system can maintain high-quality context awareness under limited memory conditions. At the same time, the design of aggregated summary vector further enhances the system's ability to capture long-distance semantic dependencies, avoids the complete loss of important background information during pruning, and thus significantly improves the coherence and consistency of long-cycle dialogues while controlling resource consumption. (3) In the context of multiple intents coexisting, this invention innovatively constructs a main intent selection mechanism driven by confidence, semantic continuity, and activation frequency, and achieves adaptive fusion of multiple indicators through a learnable gating network, overcoming the problems of insufficient flexibility and weak generalization ability caused by the reliance on manual rule sorting in the case of intent conflicts in traditional methods. This mechanism can achieve comprehensive evaluation and accurate selection of candidate intents without introducing complex graph neural network structures or global semantic slot reconstruction processes, and has strong interpretability and training friendliness. The overall architecture abandons existing technical paths such as triangular anchor point analysis and fixed rule jumps, forming an independent and efficient technical implementation route, which not only improves the adaptability of the method in open domain dialogue, but also ensures the lightweight nature and convenient deployment of the algorithm, making it particularly suitable for intelligent interactive terminal applications in embedded or edge computing environments. Attached Figure Description
[0006] Figure 1 This is a flowchart of a voice robot voice reception, recognition, and error correction method according to the present invention; Figure 2 This is a sub-flowchart of a voice robot voice reception, recognition and error correction method according to the present invention; Figure 3 This is another sub-flowchart of a voice robot voice reception, recognition and error correction method according to the present invention. Detailed Implementation
[0007] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0008] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0009] like Figure 1 As shown, the present invention provides a voice robot voice reception, recognition, and error correction method, specifically including: S1: Construct an intent stability perception unit and generate a historical consistency score based on a pre-trained semantic alignment model. The intent stability perception unit includes an input layer, a semantic encoding layer and an intent state evaluation layer. The input layer receives the original semantic vector of the current round and the historical dialogue state vector. The semantic encoding layer uses a multi-head attention mechanism to perform cross-modal feature fusion. The intent state evaluation layer outputs a sequence of stability scores for candidate intents. S2: Perform multi-granular semantic encoding on the current input text, and generate a joint semantic representation based on the BERT-wwm model, which includes lexical feature vectors, dependency syntactic graph structures and discourse behavior labels. The dependency syntactic graph structure is extracted for topological features through a graph convolutional network, and the discourse behavior labels are mapped to multiple categories through a pre-annotated dialogue behavior ontology. S3: Input the joint semantic representation of the current round into the intent stability perception unit, calculate the historical consistency score sequence between the current dialogue round and the previous N rounds of dialogue, and use the sliding window variance analysis method to detect the stability of the score sequence. When the window variance is lower than the preset threshold, it is marked as the main intent continuation state; otherwise, the multi-intent competition analysis process is triggered. S4: In the multi-intent competition analysis process, lightweight intent matchers with predefined high-frequency intent categories are run in parallel. Each intent matcher contains a bidirectional LSTM encoder and an intent feature projection layer, and outputs the confidence vector and semantic offset matrix of the candidate intent. The semantic offset matrix is calculated by cosine similarity to calculate the degree of deviation between the current semantic representation and the intent prototype vector. S5: Construct a context saliency weight function, and calculate the weighted calculation of historical dialogue segments based on semantic relevance score and time decay factor. The semantic relevance score uses max pooling to extract key semantic features in historical rounds, and the time decay factor decays exponentially according to the dialogue round interval to generate a dynamic context memory vector. S6: Execute a dynamic context pruning strategy, calculate the contextual saliency weight of each historical segment, retain the K historical segments with weights higher than the dynamic threshold, and compress the remaining low-weight segments through singular value decomposition to generate an aggregated summary vector. The dynamic threshold is adaptively adjusted based on the semantic entropy value of the current dialogue round. S7: Construct a learnable gating network that integrates three indicators: confidence of candidate intent, semantic continuity score, and historical activation frequency. Generate an intent optimization weight vector through a gating mechanism. The semantic continuity score is calculated based on the temporal correlation coefficient of the historical intent state vector, and the historical activation frequency is dynamically updated using the exponential weighted moving average method. S8: Based on the intention optimization weight vector, candidate intentions are weighted and fused to output the final intention graph recognition result. At the same time, the state transition matrix of the intention stability perception unit is updated. The parameters of the gating network are incrementally optimized through an online learning mechanism. The optimization objective function includes a weighted loss term of intention recognition accuracy and context memory overhead.
[0010] Step S1: Construct an intent stability awareness unit and generate a historical consistency score based on a pre-trained semantic alignment model. The intent stability awareness unit includes an input layer, a semantic encoding layer, and an intent state evaluation layer. The input layer receives the original semantic vector of the current round and the historical dialogue state vector. The semantic encoding layer uses a multi-head attention mechanism to fuse cross-modal features. The intent state evaluation layer outputs a sequence of stability scores for candidate intents. Specifically, it includes: S1.1: Based on the pre-trained semantic alignment model, the semantic consistency between the current round and the previous N rounds of dialogue is modeled, and a historical consistency score vector is generated. Each element of the historical consistency score vector represents the semantic similarity score between the current round and the corresponding historical round, which is used for subsequent intent stability analysis. Receive the original semantic vector of the current round and the historical dialogue state vector of the previous N rounds, and use a pre-trained semantic alignment model (parameters: model structure is a lightweight dual-tower encoder, number of encoding layer units is 128, and semantic embedding dimension is 256) to embed and encode the two respectively, so as to achieve the comparability of semantic features across rounds. Furthermore, through the similarity calculation unit in the semantic alignment model (parameters: similarity measurement method is cosine similarity, sliding matching window size is N), pairwise matching calculation between the current round semantic embedding and the semantic embedding of each historical round is realized, and the initial similarity score of each matching pair is obtained; Furthermore, the initial similarity score is processed by a normalization function (parameter: the method is extreme value normalization, which maps the score to the [0,1] interval), so as to unify the dimensions of the semantic consistency score between different rounds and generate a normalized similarity vector; Furthermore, a weighted smoothing algorithm (parameter: the weight factor is calculated by the exponential decay function of the time interval between the historical rounds and the current round, with a parameter range of α=0.01-0.2, preferably 0.05) is used to smooth the normalized similarity vector, so as to achieve a stable transition of the similarity vector in consecutive dialogue rounds and output the smoothed historical consistency score vector. Through the semantic alignment and smoothing process described above, the semantic matching results of the previous step are transformed into quantitative scoring data that reflects the degree of semantic consistency between the current round and each historical round, thereby providing low-noise and highly relevant input indicators for subsequent intent stability analysis. For example, in a multi-turn dialogue scenario for a service robot, the semantic embedding vector of the current turn is encoded as 256-dimensional using the BERT-wwm model, and the historical dialogue state vectors of the previous N=4 turns are also encoded as 256-dimensional embeddings. The semantic alignment model adopts a dual-tower structure, with each tower containing three fully connected layers with widths of 512, 256, and 128 nodes respectively. Similarity is calculated using the cosine similarity formula:
[0011] in For the current round's embedding vector, Embed vectors for historical rounds. Represents the vector dot product. and The vector modulus. The extreme value normalization is performed on each matching score:
[0012] in This is the original similarity score. and These represent the minimum and maximum values of the current matching set, respectively. Smoothing is performed using exponential decay weighted calculation, resulting in a historical consistency score vector of {0.92, 0.85, 0.78, 0.80}, which is then input into the sliding window variance calculation module in S1.2. In testing, compared to the original similarity vector without smoothing, the smoothed score vector showed significantly reduced fluctuations in continuous dialogue, significantly improving the reliability of intent state stability judgment. S1.2: Perform sliding window variance calculation on the historical consistency score vector, evaluate the stability of the intent state in the current dialogue round based on the variance index, and generate the intent state within the sliding window. Figure 1Consistency variance is used as a preliminary basis for judging whether the intentional state has drifted. S1.3: Construct the input layer of the intent stability awareness unit, which receives the original semantic vector of the current round and the historical dialogue state vector. The original semantic vector is output by the BERT-wwm model, and the historical dialogue state vector is formed by concatenating the intent state vectors of the previous N rounds to construct a complete context-aware input representation. In the process of constructing the intent stability awareness unit, the input layer is used to construct a unified input representation of the original semantic vector of the current round and the historical dialogue state vector to form a complete context-aware input signal. The BERT-wwm model (parameters: pre-trained word vector dimension 768, Whole Word Mask strategy enabled) is used to encode the standardized word sequence of the current round, generating the original semantic vector containing contextual dependencies, thereby realizing the deep semantic feature extraction of the target sentence of the current dialogue. Furthermore, the intent state vectors of the previous N rounds are sequentially connected by a vector concatenation method (parameter: concatenation length is N×d, where N is the number of historical rounds and d is the dimension of the intent state vector) to construct a historical dialogue state vector, thereby realizing the temporal stacked representation of semantic features of continuous multi-round dialogues. Furthermore, a feature normalization algorithm (parameters: Z-score normalized mean 0, variance 1) is used to normalize the original semantic vector and the historical dialogue state vector respectively, so as to eliminate the differences in numerical scale of features from different sources and ensure the stability of subsequent cross-modal fusion. Furthermore, the normalized original semantic vector and the historical dialogue state vector are linearly transformed by the dimension alignment mapping function (parameter: mapping matrix dimension d×d', d'=unified encoding dimension 512), so that the two types of vectors are prepared for feature fusion in the same feature space; By using a vector-level fusion algorithm (weight ratio α=0.6, β=0.4), the mapped current semantic vector and the historical dialogue state vector are weighted and synthesized to obtain a context-aware input representation, achieving the technical effect of preserving the dominant information of the current round's semantic features while taking into account the dependence on historical dialogue. For example, in a service robot dialogue scenario, the input text "Reserve a restaurant for me at 7 PM tomorrow" in the current round is encoded by the BERT-wwm model to obtain a 768-dimensional original semantic vector. The intention state vectors from the previous N=3 rounds have a dimension of 256, and the concatenated length is 768. In the normalization stage, the original semantic vector is standardized using Z-score, resulting in a mean close to 0 and a variance close to 1; the historical intention state vectors are also standardized. In the dimension alignment stage, the original semantic vector and the historical vectors are mapped to a unified 512-dimensional space. In the weighted fusion stage, the current semantic vector is weighted... Set to 0.6, historical vector weights The value is set to 0.4, and the fusion calculation formula is as follows:
[0013] in, For the current semantic vector, The historical semantic vector was used as the basis for calculation, and the resulting fused context-aware vector was 512-dimensional. In subsequent multi-head attention cross-modal fusion and stability scoring calculations, this fused vector significantly improved the accuracy of the idea graph recognition while maintaining stability in multi-turn ambiguous contexts. S1.4: In the semantic coding layer, a multi-head attention mechanism is used to perform cross-modal feature fusion on the context-aware representation output by the input layer, generating a fused intention semantic representation matrix to enhance the interaction modeling capability between the current semantics and historical intentions; S1.5: In the intent state evaluation layer, calculate the stability score sequence of candidate intents based on the fused intent semantic representation matrix. Each element in the stability score sequence represents the stability degree of the corresponding candidate intent in the current dialogue round, which serves as the input basis for the subsequent intent optimization mechanism.
[0014] Step S2: Perform multi-granularity semantic encoding on the current input text, generating a joint semantic representation based on the BERT-wwm model, which includes lexical feature vectors, dependency syntactic graph structures, and discourse action labels. The dependency syntactic graph structure is extracted for topological features using a graph convolutional network, and the discourse action labels are mapped to a pre-annotated dialogue behavior ontology database for multi-class classification. Specifically, this includes: S2.1: Preprocess the input text by performing morpheme segmentation and part-of-speech tagging based on Chinese word segmentation tools to generate standardized word sequences and their part-of-speech tag sequences, providing structured input for the semantic encoding of the subsequent BERT-wwm model; S2.2: Based on the BERT-wwm model, the standardized word sequence is embedded and encoded with context-aware information to generate a context-sensitive word vector representation for each word, which serves as a word feature vector to capture the semantic role of the word in the current dialogue round. Based on the completed standardized vocabulary sequence and part-of-speech tag sequence data, the Transformer encoding structure of the BERT-wwm model (parameters: using whole word masking strategy, 768 hidden layer units, 12 encoding layers) is used to perform context-aware embedding encoding on the input vocabulary sequence in order to capture the semantic association characteristics of words in the global context. Furthermore, through the multi-head self-attention mechanism of the BERT-wwm model (parameters: 12 attention heads, 64 key / value vector dimensions), the global dependency relationship between words is modeled, and the corresponding attention weight matrix is generated to quantify the contextual semantic contribution of each word to other words. Furthermore, a feedforward fully connected network module (parameters: GELU activation function, 3072 hidden layer dimension) is used to perform a non-linear transformation on the attention-fused lexical representation to generate context-enhanced lexical vectors, thereby improving the ability to encode long-distance dependencies. Furthermore, by using residual connections and layer normalization, the output of the feedforward network is weighted and superimposed with the original input vector, and normalization is performed to stabilize the training process and maintain the consistency of feature distribution across different dialogue rounds. By projecting word vectors into the output layer of BERT-wwm, the encoding result is mapped to the final set of context-sensitive word vector representations, which serve as lexical feature vectors. This ensures that each word has semantic role information related to the current dialogue round, thus realizing the core embedding task of the multi-granularity semantic encoding stage. For example, given a standardized vocabulary sequence containing 15 Chinese characters as input, the BERT-wwm model is configured with a batch size of 32, a maximum sequence length of 64, and an optimizer parameter learning rate set to... The encoding process yields a size of The word vector matrix is calculated. For the 7th word, its context-sensitive vector is calculated using a multi-head self-attention mechanism, yielding the weighted result corresponding to the maximum attention weight of 0.92. After processing with a feedforward network and residual normalization, the magnitude of its vector in the 128th dimension increases from 0.15 to 0.27, significantly improving the semantic weight of this word in the intent recognition task. In the dependency syntax topology feature extraction stage, this context-sensitive word vector is directly input into the graph convolutional network. Validation results show that this encoding method improves the support strength of syntactic structure for intent graph recognition, reduces semantic drift, and enhances the semantic weight in multi-turn dialogues. Figure 1 The ability to maintain consistency; S2.3: Perform graph convolutional network processing on the context-sensitive word vector representation, extract syntactic topology features based on the pre-constructed dependency syntactic tree structure, and generate syntactic-enhanced semantic vectors to strengthen the sentence structure's support for intent recognition; S2.4: Based on the pre-annotated dialogue behavior ontology library, perform discourse behavior classification mapping on semantic vectors, and output discourse behavior labels through a multi-classification neural network to identify the interaction intent type of the current input; It receives semantic vectors processed by the BERT-wwm model and dependency syntax enhancement as input. The input data is a multi-dimensional floating-point matrix containing lexical feature sub-vectors and syntactic feature sub-vectors. A feature alignment mapping method (parameters: dialogue behavior ontology index table, semantic vector dimension = 768) is adopted to achieve preliminary alignment between the input semantic vector and the vector representation space of predefined behavior categories in the dialogue behavior ontology. Furthermore, a multi-class neural network algorithm (parameters: number of hidden layer units = 256, activation function = ReLU, number of output categories = M, where M is the total number of discourse behavior categories defined in the ontology) is used to achieve a non-linear mapping from the input vector to the discourse behavior category and obtain the original score vector for each category. Furthermore, the original score vector is transformed into a probability distribution using the Softmax normalization method, generating normalized classification probability values for each discourse behavior category. The Softmax function is defined as follows:
[0015] in The original score for category i. Let be the normalized probability value of category i, and M be the total number of categories; Furthermore, by using the maximum probability selection method (parameter: probability threshold = 0.5), the consistency category of the current input is determined, and the final discourse behavior label is generated. Through the aforementioned neural network and normalization processing, the semantic vector result from the previous step is transformed into a discourse behavior label with probability quantification, thereby achieving the complementation effect of pragmatic layer intent in multi-granular semantic coding. For example, in a scenario for an intelligent customer service robot, the input is a semantic vector of length 768, processed by the BERT-wwm model and containing dependency syntax features. This vector is generated from the current user's input text, "Please help me check this month's bill." A dialogue behavior ontology index mapping is used, where the ontology contains M=12 discourse behavior categories, such as query, complaint, and confirmation, aligning the input vector to the prototype vector space of each category. A three-layer fully connected multi-class neural network is used for processing. The first layer is configured with an input dimension of 768 and an output dimension of 256, using the ReLU activation function; the second layer is configured with an input dimension of 256 and an output dimension of 64, using the tanh activation function; the third layer is configured with an output dimension of M=12, using the identity activation function, resulting in the original score vector z. The original score for the query category is 2.35, and the scores for the other categories are all below 1.80. The probability of each category is calculated using the Softmax formula; for example, the probability of the query category is calculated as follows:
[0016] The query class probability was calculated to be 0.68 for other categories, which is higher than the set threshold of 0.5. Therefore, the current input utterance behavior label is determined to be a query class. This label is passed to the next fusion step, where it is combined with the lexical feature vector and the syntactically enhanced semantic vector to form a joint semantic representation, thereby significantly improving the accuracy of intention graph recognition and suppressing intent drift. S2.5: The lexical feature vector, syntactically enhanced semantic vector, and discourse behavior label are fused to construct a multi-granularity joint semantic representation, which serves as a complete semantic representation of the current dialogue round for subsequent processing by the intent stability perception unit.
[0017] like Figure 2 As shown, step S3 involves inputting the joint semantic representation of the current round into the intent stability perception unit, calculating the historical consistency score sequence between the current dialogue round and the previous N rounds of dialogue, and using a sliding window variance analysis method to perform stability detection on the score sequence. When the window variance is lower than a preset threshold, it is marked as a main intent continuation state; otherwise, a multi-intent competition analysis process is triggered. Specifically, this includes: S3.1: Based on the joint semantic representation output by the BERT-wwm model, the semantic features of the current dialogue turn are encoded to generate a semantic representation of the current turn containing lexical feature vectors, dependency syntactic graph structure and discourse behavior labels, which serves as the input to the intent stability perception unit. Based on the multi-granularity joint semantic representation generated by step S2.5, a vector decoding method (parameters: lexical feature vector dimension d1, syntactic augmented semantic vector dimension d2, number of discourse behavior label categories c) is adopted to realize the structured decomposition of the semantic input of the current round, and to independently map each feature domain to a unified feature space. Furthermore, the BERT-wwm context embedding algorithm (parameters: pre-trained model size L = 12 Transformer layers, hidden layer dimension 768, attention head number 12) is used to achieve high-precision context encoding of semantic vectors, and an embedding matrix reflecting lexical semantics, syntactic roles, and discourse behavior is obtained. ; Furthermore, by fusing dependency parsing with a graph convolutional network (parameters: 2 GCN layers, kernel size K=5), cross-domain fusion of syntactic topological features and context embedding is achieved, generating a syntactic enhancement matrix containing dependency edge weights. ; Furthermore, a dialog behavior label embedding mapping method (parameters: discourse behavior ontology size C=50 classes, embedding dimension 64) is used to realize the vectorized representation of discretized labels and generate a label embedding matrix. This is used to supplement the category and morphological information of the current discourse interaction intention; Through a multimodal feature fusion algorithm (parameters: fusion weights w1, w2, and w3 correspond to the lexical, syntactic, and label feature domains respectively, satisfying w1+w2+w3=1), the following parameters are used: , and Weighted concatenation is performed to transform it into a single complete semantic representation vector for the current round. As input to the intent stability perception unit, it achieves a feature unification effect for subsequent intent history consistency matching; For example, in a multi-turn dialogue scenario of a service-oriented voice robot platform, the received speech recognition output text for the current turn is "Please check tomorrow's weather and set a reminder." After step S2.5, the lexical feature vector dimension d1=128, the syntactic augmented semantic vector dimension d2=256, and the number of speech action label categories c=3 (information query, task creation, and time setting, respectively). An embedding matrix is generated using the BERT-wwm model (configuration: 12 Transformer layers, 768 hidden dimensions, 12 attention heads). Size is [ [×768], where =12. Using a 2-layer GCN (kernel size 5), feature convolution is performed on the dependency parsing graph to obtain... Size is [ ×256]. Based on the discourse behavior ontology mapping, a tag embedding matrix is generated. The size is [3×64]. Let the fusion weights be w1=0.4, w2=0.4, and w3=0.2. , and Weighted concatenation along the feature dimension generates Size is [ [×(768+256+64)], this vector, as the input of the intent stability perception unit, can significantly improve the matching accuracy between the current round semantics and the historical semantics, and reduce the probability of intent drift. S3.2: Utilize a pre-trained small-scale semantic alignment model to perform sequential semantic matching calculations on the semantic representation of the current round and the state vectors of the previous N rounds of dialogue, so as to generate a historical consistency score sequence between the current round of dialogue and the historical dialogue. S3.3: Based on the historical consistency score sequence, the sliding window variance analysis method is used to statistically model the score change trend to calculate the variance value of the score sequence within the window, which is used to measure the stability of the current intention state. S3.4: Compare the sliding window variance value with the preset stability threshold. If the variance value is lower than the threshold, it is determined that the current state is in the intention graph continuation state; otherwise, it is determined that the intention state is unstable and the multi-intention competition analysis process needs to be triggered. In determining the stability of the sliding window variance, a threshold comparison algorithm is used (parameter: preset stability threshold). This enables the binarization and classification of variance data. Furthermore, through the difference calculation method (parameter: variance value) Stability threshold This allows for the measurement of the numerical distance between variance and threshold, and the generation of a difference determination result vector, which is used to quantify the stability level of the current intent state. Furthermore, the Boolean output of the stability condition is realized through the logical discriminant function (parameter: difference judgment result vector), and a state judgment flag is generated, which is a state code of "continuation" or "unstable". Furthermore, when the state determination flag is "unstable", the signal generation algorithm (parameters: state determination flag, unstable state code) is triggered to construct the multi-intent contention analysis process start signal and complete the generation of signal data packets. By using the threshold comparison and logical discrimination processing methods described above, the sliding window variance analysis results are transformed into state recognition data, enabling accurate differentiation between the intention graph continuation state and the intention drift state in multi-turn dialogues.
[0018] in, The variance of the sliding window. The historical consistency score for round i is given. The average score within the window. This represents the number of dialogue rounds within the window.
[0019]
[0020] in, This is the difference between the variance and the threshold. This is a preset stability threshold.
[0021]
[0022] in, This is a boolean value for state determination. A value of True indicates that the intention graph continues, while a value of False indicates that the intention is unstable.
[0023] For example, in a multi-turn interaction scenario of a service robot, with the window length n set to 5 and a preset stability threshold θ_s = 0.15, the historical consistency score sequence is {0.92, 0.90, 0.93, 0.91, 0.89}. Using the variance calculation formula, we obtain... =0.0016. Using the difference calculation formula, D = -0.1484. The logical discriminant function outputs S = True, indicating that the idea graph continues in this round of dialogue, and the system continues the previous idea graph without triggering the multi-intent competition analysis process. In another scenario, the score sequence is {0.92, 0.60, 0.85, 0.55, 0.78}, calculated as follows: =0.0224, D=0.0074, S=False, the system outputs an unstable judgment, triggering a multi-intent competition analysis start signal. The signal packet contains the current round semantic representation vector and the historical consistency score sequence, which are used for multi-intent recognition in the downstream intent matcher to improve the accuracy of main intent recognition under complex dialogue conditions. S3.5: If the intent state is determined to be unstable, output a multi-intent competition analysis trigger signal and pass the semantic representation of the current round and the historical consistency score sequence to the multi-intent competition analysis process to support subsequent intent recognition decisions.
[0024] like Figure 3 As shown, step S4: In the multi-intent competition analysis process, lightweight intent matchers with predefined high-frequency intent categories are run in parallel. Each intent matcher includes a bidirectional LSTM encoder and an intent feature projection layer, outputting a confidence vector and a semantic offset matrix for candidate intents. The semantic offset matrix is calculated using cosine similarity to determine the degree of deviation between the current semantic representation and the intent prototype vector. Specifically, this includes: S4.1: Based on the trigger signal of the multi-intent competition analysis process, start the predefined high-frequency intent category set. The high-frequency intent category set is constructed based on the statistical results of historical dialogue intent distribution to cover more than 80% of high-frequency user intent scenarios, forming the input conditions for the parallel operation of the intent matcher. Receive the trigger signal input from the multi-intent competition analysis process, parse the signal field to extract the semantic representation vector of the current round and the historical consistency score sequence data; A high-frequency intent statistical analysis algorithm is used (parameters: historical dialogue record window length N, statistical period T). Based on the historical dialogue intent distribution, an intent frequency histogram is constructed. The matrix rows correspond to intent categories, and the columns correspond to the number of occurrences within the statistical period. This is used to calculate the occurrence frequency value of each category. Furthermore, the frequency histogram is sorted in descending order and summed cumulatively using a coverage filtering algorithm (parameter: coverage threshold 0.8) to identify the top M intent categories whose cumulative coverage reaches or exceeds the set threshold, forming a predefined set of high-frequency intent categories. Furthermore, through the intent category index mapping method (parameters: category label mapping table, prototype vector database), the high-frequency intent category set is mapped to its corresponding category prototype vector and label identifier, generating the intent matcher initialization parameter set; A parallel matcher startup mechanism is adopted (parameters: number of matcher threads M, initialization delay Δt). For each high-frequency intent category in the set, a corresponding lightweight intent matcher instance is started, and the bidirectional LSTM encoder weights and intent feature projection layer parameters are initialized to form the input conditions for parallel operation. By constructing a set of high-frequency intent categories and launching the matcher in parallel, the trigger signal results of the previous step are transformed into a list of matcher tasks that can directly participate in multi-intent competition analysis, thereby achieving fast parallel response capability in multi-intent scenarios. For example, in a multi-turn dialogue scenario on a service robot platform, after receiving a trigger signal, statistics are performed on the most recent 50 rounds of dialogue records. The window length N=50, the statistical period T=daily, and an intent category frequency matrix is calculated. In the matrix, the frequency values of categories such as "query weather," "set reminder," and "play music" are 20, 15, and 12, respectively. Using a coverage filtering algorithm with a threshold of 0.8, the frequencies are accumulated in descending order. The top three categories cover 82% of the overall frequency, thus forming a high-frequency intent category set {query weather, set reminder, play music}. Combining the category label mapping table and the prototype vector database, the prototype vector dimension of each of the three categories is 128 dimensions. The number of matcher threads is set to M=3, the initialization delay Δt=5ms, and three lightweight intent matcher instances are started. The initial weights of the corresponding bidirectional LSTM encoder (derived from the transfer learning results of historical matching tasks) and the weight matrix of the intent feature projection layer (initialized as Gaussian distributed random values with a variance of 0.01) are loaded. This example controls the total delay to within 15ms after the trigger signal arrives, enabling multiple matchers to operate synchronously in high-frequency intent scenarios, which significantly improves the response speed and stability of intent graph recognition. S4.2: Perform bidirectional LSTM encoding on the joint semantic representation vector of the current round. The bidirectional LSTM encoder is initialized and trained based on the semantic features extracted from the historical intent matching task, and outputs a bidirectional hidden state sequence to capture the contextual dependency characteristics of the current input semantics in the temporal dimension and obtain a temporally enhanced semantic encoding vector. S4.3: Input the temporal enhanced semantic encoding vector into the intent feature projection layer. The intent feature projection layer is constructed based on the intent category prototype vector space. A fully connected neural network is used to map the encoding vector to the intent space to generate an intent space representation vector for subsequent intent matching calculation. The temporal augmented semantic encoding vector is input into the intent feature projection layer. The input object is a bidirectional hidden state sequence output by a bidirectional LSTM encoder, which is then concatenated to form a high-dimensional temporal semantic vector. A fully connected neural network mapping method is adopted (parameters: the length of the temporal augmented semantic encoding vector corresponding to the input dimension, and the output dimension being the dimension of the intent category prototype vector space) to implicitly project the temporal semantic vector onto the intent prototype space, so as to establish a high-dimensional spatial correspondence between the input semantics and the predefined intent categories; Furthermore, through weight matrix multiplication (parameter: the size of the weight matrix is consistent with the input and output dimensions), the linear combination mapping of each semantic feature component in the intent space coordinate system is realized, and a preliminary intent space representation vector is obtained; Furthermore, a nonlinear activation function processing method (parameter: ReLU or LeakyReLU) is adopted to realize the nonlinear feature reconstruction of the mapping result, enhance the feature separation between different intent categories, and generate an optimized intent space representation vector; Furthermore, by using a normalization method (parameter: L2 norm normalization), the intention space representation vector is unified in length scale, providing numerical stability for subsequent cosine similarity calculation; Through the above fully connected neural network projection and nonlinear normalization processing, the temporal enhanced semantic encoding vector is transformed into a multi-dimensional intent space representation vector that meets the requirements of intent matching calculation, thereby realizing the accurate mapping of semantic information from the temporal domain to the intent prototype space. For example, in a multi-turn dialogue intent recognition task, the dimension of the input temporal augmentation semantic encoding vector is... The prototype space dimension of the intent category is The weight matrix of a fully connected neural network has a size of [size missing]. The bias vector length is The activation function chosen is ReLU. The input time-series augmentation vector... Execute the mapping formula: ,in This is the weight matrix. For bias vectors, For the ReLU function. Mapping result. After L2 normalization, a normalized intent space representation vector is obtained. This normalized vector significantly improves numerical stability when performing cosine similarity matching with prototype vectors of each intent category, and enhances the accuracy and temporal consistency of intent graph recognition in actual tests, demonstrating high real-time processing capabilities on resource-constrained service robot platforms. S4.4: Based on the cosine similarity between the intent space representation vector and the prototype vector of each intent category, calculate the semantic offset between the current semantic representation and each candidate intent, and generate a semantic offset matrix, where each row corresponds to the semantic deviation distribution of a candidate intent. S4.5: Perform Softmax normalization on the semantic offset matrix to obtain the confidence distribution vector of each candidate intent, which serves as one of the inputs to the subsequent intent optimization mechanism to support stable recognition of the intent graph in multi-intent scenarios.
[0025] Step S5: Construct a contextual saliency weight function, which calculates a weighted average of historical dialogue segments based on semantic relevance scores and time decay factors. The semantic relevance scores are extracted using max pooling to capture key semantic features from historical rounds, and the time decay factor decays exponentially with each dialogue round, generating a dynamic contextual memory vector. Specifically, this includes: S5.1: Based on the joint semantic representation of historical dialogue rounds, the key semantic feature vectors in each round are extracted using the max pooling operation to generate a semantic feature matrix, which contains the set of features with the most significant semantic expression in the dialogue history. Using the joint semantic representation matrix of historical dialogue rounds as the input data source, max pooling operation (parameter: pooling window covers all semantic feature dimensions of the round) is adopted to extract the most significant semantic components of the round from the high-dimensional semantic vector; Furthermore, by using a cross-dimensional maximum value scanning algorithm (parameter: scanning step size is 1, covering the entire row vector space), the maximum response value in each dimension is extracted, and the set of key semantic feature vectors for the current round is obtained. Furthermore, by using a feature response sorting method (parameters: response values are sorted in descending order, retaining the top-M feature components, where M is based on a significance scaling factor set by the system), priority filtering of key semantic components is achieved, and a simplified feature sub-vector set is generated. Furthermore, through the feature index mapping algorithm (parameter: the index mapping table is constructed from the column labels of the original high-dimensional matrix), the association mapping between the retained key feature components and the original joint semantic representation matrix is realized, resulting in a structured historical key semantic feature index table; By stacking feature rows and columns, the key semantic vectors of all historical rounds are combined into a two-dimensional semantic feature matrix in chronological order, realizing the matrix-based aggregation representation of the most significant features of semantic expression in historical dialogues; For example, in a multi-turn dialogue scenario for a service robot, the system uses max pooling to extract the maximum value of all 128-dimensional semantic components for each of the previous N=5 rounds of joint semantic representation matrix (each round having a matrix dimension of 128×1). The pooling window parameter is set to 128, and the scan step size is 1. Through cross-dimensional scanning, a 1-dimensional maximum response value vector is generated for each round. Then, a response value sorting method is applied to retain the top M=20 feature components in each round, resulting in a 20-dimensional key feature sub-vector set. These key features are mapped to the column labels of the original matrix through feature index mapping, forming a feature index table. For example, the first round retains feature indices [3,7,15,...], the second round [1,9,22,...], etc. The key feature sub-vectors from the five rounds are stacked chronologically to form a 20×5 two-dimensional semantic feature matrix for subsequent semantic relevance scoring calculations. In actual testing, this process significantly reduces the dimension of the feature matrix while retaining highly relevant semantic information, effectively improving the accuracy and computational efficiency of subsequent contextual saliency weight calculations. S5.2: Perform semantic relevance scoring calculation on the semantic feature matrix, evaluate the semantic relevance between the current round semantic vector and the semantic feature vectors of each historical round based on the cosine similarity algorithm, and obtain a semantic relevance score sequence to quantify the contribution of historical information to the current intent recognition; When performing semantic relevance scoring on the semantic feature matrix, the cosine similarity algorithm is used (parameter: semantic vector of the current round). Historical round semantic feature vector This allows for the quantification of the semantic space angle relationship between the two. Furthermore, through normalization operations (parameter: vector magnitude based on L2 norm), the length of each semantic feature vector is standardized, and a unit vector sequence suitable for similarity calculation is obtained; Furthermore, by using the vector dot product algorithm (parameter: summation of the products of each vector component), the inner product of the current semantic vector and each historical semantic feature is calculated, and a set of inner product results is generated. Furthermore, a vector modular multiplication algorithm (parameters: current semantic vector modulus, historical semantic feature vector modulus) is used to normalize the inner product results and generate a semantic relevance score sequence; By calculating the above score sequence round by round, the semantic feature matrix of the previous step is transformed into a quantitative semantic relevance index, thereby measuring the contribution of historical information to the current intent recognition. For example, in a multi-round customer consultation scenario using a service robot, the semantic vector dimension of the current round is set to 768, and the semantic feature matrix of the historical rounds contains 5 rounds, with each round's vector also having 768 dimensions. L2 norm normalization is performed on all vectors to generate unit vectors. The inner product between the current vector and each historical vector is calculated; for example, the inner product result for round 1 is 0.76, for round 2 it is 0.83, for round 3 it is 0.45, for round 4 it is 0.62, and for round 5 it is 0.58. The ratio of each inner product to the modular multiplication yields the cosine similarity score sequence [0.76, 0.83, 0.45, 0.62, 0.58]. This score sequence is directly used for subsequent contextual saliency weight function calculations. When the score is highest in round 2, the system enhances the correlation with the context of that round, thereby significantly improving the support strength for the current idea graph recognition. Verification results show that the stability of idea graph recognition is greatly enhanced. S5.3: Calculate the time decay factor based on the time interval of the dialogue rounds using an exponential decay function. The time decay factor decreases exponentially with the increase of the round interval, which is used to reflect the decay of the importance of historical information in the time dimension. S5.4: The semantic relevance score sequence and the time decay factor are weighted and fused to generate the contextual salience weight of each historical dialogue segment, wherein the contextual salience weight represents the comprehensive importance of the historical segment in the current intent recognition task; S5.5: Based on the aforementioned contextual saliency weights, the historical dialogue state vectors are weighted and summed to generate a dynamic contextual memory vector. This dynamic contextual memory vector serves as the context-aware input in the current round of semantic parsing, enhancing the coherence and stability of intent recognition.
[0026] Step S6: Execute a dynamic context pruning strategy, calculate the contextual saliency weight of each historical segment, retain K historical segments with weights higher than a dynamic threshold, and perform dimensionality reduction and compression on the remaining low-weight segments through singular value decomposition to generate an aggregated summary vector. The dynamic threshold is adaptively adjusted based on the semantic entropy value of the current dialogue round. Specifically, this includes: S6.1: Based on the dynamic context memory vector and the semantic representation of the candidate intent in the current dialogue round, calculate the context saliency weight of each historical dialogue segment. The context saliency weight is generated based on the weighted fusion result of semantic relevance score and time decay factor to quantify the contribution of historical information to the current intent recognition. S6.2: Perform dynamic threshold determination on the context saliency weight. The dynamic threshold is adaptively adjusted based on the semantic entropy value of the current dialogue round to relax the pruning conditions when the semantic uncertainty is high and tighten the pruning range when the semantics are clear, thereby achieving the adaptability of context management. For the contextual saliency weights calculated based on the dynamic context memory vector and the semantic representation of the current candidate intent, a semantic entropy analysis method (parameter: the semantic vector distribution of the current round) is used to achieve adaptive adjustment of the pruning threshold; Furthermore, through a probability distribution modeling algorithm (parameter: candidate intent normalized weight vector), the semantic information entropy of the current round is calculated, and a quantified semantic uncertainty index is obtained. The semantic entropy value is calculated using the following formula:
[0027] in, This is the semantic entropy value. Let be the probability distribution function of the candidate intent. The total number of candidate intentions; Furthermore, through the threshold mapping function (parameter: semantic entropy value range [ , The threshold adjustment coefficient α) enables a non-linear mapping from semantic entropy values to pruning dynamic thresholds, and generates the dynamic threshold for the current round. The mapping formula is as follows:
[0028] in α is the basic pruning threshold constant, and α is the dynamic adjustment coefficient; Furthermore, through a conditional discrimination algorithm (parameters: semantic entropy value and set threshold range), the comparison operation between the current context saliency weight and the dynamic threshold is realized, and a pruning decision flag is generated for the branch selection of subsequent high-weight segment retention and low-weight segment compression processing; The dynamic threshold determination algorithm described above transforms the context saliency weight sequence from the previous step into executable context pruning decision data, achieving the expected technical effect of adaptively adjusting the context management strategy based on semantic uncertainty. For example, in a resource-constrained service robot platform, the candidate intents identified in the current round contain 5 high-frequency categories, which are normalized to obtain a probability distribution vector [0.25, 0.15, 0.35, 0.10, 0.15]. Using the semantic entropy formula mentioned above, the calculation result is: The semantic entropy value is approximately 1.45. A base pruning threshold is set. =0.5, α=0.3, =0.5, =2.0, then the dynamic threshold is: ≈0.69. The robot system compares the context saliency weight sequence [0.72, 0.68, 0.55, 0.40, 0.35] with the threshold 0.69, retains the historical segments with a weight value of 0.72, and the remaining segments are processed by SVD compression, which ultimately significantly improves the stability of the idea graph recognition and effectively controls the memory overhead; S6.3: Based on a dynamic threshold, select historical dialogue segments with a significance weight higher than the threshold, and retain a maximum of K high-weight historical segments (K≤5) to maximize the retention of key context information under limited memory resources. The value of K is dynamically configured according to the system memory budget and dialogue complexity. After receiving the dynamic threshold parameter output by sub-step S6.2 and the contextual saliency weight vector of each historical segment as input conditions, a weighted filtering algorithm (parameters: saliency weight vector, dynamic threshold) is used to implement the importance filtering function of historical dialogue segments. Furthermore, by using a descending sorting method (parameter: saliency weight vector), all historical segments are sequentially arranged from high to low in terms of overall importance, and a sorted weight-segment index table is obtained. Furthermore, by using the K-value constraint algorithm (parameters: system memory budget, dialogue complexity index), the truncation selection of the sorted high-weight historical fragment set is realized, and a list of high-weight fragments containing at most K (K≤5) is generated, wherein the K value is determined based on the dynamic function of the current system memory usage rate and the real-time dialogue complexity. Furthermore, by using the index mapping method (parameters: list of high-weight segments, set of original historical segments), the selected segments are located in the original context storage structure, and a high-weight context subset is generated. This filtering and truncation algorithm transforms the weight distribution result of the previous step into a high-density subset of key information, achieving context preservation under limited memory conditions, while providing clear preservation boundaries for subsequent compression processing of low-weight segments. For example, in a multi-turn dialogue scenario of a service robot, the contextual saliency weight vector of five received historical segments is [0.82, 0.65, 0.91, 0.34, 0.77]. The dynamic threshold is determined by the semantic entropy function. The calculated value is 0.70, where n is the number of candidate intents in the current round. A weighted filtering algorithm is used to remove segments with a weight below 0.70, resulting in a set of segments with weights of 0.82, 0.91, and 0.77. Sorting in descending order yields segment 3 (0.91), segment 1 (0.82), and segment 5 (0.77). The calculated K value for system memory budget is 3, which coincides with the number of high-weight segments, forming a high-weight context subset index [3,1,5]. This subset is passed to the next stage intent recognition unit. Verification shows that in complex multi-intent scenarios, the coherence of intent graph recognition is significantly improved, and the overall memory usage is reduced to about half of the original value compared to the unpruned version, achieving a balanced optimization of performance and resource consumption. S6.4: Perform singular value decomposition (SVD) dimensionality reduction on the low-weight historical fragments that were not preserved to compress their semantic representation dimension and generate a low-rank approximate matrix, thereby reducing storage space and preserving their semantic aggregation features; S6.5: Generate a context aggregation summary vector by performing an aggregation operation on the low-rank approximation matrix. The aggregation operation includes a fusion strategy that combines weighted averaging and max pooling to retain potentially important semantic information in the low-weight context for reference in the subsequent intent recognition process.
[0029] Step S7: Construct a learnable gating network that integrates three indicators: confidence of candidate intents, semantic continuity score, and historical activation frequency. An intent optimization weight vector is generated through a gating mechanism. The semantic continuity score is calculated based on the temporal correlation coefficient of historical intent state vectors, and the historical activation frequency is dynamically updated using an exponentially weighted moving average method. Specifically, this includes: S7.1: Based on the candidate intent confidence vector output by the intent stability perception unit, perform normalization processing to obtain the local semantic intensity distribution of the candidate intent in the current round; S7.2: Based on the historical intent state vector sequence, calculate the temporal correlation coefficient of each candidate intent in the time dimension, and generate a semantic continuity score vector based on the Pearson correlation coefficient matrix within the sliding window to measure the semantic coherence between the current intent and the historical intent. The input data includes candidate intent confidence vectors after normalization in S7.1, and a sequence of historical intent state vectors preserved and compressed by step S6, which has timestamp and intent semantic representation fields. A sliding window truncation method (parameters: window size W, window step size Δ) is used to perform time slicing on the historical intent state vector sequence to achieve temporal coherence analysis in different time intervals; Furthermore, the Pearson correlation coefficient is calculated using the parameter: the current semantic vector of the candidate intent. Semantic vector set within the history window This allows for the linear correlation measurement between the current candidate intent and the intents from previous rounds, resulting in a matrix of correlation coefficient values. The formula is as follows:
[0030] in, The Pearson correlation coefficient is used. Standard deviation Describing covariance, This represents the candidate intent vector for the current round. This represents the intent vector for each historical round. Furthermore, by averaging the correlation coefficient matrix along the window dimension, the average semantic continuity score of each candidate intent within the current window is obtained to reduce the interference of instantaneous fluctuations. Furthermore, an outlier suppression filtering algorithm is employed (parameter: threshold). Anomaly detection and suppression are performed on the continuous average score to eliminate the correlation coefficient distortion effect caused by single-round noise intention; Using the above method, the correlation coefficient matrix is transformed into a semantic continuity score vector, thereby achieving a quantitative evaluation of the coherence of each candidate intent in the time dimension. For example, for a historical dialogue intent state sequence of length 50 rounds, set the sliding window size W=10 and the step size Δ=5, and extract the current candidate intent. The analysis focuses on the three most recent windows. The candidate intent semantic vector has a dimension of 128. Using the correlation coefficient formula, the average correlation coefficients between each window and the historical vectors are 0.82, 0.77, and 0.80, respectively. In outlier suppression, a threshold is set... =0.9, no outliers above the threshold were detected, and the original score was retained. The final weighted average of the three window scores (weights increasing in reverse chronological order) yielded a final semantic continuity score of 0.795 for the current candidate intent. This score was used in the subsequent S7.4 multi-dimensional feature fusion, inputting it along with the local semantic intensity distribution and historical activation frequency vector into the gating network to accurately generate the subject graph optimization weights. S7.3: The historical activation frequency of candidate intentions is dynamically updated using the exponentially weighted moving average method. Based on the current round of intention activation status and historical weight factors, an intention activation frequency vector is generated to reflect the activity level of each intention in the dialogue context. S7.4: Construct a three-input gating network model. Based on the local semantic intensity distribution, semantic continuity score vector, and intent activation frequency vector of candidate intents, perform multi-dimensional feature fusion calculation to generate intent optimization weight vector. The gating mechanism uses the Sigmoid activation function to control the weighting coefficients of each dimension feature. S7.5: The candidate intents are weighted and summed based on the intent optimization weight vector to generate an intent optimization score vector, which serves as the basis for the subsequent intent graph recognition output. This weight vector is then fed back to the intent stability perception unit to update the state transition matrix parameters.
[0031] Step S8: Based on the intent optimization weight vector, candidate intents are weighted and fused to output the final intent graph recognition result. Simultaneously, the state transition matrix of the intent stability perception unit is updated, and the gating network parameters are incrementally optimized through an online learning mechanism. The optimization objective function includes a weighted loss term for intent recognition accuracy and context memory overhead. Specifically, this includes: S8.1: Normalize the intention selection weight vector, and perform probabilistic mapping on the weight vector based on the Softmax function to generate a normalized selection probability distribution for each candidate intention, which serves as the basis for weighted fusion. S8.2: Based on the confidence vector of the candidate intent and the normalized optimal probability distribution, perform weighted fusion calculation on each candidate intent, and use a weighted summation algorithm to generate a fused intent vector, where each dimension of the fused intent vector is the sum of the product of the corresponding candidate intent semantic prototype vector and the fusion weight; S8.3: Perform intent classification decision on the fused intent vector. Based on the predefined set of intent category prototype vectors, calculate the cosine similarity between the fused intent vector and each category prototype vector, and select the one with the largest similarity as the final intent graph recognition result for the current round. The intent classification decision process is performed on the fused intent vector input. A matching algorithm based on cosine similarity (parameter: predefined set of intent category prototype vectors) is used to calculate the semantic closeness between the fused intent vector and the prototype vectors of each category. Furthermore, by using similarity calculation methods, the fusion intent vector is... With each intent category prototype vector The cosine similarity is calculated using the following formula: ,in Represents the vector dot product. and Let represent the Euclidean norm of the vectors respectively; Furthermore, the calculated similarity vector is numerically standardized by normalization to suppress the influence of fused vectors at different scales and obtain the similarity distribution results. Furthermore, a maximum value selection mechanism is employed to select the category index with the highest similarity value from the standardized similarity distribution results. And determine the intent category corresponding to the index as the final idea graph for the current round; By using the maximum value selection method, the similarity calculation results of the previous step are transformed into concept graph category labels, thereby achieving a deterministic output effect for concept graph recognition in multi-turn dialogues. For example, in a service robot dialogue scenario, let's define a fused intent vector. It is a 50-dimensional normalized semantic encoding vector. The intent category prototype set contains 10 high-frequency intents, and each prototype vector... These are vectors of the same dimension. Perform a vector dot product operation to obtain the dot product value between each intent and the fused vector. For example, the dot product of the prototype of the third type of intent is... Its norm is The fusion vector norm is Then the cosine similarity is calculated as follows: To obtain similarity After repeatedly calculating the other categories, the cosine similarity of the 7th category intention was the highest. If the category matches the user's historical semantic continuity, then that category is selected as the main intent recognition output. In this scenario, the classification decision stably selects the intent category with the highest matching degree, thereby significantly improving the accuracy of intent graph recognition in complex multi-turn dialogue scenarios; S8.4: Based on the final intention graph recognition result of the current round and the historical intention state vector, update the state transition matrix of the intention stability perception unit, and use the semantic transition vector between the current intention state and the previous intention state to perform the matrix incremental update operation to enhance the temporal consistency of intention state modeling. S8.5: Based on the intent deviation signal between the current intent recognition result and the actual user feedback, an online learning gradient update path is constructed, and the stochastic gradient descent algorithm is used to incrementally optimize the parameters of the gated network. The optimization objective function is composed of a weighted loss term for intent recognition accuracy and a penalty term for context memory overhead, so as to achieve joint optimization of intent recognition performance and resource overhead.
[0032] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
[0033] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and rules of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for speech receiving, recognition, and error correction in a speech robot, characterized in that, Includes the following steps: S1: Construct an intent stability awareness unit and generate a historical consistency score based on a pre-trained semantic alignment model; S2: Perform multi-granular semantic encoding on the current input text and generate a joint semantic representation based on the BERT-wwm model; S3: Input the joint semantic representation of the current round into the intent stability perception unit, calculate the historical consistency score sequence between the current dialogue round and the previous N rounds of dialogue, and use the sliding window variance analysis method to perform stability detection on the historical consistency score sequence. When the window variance is lower than the preset threshold, it is marked as the main intent continuation state; otherwise, the multi-intent competition analysis process is triggered. S4: In the multi-intent competition analysis process, the intent matcher of the predefined high-frequency intent category is run in parallel, and the confidence vector and semantic offset matrix of the candidate intent are output. S5: Construct a contextual saliency weight function, and perform weighted calculations on historical dialogue segments based on semantic relevance scores and time decay factors to generate dynamic contextual memory vectors; S6: Execute a dynamic context pruning strategy, calculate the context saliency weight of each historical segment, retain historical segments with weights higher than the dynamic threshold, and compress the remaining low-weight segments through singular value decomposition to generate an aggregated summary vector; S7: Construct a learnable gating network, integrate the confidence vector of the candidate intent, the semantic continuity score, and the historical activation frequency to generate an intent optimization weight vector.
2. The method for speech receiving, recognition, and error correction in a speech robot according to claim 1, characterized in that, The process following step S7 also includes: S8: Based on the intention optimization weight vector, the candidate intentions are weighted and fused to output the final intention graph recognition result. At the same time, the state transition matrix of the intention stability perception unit is updated, and the gating network parameters are incrementally optimized through an online learning mechanism.
3. The voice robot voice reception, recognition, and error correction method according to claim 1, characterized in that, Step S1 specifically includes: Based on a pre-trained semantic alignment model, the semantic consistency between the current round and the previous N rounds of dialogue is modeled, and a historical consistency score vector is generated. Perform sliding window variance calculation on the historical consistency score vector, evaluate the stability of intent state in the current dialogue round based on the variance index, and generate intent consistency variance value within the sliding window; An intent stability perception unit is constructed, which includes an input layer, a semantic encoding layer, and an intent state evaluation layer. The input layer receives the original semantic vector of the current round and the historical dialogue state vector. The original semantic vector is output by the BERT-wwm model, and the historical dialogue state vector is formed by concatenating the intent state vectors of the previous N rounds, thus constructing a complete context-aware input representation. In the semantic encoding layer, a multi-head attention mechanism is used to perform cross-modal feature fusion on the context-aware representation to generate a fused intention semantic representation matrix; In the intent state evaluation layer, a stability score sequence of candidate intents is calculated based on the fused intent semantic representation matrix. Each element in the stability score sequence represents the stability degree of the corresponding candidate intent in the current dialogue round.
4. The voice robot voice reception, recognition, and error correction method according to claim 3, characterized in that, Step S1 further includes processing the initial similarity score through a normalization function. The normalization method adopts extreme value normalization to map the semantic similarity score to the 0-1 interval. The weighted smoothing adopts an exponential decay function based on the time interval between the historical rounds and the current round, with the decay coefficient parameter ranging from 0.01 to 0.
2.
5. The voice robot voice reception, recognition, and error correction method according to claim 1, characterized in that, Step S2 specifically includes: The input text is preprocessed, and morpheme segmentation and part-of-speech tagging are performed based on Chinese word segmentation tools to generate a standardized vocabulary sequence and its part-of-speech tag sequence; The standardized vocabulary sequence is embedded and encoded using the BERT-wwm model to generate a context-sensitive word vector representation for each word, which serves as the vocabulary feature vector. The context-sensitive word vector representation is processed by a graph convolutional network to extract syntactic topological features based on a pre-constructed dependency syntactic tree structure, generating syntactic-enhanced semantic vectors. Based on a pre-annotated dialogue behavior ontology, the syntactic-enhanced semantic vectors are subjected to discourse behavior classification mapping, and discourse behavior labels are output through a multi-classification neural network. The lexical feature vector, the syntactically enhanced semantic vector, and the discourse behavior label are fused to construct a multi-granularity joint semantic representation, which serves as the complete semantic representation of the current dialogue round.
6. The method for speech receiving, recognition, and error correction in a speech robot according to claim 1, characterized in that, Step S3 specifically includes: Based on the joint semantic representation output by the BERT-wwm model, the semantic features of the current dialogue round are encoded to generate the semantic representation of the current round. Using a pre-trained small-scale semantic alignment model, semantic matching calculations are performed on the semantic representation of the current round and the state vector of the previous N rounds of dialogue to generate a historical consistency score sequence between the current round and the historical dialogue. Based on the historical consistent score sequence, the sliding window variance analysis method is used to statistically model the score change trend and calculate the sliding window variance value of the score sequence within the window. The variance value of the sliding window is compared with a preset stability threshold. If the variance value is lower than the threshold, it is determined that the current state is the intention graph continuation state; otherwise, it is determined that the intention state is unstable and the multi-intention competition analysis process needs to be triggered. If the intent state is determined to be unstable, a multi-intent competition analysis trigger signal is output, and the semantic representation of the current round and the historical consistency score sequence are passed to the multi-intent competition analysis process.
7. The method for speech receiving, recognition, and error correction in a speech robot according to claim 1, characterized in that, Step S4 specifically includes: Based on the trigger signal of the multi-intent competition analysis process, a predefined set of high-frequency intent categories is activated, forming the input conditions for the parallel operation of the intent matcher; A bidirectional LSTM encoding operation is performed on the joint semantic representation vector of the current round. The bidirectional LSTM encoder is initialized and trained based on the semantic features extracted from the historical intent matching task, and outputs a bidirectional hidden state sequence to obtain a temporal enhanced semantic encoding vector. The temporal enhanced semantic encoding vector is input to the intent feature projection layer, which is constructed based on the intent category prototype vector space. A fully connected neural network is used to map the encoding vector to the intent space to generate an intent space representation vector. Based on the cosine similarity between the intent space representation vector and the prototype vector of each intent category, the semantic offset between the current semantic representation and each candidate intent is calculated, and a semantic offset matrix is generated. The semantic offset matrix is subjected to Softmax normalization to obtain the confidence distribution vector of each candidate intent.
8. The voice robot voice reception, recognition, and error correction method according to claim 7, characterized in that, The set of high-frequency intent categories is constructed based on the statistical results of historical dialogue intent distribution to cover more than 80% of high-frequency user intent scenarios.
9. The speech receiving, recognition, and error correction method for a speech robot according to claim 1, characterized in that, Step S5 specifically includes: Based on the joint semantic representation of historical dialogue rounds, key semantic feature vectors from each round are extracted to generate a semantic feature matrix; A semantic relevance score is calculated on the semantic feature matrix. The semantic relevance between the current round semantic vector and the semantic feature vectors of each historical round is evaluated based on the cosine similarity algorithm to obtain a semantic relevance score sequence. The time decay factor is calculated based on the time interval between dialogue rounds using an exponential decay function. The semantic relevance score sequence is weighted and fused with the time decay factor to generate the contextual saliency weight of each historical dialogue segment. Based on the aforementioned contextual saliency weights, the historical dialogue state vectors are weighted and summed to generate a dynamic contextual memory vector.
10. A voice robot voice reception, recognition, and error correction method according to claim 9, characterized in that, The semantic relevance score is obtained by extracting key semantic features from historical rounds using max pooling and evaluating them based on the cosine similarity algorithm. The time decay factor decreases exponentially with the increase of the round interval.
Citation Information
Cited By
Memory enhancement and reasoning method and system for intelligent interaction
CN121998106A