Method and system for context semantic extraction and intention recognition in voice dialogue

By combining sparse hybrid expert Transformer network and ordered graph neural network, dynamic update of dialogue context cache and deeply fusion dialogue semantic graphs, the limitations of existing speech dialogue systems in context semantic extraction and intent recognition are solved, and higher intent recognition accuracy and dialogue fluency are achieved.

CN119862891AActive Publication Date: 2025-04-22ZHEJIANG XINBA TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510345684.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-04-22
Estimated Expiration
2045-03-24

AI Technical Summary

Technical Problem

The existing speech dialogue system has limitations in context semantic extraction and intention recognition, and cannot fully understand the diversity and context dependence of speech input, resulting in insufficient accuracy and fluency of intention recognition.

Method used

The sparse hybrid expert Transformer network and ordered graph neural network are used to dynamically update the dialogue context cache, deeply fusion dialogue semantic graphs, and adjust the intent recognition results through the expert subnet to improve the accuracy of context understanding and intent recognition.

Benefits of technology

It improves the accuracy of context understanding and intention recognition of the voice dialogue system, enhances the system's processing ability and dialogue fluency, reduces information loss and misjudgment problems, and improves robustness and generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862891A_ABST
    Figure CN119862891A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for context semantic extraction and intention recognition in voice dialogue, and the method comprises the following steps: S1, obtaining a voice input signal, converting the voice input signal into text data, and carrying out the preprocessing; s2, constructing a dialogue context cache, and updating the cache content; s3, constructing a sparse hybrid expert Transform network, and carrying out semantic coding on the sparse hybrid expert Transform network; s4, calculating a semantic dependency relationship between dialogue statements by adopting an ordered graph neural network; s5, calculating intention probability distribution, and adjusting the weight of the sparse hybrid expert Transform network and the weight of the ordered graph neural network; and S6, updating a dialogue state, and generating a system response. According to the method, the sparse hybrid expert Transform network and the ordered graph neural network are combined, voice dialogue context semantic extraction and intention recognition are achieved, and the method has the advantages of being accurate in semantic understanding, high in calculation efficiency and high in context sensing capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semantic extraction and recognition, and in particular to a method and system for contextual semantic extraction and recognition of intent in voice conversations. Background Art

[0002] With the rapid development of artificial intelligence technology, voice dialogue systems have been widely used in various intelligent devices, especially in the fields of intelligent assistants, intelligent customer service and speech recognition. The core goal of voice dialogue systems is to enable machines to understand and generate speech through natural language processing technology, so as to interact with users efficiently and smoothly. Existing voice dialogue systems usually rely on modules such as speech recognition, semantic understanding and intent recognition. The speech recognition module converts the user's voice signal into text, while the semantic understanding module extracts the user's intent based on the converted text. Through this process, the system can respond to the user's needs and realize various intelligent operations. However, in practical applications, despite the significant progress made in these technologies, existing voice dialogue systems still face many challenges, especially in context understanding and intent recognition.

[0003] Traditional voice dialogue systems often rely on simple vocabulary matching and fixed pattern matching rules in the process of contextual semantic extraction and intent recognition. This approach has great limitations. First, the diversity and uncertainty of voice input signals may cause the system to encounter understanding barriers when processing various voice inputs, especially when synonyms, polysemy, accent differences and noise interference are involved. The accuracy of traditional speech recognition and text analysis technologies is greatly reduced. Second, existing systems usually lack a deep understanding of the context and cannot effectively remember and utilize conversation history information. Even in some advanced systems, the function of using conversation history to enhance semantic understanding still has certain limitations. The conversation content is usually segmented into single, isolated fragments, and the system cannot capture the deep connection between sentences, resulting in the loss of context information, which affects the accuracy of intent recognition.

[0004] In addition, traditional intent recognition methods mainly rely on predefined rules or simple classification algorithms, which often perform poorly when dealing with complex and dynamically changing dialogue scenarios. Although many existing systems use machine learning methods based on statistical models, they can learn certain semantic rules through a large amount of training data, but these methods usually cannot fully utilize the implicit information in the dialogue context, especially in the process of multi-round dialogue, and it is difficult to maintain the coherence and semantic consistency of the dialogue.

[0005] In recent years, Transformer-based deep learning models have achieved remarkable results, especially in natural language processing tasks. The Transformer model effectively captures the global dependencies of input data through the self-attention mechanism, significantly improving the text processing capabilities. Although the Transformer model has achieved good results in some areas, it still faces certain challenges in voice dialogue systems, especially in complex context understanding and intent recognition tasks. First, traditional Transformer models are usually unable to fully process the unstructured information of voice input, especially in terms of multi-round interactions, context dependencies, and dynamic changes in intent involved in dialogues, and their performance is still not ideal. Secondly, the computational and storage overhead of the standard Transformer model is large, especially when processing long sequence data, the problems of computational efficiency and resource consumption are particularly prominent.

[0006] Therefore, the existing technology still has many deficiencies in the process of contextual semantic extraction and intent recognition. First, traditional methods cannot fully consider the deep association of context and the semantic dependence of multiple rounds of dialogue. Secondly, although deep learning technology has solved the problem of semantic recognition to a certain extent, how to achieve deep fusion and real-time feedback mechanism while ensuring efficiency and accuracy is still a difficulty of current technology.

[0007] Therefore, how to provide a method and system for contextual semantic extraction and intent recognition in voice conversations is an urgent problem that those skilled in the art need to solve. Summary of the invention

[0008] One object of the present invention is to propose a method for context semantic extraction and intent recognition in voice dialogue. The present invention combines a sparse hybrid expert Transformer network and an ordered graph neural network, dynamically updates the dialogue context cache, deeply fuses the dialogue semantic graph, and adjusts the intent recognition result through an expert subnetwork, thereby improving the accuracy of context understanding and intent recognition of the voice dialogue system, and improving the system's processing capability and the fluency of the dialogue.

[0009] A method for extracting contextual semantics and identifying intent in a voice conversation according to an embodiment of the present invention comprises the following steps: S1, obtaining a speech input signal, converting the speech input signal into text data, and performing preprocessing to extract basic semantic features and generate a standardized text representation; S2. Use standardized text representation to build a conversation context cache, store the current conversation history information, and dynamically update the cache content based on the latest input to form a context-enhanced representation; S3, construct a sparse hybrid expert Transformer network, use the sparse hybrid expert Transformer network to semantically encode the context-enhanced representation, and generate a context-encoded representation; S4. Construct a conversation semantic graph based on the context encoding representation, use an ordered graph neural network to calculate the semantic dependency between conversation sentences, and adjust the current semantic expression to obtain the context association representation; S5. Calculate the intent probability distribution based on the context association representation, output the intent recognition result, and feed the intent recognition result back to the sparse hybrid expert Transformer network and the ordered graph neural network, adjust the selection weight of the expert subnetwork and the edge weight of the conversation semantic graph, and output the final intent recognition result; S6. Update the dialog state based on the final intent recognition result, input it into the dialog manager, and generate a system response based on the current dialog information.

[0010] Optionally, the preprocessing includes word segmentation, part-of-speech tagging, named entity recognition, syntactic parsing and redundancy removal.

[0011] Optionally, the S3 specifically includes: S31, constructing a sparse hybrid expert Transformer network, wherein the sparse hybrid expert Transformer network includes a gating network, an expert sub-network, a multi-head attention mechanism, and a normalization and residual connection network, wherein the gating network is used to determine which expert sub-networks should process the current input, and activate the optimal expert sub-network using a Top K selection strategy, and wherein the expert sub-network is a feed-forward neural network; S32. Obtaining context-enhanced representation , to enhance the context representation Word2Vec is used for word vector encoding to convert text input into vector representation: ; Among them, X represents The vector representation of represents the embedding vector of the Mth word, M represents the length of the input text, and d represents the embedding dimension; S33, according to The vector represents the output of the expert network ; S34. Output of the expert network Mapped into three different subspaces: ; Where Q, K, and V represent query, key, and value matrices, respectively. , and Represent the trained projection matrices, used to map queries, keys, and values, respectively. represents the output of the expert sub-network; S35. Calculate the attention score based on the query matrix and the key matrix: ; Among them, A represents the attention score, T represents the transposition operation, represents the dimension of the key, Represents the normalization factor, which is used to control numerical stability and avoid gradient disappearance or explosion; S36. Normalize the attention score A through the Softmax function and apply it to the value matrix to calculate the attention weighted output: ; Among them, Attention(Q,K,V) represents the attention weighted output, Softmax represents the normalization function, and V represents the value matrix; S37. Use multi-head attention mechanism to calculate multi-head attention weighted output : ; ; Among them, MHA(Q,K,V) represents the multi-head attention weighted output, , and represents the training parameters of different attention heads, represents the attention weighted output of the h-th head, Represents a linear transformation matrix, and Concat represents a concatenation operation; S38. Output multi-head attention weighted and the output of the expert sub-network After residual connection and layer normalization, and further mapping through a feedforward neural network, the context encoding representation is obtained : ; ; in, represents context encoding representation, FeedForward represents a two-layer feedforward neural network, and LayerNorm represents layer normalization, which is used to standardize data. represents the output of the expert sub-network, Represents the output after residual connection and layer normalization.

[0012] Optionally, the S33 specifically includes: S331, according to The vector representation of X calculates the gating weights: ; Among them, G(X) represents the gate weight, which is a probability distribution used to dynamically activate different expert sub-networks. Softmax represents normalization. and represents the training parameters; S332, using the Top K selection strategy, select K best expert sub-networks from N expert sub-networks ; ; in, represents the selected K best expert sub-networks, and N represents the number of expert sub-networks; S333. Calculate the weighted output of the expert subnetwork: ; ; Among them, H represents the weighted output of the expert sub-network, represents the weight of the selected i-th expert sub-network, represents the output of the i-th expert sub-network, , , and represents the training parameters of the expert sub-network, and ReLU represents the activation function; S334. Use the expert attention mechanism to perform weighted fusion on the results of different expert sub-networks to generate the output of the expert network : ; ; in, represents the output of the expert network, represents the weighted output of the i-th expert sub-network, MLP represents a multi-layer perceptron, Indicates that the matching scores between expert sub-networks are calculated by multi-layer perceptron, exp represents the natural exponential function, Represents the normalized weight, which is used to ensure the rationality of the expert sub-network fusion.

[0013] Optionally, the S4 specifically includes: S41. Context-based encoding representation , construct the initial embedding of each node in the conversation semantic graph : ; in, represents the initial representation of all dialogue units in the dialogue semantic graph, represents the vector representation of node f, where f represents the number of dialogue units, represents the ReLU activation function, represents the training parameter matrix, represents the bias term; S42. Calculate the semantic correlation between nodes based on the initial embedding , and calculate the edge weights in the conversation semantic graph : ; in, represents the edge weight between node i and node j, sim represents the cosine similarity, , and Represent the vector representation of node i, node j and node k respectively; S43. Using the calculated edge weights Construct the adjacency matrix B of the conversation semantic graph: ; in, Represents the path deviation value, represents the kth node of the actual path, represents the kth node of the planned path, and L represents the total number of path nodes; S44, based on initial embedding and the adjacency matrix B, and updating the node representation of each layer using an ordered graph neural network, wherein the ordered graph neural network is a deep learning network that combines a graph neural network and sequential information; S45, updating the node representation V through multiple rounds of iterations until a preset number of iterations is reached or the node representation converges, and obtaining the final node representation , represented by the final node Perform pooling operation to obtain contextual association representation.

[0014] Optionally, the S44 specifically includes: S441. Determine the neighbor node set N(i) by the adjacency matrix B, transmit the information of each node i through the neighbor node j∈N(i), and calculate the aggregate representation of the neighbor nodes: ; in, represents the message received by node i from its neighbor nodes in the tth layer, W represents the training weight matrix of message transmission, N(i) represents the set of neighbor nodes of node i, represents the vector representation of node j in the tth layer, Represents adaptive attention weights: ; in, Represents the relative time difference information between node i and node j, Represents the relative time difference information between node i and node k, Represents the scoring function, using a multi-layer perceptron: ; Among them, ReLU represents the nonlinear activation function, represents the vector concatenation operation, , , and represents the training parameters, represents the vector representation of node i, represents the vector representation of node j; S442. After receiving the aggregate representation of the neighboring nodes, the ordered graph neural network calculates the state update of the current node representation through the gating network: ; in, represents the updated node representation, which is the vector representation of node i in the t+1th layer. represents the updated path planning solution, represents the training matrix for node updates, represents the bias term, ReLU represents the activation function; S443. Perform attention calculation on all nodes at each layer to ensure that information flows in chronological order: ; ; in, represents the global ordered attention matrix, Softmax represents normalization, represents the time encoding matrix, which represents the sequential information between different time steps, and Respectively represent vector representation The query vector and key vector after projection transformation, represents the scaling factor of the embedding dimension, represents the trainable matrix, Represents the time step difference between node i and node j, and PositionalEmbedding represents the relative position encoding; S444, node representation after calculating attention: .

[0015] Optionally, the S5 specifically includes: S51, using a fully connected layer to perform feature transformation on the context association representation to generate a feature representation for intent classification; S52, based on the feature representation generated for intent classification, the Softmax classification layer is used to calculate the intent probability distribution P(I) of the current speech input, and the intent probability distribution P(I) is used as the intent recognition result; S53, feed back the intent recognition results to the sparse hybrid expert Transformer network and the ordered graph neural network, and update the parameters: ; ; in, represents the selection weight of the updated expert sub-network, G(x) represents the selection weight of the original expert sub-network, P(I) represents the probability distribution of the intent category, represents the feedback coefficient, which is used to adjust the learning rate of the expert sub-network weights. represents the initial edge weight, represents the updated edge weight, β represents the edge weight adjustment factor, represents the cosine similarity between the identified intents; S54, output the final intention recognition result: ; in, Represents the final intent recognition result, which is the intent category with the highest probability.

[0016] A system for extracting contextual semantics and recognizing intent in a voice conversation according to an embodiment of the present invention includes: A voice input module, used to receive the user's voice input and convert it into text data; The text preprocessing module is used to preprocess text data, extract basic semantic features and generate standardized text representation; A context cache module, which is used to store conversation history and dynamically update the cache to form a context-enhanced representation; A sparse hybrid expert Transformer network module is used to semantically encode the context-enhanced representation and generate a context-encoded representation; Semantic graph construction and ordered graph neural network module, which is used to construct the conversation semantic graph and calculate the semantic dependency between sentences to generate contextual association representation; An intent recognition module, used to calculate and output intent recognition results based on context association representation; Feedback module, used to feed back the intent recognition results to the sparse hybrid expert Transformer network and semantic graph construction and ordered graph neural network modules, adjust the network weights, and output the final intent recognition results; The dialogue management module is used to update the dialogue state and generate system responses based on the final intent recognition results.

[0017] The beneficial effects of the present invention are: First, by constructing a conversation context cache, the present invention enables the system to store and dynamically update historical conversation information, ensuring the consistency of multiple rounds of conversations, enabling the system to maintain the coherence of conversation logic in continuous conversation scenarios, and reducing recognition errors caused by semantic drift. The sparse hybrid expert Transformer network is used for semantic encoding, and the gated network is used to activate the optimal expert sub-network, so that the sparse hybrid expert Transformer network can achieve a balance between computational efficiency and expression ability, which not only improves the processing capability of large-scale corpus, but also reduces the consumption of computing resources, thereby improving the real-time and scalability of the system.

[0018] Secondly, the present invention uses an ordered graph neural network to model the conversation semantic graph, ensuring the correct propagation of semantic information between different conversation rounds. Traditional methods usually regard conversation rounds as independent units, ignoring the impact of historical conversations on current semantics. The present invention constructs a conversation semantic graph, uses a graph neural network to calculate the semantic dependencies between sentences, and combines the attention mechanism to adjust the semantic expression, so that the system can better understand the semantic hierarchical relationship and reduce the information loss and misjudgment problems of traditional voice dialogue systems in multi-round conversations. At the same time, the dynamic edge weight adjustment mechanism of the present invention adaptively optimizes the structure of the conversation semantic graph according to the intention recognition results, enhancing the robustness and generalization ability of the system in complex conversation environments.

[0019] In addition, in terms of intent recognition, compared with the traditional static intent recognition method, the present invention feeds back the intent recognition results to the sparse hybrid expert Transformer network and the ordered graph neural network, dynamically adjusts the selection weight of the expert sub-network and the edge weight of the semantic graph, thereby enhancing the adaptive ability and context perception ability of the dialogue model. The system can improve the adaptability to complex contexts by continuously optimizing the activation strategy of the expert sub-network, making intent recognition more accurate, especially in long dialogues, fuzzy intent expressions, and dialogue scenarios with strong cross-turn semantic dependencies. The present invention shows obvious advantages.

[0020] Finally, the present invention also performs well in terms of consistency and interpretability of multi-round dialogues. Through the construction and dynamic update of the dialogue semantic graph, the system can clearly track and model the evolution of user intentions, making the reasoning process of the dialogue system more interpretable. Traditional voice dialogue systems often find it difficult to provide stable outputs when faced with fuzzy and ambiguous contexts. The semantic graph modeling and expert network dynamic adjustment mechanism of the present invention enable the system to provide more reasonable intent recognition results when faced with complex problems, reducing misidentification and irrelevant answers, and improving user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 A flowchart of a method for extracting contextual semantics and identifying intent in voice conversations proposed by the present invention; Figure 2 This is a structural diagram of a sparse hybrid expert Transformer network for a method proposed in the present invention for contextual semantic extraction and intent recognition in voice conversations. DETAILED DESCRIPTION

[0022] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.

[0023] refer to Figure 1 and Figure 2 , a method for extracting contextual semantics and identifying intentions in voice conversations, comprising the following steps: S1, obtaining a speech input signal, converting the speech input signal into text data, and performing preprocessing to extract basic semantic features and generate a standardized text representation; S2. Use standardized text representation to build a conversation context cache, store the current conversation history information, and dynamically update the cache content based on the latest input to form a context-enhanced representation; S3, construct a sparse hybrid expert Transformer network, use the sparse hybrid expert Transformer network to semantically encode the context-enhanced representation, and generate a context-encoded representation; S4. Construct a conversation semantic graph based on the context encoding representation, use an ordered graph neural network to calculate the semantic dependency between conversation sentences, and adjust the current semantic expression to obtain the context association representation; S5. Calculate the intent probability distribution based on the context association representation, output the intent recognition result, and feed the intent recognition result back to the sparse hybrid expert Transformer network and the ordered graph neural network, adjust the selection weight of the expert subnetwork and the edge weight of the conversation semantic graph, and output the final intent recognition result; S6. Update the dialog state based on the final intent recognition result, input it into the dialog manager, and generate a system response based on the current dialog information.

[0024] In this embodiment, the preprocessing includes word segmentation, part-of-speech tagging, named entity recognition, syntactic parsing and redundancy removal.

[0025] In this implementation, S3 specifically includes: S31, constructing a sparse hybrid expert Transformer network, wherein the sparse hybrid expert Transformer network includes a gating network, an expert sub-network, a multi-head attention mechanism, and a normalization and residual connection network, wherein the gating network is used to determine which expert sub-networks should process the current input, and activate the optimal expert sub-network using a Top K selection strategy, and wherein the expert sub-network is a feed-forward neural network; S32. Obtaining context-enhanced representation , to enhance the context representation Word2Vec is used for word vector encoding to convert text input into vector representation: ; Among them, X represents The vector representation of represents the embedding vector of the Mth word, M represents the length of the input text, and d represents the embedding dimension; S33, according to The vector represents the output of the expert network ; S34. Output of the expert network Mapped into three different subspaces: ; Where Q, K, and V represent query, key, and value matrices, respectively. , and Represent the trained projection matrices, used to map queries, keys, and values, respectively. represents the output of the expert sub-network; S35. Calculate the attention score based on the query matrix and the key matrix: ; Among them, A represents the attention score, T represents the transposition operation, represents the dimension of the key, Represents the normalization factor, which is used to control numerical stability and avoid gradient disappearance or explosion; S36. Normalize the attention score A through the Softmax function and apply it to the value matrix to calculate the attention weighted output: ; Among them, Attention(Q,K,V) represents the attention weighted output, Softmax represents the normalization function, and V represents the value matrix; S37. Use multi-head attention mechanism to calculate multi-head attention weighted output : ; ; Among them, MHA(Q,K,V) represents the multi-head attention weighted output, , and represents the training parameters of different attention heads, represents the attention weighted output of the h-th head, Represents a linear transformation matrix, and Concat represents a concatenation operation; S38. Output multi-head attention weighted and the output of the expert sub-network After residual connection and layer normalization, and further mapping through a feedforward neural network, the context encoding representation is obtained : ; ; in, represents context encoding representation, FeedForward represents a two-layer feedforward neural network, and LayerNorm represents layer normalization, which is used to standardize data. represents the output of the expert sub-network, Represents the output after residual connection and layer normalization.

[0026] In this implementation manner, the S33 specifically includes: S331, according to The vector representation of X calculates the gating weights: ; Among them, G(X) represents the gate weight, which is a probability distribution used to dynamically activate different expert sub-networks. Softmax represents normalization. and represents the training parameters; S332, using the Top K selection strategy, select K best expert sub-networks from N expert sub-networks ; ; in, represents the selected K best expert sub-networks, and N represents the number of expert sub-networks; S333. Calculate the weighted output of the expert subnetwork: ; ; Among them, H represents the weighted output of the expert sub-network, represents the weight of the selected i-th expert sub-network, represents the output of the i-th expert sub-network, , , and represents the training parameters of the expert sub-network, and ReLU represents the activation function; S334. Use the expert attention mechanism to perform weighted fusion on the results of different expert sub-networks to generate the output of the expert network : ; ; in, represents the output of the expert network, represents the weighted output of the i-th expert sub-network, MLP represents a multi-layer perceptron, Indicates that the matching scores between expert sub-networks are calculated by multi-layer perceptron, exp represents the natural exponential function, Represents the normalized weight, which is used to ensure the rationality of the expert sub-network fusion.

[0027] In this implementation, S4 specifically includes: S41. Context-based encoding representation , construct the initial embedding of each node in the conversation semantic graph : ; in, represents the initial representation of all dialogue units in the dialogue semantic graph, represents the vector representation of node f, where f represents the number of dialogue units, represents the ReLU activation function, represents the training parameter matrix, represents the bias term; S42, calculating the semantic correlation between nodes based on the initial embedding , and calculate the edge weights in the conversation semantic graph : ; in, represents the edge weight between node i and node j, sim represents the cosine similarity, , and Represent the vector representation of node i, node j and node k respectively; S43. Using the calculated edge weights Construct the adjacency matrix B of the conversation semantic graph: ; in, Represents the path deviation value, represents the kth node of the actual path, represents the kth node of the planned path, and L represents the total number of path nodes; S44, based on initial embedding and the adjacency matrix B, and updating the node representation of each layer using an ordered graph neural network, wherein the ordered graph neural network is a deep learning network that combines a graph neural network and sequential information; S45, updating the node representation V through multiple rounds of iterations until a preset number of iterations is reached or the node representation converges, and obtaining the final node representation , represented by the final node Perform pooling operation to obtain contextual association representation.

[0028] In this implementation manner, the S44 specifically includes: S441. Determine the neighbor node set N(i) by the adjacency matrix B, transmit the information of each node i through the neighbor node j∈N(i), and calculate the aggregate representation of the neighbor nodes: ; in, represents the message received by node i from its neighbor nodes in the tth layer, W represents the training weight matrix of message transmission, N(i) represents the set of neighbor nodes of node i, represents the vector representation of node j in the tth layer, Represents adaptive attention weights: ; in, Represents the relative time difference information between node i and node j, Represents the relative time difference between node i and node k, Represents the scoring function, using a multi-layer perceptron: ; Among them, ReLU represents the nonlinear activation function, represents the vector concatenation operation, , , and represents the training parameters, represents the vector representation of node i, represents the vector representation of node j; S442. After receiving the aggregate representation of the neighboring nodes, the ordered graph neural network calculates the state update of the current node representation through the gating network: ; in, represents the updated node representation, which is the vector representation of node i in the t+1th layer. represents the updated path planning solution, represents the training matrix for node updates, represents the bias term, ReLU represents the activation function; S443. Perform attention calculation on all nodes at each layer to ensure that information flows in chronological order: ; ; in, represents the global ordered attention matrix, Softmax represents normalization, represents the time encoding matrix, which represents the sequential information between different time steps, and Respectively represent vector representation The query vector and key vector after projection transformation, represents the scaling factor of the embedding dimension, represents the trainable matrix, Represents the time step difference between node i and node j, and PositionalEmbedding represents the relative position encoding; S444, node representation after calculating attention: .

[0029] In this implementation manner, S5 specifically includes: S51, using a fully connected layer to perform feature transformation on the context association representation to generate a feature representation for intent classification; S52, based on the feature representation generated for intent classification, the Softmax classification layer is used to calculate the intent probability distribution P(I) of the current speech input, and the intent probability distribution P(I) is used as the intent recognition result; S53, feed back the intent recognition results to the sparse hybrid expert Transformer network and the ordered graph neural network, and update the parameters: ; ; in, represents the selection weight of the updated expert sub-network, G(x) represents the selection weight of the original expert sub-network, P(I) represents the probability distribution of the intent category, represents the feedback coefficient, which is used to adjust the learning rate of the expert sub-network weights. represents the initial edge weight, represents the updated edge weight, β represents the edge weight adjustment factor, represents the cosine similarity between the identified intents; S54, output the final intention recognition result: ; in, Represents the final intent recognition result, which is the intent category with the highest probability.

[0030] A system for extracting contextual semantics and identifying intent in voice conversations, comprising: A voice input module, used to receive the user's voice input and convert it into text data; The text preprocessing module is used to preprocess text data, extract basic semantic features and generate standardized text representation; A context cache module, which is used to store conversation history and dynamically update the cache to form a context-enhanced representation; A sparse hybrid expert Transformer network module is used to semantically encode the context-enhanced representation and generate a context-encoded representation; Semantic graph construction and ordered graph neural network module, which is used to construct the conversation semantic graph and calculate the semantic dependency between sentences to generate contextual association representation; An intent recognition module, used to calculate and output intent recognition results based on context association representation; Feedback module, used to feed back the intent recognition results to the sparse hybrid expert Transformer network and semantic graph construction and ordered graph neural network modules, adjust the network weights, and output the final intent recognition results; The dialogue management module is used to update the dialogue state and generate system responses based on the final intent recognition results.

[0031] Embodiment 1: In order to verify the feasibility of the present invention in implementation, the present invention is applied to the customer service system of a certain intelligent e-commerce platform. The platform receives tens of thousands of user requests every day, covering multiple fields from product inquiries, order processing to after-sales services. In order to improve customer satisfaction and reduce the burden of manual customer service, the platform decided to introduce a voice-based intelligent customer service system, and the system can handle multiple rounds of dialogue and accurately understand the user's intentions and needs in the dialogue, especially in the contextual semantic understanding of cross-round dialogues, which can effectively improve the accuracy of intention recognition.

[0032] In the actual application of this e-commerce platform, users interact with the customer service system through voice. For example, when a user asks "I want to check the order status of last month", the system needs to convert the request into text data through voice recognition and extract the semantic information of "check" and "last month's order". Next, the system will rely on its dialogue context cache module to identify whether the user has had related order query behavior before, and then generate an enhanced context representation, and semantically encode it through the sparse hybrid expert Transformer network module.

[0033] This system uses a sparse hybrid expert Transformer network, which can dynamically select relevant expert subnetworks for processing based on the current conversation content, improving computational efficiency while ensuring that the contextual information of the conversation is not lost in the semantic encoding. For example, if a user mentions "order" or "delivery" in multiple rounds of conversation, the system can identify these key information and maintain the consistency of the context. This process can effectively avoid the semantic deviation that may occur in traditional systems when processing cross-round conversations.

[0034] In order to fully evaluate the effectiveness of the method of the present invention, we conducted a two-week experiment in the intelligent customer service system of an e-commerce platform, during which more than 100,000 rounds of user dialogues were conducted. The following is the detailed data of the experimental results.

[0035] Table 1 Experimental data comparison table ; From the comparison of intent recognition accuracy, the accuracy of the system of the present invention in each round of dialogue is significantly higher than that of the traditional speech recognition system. For example, in the first round of experiments, the accuracy of the traditional system was 78.5%, while the accuracy of the system of the present invention reached 91.2%, an increase of 16.7%. This gap was also continuously reflected in other rounds of dialogue, with the average accuracy increasing from 80.4% of the traditional system to 92.6% of the system of the present invention, an increase of about 15.8%. This result shows that by introducing the sparse hybrid expert Transformer network and the ordered graph neural network, the system can understand the dialogue context more accurately, thereby effectively improving the accuracy of intent recognition.

[0036] In terms of response time, the system of the present invention shows significant advantages over traditional speech recognition systems. The average response time of the traditional system is 5.3 seconds, while the average response time of the system of the present invention is reduced to 3.8 seconds, an increase of 28.2%. This shortened response time means that users can get feedback from the system in a shorter time, which improves the interaction efficiency of the system. Especially in high-concurrency dialogue scenarios, the optimization of response time is of great significance to improving user experience.

[0037] The change in user satisfaction further verifies the effectiveness of the present invention in improving user experience. Although in some rounds, the user satisfaction of the traditional system is higher, the overall performance of the system of the present invention is relatively stable, with an average user satisfaction of 100%. This reflects that the present invention optimizes the accuracy of intent recognition and response time, making the overall performance of the system more in line with user needs, thereby greatly improving the user experience. Especially in scenarios with frequent conversations and complex content, accurate and fast feedback can effectively reduce users' waiting anxiety and improve users' trust and satisfaction with the system.

[0038] In summary, the present invention not only improves the accuracy of intent recognition, but also effectively reduces the system response time, thereby improving the overall user experience. These improvements make the present invention more competitive in practical applications and can meet higher requirements for intelligent voice interaction.

[0039] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for extracting contextual semantics and identifying intent in voice conversations, characterized in that: The steps include: S1, obtaining a speech input signal, converting the speech input signal into text data, and performing preprocessing to extract basic semantic features and generate a standardized text representation; S2. Use standardized text representation to build a conversation context cache, store the current conversation history information, and dynamically update the cache content based on the latest input to form a context-enhanced representation; S3, construct a sparse hybrid expert Transformer network, use the sparse hybrid expert Transformer network to semantically encode the context-enhanced representation, and generate a context-encoded representation; S4. Construct a conversation semantic graph based on the context encoding representation, use an ordered graph neural network to calculate the semantic dependency between conversation sentences, and adjust the current semantic expression to obtain the context association representation; S5. Calculate the intent probability distribution based on the context association representation, output the intent recognition result, and feed the intent recognition result back to the sparse hybrid expert Transformer network and the ordered graph neural network, adjust the selection weight of the expert subnetwork and the edge weight of the conversation semantic graph, and output the final intent recognition result; S6. Update the dialog state based on the final intent recognition result, input it into the dialog manager, and generate a system response based on the current dialog information.

2. A method for extracting contextual semantics and identifying intentions in voice conversations according to claim 1, characterized in that: The preprocessing includes word segmentation, part-of-speech tagging, named entity recognition, syntactic parsing and redundancy removal.

3. The method for extracting contextual semantics and identifying intentions in voice conversations according to claim 1, characterized in that: The S3 specifically includes: S31, constructing a sparse hybrid expert Transformer network, wherein the sparse hybrid expert Transformer network includes a gating network, an expert sub-network, a multi-head attention mechanism, and a normalization and residual connection network, wherein the gating network is used to determine which expert sub-networks should process the current input, and activate the optimal expert sub-network using a Top K selection strategy, and wherein the expert sub-network is a feed-forward neural network; S32. Obtaining context-enhanced representation , to enhance the context representation Word2Vec is used for word vector encoding to convert text input into vector representation: ; Among them, X represents The vector representation of represents the embedding vector of the Mth word, M represents the length of the input text, and d represents the embedding dimension; S33, according to The vector represents the output of the expert network ; S34. Output of the expert network Mapped to three different subspaces: ; Where Q, K, and V represent query, key, and value matrices, respectively. , and Represent the trained projection matrices, used to map queries, keys, and values, respectively. represents the output of the expert sub-network; S35. Calculate the attention score based on the query matrix and the key matrix: ; Among them, A represents the attention score, T represents the transposition operation, represents the dimension of the key, Represents the normalization factor, which is used to control numerical stability and avoid gradient disappearance or explosion; S36. Normalize the attention score A through the Softmax function and apply it to the value matrix to calculate the attention weighted output: ; Among them, Attention(Q,K,V) represents the attention weighted output, Softmax represents the normalization function, and V represents the value matrix; S37. Use multi-head attention mechanism to calculate multi-head attention weighted output : ; ; Among them, MHA(Q,K,V) represents the multi-head attention weighted output, , and represents the training parameters of different attention heads, represents the attention weighted output of the h-th head, Represents a linear transformation matrix, and Concat represents a concatenation operation; S38. Output multi-head attention weighted and the output of the expert sub-network After residual connection and layer normalization, and further mapping through a feedforward neural network, the context encoding representation is obtained : ; ; in, represents context encoding representation, FeedForward represents a two-layer feedforward neural network, and LayerNorm represents layer normalization, which is used to standardize data. represents the output of the expert sub-network, Represents the output after residual connection and layer normalization.

4. A method for extracting contextual semantics and identifying intentions in voice conversations according to claim 3, characterized in that: The S33 specifically includes: S331, according to The vector representation of X calculates the gating weights: ; Among them, G(X) represents the gate weight, which is a probability distribution used to dynamically activate different expert sub-networks. Softmax represents normalization. and represents the training parameters; S332, using the Top K selection strategy, select K best expert sub-networks from N expert sub-networks ; ; in, represents the selected K best expert sub-networks, and N represents the number of expert sub-networks; S333. Calculate the weighted output of the expert subnetwork: ; ; Among them, H represents the weighted output of the expert sub-network, represents the weight of the selected i-th expert sub-network, represents the output of the i-th expert sub-network, , , and represents the training parameters of the expert sub-network, and ReLU represents the activation function; S334. Use the expert attention mechanism to perform weighted fusion on the results of different expert sub-networks to generate the output of the expert network : ; ; in, represents the output of the expert network, represents the weighted output of the i-th expert sub-network, MLP represents a multi-layer perceptron, Indicates that the matching scores between expert sub-networks are calculated by multi-layer perceptron, exp represents the natural exponential function, Represents the normalized weight, which is used to ensure the rationality of the expert sub-network fusion.

5. The method for extracting contextual semantics and identifying intentions in voice conversations according to claim 1, characterized in that: The S4 specifically includes: S41. Context-based encoding representation , construct the initial embedding of each node in the conversation semantic graph : ; in, represents the initial representation of all dialogue units in the dialogue semantic graph, represents the vector representation of node f, where f represents the number of dialogue units, represents the ReLU activation function, represents the training parameter matrix, represents the bias term; S42. Calculate the semantic correlation between nodes based on the initial embedding , and calculate the edge weights in the conversation semantic graph : ; in, represents the edge weight between node i and node j, sim represents the cosine similarity, , and Represent the vector representation of node i, node j and node k respectively; S43. Using the calculated edge weights Construct the adjacency matrix B of the conversation semantic graph: ; in, Represents the path deviation value, represents the kth node of the actual path, represents the kth node of the planned path, and L represents the total number of path nodes; S44, based on initial embedding and the adjacency matrix B, and updating the node representation of each layer using an ordered graph neural network, wherein the ordered graph neural network is a deep learning network that combines a graph neural network and sequential information; S45, updating the node representation V through multiple rounds of iterations until a preset number of iterations is reached or the node representation converges, and obtaining the final node representation , represented by the final node Perform pooling operation to obtain contextual association representation.

6. A method for extracting contextual semantics and identifying intentions in voice conversations according to claim 5, characterized in that: The S44 specifically includes: S441. Determine the neighbor node set N(i) by the adjacency matrix B, transmit the information of each node i through the neighbor node j∈N(i), and calculate the aggregate representation of the neighbor nodes: ; in, represents the message received by node i from its neighbor nodes in the tth layer, W represents the training weight matrix of message transmission, N(i) represents the set of neighbor nodes of node i, represents the vector representation of node j in the tth layer, Represents adaptive attention weights: ; in, Represents the relative time difference information between node i and node j, Represents the relative time difference between node i and node k, Represents the scoring function, using a multi-layer perceptron: ; Among them, ReLU represents the nonlinear activation function, represents the vector concatenation operation, , , and represents the training parameters, represents the vector representation of node i, represents the vector representation of node j; S442. After receiving the aggregate representation of the neighboring nodes, the ordered graph neural network calculates the state update of the current node representation through the gating network: ; in, represents the updated node representation, which is the vector representation of node i in the t+1th layer. represents the updated path planning solution, represents the training matrix for node updates, represents the bias term, ReLU represents the activation function; S443. Perform attention calculation on all nodes at each layer to ensure that information flows in chronological order: ; ; in, represents the global ordered attention matrix, Softmax represents normalization, represents the time encoding matrix, which represents the sequential information between different time steps, and Respectively represent vector representation The query vector and key vector after projection transformation, represents the scaling factor of the embedding dimension, represents the trainable matrix, Represents the time step difference between node i and node j, and PositionalEmbedding represents the relative position encoding; S444, node representation after calculating attention: 。 7. The method for extracting contextual semantics and identifying intentions in voice conversations according to claim 1, characterized in that: The S5 specifically includes: S51, using a fully connected layer to perform feature transformation on the context association representation to generate a feature representation for intent classification; S52, based on the feature representation generated for intent classification, the Softmax classification layer is used to calculate the intent probability distribution P(I) of the current speech input, and the intent probability distribution P(I) is used as the intent recognition result; S53, feed back the intent recognition results to the sparse hybrid expert Transformer network and the ordered graph neural network, and update the parameters: ; ; in, represents the selection weight of the updated expert sub-network, G(x) represents the selection weight of the original expert sub-network, P(I) represents the probability distribution of the intent category, represents the feedback coefficient, which is used to adjust the learning rate of the expert sub-network weights. represents the initial edge weight, represents the updated edge weight, β represents the edge weight adjustment factor, represents the cosine similarity between the identified intents; S54, output the final intention recognition result: ; in, Represents the final intent recognition result, which is the intent category with the highest probability.

8. A system for extracting contextual semantics and identifying intentions in voice conversations, executing the method for extracting contextual semantics and identifying intentions in voice conversations as claimed in any one of claims 1 to 7, characterized in that: include: A voice input module, used to receive the user's voice input and convert it into text data; The text preprocessing module is used to preprocess text data, extract basic semantic features and generate standardized text representation; A context cache module, which is used to store conversation history and dynamically update the cache to form a context-enhanced representation; A sparse hybrid expert Transformer network module is used to semantically encode the context-enhanced representation and generate a context-encoded representation; Semantic graph construction and ordered graph neural network module, which is used to construct the conversation semantic graph and calculate the semantic dependency between sentences to generate contextual association representation; An intent recognition module, used to calculate and output intent recognition results based on context association representation; Feedback module, used to feed back the intent recognition results to the sparse hybrid expert Transformer network and semantic graph construction and ordered graph neural network modules, adjust the network weights, and output the final intent recognition results; The dialogue management module is used to update the dialogue state and generate system responses based on the final intent recognition results.

Citation Information

Patent Citations

  • Multi-round dialogue reply generation method based on dual-channel semantic enhancement and terminal equipment

    CN115495552A

  • Natural language understanding method and device fusing dialogue context information

    CN116542256A

  • Knowledge retrieval graph-based Chinese dialogue knowledge retrieval method and system

    CN118551004A

  • Customer voice analysis system based on large model

    CN119541499A

Cited By

  • Session content key point extraction method based on reinforcement learning

    CN120353923A

  • A method for extracting key points from conversation content based on reinforcement learning

    CN120353923B

  • Intelligent ship lock joint scheduling method and system for multi-cascade channel

    CN120875370A

  • Intelligent ship lock joint scheduling method and system for multi-stage waterway

    CN120875370B

  • Voice multi-instruction parallel recognition method and device based on large model

    CN120877731A