Multi-round dialogue intention recognition method, device and equipment based on small sample learning

Through the method based on small sample learning, the historical dialogue data in the financial field is designed and model training, which solves the problem of low efficiency in traditional intention recognition and realizes efficient intention recognition under small samples.

CN119416798APending Publication Date: 2025-02-11CHINA LIFE INSURANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411727735.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

Traditional intent recognition methods are inefficient and require a lot of manual processing time, making it difficult to efficiently identify intentions in multiple rounds of conversations.

Method used

Using a multi-round dialogue intention recognition method based on small sample learning, through intent annotation and data screening of historical dialogue data in the financial field, a support sample set and query sample set are constructed, and the small sample intention recognition model is iteratively trained, and the model is carried out. Transform to increase deployment efficiency.

Benefits of technology

It improves the efficiency of intention recognition, can quickly learn intention characteristics under a small sample condition, simplify the model deployment process, and thus improves the overall intention recognition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416798A_ABST
    Figure CN119416798A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-round dialogue intention recognition method and device based on small sample learning, computer equipment, a computer readable storage medium and a computer program product, and can be applied to the technical field of computers. The method comprises the following steps: performing intention labeling processing on historical dialogue data in the insurance field to obtain a labeled data set; selecting a training data set for model training from the annotated data set according to the data volume of each intention category in the annotated data set; according to preset data sampling information, sampling from the training data set to obtain a support sample set and a query sample set; according to the support sample set and the query sample set, performing iterative training on a to-be-trained small sample intention recognition model to obtain a trained small sample intention recognition model; and according to a preset model framework, performing model conversion processing on the trained small sample intention recognition model to obtain a target small sample intention recognition model. By adopting the method, the intention recognition efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for multi-round conversation intention recognition based on small sample learning. Background Art

[0002] With the development of artificial intelligence technology, intelligent dialogue systems have been widely used in many fields such as insurance. In intelligent dialogue systems, intent recognition is a key technical link. Therefore, how to efficiently perform intent recognition has become an important research direction.

[0003] Traditional technology usually performs intent recognition through manual rule matching; however, this method requires a lot of manual processing time, resulting in low efficiency of intent recognition. Summary of the invention

[0004] Based on this, it is necessary to provide a multi-round dialogue intention recognition method, device, computer equipment, computer-readable storage medium and computer program product based on small sample learning that can improve the efficiency of intention recognition in response to the above technical problems.

[0005] In a first aspect, the present application provides a multi-round conversation intention recognition method based on small sample learning. The method comprises:

[0006] Perform intent labeling on historical conversation data in the financial field to obtain a labeled dataset;

[0007] Selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0008] According to preset data sampling information, sampling is performed from the training data set to obtain a support sample set and a query sample set;

[0009] Iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0010] According to the preset model framework, the trained small sample intent recognition model is subjected to model conversion processing to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

[0011] In one embodiment, selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set includes:

[0012] Determining the amount of data for each intent category in the annotated data set;

[0013] Selecting, from the labeled data set, data corresponding to the intent category whose data volume is greater than a first preset threshold as the training data set;

[0014] From the annotated data set, data corresponding to the intent category whose data volume is greater than or equal to the second preset threshold and less than or equal to the first preset threshold is selected as a test data set.

[0015] In one embodiment, sampling the support sample set and the query sample set from the training data set according to preset data sampling information includes:

[0016] Selecting a target intent category from the intent categories in the training data set according to the data sampling information;

[0017] From the data corresponding to the target intent category in the training data set, a first preset amount of data is sampled as the support sample set, and a second preset amount of data is sampled as the query sample set.

[0018] In one embodiment, the small sample intent recognition model to be trained includes a pre-trained language model encoder, a conversion matching module and a multi-layer perceptron module;

[0019] The iterative training of the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain the trained small sample intent recognition model includes:

[0020] Inputting the support sample set and the query sample set into the pre-trained language model encoder for feature recognition processing to obtain feature data of the support sample set and feature data of the query sample set;

[0021] Inputting the feature data of the support sample set into the conversion and matching module for feature aggregation processing to obtain the category features of each intent category in the support sample set;

[0022] Performing similarity identification on the feature data of the query sample set and the category feature to obtain similarity information;

[0023] Inputting the similarity information into the multi-layer perceptron module for intention prediction processing to obtain an intention prediction result;

[0024] According to the intention prediction result, the small sample intention recognition model to be trained is iteratively trained to obtain the trained small sample intention recognition model.

[0025] In one embodiment, after performing model conversion processing on the trained small sample intent recognition model according to a preset model framework to obtain a target small sample intent recognition model, the method further includes:

[0026] Obtaining the current conversation data;

[0027] The current conversation data is input into the target small sample intention recognition model for intention recognition to obtain the intention recognition result of the current conversation data.

[0028] In one embodiment, the intention annotation processing is performed on the historical conversation data in the financial field to obtain the annotated data set, including:

[0029] Performing data cleaning on the historical conversation data to obtain cleaned conversation data;

[0030] The cleaned conversation data is subjected to intent annotation processing to obtain the annotated data set.

[0031] In a second aspect, the present application also provides a multi-round dialogue intention recognition device based on small sample learning. The device comprises:

[0032] The data annotation module is used to perform intent annotation processing on historical conversation data in the financial field to obtain annotated data sets;

[0033] A data selection module, used to select a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0034] A data sampling module, used to sample a support sample set and a query sample set from the training data set according to preset data sampling information;

[0035] A model training module, used for iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0036] The model conversion module is used to perform model conversion processing on the trained small sample intent recognition model according to a preset model framework to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

[0037] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0038] Perform intent labeling on historical conversation data in the financial field to obtain a labeled dataset;

[0039] Selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0040] According to preset data sampling information, sampling is performed from the training data set to obtain a support sample set and a query sample set;

[0041] Iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0042] According to the preset model framework, the trained small sample intent recognition model is subjected to model conversion processing to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

[0043] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0044] Perform intent labeling on historical conversation data in the financial field to obtain a labeled dataset;

[0045] Selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0046] According to preset data sampling information, sampling is performed from the training data set to obtain a support sample set and a query sample set;

[0047] Iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0048] According to the preset model framework, the trained small sample intent recognition model is subjected to model conversion processing to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

[0049] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0050] Perform intent labeling on historical conversation data in the financial field to obtain a labeled dataset;

[0051] Selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0052] According to preset data sampling information, sampling is performed from the training data set to obtain a support sample set and a query sample set;

[0053] Iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0054] According to the preset model framework, the trained small sample intent recognition model is subjected to model conversion processing to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

[0055] The above-mentioned multi-round dialogue intention recognition method, device, computer equipment, computer-readable storage medium and computer program product based on small sample learning perform intent annotation processing on historical dialogue data in the financial field to obtain an annotated data set; according to the data amount of each intent category in the annotated data set, a training data set for model training is selected from the annotated data set; according to preset data sampling information, a support sample set and a query sample set are sampled from the training data set; according to the support sample set and the query sample set, the small sample intention recognition model to be trained is iteratively trained to obtain a trained small sample intention recognition model; according to the preset model framework, the trained small sample intention recognition model is model converted to obtain a target small sample intention recognition model; the target small sample intention recognition model is used to perform intent recognition on the current dialogue data. This solution ensures the quality and adequacy of training data by annotating the intent of historical conversation data in the financial field and screening it based on the data volume, which is conducive to the model obtaining a reliable training foundation; it constructs support sample sets and query sample sets through preset data sampling information, and inputs them into the small sample intention recognition model for iterative training, which is conducive to the model quickly learning intent features under the conditions of a small number of samples; and then obtains the target model through model framework conversion processing, which is conducive to improving the efficiency of model deployment and thus the efficiency of intent recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0057] Figure 1 A flowchart of a method for multi-round dialogue intention recognition based on small sample learning in one embodiment;

[0058] Figure 2 A schematic diagram of a flow chart of the steps of selecting a training data set in one embodiment;

[0059] Figure 3 A flowchart of the steps of sampling to obtain a support sample set and querying a sample set in one embodiment;

[0060] Figure 4 It is a structural block diagram of a multi-round dialogue intention recognition device based on small sample learning in one embodiment;

[0061] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0064] In an exemplary embodiment, Figure 1 As shown, a multi-round conversation intention recognition method based on small sample learning is provided. This embodiment takes the method applied to a terminal as an example; it can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be but is not limited to various personal computers, laptops, smart phones, tablet computers, etc.; the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. In this embodiment, the method includes the following steps:

[0065] Step S101, perform intention annotation processing on historical conversation data in the financial field to obtain an annotated data set.

[0066] Step S102: Select a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set.

[0067] Step S103: According to preset data sampling information, a support sample set and a query sample set are sampled from the training data set.

[0068] Step S104, iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model.

[0069] Step S105, according to the preset model framework, the trained small sample intention recognition model is converted to obtain a target small sample intention recognition model; the target small sample intention recognition model is used to perform intent recognition on the current conversation data.

[0070] Among them, small sample learning can be a learning method for model training under the condition of limited labeled data. For example, it can be a learning strategy for model training when there are only a small number of samples in each category (such as 5 samples).

[0071] Among them, the multi-round dialogue intention recognition method can be a method for understanding the intention expressed by the user in a continuous dialogue process. For example, it can be a method for identifying the user's true intention by analyzing multiple consecutive questions asked by the user during the insurance consultation process.

[0072] The historical conversation data may be conversation interaction records, such as customer service records and other data.

[0073] Among them, intent labeling can be the process of classifying the intent of the conversation content, for example, it can be the process of classifying and marking the intent of each conversation record.

[0074] The annotated data set may be a data set formed after intention annotation processing, for example, it may be an annotated insurance intention data set.

[0075] The training data set may be a data set used for model training, for example, intent category data with a data volume greater than 100.

[0076] The data sampling information may be a relevant parameter setting for data sampling, for example, a 5-way5-shot sampling setting (ie, sampling 5 data from each of 5 categories).

[0077] The support sample set (Support Set) may be a benchmark sample set used for model training, for example, a data set consisting of 5 user questions selected from each category.

[0078] The query sample set (Query Set) may be a sample set used to verify the model effect, for example, it may be a data set consisting of 3 to 8 samples randomly selected from the remaining data of the corresponding category of the support sample set.

[0079] Among them, the small sample intent recognition model can be a deep learning model for intent recognition based on a small number of samples. For example, it can be a model composed of StructBert (structurally enhanced Bert) as an encoder, combined with a conversion matching module and a multi-layer perceptron (MLP).

[0080] The model framework may be a structural framework of the model, for example, an onnx (Open Neural Network Exchange) framework.

[0081] Among them, the target small sample intent recognition model can be a model that can be deployed and used after the conversion is completed, for example, it can be a model stored in a model repository after conversion by the onnx framework.

[0082] The current conversation data may be real-time conversation content that requires intent recognition, for example, specific questions or descriptions sent by the user during the consultation process.

[0083] Optionally, the terminal collects and cleans historical conversation data in the financial field, deletes irrelevant conversation records, duplicate data, and records containing obvious errors; the terminal annotates the intent of each conversation record to form an annotated data set; the terminal performs statistical analysis on the annotated data set, and uses the intent categories with a data volume greater than 100 as the training data set; the terminal randomly selects 5 intent categories from the training data set according to the 5-way5-shot sampling setting, samples 5 data from each category as the support sample set, and randomly selects 3-8 data from the remaining data of these 5 categories as the query sample set; the terminal inputs the support sample set and the query sample set into a small sample intent recognition model with StructBert (structurally enhanced Bert) as the encoder for training, and the model includes a conversion matching module and a multi-layer perceptron (MLP) module; the terminal converts the trained model into an onnx (open neural network exchange) framework, and deploys the converted target small sample intent recognition model to the model warehouse for real-time intent recognition.

[0084] For example, when the terminal is performing intent labeling, it labels the cleaned data samples; when the terminal is dividing the training data set, the intent categories with a data volume greater than 100 are classified as Set1 (dataset 1) for training, and the categories with a data volume between 20 and 100 are classified as Set2 (dataset 2) for testing; when sampling data, the terminal uses the tokenizer method to convert text data into an input format that the model can understand, and uses the DataLoader (data loader) to efficiently load and shuffle the data; when training the model, the terminal sets the character length of the input data to 128, uses padding to fill the insufficient length, truncates the excess length, and extracts features through a 12-layer Transformer (transformer) encoder; when converting the model, the terminal enables constant folding to improve performance and reduce file size, and supports dynamic input size to enhance the flexibility of model deployment; the terminal applies the converted target small sample intent recognition model to the intent recognition of the current conversation data to achieve fast and accurate intent understanding.

[0085] In the above-mentioned multi-round dialogue intention recognition method based on small sample learning, the historical dialogue data in the financial field is annotated with intent to obtain an annotated data set; according to the amount of data of each intent category in the annotated data set, a training data set for model training is selected from the annotated data set; according to the preset data sampling information, a support sample set and a query sample set are sampled from the training data set; according to the support sample set and the query sample set, the small sample intention recognition model to be trained is iteratively trained to obtain a trained small sample intention recognition model; according to the preset model framework, the trained small sample intention recognition model is converted to obtain a target small sample intention recognition model; the target small sample intention recognition model is used to recognize the intent of the current dialogue data. This scheme ensures the quality and adequacy of the training data by annotating the historical dialogue data in the financial field and screening based on the amount of data, which is conducive to the model obtaining a reliable training basis; the support sample set and the query sample set are constructed by the preset data sampling information, and they are input into the small sample intention recognition model for iterative training, which is conducive to the model to quickly learn the intent features under the condition of a small number of samples; and then the target model is obtained by the model framework conversion processing, which is conducive to improving the efficiency of model deployment, thereby improving the efficiency of intent recognition.

[0086] In an exemplary embodiment, referring to Figure 2 , according to the amount of data of each intent category in the annotated dataset, a training dataset for model training is selected from the annotated dataset, which specifically includes the following contents:

[0087] Step S201, determining the amount of data for each intent category in the annotated data set;

[0088] Step S202, selecting data corresponding to the intent category whose data volume is greater than a first preset threshold from the annotated data set as a training data set;

[0089] Step S203: Select data corresponding to the intent category whose data volume is greater than or equal to the second preset threshold and less than or equal to the first preset threshold from the annotated data set as a test data set.

[0090] Among them, the intent category can be a classification of user conversation content according to the query purpose, for example, it can be different types of query classification such as insurance product consultation, claim process consultation, etc.

[0091] The data volume may be the number of conversation data items contained in each intent category, for example, the number of user questions collected under a certain intent category.

[0092] The first preset threshold may be a data volume standard for dividing training data, for example, 100 pieces of data.

[0093] The second preset threshold may be a lower limit standard for the amount of data used to divide the test data, for example, it may be 20 pieces of data.

[0094] The test data set may be a data set used to evaluate model performance, for example, data corresponding to intent categories with a data volume between 20 and 100 items.

[0095] Optionally, the terminal performs data statistical analysis on the annotated data set, counts the number of data items contained in each intent category in the annotated data set through database query or data counting tools, and generates a data volume distribution report for the intent category; the terminal divides the data corresponding to the intent categories with a data volume greater than 100 in the annotated data set into a training data set for subsequent model training; the terminal divides the data corresponding to the intent categories with a data volume between 20 and 100 in the annotated data set into a test data set for evaluating the generalization performance of the model; the terminal unifies the data format of the divided training data set and test data set to ensure that the data structure meets the model input requirements.

[0096] The technical solution provided in this embodiment ensures that each intent category in the training data set has sufficient data volume by counting and thresholding the data volume of each intent category in the annotated data set, which is conducive to the model learning complete intent features; by setting two preset thresholds to select data in layers, categories with larger data volumes are used for training, and categories with moderate data volumes are used for testing, which is conducive to building a reasonable test set while ensuring the quality of training, thereby facilitating accurate evaluation of the actual performance of the model.

[0097] In an exemplary embodiment, referring to Figure 3 , according to the preset data sampling information, the support sample set and the query sample set are sampled from the training data set, which specifically include the following contents:

[0098] Step S301, selecting a target intent category from intent categories in a training data set according to data sampling information;

[0099] Step S302: From the data corresponding to the target intent category in the training data set, a first preset amount of data is sampled as a support sample set, and a second preset amount of data is sampled as a query sample set.

[0100] The target intent categories may be intent categories selected from the training data set for constructing the support sample set and the query sample set, for example, 5 intent categories randomly selected from the training data set.

[0101] Among them, the first preset number can be the number of data items that need to be sampled for each intent category when constructing a support sample set, for example, 5 data items can be sampled for each category.

[0102] Among them, the second preset number can be the number of data items that need to be sampled for each intent category when constructing a query sample set, for example, 3-8 data items can be sampled for each category.

[0103] Optionally, the terminal sets sampling parameters according to preset data sampling information, including the number of intent categories to be selected for each iteration and the number of data items to be sampled in each category; the terminal randomly selects 5 intent categories from the training data set as target intent categories; the terminal uses DataLoader to load and shuffle the data corresponding to the target intent category; the terminal samples 5 data items from the data corresponding to each target intent category to form a support sample set, and samples 3-8 data items from the remaining data to form a query sample set; the terminal uses a tokenizer to preprocess the text data in the support sample set and the query sample set, and converts the text into a standard format that can be processed by the model.

[0104] The technical solution provided in this embodiment selects the target intent category from the training data set through preset data sampling information, which ensures the pertinence and representativeness of the data sampling, and is conducive to the model learning the characteristics of each intent category; by setting two preset numbers to sample the support sample set and the query sample set respectively, the reasonable distribution and balanced construction of the training data are achieved, which is conducive to ensuring the stability of the model training process, and thus is conducive to improving the accuracy of intent recognition under small sample conditions.

[0105] In an exemplary embodiment, the small sample intent recognition model to be trained is iteratively trained according to the support sample set and the query sample set to obtain the trained small sample intent recognition model, which specifically includes the following contents: the support sample set and the query sample set are input into the pre-trained language model encoder for feature recognition processing to obtain feature data of the support sample set and feature data of the query sample set; the feature data of the support sample set is input into the conversion and matching module for feature aggregation processing to obtain category features of each intent category in the support sample set; similarity is identified between the feature data of the query sample set and the category features to obtain similarity information; the similarity information is input into the multi-layer perceptron module for intent prediction processing to obtain intent prediction results; according to the intent prediction results, the small sample intent recognition model to be trained is iteratively trained to obtain the trained small sample intent recognition model.

[0106] Among them, the small sample intention recognition model to be trained includes a pre-trained language model encoder, a conversion matching module and a multi-layer perceptron module.

[0107] Among them, the pre-trained language model encoder can be a pre-trained natural language processing model, for example, it can be a StructBert (structurally enhanced Bert) model pre-trained on data in the financial insurance field and composed of 12 layers of Transformer (transformer) encoders stacked together.

[0108] Among them, the conversion matching module can be a module for processing the relationship between the support sample set and the query sample set, for example, it can be a module that aggregates the support sample sets in the same category into the current category feature representation through the attention mechanism.

[0109] Among them, the multi-layer perceptron module can be a neural network module for final intent prediction, for example, it can be a fully connected layer network that performs nonlinear transformation through a ReLU (rectified linear unit) activation function and a Sigmoid (S-type) function.

[0110] The feature recognition process may be a process of extracting features from the input text, for example, feature extraction may be performed through Token Embedding, Position Embedding, and Segment Embedding.

[0111] The feature data may be a data representation obtained after being processed by an encoder, for example, a hidden layer representation obtained by encoding through a 12-layer Transformer.

[0112] Among them, feature aggregation processing can be a process of summarizing data of the same category in the support sample set, for example, it can be a process of fusing features of data of the same category through a cyclic attention mechanism.

[0113] The category feature may be a feature representation supporting each intent category in the sample set, for example, it may be a corresponding feature expression of each intent category obtained by feature aggregation.

[0114] Among them, similarity recognition can be a process of calculating the matching degree between the query sample and each category feature, for example, the matching score can be calculated by methods such as dot product and cosine similarity.

[0115] The similarity information may be the matching degree data between the query sample and each category, for example, the similarity score of the query sample to each supporting category.

[0116] Among them, the intention prediction processing can be a process of further analyzing the similarity information, for example, it can be a nonlinear transformation processing performed by a multi-layer perceptron.

[0117] The intent prediction result may be the intent judgment result of the model on the query sample, for example, the probability value of each category between 0 and 1 obtained by transforming the Sigmoid function.

[0118] Optionally, the terminal inputs the support sample set and the query sample set into a pre-trained language model encoder formed by stacking 12 layers of Transformer encoders, extracts features of the input text through Token Embedding, Position Embedding and Segment Embedding, and obtains feature data of the support sample set and the query sample set; the terminal inputs the feature data of the support sample set into the conversion and matching module, and aggregates the support sample sets in the same category into feature representations of the current category through a cyclic attention mechanism; the terminal performs dot product operations and cosine similarity calculations on the feature data of the query sample set and the category features, and obtains similarity scores of the query sample to each support category; the terminal inputs the similarity scores into a multi-layer perceptron module, performs nonlinear transformation through a ReLU (rectified linear unit) activation function, and finally converts the results into probability values ​​of each category through a Sigmoid function; the terminal calculates the loss value based on the intent prediction result and performs back propagation, and uses Adamw (adaptive momentum optimizer) to update the model parameters to obtain a trained small sample intent recognition model.

[0119] The technical solution provided in this embodiment realizes a complete processing flow from feature extraction, feature aggregation to intent prediction through a three-module serial structure of a pre-trained language model encoder, a conversion matching module and a multi-layer perceptron module, which is conducive to making full use of the category feature information of the support sample set and performing effective similarity matching with the query sample set; through the dual feature extraction mechanism of feature recognition processing and feature aggregation processing, combined with the dual judgment mechanism of similarity recognition and intent prediction, it is conducive to improving the accuracy of intent recognition under small sample conditions, thereby facilitating the model to achieve stable and reliable training effects with a small amount of labeled data.

[0120] In an exemplary embodiment, after performing model conversion processing on the trained small sample intent recognition model according to a preset model framework to obtain a target small sample intent recognition model, the following contents are also included: obtaining current conversation data; inputting the current conversation data into the target small sample intent recognition model for intent recognition to obtain the intent recognition result of the current conversation data.

[0121] Among them, the preset model framework can be a standardized framework structure for model conversion and deployment, for example, it can be an onnx (open neural network exchange) framework.

[0122] Among them, the model conversion process can be the process of converting the trained model into a standard deployment format, for example, it can be the process of converting a model in pt (PyTorch, an open source deep learning framework for machine learning and deep learning) format into onnx (Open Neural Network Exchange) format, and performing constant folding optimization and dynamic input size support processing.

[0123] Among them, the target small sample intention recognition model can be a model that can be directly deployed and used after model conversion processing, for example, it can be an onnx (open neural network exchange) format model uploaded to a dedicated model repository and can be called by a service.

[0124] Among them, the intention recognition result can be the output result of the model's intention judgment on the current conversation data.

[0125] Optionally, the terminal converts the trained small sample intent recognition model through the onnx (open neural network exchange) framework, enables constant folding optimization and supports dynamic input size during the conversion process, and uploads the converted target small sample intent recognition model to a dedicated model warehouse; the terminal obtains current conversation data from online customer service records and other channels, cleans the current conversation data, deletes irrelevant content and obvious errors, and unifies the format; the terminal inputs the processed current conversation data into the target small sample intent recognition model, performs intent recognition through the model service call interface, and obtains the intent recognition result of the current conversation data.

[0126] The technical solution provided in this embodiment, by converting the trained small sample intent recognition model into a target small sample intent recognition model under a preset model framework, is conducive to the standardized deployment and efficient calling of the model; by acquiring the current conversation data and inputting it into the target small sample intent recognition model for intent recognition, it is conducive to applying the trained model to actual scenarios for intent recognition tasks; thus, it is conducive to converting the theoretical model into a system that can be actually deployed and used, and realizing fast and accurate recognition of real-time conversation data.

[0127] In an exemplary embodiment, historical conversation data in the financial field is subjected to intent labeling to obtain a labeled data set, which specifically includes the following contents: performing data cleaning on the historical conversation data to obtain cleaned conversation data; performing intent labeling on the cleaned conversation data to obtain a labeled data set.

[0128] Among them, data cleaning processing can be the process of screening and organizing the original data, for example, it can delete irrelevant conversation records, duplicate data and records containing obvious errors, and process them in a unified format.

[0129] The cleaned conversation data may be normalized conversation data obtained after data cleaning processing.

[0130] Optionally, the terminal collects historical conversation data in the financial field from multiple channels; the terminal performs data cleaning on the historical conversation data in the financial field, deletes irrelevant conversation records, duplicate data, and records containing obvious errors, and performs formatting of the historical conversation data in the financial field to obtain cleaned conversation data; the terminal performs intent labeling on the cleaned conversation data to ensure that each query has a clear intent label to obtain a labeled data set.

[0131] The technical solution provided in this embodiment helps to ensure the quality and standardization of training data by performing data cleaning on historical conversation data in the financial field; and helps to provide accurate label information for model training by performing intent labeling on the cleaned conversation data; thereby helping to build a high-quality labeled data set and provide a reliable data foundation for subsequent small sample intent recognition model training.

[0132] The following is an application example to illustrate the multi-round dialogue intention recognition method based on small sample learning provided by this application. This application example uses the method applied to a terminal as an example.

[0133] This application example aims to train the model through limited labeled data to accurately understand and respond to users' diverse query needs during the insurance consultation process.

[0134] In the insurance industry, users often need to consult complex information about insurance products, claims procedures, etc. This requires the customer service system to understand the user's intentions and provide accurate services. However, traditional manual customer service is not only costly, but also inefficient, and it is difficult to meet the needs of a large number of users for simultaneous consultation. With the widespread application of deep learning and natural language processing technologies, the performance and effect of using deep learning neural networks to support intelligent customer service systems are constantly improving. Among them, intent recognition, as the core link of human-computer interaction, is of great significance for improving user experience. Therefore, this application example proposes a few-shot-based intent recognition method for identifying user questions in the intelligent customer service system, which effectively reduces the amount of labeled data required for the model training process, so that the model can support the prediction of various intents that have not been encountered during the training process in the inference stage.

[0135] This application example aims to solve the problems of limited data volume and poor generalization of the current few-shot custom intent recognition model in the insurance field, and proposes a new insurance multi-round question-answering few-shot intent recognition system. This application example first collects and cleans historical dialogue data in the insurance field to obtain user dialogues, and uses the experience and knowledge of industry experts to complete the intention annotation of dialogues, providing a data basis for the model training of this application example. In the model training part, the StructBert (Structure Enhanced Bert) model pre-trained on financial insurance corpus is used as an encoder to encode user data, and then input into the conversion matching module to process each support set and query set and calculate the similarity of the query set to each category in the support set. According to the performance of the model indicators during the training process, the parameters of the model are further adjusted to improve the model's recognition ability for custom intents in the insurance field, while further enhancing the robustness and accuracy of the model. After completing the model adjustment, convert the pt (PyTorch format) model produced by training into an onnx (Open Neural Network Exchange) framework model, upload it to the model warehouse for storage and calling, and develop the model backend calling interface to complete the system's call to the model service.

[0136] Detailed description of this application example:

[0137] Data preprocessing process. Collect insurance consultation-related conversation data from multiple channels, including online customer service records, submitted questions, etc., clean the collected raw data, delete irrelevant conversation records, duplicate data, and records containing obvious errors, and ensure the uniform format. Professionals will annotate the intent of each conversation record to ensure that each user query has a clear intent label.

[0138] After sorting and cleaning, the intent of user speech is annotated to form an insurance intent data set. In this application example, in order to meet the input needs of the model, the data set is further divided, the amount of data in each category is counted, the number of samples in each category is determined, and the categories with larger data volumes are used as support sets and query sets in the subsequent training process to help the model learn more stable feature representations. Categories with smaller data volumes are selected as support sets and query sets in the testing process. Using categories with limited data volumes, the generalization ability of the model under small sample conditions can be evaluated.

[0139] A few-shot intent recognition model based on few-shot. The core model in this application example adopts a few-shot learning strategy, using StructBert as an encoder to encode the input data, and then processing the support and query data through the transformation matching module. The similarity score of the query to each support category is obtained through methods such as dot product, cosine similarity, and attention mechanism. The similarity scores of the query to all support categories are then used as input and sent to a multi-layer perceptron (MLP) module. The MLP module further learns and refines these similarity information through multiple layers of nonlinear transformations to more accurately predict the intent of the query. The output layer of the MLP module contains neurons equal to the number of support categories, and the output of each neuron corresponds to the score of the query belonging to a certain support category. These scores are normalized by activation and normalization functions to obtain the final intent distribution.

[0140] The overall specific steps are as follows:

[0141] Step 1: Label all collected and cleaned data samples for intent recognition, and divide them according to the amount of data in the intent category. The categories with a data volume greater than 100 are grouped together as Set 1, which is used to build the support set and query set for the training process. The remaining categories with a data volume between 20 and 100 are grouped together as Set 2, which is used to build the support set and query set for the test process.

[0142] Step 2: Build a small sample network for custom intent recognition to train the model. Use StructBert (structurally enhanced Bert) pre-trained in the financial insurance field as the encoder, combined with the designed conversion matching module and multi-layer perceptron to form a complete model framework.

[0143] Sub-step 1: According to the few-shot intent recognition model, configure the corresponding training parameters, including the number of iterations of the training process; the number of categories of input in each iteration and the number of user questions of each category of intent input in the support set; the number of user questions of the corresponding category in the query set in each iteration; the initial training learning rate; and setting Adamw (adaptive momentum optimizer) for back propagation and gradient update in the training process.

[0144] Sub-step 2: Build a data loading module for the few-shot intent recognition model. In the data loading module, the tokenizer method is used to obtain the input format understood by the model, that is, the text data is tokenized to obtain IDs mapped to the predetermined vocabulary index. To support the scenario of selecting the best matching answer from a set of candidate answers required in the model reasoning phase, 5 categories are selected in the data loading module, and 5 user questions are selected from each category as the support set, and 3-8 of the remaining data in these 5 categories are selected and combined as the query set. And use the DataLoader in the Pytorch framework to efficiently perform the data loading process, during which the data is shuffled and processed in parallel.

[0145] Sub-step 3: Model definition. The structure of the few-shot intent recognition model is as follows:

[0146] 1. Input layer: The model consists of Token Embedding, Position Embedding, and Segment Embedding. The character length of the input is defined as 128. Data that is less than the character length is padded with padding, and data that exceeds the length is truncated.

[0147] 2. Encoding layer: The Bert (bidirectional transformer model) used in the encoding layer is composed of 12 layers of Transformer encoders stacked together. Each encoder contains a Self-Attention mechanism and a feedforward neural network structure to abstract the features of the data. At the same time, because the encoder has been pre-trained on massive data in the financial insurance field, it can better capture the features of user speech and make the output results more representative.

[0148] 3. Conversion and matching module: In this module, a method is designed to aggregate the support set in the same category into the feature representation of the current category through attention. In order to prevent the problem of local feature loss, the connection between the support set and the query set is further summarized through the matching module, and then a cyclic attention mechanism is used to further consolidate the features of the data until the corresponding results are finally output.

[0149] 4. Multilayer Perceptron: The similarity scores calculated by the input conversion matching module are linearly transformed through the fully connected layer, and then nonlinear characteristics are introduced through the ReLU (rectified linear unit) activation function. Finally, the results of each corresponding category are converted into a set through the Sigmoid method, in which the probability value of each category is between 0 and 1.

[0150] Step 3: Train the few-shot intent recognition model.

[0151] Sub-step 1: Use Set1 as the training set to train the model. First, randomly select data through the data loading module in each iteration, and select 5 categories for training. In the form of 5-way5-shot, sample 5 data from each of the 5 categories and combine them to form a training list of length 25. Then randomly select 3-8 data from the remaining data in these 5 categories to ensure a total length of 25, and combine them together to form a query set.

[0152] Sub-step 2: Input the support set and query set into the encoder in sequence, and obtain the representation of each sentence in the hidden layer through the 12-layer Transformer encoding. Then, in the conversion matching module, the support set and the query set are separated, the data in the support set are clustered according to the label, and the support label is made into a onehot encoding form. The data corresponding to different categories in the support are summarized through the fusion strategy to obtain the corresponding feature expression for each category. Then, the representation of each class of the support set and the representation of each sentence of the query are activated and the matching score results are generated by linear representation and other strategies. Finally, the result of each sentence in the query is classified as the result that meets the output through the operation of the multi-layer perceptron, and the corresponding result is converted into an output score result between 0 and 1 through the sigmoid function.

[0153] Sub-step 3: Repeat the process of sub-step 2, iterate according to the pre-set number of training iterations and the corresponding training setting parameters, and save the model with the highest accuracy index. After a training is completed, adjust some parameters and retrain in the hope of obtaining the best results.

[0154] Step 4: Use the onnx (Open Neural Network Exchange) framework to convert the pt (PyTorch format) model. Load the trained model and its corresponding weight data. Set the model to evaluation mode and create a simulated input data that is consistent with the actual input data the model is expected to receive. In order to improve model performance and reduce file size, constant folding is enabled when exporting, and dynamic input size is supported, which enhances the flexibility and wide applicability of model deployment.

[0155] Step 5: Deploy the optimal performance model. Upload the model of the onnx (open neural network exchange) structure to the model warehouse, use the service to call it, and complete the call and response tasks of the overall intent recognition system.

[0156] This application example has achieved significant technical effects in the following aspects:

[0157] 1. Improved the accuracy and flexibility of intent recognition.

[0158] Traditional intent recognition systems usually require a large amount of labeled data to achieve good performance. However, in practical applications, especially in the insurance business, it is difficult and time-consuming to obtain a large amount of high-quality labeled data. This system adopts a few-shot learning mechanism, which can achieve high-precision intent classification based on a small number of samples. In addition, the system has the ability to self-learn and adapt to new situations, allowing it to flexibly respond to changing customer needs.

[0159] 2. Enhanced user experience.

[0160] This system is designed with a multi-round dialogue function, which can interact continuously based on contextual understanding and user feedback, allowing the system to communicate with users more naturally. The system can infer the information that the user may have missed based on the content of the previous round of dialogue, and actively ask for supplementary information, thus avoiding the one-question-one-answer mechanical communication that may occur in the traditional single question-and-answer mode, and enhancing the fluency of the dialogue.

[0161] 3. Reduce the pressure of manual service.

[0162] With the system in use, many routine inquiries and simple questions can be automatically handled by the system, which greatly frees up the time and energy of human service personnel, allowing them to focus on more complex or sensitive service issues. In addition, the system can also serve as an auxiliary tool to provide service personnel with real-time data support and suggestions, further improving the professionalism of the service.

[0163] 4. Accelerated service response speed.

[0164] Thanks to the use of efficient information processing algorithms, the system can understand the user's intentions in a very short time and give corresponding replies or solutions. For users, this means that they can get instant feedback, reduce waiting time, and improve overall satisfaction.

[0165] 5. Improved the level of personalized service.

[0166] Based on learning from users' historical interaction records, the system can capture the preferences and habits of each user and provide them with more personalized service recommendations.

[0167] 6. Achieved cost savings.

[0168] By automating a large number of repetitive tasks, the reliance on manpower is reduced, and the cost of human resources is reduced. At the same time, since the system can run uninterruptedly around the clock, it also saves operating time costs.

[0169] 7. Supported decision making.

[0170] The system not only provides instant services, but also accumulates a large amount of data. By analyzing these data, we can gain insights into market trends, predict potential risk points, and provide data support for future product innovation and service optimization.

[0171] The insurance multi-round question-answering few-shot intention recognition system in this application example not only solves many problems existing in traditional service systems, but also promotes the overall improvement of service quality and has significant technical advantages.

[0172] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0173] Based on the same inventive concept, the embodiment of the present application also provides a multi-round conversation intention recognition device based on small sample learning for implementing the multi-round conversation intention recognition method based on small sample learning involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the multi-round conversation intention recognition device based on small sample learning provided below can refer to the limitations of the multi-round conversation intention recognition method based on small sample learning above, and will not be repeated here.

[0174] In an exemplary embodiment, Figure 4 As shown, a multi-round dialogue intention recognition device based on small sample learning is provided. The multi-round dialogue intention recognition device based on small sample learning 400 may include:

[0175] The data annotation module 401 is used to perform intention annotation processing on the historical conversation data in the insurance field to obtain an annotated data set;

[0176] A data selection module 402 is used to select a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set;

[0177] The data sampling module 403 is used to sample the support sample set and the query sample set from the training data set according to the preset data sampling information;

[0178] A model training module 404 is used to iteratively train the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model;

[0179] The model conversion module 405 is used to perform model conversion processing on the trained small sample intent recognition model according to a preset model framework to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current dialogue data.

[0180] In an exemplary embodiment, the data selection module 402 is also used to determine the data volume of each intent category in the annotated data set; select data corresponding to intent categories with a data volume greater than a first preset threshold from the annotated data set as a training data set; select data corresponding to intent categories with a data volume greater than or equal to a second preset threshold and less than or equal to the first preset threshold from the annotated data set as a test data set.

[0181] In an exemplary embodiment, the data sampling module 403 is also used to select a target intent category from the intent categories in the training data set based on the data sampling information; sample a first preset number of data from the data corresponding to the target intent category in the training data set as a support sample set, and sample a second preset number of data as a query sample set.

[0182] In an exemplary embodiment, the small sample intent recognition model to be trained includes a pre-trained language model encoder, a conversion and matching module, and a multi-layer perceptron module; the model training module 404 is used to input the support sample set and the query sample set into the pre-trained language model encoder for feature recognition processing to obtain feature data of the support sample set and feature data of the query sample set; input the feature data of the support sample set into the conversion and matching module for feature aggregation processing to obtain category features of each intent category in the support sample set; perform similarity recognition on the feature data of the query sample set and the category features to obtain similarity information; input the similarity information into the multi-layer perceptron module for intent prediction processing to obtain intent prediction results; according to the intent prediction results, the small sample intent recognition model to be trained is iteratively trained to obtain a trained small sample intent recognition model.

[0183] In an exemplary embodiment, the device 400 also includes: a data input module, which is used to obtain current conversation data; input the current conversation data into a target small sample intention recognition model for intention recognition, and obtain an intention recognition result of the current conversation data.

[0184] In an exemplary embodiment, the data annotation module 401 is further used to perform data cleaning processing on the historical conversation data to obtain cleaned conversation data; and perform intent annotation processing on the cleaned conversation data to obtain an annotated data set.

[0185] Each module in the above-mentioned multi-round dialogue intention recognition device based on small sample learning can be implemented in whole or in part by software, hardware and their combination. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each of the above modules.

[0186] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a multi-round dialogue intention recognition method based on small sample learning is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0187] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0188] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0189] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0190] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0191] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0192] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0193] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A multi-round dialogue intention recognition method based on small sample learning, characterized in that: The method comprises: Perform intent labeling on historical conversation data in the financial field to obtain a labeled dataset; Selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set; According to preset data sampling information, sampling is performed from the training data set to obtain a support sample set and a query sample set; Iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model; According to the preset model framework, the trained small sample intent recognition model is subjected to model conversion processing to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

2. The method according to claim 1, characterized in that The step of selecting a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set includes: Determining the amount of data for each intent category in the annotated data set; Selecting, from the labeled data set, data corresponding to the intent category whose data volume is greater than a first preset threshold as the training data set; From the annotated data set, data corresponding to the intent category whose data volume is greater than or equal to the second preset threshold and less than or equal to the first preset threshold is selected as a test data set.

3. The method according to claim 1, characterized in that The step of sampling the support sample set and the query sample set from the training data set according to the preset data sampling information includes: Selecting a target intent category from the intent categories in the training data set according to the data sampling information; From the data corresponding to the target intent category in the training data set, a first preset amount of data is sampled as the support sample set, and a second preset amount of data is sampled as the query sample set.

4. The method according to claim 1, characterized in that The small sample intention recognition model to be trained includes a pre-trained language model encoder, a conversion matching module and a multi-layer perceptron module; The iterative training of the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain the trained small sample intent recognition model includes: Inputting the support sample set and the query sample set into the pre-trained language model encoder for feature recognition processing to obtain feature data of the support sample set and feature data of the query sample set; Inputting the feature data of the support sample set into the conversion and matching module for feature aggregation processing to obtain the category features of each intent category in the support sample set; Performing similarity identification on the feature data of the query sample set and the category feature to obtain similarity information; Inputting the similarity information into the multi-layer perceptron module for intention prediction processing to obtain an intention prediction result; According to the intention prediction result, the small sample intention recognition model to be trained is iteratively trained to obtain the trained small sample intention recognition model.

5. The method according to claim 1, characterized in that After performing model conversion processing on the trained small sample intent recognition model according to the preset model framework to obtain a target small sample intent recognition model, the method further includes: Obtaining the current conversation data; The current conversation data is input into the target small sample intention recognition model for intention recognition to obtain the intention recognition result of the current conversation data.

6. The method according to any one of claims 1 to 5, characterized in that The historical conversation data in the financial field is subjected to intention labeling to obtain a labeling data set, including: Performing data cleaning on the historical conversation data to obtain cleaned conversation data; The cleaned conversation data is subjected to intent annotation processing to obtain the annotated data set.

7. A multi-round dialogue intention recognition device based on small sample learning, characterized in that: The device comprises: The data annotation module is used to perform intent annotation processing on historical conversation data in the financial field to obtain annotated data sets; A data selection module, used to select a training data set for model training from the annotated data set according to the amount of data of each intent category in the annotated data set; A data sampling module, used to sample a support sample set and a query sample set from the training data set according to preset data sampling information; A model training module, used for iteratively training the small sample intent recognition model to be trained according to the support sample set and the query sample set to obtain a trained small sample intent recognition model; The model conversion module is used to perform model conversion processing on the trained small sample intent recognition model according to a preset model framework to obtain a target small sample intent recognition model; the target small sample intent recognition model is used to perform intent recognition on the current conversation data.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Training sample generation method of intelligent shopping guide dialogue robot and related device

    CN120562550A