Intention recognition method and device, terminal device, and storage medium

The intent recognition method using a dual-tower retrieval mechanism, which processes user queries using bi-encoder and cross-encoder models, solves the accuracy and speed problems of intelligent outbound customer service systems, and achieves fast and accurate user intent recognition.

CN116383362BActive Publication Date: 2026-06-09CHINA MERCHANTS BANK

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MERCHANTS BANK
Filing Date
2023-04-21
Publication Date
2026-06-09

Smart Images

  • Figure CN116383362B_ABST
    Figure CN116383362B_ABST
Patent Text Reader

Abstract

The application discloses an intention recognition method and device, a terminal device and a storage medium. The intention recognition method comprises the following steps: obtaining a user question; inputting the user question into an intention recognition model to perform matching recognition based on a double-tower retrieval mechanism, and obtaining a recognized user intention, wherein the intention recognition model is constructed based on a double-tower model. The application solves the problem that an outbound intelligent customer service cannot timely and accurately judge the intention of a customer problem, accelerates the reasoning speed of the model, and improves the reasoning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent voice interaction technology, and in particular to an intent recognition method, apparatus, terminal device, and storage medium. Background Technology

[0002] With the development of artificial intelligence and the popularization of big data and cloud computing, traditional human customer service is gradually being replaced by intelligent customer service. To provide customers with a more intelligent and human-centered voice interaction experience, improving the model's understanding ability and its ability to identify the intent behind customer questions has become a hot research topic in intelligent customer service.

[0003] Current methods for identifying outbound call intent in intelligent outbound customer service for banks require model matching of user questions with multiple standard questions in the same scenario to obtain similarity scores in order to accurately identify user question intent in different scenarios. While this approach can identify user question intent relatively accurately, it suffers from drawbacks such as high latency and demanding hardware requirements, making it unsuitable for systems like intelligent voice outbound customer service that require high timeliness and are sensitive to feedback rates.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this invention is to provide an intent recognition method, apparatus, terminal device, and storage medium, aiming to solve the technical problem that outbound intelligent customer service cannot timely and accurately determine the intent of customer questions.

[0006] To achieve the above objectives, the present invention provides an intent recognition method, the intent recognition method comprising:

[0007] Get user questions;

[0008] The user's question is input into the intent recognition model and matched and recognized based on the dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on the dual-tower model.

[0009] Optionally, the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent includes:

[0010] The user question is input into the intent recognition model and processed as follows:

[0011] The corresponding sentence vectors are generated using the bi-encoder dual-tower model;

[0012] The sentence vectors are compared with standard questions in a pre-built vector index library to roughly screen out the most relevant questions and obtain the first matching result;

[0013] By using a pre-built text retrieval model, the most relevant questions are matched to obtain the second matching result;

[0014] The first and second matching results are concatenated and deduplicated to obtain the initial filtering results;

[0015] The initial screening results are refined using a cross-encoder dual-tower model to select the most matching user intent.

[0016] Optionally, the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent further includes:

[0017] Building a text retrieval model specifically includes:

[0018] Retrieve user question texts from the customer service backend database and construct a dataset;

[0019] The dataset is divided into a training set, a validation set, and a test set;

[0020] Based on the bi-encoder model and the cross-encoder model, a text retrieval model is constructed.

[0021] Input the training set into the text retrieval model to obtain similar sentences corresponding to the training set;

[0022] The text retrieval model is trained based on the similar sentences, the validation set, and the test set to obtain the trained text retrieval model.

[0023] Optionally, the step of obtaining user question text from the customer service backend database and constructing the dataset includes:

[0024] Extract user question text and question scenarios from the customer service backend database;

[0025] The user question text is categorized according to the problem scenario.

[0026] Similarity labels are applied to the pairs of user question texts under each category to obtain the labeled user question texts.

[0027] The dataset was constructed using annotated user question text.

[0028] Optionally, the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent further includes:

[0029] Building a vector index library specifically includes:

[0030] A standard dataset is created based on the user's question text;

[0031] The bi-encoder model is used to construct corresponding sentence vectors based on the standard dataset.

[0032] Based on the sentence vectors, a vector index library is established.

[0033] Optionally, the step of inputting the training set into the text retrieval model to obtain similar sentences corresponding to the training set includes:

[0034] The training set is then input into the bi-encoder model and the cross-encoder model in the text retrieval model, respectively.

[0035] The sentence vectors of sentence pairs in the training set are calculated using a bi-encoder model to obtain the first similarity.

[0036] The sentence vectors of sentence pairs in the training set are calculated using a cross-encoder model to obtain the second similarity.

[0037] Based on the first similarity and the second similarity, a binary classification process is performed to obtain similar sentences in the corresponding training set.

[0038] Optionally, the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent further includes:

[0039] An intent recognition model is constructed based on the dual-tower model, specifically including:

[0040] An intent recognition model was constructed based on the bi-encoder model, the cross-encoder model, and the text retrieval model.

[0041] This invention also proposes an intent recognition device, the intent recognition device comprising:

[0042] The acquisition module is used to acquire user questions;

[0043] The intent recognition module is used to input the user's question into the intent recognition model and perform matching and recognition based on the dual-tower retrieval mechanism to obtain the recognized user intent, wherein the intent recognition model is constructed based on the dual-tower model.

[0044] This invention also proposes a terminal device, which includes a memory, a processor, and an intent recognition program stored in the memory and executable on the processor. When the intent recognition program is executed by the processor, it implements the steps of the intent recognition method described above.

[0045] This invention also proposes a computer-readable storage medium storing an intent recognition program, which, when executed by a processor, implements the steps of the intent recognition method as described above.

[0046] This invention proposes an outbound call intent recognition method based on a dual-tower retrieval mechanism. The method involves acquiring a user question, inputting the question into an intent recognition model, and performing matching and recognition based on the dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on a dual-tower model. By using this constructed intent recognition model to identify the user question's intent, the problem of intelligent outbound customer service being unable to promptly and accurately determine the intent of customer questions is solved. Based on this invention, starting from the current poor understanding of user questions by intelligent outbound customer service, an intent recognition model is constructed. The effectiveness of the proposed intent recognition method is verified on user question text. Finally, the intent recognition model of this invention accelerates the model's inference speed and improves the inference accuracy. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the functional modules of the terminal device to which the intent identification device of this invention belongs;

[0048] Figure 2 This is a flowchart illustrating an exemplary embodiment of the intent recognition method of the present invention;

[0049] Figure 3 This is a flowchart illustrating another exemplary embodiment of the intent recognition method of the present invention;

[0050] Figure 4 This is a detailed flowchart illustrating the overall process of an embodiment of the intent recognition method of the present invention;

[0051] Figure 5 This is a flowchart illustrating yet another exemplary embodiment of the intent recognition method of the present invention;

[0052] Figure 6 This is a schematic diagram of the process of constructing a text retrieval model in an embodiment of the present invention;

[0053] Figure 7 This is a schematic diagram illustrating the process of constructing a dataset involved in the intent recognition method of the present invention;

[0054] Figure 8This is a flowchart illustrating yet another exemplary embodiment of the intent recognition method of the present invention;

[0055] Figure 9 This is a schematic diagram of the process for constructing a vector index library in an embodiment of the present invention;

[0056] Figure 10 This is a schematic diagram of the process for obtaining similar sentences corresponding to the training set in an embodiment of the intent recognition method of the present invention;

[0057] Figure 11 This is a flowchart illustrating another exemplary embodiment of the intent recognition method of the present invention.

[0058] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0060] The main solution of this invention is as follows: the user question is input into an intent recognition model for the following processing: a corresponding sentence vector is generated using a bi-encoder dual-tower model; the sentence vector is compared with standard questions in a pre-built vector index library to coarsely screen out the most relevant questions, obtaining a first matching result; a pre-built text retrieval model is used to match the most relevant questions, obtaining a second matching result; the first and second matching results are concatenated and deduplicated to obtain an initial filtering result; the initial filtering result is then finely sorted using a cross-encoder dual-tower model to filter out the most matching user intent. By using an intent recognition model to identify the user question's intent, the recognized user intent can be obtained, solving the problem that intelligent outbound customer service cannot promptly and accurately determine the intent of customer questions. Based on this invention, starting from the current poor understanding of user questions by intelligent outbound customer service, an intent recognition model is constructed, and the effectiveness of the proposed intent recognition method is verified on user question text. Finally, the intent recognition model using this invention accelerates the model's inference speed and improves the inference accuracy.

[0061] The technical terms involved in this invention are:

[0062] Bi-encoder model: The bi-encoder model is a deep learning model for natural language processing. It employs a bidirectional encoding structure, encoding the input sentence into a fixed-length vector representation, and simultaneously encoding the sentence to be matched into a vector representation. During similarity calculation, the encoded vector representations are used to calculate the similarity score between the two sentences. The advantages of the bi-encoder model are its fast computation speed and high performance, making it suitable for natural language processing tasks such as text matching, semantic retrieval, and question answering systems.

[0063] The cross-encoder model is a deep learning model used to solve text matching and relevance tasks. Unlike traditional unidirectional encoders, the cross-encoder model considers two text sequences simultaneously, encoding them into fixed-length vectors, and then uses a classifier to determine whether they are related. This model typically uses a pre-trained language model as the encoder, such as BERT and RoBERTa. Cross-encoder models perform well in tasks such as question answering, text matching, and natural language inference.

[0064] The Dual-Tower Model is a design framework for artificial intelligence systems. This framework divides the AI ​​system into two towers: the perception tower and the decision tower. The perception tower is primarily responsible for data input and processing, including image recognition, speech recognition, and natural language processing. The decision tower is responsible for decision-making and output, making corresponding decisions and outputting results based on the data provided by the perception tower. The advantages of the Dual-Tower Model are its efficient computation and flexible architecture, while also providing high scalability and maintainability.

[0065] Specifically, refer to Figure 1 , Figure 1 This is a schematic diagram of the functional modules of the terminal device to which the intent recognition device of the present invention belongs. The intent recognition device can be an independent device capable of intent recognition, and it can be implemented on the terminal device in hardware or software form. The terminal device can be a smart mobile terminal with data processing capabilities, such as a mobile phone or tablet computer, or it can be a fixed terminal device or server with data processing capabilities.

[0066] In this embodiment, the terminal device to which the intent recognition device belongs includes at least an output module 110, a processor 120, a memory 130, and a communication module 140.

[0067] The memory 130 stores the operating system and the intent recognition program. The intent recognition device inputs the user question into the intent recognition model for the following processing: A corresponding sentence vector is generated using a bi-encoder dual-tower model; the sentence vector is compared with standard questions in a pre-built vector index library to coarsely filter out the most relevant questions, obtaining a first matching result; a pre-built text retrieval model is used to match the most relevant questions, obtaining a second matching result; the first and second matching results are concatenated and deduplicated to obtain an initial filtering result; the initial filtering result is then finely sorted using a cross-encoder dual-tower model to filter out the most matching user intent. The intent recognition model performs intent recognition, and the resulting model recognition information is stored in the memory 130.

[0068] When the intent recognition program in memory 130 is executed by the processor, it performs the following steps:

[0069] Get user questions;

[0070] The user's question is input into the intent recognition model and matched and recognized based on the dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on the dual-tower model.

[0071] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0072] The user question is input into the intent recognition model and processed as follows:

[0073] The corresponding sentence vectors are generated using the bi-encoder dual-tower model;

[0074] The sentence vectors are compared with standard questions in a pre-built vector index library to roughly screen out the most relevant questions and obtain the first matching result;

[0075] By using a pre-built text retrieval model, the most relevant questions are matched to obtain the second matching result;

[0076] The first and second matching results are concatenated and deduplicated to obtain the initial filtering results;

[0077] The initial screening results are refined using a cross-encoder dual-tower model to select the most matching user intent.

[0078] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0079] Building a text retrieval model specifically includes:

[0080] Retrieve user question texts from the customer service backend database and construct a dataset;

[0081] The dataset is divided into a training set, a validation set, and a test set;

[0082] Based on the bi-encoder model and the cross-encoder model, a text retrieval model is constructed.

[0083] Input the training set into the text retrieval model to obtain similar sentences corresponding to the training set;

[0084] The text retrieval model is trained based on the similar sentences, the validation set, and the test set to obtain the trained text retrieval model.

[0085] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0086] Extract user question text and question scenarios from the customer service backend database;

[0087] The user question text is categorized according to the problem scenario.

[0088] Similarity labels are applied to the pairs of user question texts under each category to obtain the labeled user question texts.

[0089] The dataset was constructed using annotated user question text.

[0090] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0091] Building a vector index library specifically includes:

[0092] A standard dataset is created based on the user's question text;

[0093] The bi-encoder model is used to construct corresponding sentence vectors based on the standard dataset.

[0094] Based on the sentence vectors, a vector index library is established.

[0095] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0096] The training set is then input into the bi-encoder model and the cross-encoder model in the text retrieval model, respectively.

[0097] The sentence vectors of sentence pairs in the training set are calculated using a bi-encoder model to obtain the first similarity.

[0098] The sentence vectors of sentence pairs in the training set are calculated using a cross-encoder model to obtain the second similarity.

[0099] Based on the first similarity and the second similarity, a binary classification process is performed to obtain similar sentences in the corresponding training set.

[0100] Furthermore, when the intent recognition program in memory 130 is executed by the processor, it also performs the following steps:

[0101] An intent recognition model is constructed based on the dual-tower model, specifically including:

[0102] An intent recognition model was constructed based on the bi-encoder model, the cross-encoder model, and the text retrieval model.

[0103] This embodiment, through the above-described scheme, specifically obtains the user's question; inputs the user's question into an intent recognition model and performs matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on a dual-tower model. By recognizing the user's question through the intent recognition model, the technical problem of outbound intelligent customer service being unable to timely and accurately determine the intent of customer questions is solved. Based on the scheme of this invention, starting from the current poor understanding of user questions by intelligent outbound customer service, an intent recognition model is constructed, and the effectiveness of the intent recognition method proposed in this invention is verified on user question text. Finally, the intent recognition model of this invention accelerates the model's reasoning speed and improves the accuracy of reasoning.

[0104] Based on, but not limited to, the terminal device architecture described above, embodiments of the method of the present invention are proposed.

[0105] Reference Figure 2 , Figure 2 This is a flowchart illustrating an exemplary embodiment of the text classification method of the present invention. The intent recognition method includes:

[0106] Step S104, obtain user questions;

[0107] The execution subject of the method in this embodiment can be an intent device, an intent recognition terminal device, or a server. This embodiment takes an intent recognition device as an example, which can be integrated into a terminal device with data processing function.

[0108] Among them, the user questions obtained can be questions raised by customers obtained by the bank's intelligent outbound customer service.

[0109] Step S105: Input the user question into the intent recognition model and perform matching and recognition based on the dual-tower retrieval mechanism to obtain the recognized user intent, wherein the intent recognition model is constructed based on the dual-tower model.

[0110] This embodiment starts from the practical problem of intent recognition and designs an intent recognition model based on a dual-tower retrieval mechanism.

[0111] This embodiment uses an intent recognition model to identify user questions. The framework of this intent recognition model includes: a bi-encoder model, a text retrieval model, and a cross-encoder model.

[0112] The Bi-encoder model is used to build a vector index library with the user's question text, calculate the sentence vector in the user's question, and derive the first matching result based on the sentence vector.

[0113] The text retrieval model is used to match the user's question text to obtain a second matching result for the current user question.

[0114] The cross-encoder model is used to refine the initial screening results obtained from the first and second matching results to determine the most matching user intent.

[0115] The text retrieval model is constructed from the bi-encoder model and the cross-encoder model.

[0116] This embodiment, through the above-described scheme, specifically obtains user questions; inputs these user questions into an intent recognition model and performs matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on a dual-tower model. Compared to existing technologies, this method utilizes artificial intelligence to pre-vectorize standard user questions from different scenarios, then performs ranking and matching with the user questions, integrating information to form an intent recognition method based on a dual-tower retrieval mechanism. This accelerates the model's inference speed and improves its accuracy.

[0117] Reference Figure 3 , Figure 3 This is a flowchart illustrating another exemplary embodiment of the intent identification method of the present invention.

[0118] Based on the above Figure 2 In the aforementioned embodiment, step S105, which involves inputting the user's question into the intent recognition model and performing matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, includes:

[0119] Step S1051: Generate the corresponding sentence vectors using the bi-encoder dual-tower model;

[0120] Step S1052: Compare the sentence vector with the standard questions in the pre-built vector index library to roughly screen out the most relevant questions and obtain the first matching result;

[0121] Step S1053: Using a pre-built text retrieval model, match the most relevant questions to obtain the second matching result;

[0122] Step S1054: The first matching result and the second matching result are concatenated and deduplicated to obtain the initial filtering result;

[0123] Step S1055: The initial screening results are refined using a cross-encoder dual-tower model to select the most matching user intent.

[0124] Specifically, the overall process of this embodiment is as follows: Figure 4 As shown, the acquired user questions are input into the intent recognition model for processing. First, a bi-encoder dual-tower model is used to process the user questions, obtaining sentence vectors. Then, the obtained user question sentence vectors are compared with a pre-built vector index library to coarsely filter out several of the most relevant user questions as the first matching result. Next, the user questions are input into a pre-built text retrieval model to match several of the most relevant questions as the second matching result. Then, the first matching result and the second matching result are concatenated and deduplicated to obtain the initial filtering result. Finally, the obtained initial filtering result is input into a cross-encoder dual-tower model for fine-tuning to filter out the most matching user intents.

[0125] This embodiment, through the above scheme, specifically generates corresponding sentence vectors using a bi-encoder dual-tower model; compares these sentence vectors with standard questions in a pre-built vector index library to coarsely filter out the most relevant questions, obtaining a first matching result; uses a pre-built text retrieval model to match the most relevant questions, obtaining a second matching result; concatenates and deduplicates the first and second matching results to obtain an initial filtering result; and uses a cross-encoder dual-tower model to fine-tune the initial filtering result, selecting the most matching user intent. Based on the bi-encoder dual-tower model, text retrieval model, and cross-encoder model, the lack of feature information extracted by a single model can be addressed, and the advantages of vector pre-computation are utilized to accelerate model inference speed and improve inference accuracy.

[0126] Reference Figure 5 , Figure 5 This is a flowchart illustrating another exemplary embodiment of the intent recognition method of the present invention.

[0127] Based on the above Figure 2 In the embodiment shown, before the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, the intent recognition method further includes:

[0128] Step S101: Construct a text retrieval model. In this embodiment, this is performed before step S104. In other embodiments, step S101 may also be performed between step S104 and step S105.

[0129] Compared to the above Figure 2 The embodiment shown also includes a scheme for obtaining a text retrieval model.

[0130] Specifically, refer to Figure 6 , Figure 6 This is a flowchart illustrating the process of constructing the text retrieval model in this embodiment. Specifically, constructing the text retrieval model in this embodiment may include:

[0131] Step S1011: Obtain user question texts from the customer service backend database and construct a dataset;

[0132] Step S1012: Divide the dataset into a training set, a validation set, and a test set;

[0133] Step S1013: Based on the bi-encoder model and the cross-encoder model, a text retrieval model is constructed;

[0134] Step S1014: Input the training set into the text retrieval model to obtain similar sentences corresponding to the training set;

[0135] Step S1015: Train the text retrieval model based on the similar sentences, the validation set, and the test set to obtain the trained text retrieval model.

[0136] More specifically, the process begins by retrieving user question text from the customer service backend database and constructing a dataset. Then, the text in the dataset is divided into training, validation, and test sets according to appropriate proportions. Next, an initial text retrieval model is built using bi-encoder and cross-encoder models. The training set is then input into the initial text retrieval model, which processes the text to obtain similar sentences corresponding to the training set. Finally, the initial text retrieval model is trained using these similar sentences and the previously manually annotated validation and test set texts to obtain the trained text retrieval model.

[0137] This embodiment, through the above-described scheme, specifically constructs a dataset by acquiring user question text from the customer service backend database; divides the dataset into a training set, a validation set, and a test set; constructs a text retrieval model based on the bi-encoder model and the cross-encoder model; inputs the training set into the text retrieval model to obtain similar sentences corresponding to the training set; and trains the text retrieval model based on the similar sentences and the validation set to obtain the trained text retrieval model. Using the trained text retrieval model to perform text retrieval on user questions can improve the accuracy of the intent recognition model.

[0138] Reference Figure 7 , Figure 7 This is a schematic diagram illustrating the process of constructing a dataset involved in the intent recognition method of this invention.

[0139] Based on the above Figure 5 In the illustrated embodiment, step S1011, which involves obtaining user question text from the customer service backend database and constructing a dataset, includes:

[0140] S10111: Extract user question text and question scenarios from the customer service backend database;

[0141] S10112: Classify the user question text according to the problem scenario;

[0142] S10113: Perform similarity annotation on the user question text pairs under each category to obtain the annotated user question text;

[0143] S10114: Construct a dataset using annotated user question text.

[0144] Specifically, first, user question texts and question scenarios that do not contain sensitive customer information are extracted from the customer service backend database. Then, based on the extracted question scenarios, the user question texts are categorized. Next, a manual similarity standard is applied to the user question texts within each category to obtain standardized user question texts. Finally, the labeled user question texts are used to construct a dataset.

[0145] This embodiment employs the above-described scheme, specifically by extracting user question text and question scenarios from the customer service backend database; classifying the user question text according to the question scenarios; manually labeling the similarity of user question text pairs under each category to obtain labeled user question text; and constructing a dataset using the labeled user question text. This constructed dataset allows for more accurate retrieval results from the text retrieval model.

[0146] Reference Figure 8 , Figure 8This is a flowchart illustrating another exemplary embodiment of the intent recognition method of the present invention.

[0147] Based on the above Figure 2 In the embodiment shown, before the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, the intent recognition method further includes:

[0148] Step S102: Construct a vector index library. In this embodiment, this is performed before step S104. In other embodiments, step S102 may also be performed between step S104 and step S105.

[0149] Compared to the above Figure 2 The embodiment shown also includes a scheme for obtaining a vector index library.

[0150] Specifically, refer to Figure 9 , Figure 9 The scheme for constructing the vector index library in this embodiment specifically includes:

[0151] Step S1021: Establish a standard dataset based on the user question text;

[0152] Step S1022: Construct corresponding sentence vectors using the bi-encoder model and based on the standard dataset;

[0153] Step S1023: Establish a vector index library based on the sentence vector.

[0154] More specifically, first, user question text is retrieved from the customer service database. Then, a standard dataset is created using this retrieved user question text. Next, the calibration dataset is input into the bi-encoder model, which constructs corresponding sentence vectors. Finally, a vector index library is built based on the constructed sentence vectors.

[0155] This embodiment, through the above-described scheme, specifically establishes a standard dataset based on the user's question text; constructs corresponding sentence vectors from the standard dataset using a bi-encoder model; and establishes a vector index library based on the sentence vectors. By constructing a vector index library, the inference speed of the model is improved.

[0156] Reference Figure 10 , Figure 10 This is a schematic diagram illustrating the process of obtaining similar sentences corresponding to the training set in an embodiment of the intent recognition method of the present invention.

[0157] Based on the above Figure 5In the aforementioned embodiment, step S1004: inputting the training set into the text retrieval model to obtain similar sentences corresponding to the training set may include:

[0158] Step S10141: Input the training set into the bi-encoder model and cross-encoder model in the text retrieval model respectively;

[0159] Step S10142: Calculate the sentence vectors of the sentence pairs in the training set using the bi-encoder model to obtain the first similarity.

[0160] Step S10143: Calculate the sentence vectors of the sentence pairs in the training set using the cross-encoder model to obtain the second similarity.

[0161] Step S10144: Perform binary classification based on the first similarity and the second similarity to obtain similar sentences in the corresponding training set.

[0162] Specifically, the pre-acquired training set text pairs are input into the bi-encoder dual-tower model to calculate the sentence vectors for each pair, and the first similarity of the sentence pairs is calculated based on the sentence vectors. Then, the training set text pairs are input into the cross-encoder model to calculate the second similarity of the sentence pairs. Finally, binary classification is performed based on the first and second similarities to obtain the similar sentences corresponding to the training set.

[0163] This embodiment employs the above-described scheme, specifically by inputting the training set into both the bi-encoder and cross-encoder models within the text retrieval model. The bi-encoder model calculates the sentence vectors of sentence pairs in the training set to obtain a first similarity score. The cross-encoder model calculates the sentence vectors of the sentence pairs in the training set to obtain a second similarity score. Based on the first and second similarities, binary classification is performed to obtain similar sentences corresponding to the training set. The obtained similar sentences are then used to train an initial text retrieval model against manually annotated user question text. The trained text retrieval model is then applied to make the final determination of user intent more accurate.

[0164] Reference Figure 11 , Figure 11 This is a flowchart illustrating another exemplary embodiment of the intent recognition method of the present invention.

[0165] Based on the above Figure 2 In the embodiment shown, before the step of inputting the text to be processed into a pre-created text classification model for classification to obtain the classified text, the text classification method further includes:

[0166] Step S103 involves constructing an intent recognition model based on the bi-encoder model, cross-encoder model, and text retrieval model. In this embodiment, step S104 is implemented before step S105 and after step S101. In other embodiments, step S103 can also be implemented between step S104 and step S105.

[0167] Compared to the above Figure 2 The embodiment shown also includes a scheme for obtaining an intent recognition model.

[0168] Specifically, this embodiment involves an intent recognition model equipped with a bi-encoder model, a cross-encoder model, and a text retrieval model. First, an initial text retrieval model is constructed using the bi-encoder and cross-encoder dual-tower models. This initial text retrieval model is trained using user question text to obtain a trained text retrieval model. Then, the intent recognition model is constructed using the bi-encoder, cross-encoder, and text retrieval models. The bi-encoder model within the intent recognition model converts the user question into a sentence vector. Based on a vector index library, a first matching result is obtained. The text retrieval model within the intent recognition model then matches this vector with a customer service backend database to obtain a second matching result. Next, the first and second matching results are concatenated and deduplicated to obtain an initial filtering result. Finally, the initial filtering result is input into the cross-encoder model for fine-tuning, selecting the most matching user intent.

[0169] This embodiment, through the above-described scheme, specifically constructs an intent recognition model based on a bi-encoder model, a cross-encoder model, and a text retrieval model. The constructed intent recognition model identifies user intent, and by combining the filtering results from the bi-encoder, cross-encoder, and text retrieval models, it accelerates the model's inference speed and improves inference accuracy.

[0170] Furthermore, embodiments of the present invention also propose an intent recognition device, the intent recognition device comprising:

[0171] The acquisition module is used to acquire user questions;

[0172] The intent recognition module is used to input the user's question into the intent recognition model and perform matching and recognition based on the dual-tower retrieval mechanism to obtain the recognized user intent, wherein the intent recognition model is constructed based on the dual-tower model.

[0173] The principle and implementation process of text classification in this embodiment are explained in the above embodiments and will not be repeated here.

[0174] Furthermore, this embodiment of the invention also proposes a terminal device, which includes a memory, a processor, and an intent recognition program stored in the memory and executable on the processor. When the intent recognition program is executed by the processor, it implements the steps of the intent recognition method as described above.

[0175] Since this intent recognition program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be repeated here.

[0176] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an intent recognition program, which, when executed by a processor, implements the steps of the intent recognition method as described above.

[0177] Since this intent recognition program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be repeated here.

[0178] Compared to existing technologies, the intent recognition method, apparatus, terminal device, and storage medium proposed in this invention acquire user questions; input the user questions into an intent recognition model and perform matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, wherein the intent recognition model is constructed based on a dual-tower model. Therefore, by using the intent recognition model to identify user questions, the technical problem of outbound intelligent customer service being unable to determine the intent of customer questions in a timely and accurate manner is solved. Based on the solution of this invention, starting from the current poor understanding of user questions by intelligent outbound customer service, an intent recognition model is constructed, and the effectiveness of the intent recognition method proposed in this invention is verified on user question text. Finally, the intent recognition model of this invention accelerates the model inference speed and improves the inference accuracy.

[0179] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0180] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of the present invention.

[0182] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An intent recognition method, characterized in that, The intent recognition method includes the following steps: Get user questions; A vector index library is built using the Bi-encoder model and user question text; The user's question is input into the intent recognition model and matched and recognized based on a dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on a dual-tower model and specifically includes: generating corresponding sentence vectors through a bi-encoder dual-tower model; comparing the sentence vectors with standard questions in a pre-built vector index library to coarsely screen out several most relevant questions to obtain a first matching result; matching several most relevant questions through a pre-built text retrieval model to obtain a second matching result; concatenating and deduplicating the first and second matching results to obtain an initial filtering result; and refining the initial filtering result through a cross-encoder dual-tower model to filter out the most matching user intent.

2. The intent recognition method according to claim 1, characterized in that, Before the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, the following steps are also included: Building a text retrieval model specifically includes: Retrieve user question texts from the customer service backend database and construct a dataset; The dataset is divided into a training set, a validation set, and a test set; Based on the bi-encoder model and the cross-encoder model, a text retrieval model is constructed; Input the training set into the text retrieval model to obtain similar sentences corresponding to the training set; The text retrieval model is trained based on the similar sentences, the validation set, and the test set to obtain the trained text retrieval model.

3. The intent recognition method according to claim 2, characterized in that, The steps of obtaining user question texts from the customer service backend database and constructing the dataset include: Extract user question text and question scenarios from the customer service backend database; The user question text is categorized according to the problem scenario. Similarity labels are applied to the pairs of user question texts under each category to obtain the labeled user question texts. The dataset was constructed using annotated user question text.

4. The intent recognition method according to claim 2, characterized in that, The construction of a vector index library using the Bi-encoder model and user question text specifically includes: A standard dataset is created based on the user's question text; The bi-encoder model is used to construct corresponding sentence vectors based on the standard dataset. Based on the sentence vectors, a vector index library is established.

5. The intent recognition method according to claim 2, characterized in that, The step of inputting the training set into the text retrieval model to obtain similar sentences corresponding to the training set includes: The training set is then input into the bi-encoder model and the cross-encoder model in the text retrieval model, respectively. The sentence vectors of sentence pairs in the training set are calculated using a bi-encoder model to obtain the first similarity. The sentence vectors of sentence pairs in the training set are calculated using a cross-encoder model to obtain the second similarity. Based on the first similarity and the second similarity, a binary classification process is performed to obtain similar sentences in the corresponding training set.

6. The intent recognition method according to claim 1, characterized in that, Before the step of inputting the user's question into the intent recognition model for matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent, the following steps are also included: An intent recognition model is constructed based on the dual-tower model, specifically including: An intent recognition model was constructed based on the bi-encoder model, the cross-encoder model, and the text retrieval model.

7. An intent recognition device, characterized in that, The intent recognition device includes: The acquisition module is used to acquire user questions; A vector index library is built using the Bi-encoder model and user question text; The intent recognition module is used to input the user question into the intent recognition model and perform matching and recognition based on a dual-tower retrieval mechanism to obtain the recognized user intent. The intent recognition model is constructed based on a dual-tower model and specifically includes: generating corresponding sentence vectors through a bi-encoder dual-tower model; comparing the sentence vectors with standard questions in a pre-built vector index library to coarsely screen out several most relevant questions, obtaining a first matching result; matching several most relevant questions through a pre-built text retrieval model to obtain a second matching result; concatenating and deduplicating the first and second matching results to obtain an initial filtering result; and refining the initial filtering result through a cross-encoder dual-tower model to filter out the most matching user intent.

8. A terminal device, characterized in that, The terminal device includes a memory, a processor, and an intent recognition program stored in the memory and executable on the processor. When the intent recognition program is executed by the processor, it implements the steps of the intent recognition method as described in any one of claims 1-6.

9. A calculator-readable storage medium, characterized in that, The computer-readable storage medium stores an intent recognition program, which, when executed by a processor, implements the steps of the intent recognition method as described in any one of claims 1-6.