A method, system, electronic device and storage medium for identifying conversation intention

By clustering and grading historical dialogue texts and training texts, combined with keyword filtering and model adjustment, the accuracy of the intention recognition model is improved, and the problem of low accuracy of intention recognition in the prior art is solved, especially the recognition effect when the amount of information is insufficient.

CN120354860BActive Publication Date: 2025-08-29CHINA UNICOM ONLINE INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510845763.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-08-29
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

The existing intention recognition technology has a low accuracy rate for intent recognition of dialogue texts, especially when the amount of information is insufficient, the recognition effect is poor.

Method used

By clustering and grading intention similarity among multiple historical dialogue texts and training dialogue texts, extracting keyword information, adjusting the pre-trained intention recognition model to improve recognition accuracy, and semantic feature extraction and fusion using word vector layer, normalization, convolutional layer, ReLU function and multi-layer perceptron.

Benefits of technology

The accuracy of dialogue text intention recognition is improved, especially when the amount of information is insufficient, and the accuracy and efficiency of recognition is enhanced by adjusting the model and keyword filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120354860B_ABST
    Figure CN120354860B_ABST
Patent Text Reader

Abstract

This application discloses a method, system, electronic device, and storage medium for identifying conversational intent. This method classifies the intent of each category of historical conversation texts according to intent importance based on a second clustering result, thereby obtaining an intent classification result. The method then extracts multiple first keywords from the conversation text to be identified and, based on the intent classification result, determines whether the information content of the multiple first keywords is greater than or equal to a preset threshold. If the information content of the multiple first keywords is greater than or equal to the preset threshold, multiple target conversation texts corresponding to the multiple first keywords are obtained from the multiple historical conversation texts based on the first clustering result. A pretrained intent recognition model is then adjusted using the multiple target conversation texts to obtain an optimized intent recognition model. The optimized intent recognition model is then used to perform intent recognition on all keywords corresponding to the conversation text to be identified, thereby obtaining an intent recognition result. This application improves the accuracy of conversational intent recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intention recognition, and in particular to a method, system, electronic device and storage medium for recognizing conversation intention. Background Art

[0002] With the continuous development of deep learning and artificial intelligence technologies, intelligent conversational systems have been widely used in fields such as healthcare, e-commerce, entertainment, and autonomous driving, including intelligent customer service, digital doctors, and smart butlers. Intelligent conversational systems require accurate understanding of user intent to effectively solve problems. To accurately understand user intent, technology that can understand the meaning of conversations is required, which is why the emergence of intent recognition technology is of great significance.

[0003] Intent recognition is a key task in natural language processing (NLP). It aims to determine the intent or purpose expressed in user input. Simply put, intent recognition involves semantically understanding user utterances to better answer questions or provide relevant services. Traditional intent recognition methods are generally based on template matching or artificial feature sets. These methods are time-consuming and labor-intensive, with limited scalability. Using traditional neural network models, such as convolutional neural networks (CNNs), for intelligent recognition lacks contextual information, resulting in low accuracy. Furthermore, a large amount of conversational text is required to achieve accurate intent recognition.

[0004] Therefore, the accuracy of existing related intent recognition technologies in recognizing the intent of conversation texts is relatively low. Summary of the Invention

[0005] This application aims to propose a method, system, electronic device and storage medium for recognizing conversation intent, which can improve the accuracy of conversation text intent recognition.

[0006] In a first aspect, an embodiment of the present application provides a method for identifying conversation intentions, the method comprising:

[0007] Obtaining multiple historical conversation texts and corresponding first intent labels, multiple training conversation texts and corresponding second intent labels, and conversation text to be recognized;

[0008] Based on the first intent label, clustering the multiple historical conversation texts according to intent similarity to obtain a first clustering result; and, based on the second intent label, clustering the multiple training conversation texts according to intent similarity to obtain a second clustering result;

[0009] Based on the second clustering result, the historical conversation texts of each category are classified according to the importance of the intent to obtain an intent classification result;

[0010] Extracting a plurality of first keywords from the to-be-recognized conversation text, and determining whether information amounts of the plurality of first keywords are greater than or equal to a preset threshold based on the intention classification result;

[0011] If the information amount of the multiple first keywords is greater than or equal to a preset threshold, obtaining multiple target conversation texts of categories corresponding to the multiple first keywords from the multiple historical conversation texts according to the first clustering result;

[0012] Adjusting a pre-trained intent recognition model using the multiple target conversation texts to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the multiple training conversation texts and the second intent labels corresponding thereto;

[0013] The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized to obtain an intent recognition result.

[0014] Compared with the prior art, the first aspect of the present application has the following beneficial effects:

[0015] The method obtains a plurality of historical conversation texts and corresponding first intent labels, a plurality of training conversation texts and corresponding second intent labels, and a conversation text to be identified; clusters the plurality of historical conversation texts according to intent similarity based on the first intent label to obtain a first clustering result, and clusters the plurality of training conversation texts according to intent similarity based on the second intent label to obtain a second clustering result; based on the second clustering result, the historical conversation texts of each category are classified according to intent importance to obtain an intent classification result; extracts a plurality of first keywords from the conversation text to be identified, and determines whether the information content of the plurality of first keywords is greater than or equal to a preset threshold based on the intent classification result; if the information content of the plurality of first keywords is greater than or equal to the preset threshold, obtains a plurality of target conversation texts of categories corresponding to the plurality of first keywords from the plurality of historical conversation texts based on the first clustering result; uses the plurality of target conversation texts to adjust a pre-trained intent recognition model to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the plurality of training conversation texts and the corresponding second intent labels; uses the optimized intent recognition model to perform intent recognition on all keywords corresponding to the conversation text to be identified to obtain an intent recognition result. In this way, multiple historical conversation texts are first clustered according to the similarity of their intentions, and then the intentions of each category of historical conversation texts are graded according to the importance of their intentions, because the intentions of the same category are easier to distinguish and the efficiency of intention grading can be improved; then it is determined whether the amount of information of multiple first keywords is greater than or equal to the preset threshold, because a sufficient amount of information can improve the accuracy of conversation text intent recognition; and then the pre-trained intent recognition model is adjusted through multiple target conversation texts, which can improve the accuracy of the intent recognition model, thereby further improving the accuracy of conversation text intent recognition.

[0016] In some embodiments, the intent recognition model includes a word vector layer, normalization, a convolution layer, a ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron. The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized, and the intent recognition result obtained includes:

[0017] Input all keywords corresponding to the conversation text to be recognized into the tuned intent recognition model, and vectorize all keywords through the word vector layer to obtain target keyword vectors;

[0018] The target keyword vector is normalized, subjected to a convolution layer, and subjected to a ReLU function to extract a feature vector to obtain keyword features;

[0019] Inputting the keyword feature into a first semantic feature extraction module to perform semantic feature extraction to obtain a first semantic feature extraction result;

[0020] Inputting the first semantic feature extraction result and the keyword feature into a second semantic feature extraction module to perform semantic feature extraction to obtain a second semantic feature extraction result;

[0021] Inputting the second semantic feature extraction result and the keyword feature into a third semantic feature extraction module to perform semantic feature extraction to obtain a third semantic feature extraction result;

[0022] Performing feature fusion on the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result to obtain a fused semantic feature;

[0023] The fused semantic features are input into a multi-layer perceptron for intent recognition to obtain an intent recognition result.

[0024] In some embodiments, the pre-trained intent recognition model is obtained by:

[0025] Build an intent recognition model that includes a word embedding layer, normalization, convolutional layer, ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron;

[0026] extracting keywords from each training dialogue text in the plurality of training dialogue texts to obtain a keyword dataset;

[0027] Filtering the keywords in the keyword data set to obtain a filtered data set, and acquiring a second intent tag corresponding to the filtered data set;

[0028] The pre-trained intent recognition model is obtained by pre-training the constructed intent recognition model with the filtered data set and the second intent label corresponding thereto.

[0029] In some embodiments, screening the keywords in the keyword dataset to obtain a screened dataset includes:

[0030] Vectorizing the keywords in the keyword dataset to obtain a keyword vector dataset;

[0031] Input the keyword vector dataset into the multi-head attention mechanism to obtain the weight corresponding to each keyword;

[0032] Calculate the importance of each keyword based on the weight corresponding to each keyword;

[0033] The keywords in the keyword data set are filtered according to the importance of each keyword to obtain a filtered data set.

[0034] In some embodiments, determining whether the information volume of the plurality of first keywords is greater than or equal to a preset threshold according to the intention classification result includes:

[0035] Determining, based on the multiple first keywords, a category corresponding to the to-be-recognized conversation text in the second clustering result;

[0036] Select relevant intent grading results according to the category corresponding to the to-be-identified conversation text, and obtain a target intent grading result;

[0037] Calculating information value of the plurality of first keywords according to the target intention classification result;

[0038] The information amount values ​​of the plurality of first keywords are compared with the preset threshold to determine whether the information amount of the plurality of first keywords is greater than or equal to the preset threshold.

[0039] In some implementations, calculating the information value of the plurality of first keywords according to the target intent grading result includes:

[0040] ;

[0041] in, Indicates the information value of multiple first keywords, It represents the correlation between the first keyword i and the intent level j in the target intent grading result. The correlation of the first keyword belonging to the intent level j is 1, and the correlation of the first keyword not belonging to the intent level j is 0. k represents the number of multiple keywords belonging to the same intent level, n represents the number of intent levels corresponding to the current category dialogue text, and m represents the number of multiple first keywords.

[0042] In some implementations, the conversation intent identification method further includes:

[0043] If the information amount of all first keywords corresponding to the dialogue text to be recognized is less than the preset threshold, inputting the dialogue text to be recognized into the trained multi-turn dialogue model to obtain multi-turn dialogue text related to the dialogue text to be recognized;

[0044] Extracting multiple second keywords from the multiple rounds of conversation texts, merging all the second keywords with all the first keywords to obtain a merged keyword set;

[0045] Calculating the information value of all keywords in the merged keyword set according to the target intent classification result;

[0046] The information amount values ​​of all keywords in the merged keyword set are compared with the preset threshold to obtain a comparison result, until the comparison result indicates that the information amount values ​​of all keywords in the merged keyword set are greater than or equal to the preset threshold, thereby obtaining all keywords corresponding to the conversation text to be identified.

[0047] In a second aspect, an embodiment of the present application further provides a conversation intention recognition system, the system comprising:

[0048] A data acquisition unit, configured to acquire a plurality of historical conversation texts and corresponding first intent labels, a plurality of training conversation texts and corresponding second intent labels, and a conversation text to be recognized;

[0049] a data clustering unit configured to cluster the plurality of historical conversation texts based on intent similarity based on the first intent label to obtain a first clustering result, and to cluster the plurality of training conversation texts based on intent similarity based on the second intent label to obtain a second clustering result;

[0050] an intention grading unit, configured to grade the historical conversation texts of each category according to the importance of the intentions based on the second clustering result, to obtain an intention grading result;

[0051] an information volume determination unit, configured to extract a plurality of first keywords from the to-be-recognized conversation text, and determine whether the information volume of the plurality of first keywords is greater than or equal to a preset threshold value based on the intention classification result;

[0052] a historical data acquisition unit, configured to acquire, from the plurality of historical conversation texts, a plurality of target conversation texts of categories corresponding to the plurality of first keywords based on the first clustering result, if the information amount of the plurality of first keywords is greater than or equal to a preset threshold;

[0053] a model adjustment unit, configured to adjust a pre-trained intent recognition model using the plurality of target conversation texts to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the plurality of training conversation texts and the second intent labels corresponding thereto;

[0054] The intention recognition unit is used to use the tuned intention recognition model to perform intention recognition on all keywords corresponding to the dialogue text to be recognized, and obtain an intention recognition result.

[0055] In a third aspect, an embodiment of the present application also provides an electronic device comprising at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute a conversation intention recognition method as described above.

[0056] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute a conversation intention recognition method as described above.

[0057] It can be understood that the beneficial effects of the above-mentioned second to fourth aspects compared with the relevant technologies are the same as the beneficial effects of the above-mentioned first aspect compared with the relevant technologies. Please refer to the relevant description in the above-mentioned first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0059] Figure 1 This is a flowchart of an embodiment of the method for identifying conversation intentions provided by the present application;

[0060] Figure 2 This is a schematic diagram of the structure of the intention recognition model in the best embodiment of the conversation intention recognition method provided by this application;

[0061] Figure 3 This is a schematic diagram of the structure of an embodiment of the conversation intention recognition system provided by the present application;

[0062] Figure 4 It is a structural diagram of an embodiment of the electronic device provided by this application. DETAILED DESCRIPTION

[0063] The following describes in detail embodiments of the present application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.

[0064] In the description of this application, if there is a description of first, second, etc., it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0065] In the description of this application, it should be understood that descriptions involving orientation, such as the orientation or positional relationship indicated by up, down, etc., are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application.

[0066] In the description of this application, it should be noted that, unless otherwise clearly defined, terms such as setting, installing, and connecting should be understood in a broad sense, and technical personnel in the relevant technical field can reasonably determine the specific meaning of the above terms in this application based on the specific content of the technical solution.

[0067] First, let’s analyze some of the terms used in this application:

[0068] The k-means clustering algorithm (also known as the k-means algorithm) is an iterative cluster analysis algorithm. It divides the data into K groups, randomly selects K objects as initial cluster centers, and then calculates the distance between each object and each seed cluster center, assigning each object to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. With each assignment of a sample, the cluster centers are recalculated based on the existing objects in the cluster. This process is repeated until a termination criterion is met. The termination criteria can be that no (or a minimum number of) objects are reassigned to different clusters, no (or a minimum number of) cluster centers change, and the sum of squared errors reaches a local minimum.

[0069] DBSCAN algorithm: A representative density-based clustering algorithm. Unlike partitioning and hierarchical clustering methods, it defines a cluster as the largest set of density-connected points. It can partition sufficiently high-density areas into clusters and can discover clusters of arbitrary shapes in noisy spatial databases.

[0070] Large Language Models (LLMs) are deep learning models trained using large amounts of text data, enabling them to generate natural language text or understand the meaning of text. These models can be trained on massive datasets to provide in-depth knowledge and language production across a wide range of topics. Their core concept is to learn the patterns and structure of natural language through large-scale unsupervised training, simulating, to a certain extent, the human language cognition and generation process.

[0071] ChatGPT model: Built on the GPT system model, it is OpenAI's "Reinforcement Learning from Human Feedback" (RLHF) training method. The essence of ChatGPT is an intelligent tool that improves the human brain's ability to collect, organize, calculate, and analyze various information materials. It is a tool system that provides rich and accurate plans, diagrams, and other materials or conditions for the human brain's "concept construction."

[0072] Multilayer Perceptron (MLP): A feedforward artificial neural network model that maps multiple input data sets to a single output data set.

[0073] Word2vec: A family of related models used to generate word vectors. These models are shallow, two-layer neural networks trained to reconstruct linguistic text. The network is represented by words and is required to guess the adjacent positions of the input words. Under the bag-of-words model in Word2vec, word order is unimportant. After training, the Word2vec model can be used to map each word to a vector, which can be used to represent the relationships between words.

[0074] With the continuous development of deep learning and artificial intelligence technologies, intelligent conversational systems have been widely used in fields such as healthcare, e-commerce, entertainment, and autonomous driving, including intelligent customer service, digital doctors, and smart butlers. Intelligent conversational systems require accurate understanding of user intent to effectively solve problems. To accurately understand user intent, technology that can understand the meaning of conversations is required, which is why the emergence of intent recognition technology is of great significance.

[0075] Intent recognition is a key task in natural language processing (NLP). It aims to determine the intent or purpose expressed in user input. Simply put, intent recognition involves semantically understanding user utterances to better answer questions or provide relevant services. Traditional intent recognition methods are generally based on template matching or artificial feature sets. These methods are time-consuming and labor-intensive, with limited scalability. Using traditional neural network models, such as convolutional neural networks (CNNs), for intelligent recognition lacks contextual information, resulting in low accuracy. Furthermore, a large amount of conversational text is required to achieve accurate intent recognition.

[0076] Therefore, the accuracy of existing related intent recognition technologies in recognizing the intent of conversation texts is relatively low.

[0077] In order to solve the above-mentioned problem that the existing relevant intent recognition technology has a relatively low accuracy rate in recognizing the intent of conversation texts, the present application proposes a conversation intent recognition method, system, electronic device and storage medium.

[0078] Reference Figure 1 , an embodiment of the present application provides a method for identifying conversation intentions, the method comprising the following steps:

[0079] Step S100: Acquire multiple historical conversation texts and their corresponding first intent labels, multiple training conversation texts and their corresponding second intent labels, and a conversation text to be recognized;

[0080] Step S200: Based on the first intent label, clustering multiple historical conversation texts based on intent similarity to obtain a first clustering result; and, based on the second intent label, clustering multiple training conversation texts based on intent similarity to obtain a second clustering result;

[0081] Step S300: Based on the second clustering result, the historical conversation texts of each category are classified according to the importance of the intentions to obtain an intention classification result;

[0082] Step S400: extracting multiple first keywords from the conversation text to be recognized, and determining whether the information content of the multiple first keywords is greater than or equal to a preset threshold based on the intent classification result;

[0083] Step S500: If the information amount of the multiple first keywords is greater than or equal to a preset threshold, then, based on the first clustering result, obtaining multiple target conversation texts of categories corresponding to the multiple first keywords from the multiple historical conversation texts;

[0084] Step S600: Using multiple target conversation texts to adjust a pre-trained intent recognition model to obtain an optimized intent recognition model, where the pre-trained intent recognition model is trained based on the multiple training conversation texts and the corresponding second intent labels.

[0085] Step S700: Use the tuned intent recognition model to perform intent recognition on all keywords corresponding to the conversation text to be recognized, and obtain intent recognition results.

[0086] In this embodiment, a plurality of historical conversation texts and corresponding first intent labels, a plurality of training conversation texts and corresponding second intent labels, and a conversation text to be recognized are obtained; based on the first intent labels, the plurality of historical conversation texts are clustered according to intent similarity to obtain a first clustering result; and, based on the second intent labels, the plurality of training conversation texts are clustered according to intent similarity to obtain a second clustering result; based on the second clustering result, the historical conversation texts of each category are classified according to intent importance to obtain an intent classification result; a plurality of first keywords are extracted from the conversation text to be recognized, and it is determined whether the information content of the plurality of first keywords is greater than or equal to a preset threshold based on the intent classification result; if the information content of the plurality of first keywords is greater than or equal to the preset threshold, a plurality of target conversation texts of categories corresponding to the plurality of first keywords are obtained from the plurality of historical conversation texts based on the first clustering result; a pre-trained intent recognition model is adjusted using the plurality of target conversation texts to obtain a tuned intent recognition model, wherein the pre-trained intent recognition model is trained based on the plurality of training conversation texts and the corresponding second intent labels; and the tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized to obtain an intent recognition result. In this way, multiple historical conversation texts are first clustered according to the similarity of their intentions, and then the intentions of each category of historical conversation texts are graded according to the importance of their intentions, because the intentions of the same category are easier to distinguish and the efficiency of intention grading can be improved; then it is determined whether the amount of information of multiple first keywords is greater than or equal to the preset threshold, because a sufficient amount of information can improve the accuracy of conversation text intent recognition; and then the pre-trained intent recognition model is adjusted through multiple target conversation texts, which can improve the accuracy of the intent recognition model, thereby further improving the accuracy of conversation text intent recognition.

[0087] The above-mentioned clustering of multiple historical conversation texts based on intent similarity based on the first intent label to obtain a first clustering result, and clustering of multiple training conversation texts based on intent similarity based on the second intent label to obtain a second clustering result, can be performed by using a k-means algorithm and DBSCAN algorithm well known in the art to cluster the multiple historical conversation texts to obtain the first clustering result, and clustering the multiple training conversation texts to obtain the second clustering result.

[0088] The above-mentioned intention grading of each category of historical conversation texts according to the importance of intentions can be performed manually by distinguishing the importance of intentions based on experience, thereby grading the intentions of each category of historical conversation texts according to the importance of intentions.

[0089] The above-mentioned preset threshold value can be set manually and can be changed according to actual conditions, and is not specifically limited in this embodiment.

[0090] In some embodiments, the intent recognition model includes a word embedding layer, normalization, a convolution layer, a ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron. The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized, and the intent recognition results obtained include:

[0091] Input all keywords corresponding to the conversation text to be recognized into the tuned intent recognition model, vectorize all keywords through the word vector layer, and obtain the target keyword vector;

[0092] The target keyword vector is normalized, convolutional layer and ReLU function are used to extract the feature vector to obtain the keyword feature;

[0093] Inputting the keyword features into a first semantic feature extraction module to perform semantic feature extraction to obtain a first semantic feature extraction result;

[0094] Inputting the first semantic feature extraction result and the keyword feature into a second semantic feature extraction module to perform semantic feature extraction to obtain a second semantic feature extraction result;

[0095] Inputting the second semantic feature extraction result and the keyword feature into a third semantic feature extraction module to perform semantic feature extraction to obtain a third semantic feature extraction result;

[0096] Performing feature fusion on the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result to obtain a fused semantic feature;

[0097] The fused semantic features are input into the multi-layer perceptron for intent recognition to obtain the intent recognition result.

[0098] In this embodiment, all keywords corresponding to the dialogue text to be recognized are input into the tuned intent recognition model, and all keywords are vectorized through the word vector layer to obtain a target keyword vector; the target keyword vector is normalized, convolutional layer, and ReLU function are used to extract the feature vector to obtain the keyword feature; the keyword feature is input into the first semantic feature extraction module for semantic feature extraction to obtain the first semantic feature extraction result; the first semantic feature extraction result and the keyword feature are input into the second semantic feature extraction module for semantic feature extraction to obtain the second semantic feature extraction result; the second semantic feature extraction result and the keyword feature are input into the third semantic feature extraction module for semantic feature extraction to obtain the third semantic feature extraction result; the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result are subjected to feature fusion to obtain a fused semantic feature; the fused semantic feature is input into the multi-layer perceptron for intent recognition to obtain the intent recognition result. In this way, more detailed semantic features are continuously extracted through multiple semantic feature extraction modules to improve the accuracy of dialogue text intent recognition.

[0099] In some embodiments, a pre-trained intent recognition model is obtained by:

[0100] Build an intent recognition model that includes a word embedding layer, normalization, convolutional layer, ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron;

[0101] Extracting keywords from each training conversation text in a plurality of training conversation texts to obtain a keyword dataset;

[0102] Filtering keywords in the keyword data set to obtain a filtered data set, and obtaining a second intent label corresponding to the filtered data set;

[0103] The intent recognition model is constructed by pre-training the filtered data set and the corresponding second intent label to obtain a pre-trained intent recognition model.

[0104] In this embodiment, an intent recognition model including a word vector layer, normalization, a convolution layer, a ReLU function, multiple semantic feature extraction modules and a multi-layer perceptron is constructed; keywords of each training dialogue text in multiple training dialogue texts are extracted to obtain a keyword data set; keywords in the keyword data set are filtered to obtain a filtered data set, and a second intent label corresponding to the filtered data set is obtained; the intent recognition model constructed by pre-training the filtered data set and the second intent label corresponding thereto is obtained, thereby obtaining a pre-trained intent recognition model. In this way, the intent recognition model constructed by pre-training the filtered data set and the second intent label corresponding thereto can not only improve the efficiency of the intent recognition model training, but also eliminate the influence of some irrelevant keywords during the intention recognition model training process, thereby improving the accuracy of the intent recognition model recognition.

[0105] In some embodiments, filtering keywords in a keyword dataset to obtain a filtered dataset includes:

[0106] Vectorize the keywords in the keyword dataset to obtain a keyword vector dataset;

[0107] Input the keyword vector dataset into the multi-head attention mechanism to obtain the weight corresponding to each keyword;

[0108] Calculate the importance of each keyword based on the weight corresponding to each keyword;

[0109] The keywords in the keyword data set are filtered according to the importance of each keyword to obtain a filtered data set.

[0110] In this embodiment, the keywords in the keyword dataset are vectorized to obtain a keyword vector dataset; the keyword vector dataset is input into a multi-head attention mechanism to obtain the weight corresponding to each keyword; the importance of each keyword is calculated based on the weight corresponding to each keyword; and the keywords in the keyword dataset are filtered based on the importance of each keyword to obtain a filtered dataset. In this way, by filtering some important keywords and removing some irrelevant keywords, the influence of some irrelevant keywords can be eliminated during the intent recognition model training process, thereby improving the accuracy of the intent recognition model during recognition.

[0111] In some embodiments, determining whether the information volume of the plurality of first keywords is greater than or equal to a preset threshold according to the intention classification result includes:

[0112] Determining, based on the plurality of first keywords, a category corresponding to the to-be-recognized conversation text in the second clustering result;

[0113] Select relevant intent classification results according to the category corresponding to the dialogue text to be recognized, and obtain the target intent classification result;

[0114] Calculating the information value of the first keywords according to the target intention classification results;

[0115] The information amount values ​​of the plurality of first keywords are compared with a preset threshold value to determine whether the information amount of the plurality of first keywords is greater than or equal to the preset threshold value.

[0116] In this embodiment, based on multiple first keywords, the category corresponding to the conversation text to be identified in the second clustering result is determined; based on the category corresponding to the conversation text to be identified, the relevant intent grading result is selected to obtain the target intent grading result; based on the target intent grading result, the information volume values ​​of the multiple first keywords are calculated; the information volume values ​​of the multiple first keywords are compared with a preset threshold to determine whether the information volume of the multiple first keywords is greater than or equal to the preset threshold. In this way, by calculating the information volume values ​​of the keywords based on the intent grading, it is possible to determine whether the keyword information volume meets the standard. Because the more levels the keywords involve, the more detailed the information involved in the keyword information. Using some detailed information for later intent recognition can improve the accuracy of intent recognition.

[0117] In some embodiments, calculating the information value of the plurality of first keywords according to the target intent classification result includes:

[0118] ;

[0119] in, Indicates the information value of multiple first keywords, It represents the correlation between the first keyword i and the intent level j in the target intent grading result. The correlation of the first keyword belonging to the intent level j is 1, and the correlation of the first keyword not belonging to the intent level j is 0. k represents the number of multiple keywords belonging to the same intent level, n represents the number of intent levels corresponding to the current category dialogue text, and m represents the number of multiple first keywords.

[0120] In some implementations, the method for identifying conversation intent further includes:

[0121] If the information amount of all first keywords corresponding to the dialogue text to be recognized is less than a preset threshold, inputting the dialogue text to be recognized into the trained multi-turn dialogue model to obtain multi-turn dialogue text related to the dialogue text to be recognized;

[0122] Extracting multiple second keywords from the multi-round conversation texts, merging all the second keywords with all the first keywords to obtain a merged keyword set;

[0123] According to the target intent classification results, calculate the information value of all keywords in the merged keyword set;

[0124] The information value of all keywords in the merged keyword set is compared with the preset threshold to obtain a comparison result, until the comparison result indicates that the information value of all keywords in the merged keyword set is greater than or equal to the preset threshold, and all keywords corresponding to the conversation text to be recognized are obtained.

[0125] In this embodiment, if the information content of all first keywords corresponding to the conversation text to be recognized is less than a preset threshold, the conversation text to be recognized is input into a trained multi-turn conversation model to obtain multi-turn conversation text related to the conversation text to be recognized; multiple second keywords from the multi-turn conversation text are extracted, and all second keywords and all first keywords are merged to obtain a merged keyword set; based on the target intent classification results, the information content of all keywords in the merged keyword set is calculated; the information content of all keywords in the merged keyword set is compared with a preset threshold to obtain a comparison result, until the comparison result indicates that the information content of all keywords in the merged keyword set is greater than or equal to the preset threshold, thereby obtaining all keywords corresponding to the conversation text to be recognized. In this way, when the information content provided by the conversation text to be recognized is insufficient, the keyword information content can be enhanced by obtaining multi-turn conversation text related to the conversation text to be recognized, thereby laying a good data foundation for improving the accuracy of intent recognition in the later stage.

[0126] To facilitate understanding by those skilled in the art, a set of best embodiments is provided below:

[0127] Intent recognition is a key task in natural language processing (NLP). It aims to determine the intent or purpose expressed in user input. Simply put, intent recognition involves semantically understanding user utterances to better answer questions or provide relevant services. Traditional intent recognition methods are generally based on template matching or artificial feature sets, which are time-consuming and labor-intensive, with limited scalability. Using traditional neural network models, such as convolutional neural networks (CNNs), for intelligent recognition lacks contextual information, resulting in low accuracy. Furthermore, a large amount of conversational text is required to achieve improved accuracy. Consequently, existing intent recognition technologies have low accuracy for conversational texts with relatively small amounts of information.

[0128] If there are multiple rounds of conversation, and conversation intent recognition is performed once for each round, it will waste time. In the initial conversation, due to the lack of key information, conversation intent recognition may be incorrect, thus affecting the intention recognition of subsequent conversations. Therefore, this embodiment can achieve more accurate intent recognition and save time by first determining whether the keyword information meets the preset conditions before performing intent recognition. The conversation texts and intent recognition results that have been recognized are retained as a historical conversation text dataset. This historical conversation text dataset is then classified. This allows for faster and more accurate conversation intent recognition results for the next conversation text with the same or similar questions. This provides a data foundation for the next conversation, reduces search time, and improves the accuracy and efficiency of intent recognition.

[0129] The technical solution of this embodiment specifically includes the following steps:

[0130] Step S1: Obtain a conversation text training dataset (including multiple training conversation texts and their corresponding second intent labels) and the conversation text to be recognized, extract keywords from the conversation text to be recognized, and determine whether the information volume of all keywords corresponding to the conversation text to be recognized meets the preset conditions.

[0131] The conversation texts in the conversation text training dataset are clustered according to intent to obtain a clustering result (i.e., a second clustering result). This clustering result includes conversation texts from multiple categories, and conversation texts within the same category have similar intents. Well-known algorithms in the art, such as the k-means algorithm and the DBSCAN algorithm, can be used, and are not specifically described or limited in this embodiment.

[0132] Each category in the conversation text training dataset is graded based on intent importance to construct intent classification labels. For example, in the climate-time-location and book category-theme-character-plot categories, climate is a level 1 intent, time is a level 2 intent, and location is a level 3 intent. Intent levels are constructed for each category of conversation text, with the finer the grading, the better.

[0133] Extracting multiple first keywords from the conversation text to be recognized, determining which category of conversation text the conversation text to be recognized belongs to based on all the first keywords corresponding to the conversation text to be recognized, and selecting the intent level of the conversation text corresponding to the category (i.e., the target intent classification result);

[0134] According to the intent level of the corresponding category of the conversation text, calculate the information value of all the first keywords:

[0135] ;

[0136] in, Indicates the information value of all first keywords, It represents the correlation between the first keyword i and the intent level j. The correlation of the first keyword belonging to the intent level is 1, and the correlation of the first keyword not belonging to the intent level is 0. k represents the number of keywords belonging to the same intent level, n represents the number of intent levels corresponding to the current category of dialogue text, and m represents the number of first keywords.

[0137] The information value of the keyword is compared with a preset condition to obtain a first comparison result.

[0138] The preset conditions corresponding to different types of dialogue texts are different and can be changed according to actual conditions. This embodiment does not impose any specific restrictions.

[0139] Step S2: If the first comparison result indicates that the keyword information volume meets the preset condition (i.e., the keyword information volume is greater than or equal to the preset threshold), the process proceeds directly to step S3. If the first comparison result indicates that the keyword information volume does not meet the preset condition (i.e., the keyword information volume is less than the preset threshold), the process proceeds to a conversation mode to obtain more key information.

[0140] Specifically, to obtain a multi-turn dialogue model, a large language model (LLM) or ChatGPT model can be used. Each category of data in the dialogue text training dataset is classified according to intent importance, and the dialogue text corresponding to each level is annotated with intent classification labels. The multi-turn dialogue model is trained using the dialogue text training dataset annotated with intent classification labels to obtain a trained multi-turn dialogue model.

[0141] The dialogue text to be recognized is input into the trained multi-round dialogue model, and a human-computer dialogue related to the dialogue text to be recognized can be carried out to obtain multi-round dialogue text related to the dialogue text to be recognized.

[0142] Then, the second keywords in the multi-round conversation texts are extracted, and all the second keywords are merged with all the first keywords to obtain a merged keyword set;

[0143] According to the intent level of the corresponding category of the conversation text to be identified, the information value of the merged keyword set is calculated:

[0144] ;

[0145] in, Indicates the information value of the merged keyword set, It represents the correlation between keyword i and intent level j in the merged keyword set. The correlation of the keyword belonging to the intent level is 1, and the correlation of the keyword not belonging to the intent level is 0. k represents the number of keywords belonging to the same intent level, n represents the number of intent levels corresponding to the current category of dialogue text, and p represents the number of keywords in the merged keyword set.

[0146] The information value of the keywords is compared with a preset condition to obtain a second comparison result. If the second comparison result indicates that the information value of the merged keyword set has not yet reached the preset condition, the conversation mode is continued to obtain more key information until the second comparison result indicates that the information value of the merged keyword set has reached the preset condition, thereby obtaining all keywords corresponding to the conversation text to be recognized.

[0147] Step S3: Use the conversation text training data set to train the constructed intent recognition model to obtain a trained intent recognition model.

[0148] The specific training process of the intent recognition model includes:

[0149] (1) Using any one of the TF-IDF algorithm, the TextRank algorithm, and the KeyBERT algorithm, keywords are extracted from the conversation text training dataset to obtain a keyword dataset. The TF-IDF algorithm, the TextRank algorithm, and the KeyBERT algorithm are all well-known technical solutions to those skilled in the art and are not specifically limited or described in this embodiment.

[0150] (2) Filter the keyword dataset to obtain a filtered dataset. That is, only the keywords that are relatively relevant to each conversation text are retained, and some less relevant keywords are removed to improve the efficiency of model training. In addition, the influence of some irrelevant keywords is eliminated during the model training process, thereby improving the accuracy of the model in intent recognition. The specific filtering method is as follows:

[0151] Represent the keywords in the keyword dataset as vectors to obtain a keyword vector dataset;

[0152] The keyword vector dataset is input into the multi-head attention mechanism to obtain the weight corresponding to each keyword. The word frequency of each keyword in the corresponding conversation text is calculated. Based on the word frequency, the relevance of each keyword and the corresponding conversation text is calculated. The keyword importance (i.e., the importance of the keyword) is then calculated based on the corresponding weight and the corresponding relevance of each keyword. The keyword dataset is filtered based on keyword importance, retaining the keywords that are more relevant to each conversation text. The specific calculation process is as follows:

[0153] ;

[0154] ;

[0155] Among them, S represents the importance of keywords, represents the weight of the i-th keyword, n represents the number of all keywords in each conversation text, represents the relevance between the ith keyword and its corresponding conversation text, k represents an adjustable parameter, The word frequency statistics of the keyword can adopt the existing technology well known to those skilled in the art, which will not be described in detail in this embodiment.

[0156] (3) Build an intent recognition model.

[0157] The intent recognition model includes a word vector layer, normalization, a convolution layer, a ReLU function, multiple semantic feature extraction modules and a multi-layer perceptron MLP. Among them, the word vector layer can use Word2vec to vectorize all keywords, the semantic feature extraction module can use the encoder part of the Transformer model, and multiple semantic feature extraction modules can use the same network structure or different network structures. The word vector layer and the semantic feature extraction module can use existing technologies known to those skilled in the art, which are not described in detail in this embodiment. The normalization of this embodiment can use layer normalization, which is not specifically limited in this embodiment. Figure 2 ,The specific intention recognition process of the intention recognition model is:

[0158] Input the keywords into the intent recognition model, and vectorize the keywords through the word vector layer in the intent recognition model to obtain the keyword vector;

[0159] The keyword vector is normalized, convolutional layer and ReLU function are used to extract the feature vector to obtain the keyword feature;

[0160] Inputting the keyword features into a first semantic feature extraction module to perform semantic feature extraction to obtain a first semantic feature extraction result;

[0161] Inputting the first semantic feature extraction result and the keyword feature into a second semantic feature extraction module to perform semantic feature extraction to obtain a second semantic feature extraction result;

[0162] Inputting the second semantic feature extraction result and the keyword feature into a third semantic feature extraction module to perform semantic feature extraction to obtain a third semantic feature extraction result;

[0163] Performing feature fusion on the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result to obtain a fused semantic feature;

[0164] The fused semantic features are input into the multi-layer perceptron for intent recognition to obtain the intent recognition result.

[0165] (4) Using the filtered keyword dataset and its corresponding intent labels, the constructed intent recognition model is pre-trained to obtain a pre-trained intent recognition model.

[0166] Step S4: Obtain a historical conversation text dataset of the corresponding category using all first keywords corresponding to the conversation text to be recognized obtained in step S1 or step S2. Adjust the pre-trained intent recognition model using the historical conversation text dataset, i.e., optimize the parameters of the pre-trained intent recognition model to obtain an optimized intent recognition model. Use the optimized intent recognition model to perform intent recognition on all keywords corresponding to the conversation text to be recognized, and obtain an intent recognition result. Further optimizing the parameters of the trained intent recognition model can further improve the accuracy of intent recognition. The longer the intent recognition model is used, the more accurate its predictions will be.

[0167] Specifically, each user conversation text (i.e., historical conversation text) and its corresponding conversation text intent recognition result (i.e., first intent label) are saved as a historical conversation text dataset. This saved historical conversation text dataset serves as a validation set for adjusting the parameters of the intent recognition model. This dataset can change as the topic changes, thereby enabling the intent recognition model to keep pace with the times, more accurately identify user conversation intent, and improve the user experience. The dataset in step S1 may or may not change. The historical conversation text dataset is clustered using the same clustering method as step S1 to obtain a historical conversation text clustering result (i.e., first clustering result). Similarity is calculated based on all keywords corresponding to the conversation text to be recognized and the historical conversation text clustering result. The historical conversation text dataset with the highest similarity is used as the historical conversation text dataset corresponding to the category of the conversation text to be recognized. The pre-trained intent recognition model is adjusted using this historical conversation text dataset to obtain a tuned intent recognition model. The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized to obtain an intent recognition result. This specifically includes:

[0168] Input all keywords corresponding to the conversation text to be recognized into the tuned intent recognition model, vectorize all keywords through the word vector layer, and obtain the target keyword vector;

[0169] The target keyword vector is normalized, convolutional layer and ReLU function are used to extract the feature vector to obtain the keyword feature;

[0170] Inputting the target keyword feature into the first semantic feature extraction module to perform semantic feature extraction to obtain a first semantic feature extraction result;

[0171] Inputting the first semantic feature extraction result and the keyword feature into a second semantic feature extraction module to perform semantic feature extraction to obtain a second semantic feature extraction result;

[0172] Inputting the second semantic feature extraction result and the keyword feature into a third semantic feature extraction module to perform semantic feature extraction to obtain a third semantic feature extraction result;

[0173] Performing feature fusion on the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result to obtain a fused semantic feature;

[0174] The fused semantic features are input into the multi-layer perceptron for intent recognition to obtain the intent recognition result.

[0175] Reference Figure 3The embodiment of the present application further provides a conversation intention recognition system, which includes a data acquisition unit 100, a data clustering unit 200, an intention classification unit 300, an information volume judgment unit 400, a historical data acquisition unit 500, a model adjustment unit 600, and an intention recognition unit 700, wherein:

[0176] The data acquisition unit 100 is used to acquire a plurality of historical conversation texts and their corresponding first intent labels, a plurality of training conversation texts and their corresponding second intent labels, and a conversation text to be recognized;

[0177] A data clustering unit 200 is configured to cluster multiple historical conversation texts based on similar intent based on the first intent label to obtain a first clustering result, and to cluster multiple training conversation texts based on similar intent based on the second intent label to obtain a second clustering result;

[0178] The intention classification unit 300 is used to classify the historical conversation texts of each category according to the importance of the intention based on the second clustering result to obtain an intention classification result;

[0179] An information volume determination unit 400 is configured to extract a plurality of first keywords from the conversation text to be recognized, and determine whether the information volume of the plurality of first keywords is greater than or equal to a preset threshold value based on the intention classification result;

[0180] The historical data acquisition unit 500 is configured to acquire, based on the first clustering result, a plurality of target conversation texts of categories corresponding to the plurality of first keywords from the plurality of historical conversation texts if the information amount of the plurality of first keywords is greater than or equal to a preset threshold;

[0181] A model adjustment unit 600 is configured to adjust a pre-trained intent recognition model using multiple target conversation texts to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the multiple training conversation texts and the corresponding second intent labels;

[0182] The intention recognition unit 700 is used to use the tuned intention recognition model to perform intention recognition on all keywords corresponding to the dialogue text to be recognized, and obtain an intention recognition result.

[0183] It should be noted that since the conversation intention recognition system in this embodiment and the above-mentioned conversation intention recognition method are based on the same inventive concept, the corresponding content in the method embodiment is also applicable to the system embodiment and will not be described in detail here.

[0184] Reference Figure 4 , an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0185] at least one memory;

[0186] at least one processor;

[0187] at least one program;

[0188] The programs are stored in the memory, and the processor executes at least one program to implement the above-mentioned conversation intention recognition method implemented in the present disclosure.

[0189] The electronic device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.

[0190] The electronic device according to the embodiment of the present application is described in detail below.

[0191] The processor 1600 may be implemented as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present disclosure.

[0192] Memory 1700 can be implemented in the form of read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). Memory 1700 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program code is stored in memory 1700 and is called by processor 1600 to execute the conversation intent recognition method of the embodiments of this disclosure.

[0193] Input / output interface 1800, used for information input and output;

[0194] Communication interface 1900, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0195] Bus 2000 , which transmits information between various components of the device (e.g., processor 1600 , memory 1700 , input / output interface 1800 , and communication interface 1900 );

[0196] The processor 1600 , the memory 1700 , the input / output interface 1800 , and the communication interface 1900 are connected to each other in communication within the device via the bus 2000 .

[0197] An embodiment of the present disclosure further provides a storage medium, which is a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the above-mentioned conversation intention recognition method.

[0198] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0199] The embodiments described in the embodiments of the present disclosure are intended to more clearly illustrate the technical solutions of the embodiments of the present disclosure and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0200] Those skilled in the art will understand that the technical solutions shown in the drawings do not constitute a limitation on the embodiments of the present disclosure, and may include more or fewer steps than shown in the drawings, or a combination of certain steps, or different steps.

[0201] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0202] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0203] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0204] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0205] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0206] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0207] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0208] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.

[0209] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the relevant technical field without departing from the purpose of the present application.

Claims

1. A method for identifying conversation intention, characterized in that: The method comprises: Obtaining multiple historical conversation texts and corresponding first intent labels, multiple training conversation texts and corresponding second intent labels, and conversation text to be recognized; Based on the first intent label, clustering the multiple historical conversation texts according to intent similarity to obtain a first clustering result; and, based on the second intent label, clustering the multiple training conversation texts according to intent similarity to obtain a second clustering result; Based on the second clustering result, the historical conversation texts of each category are classified according to the importance of the intent to obtain an intent classification result; Extracting a plurality of first keywords from the to-be-recognized conversation text, and determining whether information amounts of the plurality of first keywords are greater than or equal to a preset threshold based on the intention classification result; If the information amount of the multiple first keywords is greater than or equal to a preset threshold, obtaining multiple target conversation texts of categories corresponding to the multiple first keywords from the multiple historical conversation texts according to the first clustering result; Adjusting a pre-trained intent recognition model using the multiple target conversation texts to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the multiple training conversation texts and the second intent labels corresponding thereto; The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized to obtain an intent recognition result.

2. The method for identifying conversation intention according to claim 1, wherein: The intent recognition model includes a word vector layer, normalization, a convolution layer, a ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron. The tuned intent recognition model is used to perform intent recognition on all keywords corresponding to the conversation text to be recognized, and the intent recognition results obtained include: Input all keywords corresponding to the conversation text to be recognized into the tuned intent recognition model, and vectorize all keywords through the word vector layer to obtain target keyword vectors; The target keyword vector is normalized, subjected to a convolution layer, and subjected to a ReLU function to extract a feature vector to obtain keyword features; Inputting the keyword feature into a first semantic feature extraction module to perform semantic feature extraction to obtain a first semantic feature extraction result; Inputting the first semantic feature extraction result and the keyword feature into a second semantic feature extraction module to perform semantic feature extraction to obtain a second semantic feature extraction result; Inputting the second semantic feature extraction result and the keyword feature into a third semantic feature extraction module to perform semantic feature extraction to obtain a third semantic feature extraction result; Performing feature fusion on the first semantic feature extraction result, the second semantic feature extraction result, and the third semantic feature extraction result to obtain a fused semantic feature; The fused semantic features are input into a multi-layer perceptron for intent recognition to obtain an intent recognition result.

3. The method for identifying conversation intention according to claim 1, wherein: The pre-trained intent recognition model is obtained by: Build an intent recognition model that includes a word embedding layer, normalization, convolutional layer, ReLU function, multiple semantic feature extraction modules, and a multi-layer perceptron; extracting keywords from each training dialogue text in the plurality of training dialogue texts to obtain a keyword dataset; Filtering the keywords in the keyword data set to obtain a filtered data set, and acquiring a second intent tag corresponding to the filtered data set; The pre-trained intent recognition model is obtained by pre-training the constructed intent recognition model with the filtered data set and the second intent label corresponding thereto.

4. The method for identifying conversation intention according to claim 3, wherein: The filtering of the keywords in the keyword data set to obtain a filtered data set includes: Vectorizing the keywords in the keyword dataset to obtain a keyword vector dataset; Input the keyword vector dataset into the multi-head attention mechanism to obtain the weight corresponding to each keyword; Calculate the importance of each keyword based on the weight corresponding to each keyword; The keywords in the keyword data set are filtered according to the importance of each keyword to obtain a filtered data set.

5. The method for recognizing conversation intention according to claim 1, wherein: The determining, based on the intention classification result, whether the information amount of the plurality of first keywords is greater than or equal to a preset threshold value includes: Determining, based on the multiple first keywords, a category corresponding to the to-be-recognized conversation text in the second clustering result; Select relevant intent grading results according to the category corresponding to the to-be-identified conversation text, and obtain a target intent grading result; Calculating information value of the plurality of first keywords according to the target intention classification result; The information amount values ​​of the plurality of first keywords are compared with the preset threshold to determine whether the information amount of the plurality of first keywords is greater than or equal to the preset threshold.

6. The method for identifying conversation intention according to claim 5, wherein: Calculating the information value of the plurality of first keywords according to the target intent classification result includes: ; in, Indicates the information value of multiple first keywords, It represents the correlation between the first keyword i and the intent level j in the target intent grading result. The correlation of the first keyword belonging to the intent level j is 1, and the correlation of the first keyword not belonging to the intent level j is 0. k represents the number of multiple keywords belonging to the same intent level, n represents the number of intent levels corresponding to the current category dialogue text, and m represents the number of multiple first keywords.

7. The method for recognizing conversation intention according to claim 5, wherein: The method for identifying conversation intentions further includes: If the information amount of all first keywords corresponding to the dialogue text to be recognized is less than the preset threshold, inputting the dialogue text to be recognized into the trained multi-turn dialogue model to obtain multi-turn dialogue text related to the dialogue text to be recognized; Extracting multiple second keywords from the multiple rounds of conversation texts, merging all the second keywords with all the first keywords to obtain a merged keyword set; Calculating the information value of all keywords in the merged keyword set according to the target intent classification result; The information amount values ​​of all keywords in the merged keyword set are compared with the preset threshold to obtain a comparison result, until the comparison result indicates that the information amount values ​​of all keywords in the merged keyword set are greater than or equal to the preset threshold, thereby obtaining all keywords corresponding to the conversation text to be identified.

8. A conversation intention recognition system, characterized in that: The system comprises: A data acquisition unit, configured to acquire a plurality of historical conversation texts and corresponding first intent labels, a plurality of training conversation texts and corresponding second intent labels, and a conversation text to be recognized; a data clustering unit configured to cluster the plurality of historical conversation texts based on intent similarity based on the first intent label to obtain a first clustering result, and to cluster the plurality of training conversation texts based on intent similarity based on the second intent label to obtain a second clustering result; an intention grading unit, configured to grade the historical conversation texts of each category according to the importance of the intentions based on the second clustering result, to obtain an intention grading result; an information volume determination unit, configured to extract a plurality of first keywords from the to-be-recognized conversation text, and determine whether the information volume of the plurality of first keywords is greater than or equal to a preset threshold value based on the intention classification result; a historical data acquisition unit, configured to acquire, from the plurality of historical conversation texts, a plurality of target conversation texts of categories corresponding to the plurality of first keywords based on the first clustering result, if the information amount of the plurality of first keywords is greater than or equal to a preset threshold; a model adjustment unit, configured to adjust a pre-trained intent recognition model using the plurality of target conversation texts to obtain an optimized intent recognition model, wherein the pre-trained intent recognition model is trained based on the plurality of training conversation texts and the second intent labels corresponding thereto; The intention recognition unit is used to use the tuned intention recognition model to perform intention recognition on all keywords corresponding to the dialogue text to be recognized, and obtain an intention recognition result.

9. An electronic device, characterized in that: It includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor to enable the at least one control processor to execute the conversation intention recognition method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the conversation intention recognition method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Intention recognition method and device, computer equipment and computer readable storage medium

    CN114678014A

  • Multi-level semantic intention recognition method and related equipment thereof

    CN115730597A