Intention classification method, device and computer equipment based on small sample corpus

By constructing labeled and unlabeled sample datasets and training an intent classification model using the template-classification label mapping relationship, the problem of resource-intensive manual annotation in existing technologies is solved, achieving efficient intent classification with a small number of samples and improving the model's generalization and prediction accuracy.

CN114510570BActive Publication Date: 2024-11-22PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210071898.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2024-11-22
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

Existing technologies require a large amount of manually labeled data for intent classification, resulting in a significant expenditure of human, material, and financial resources. It is difficult to achieve efficient intent classification based on a small number of labeled and unlabeled samples.

Method used

Construct labeled and unlabeled sample datasets, train the target weak classification model using the initial weak classification model, construct the second sample dataset and train the initial intent classification model through the template-classification label mapping relationship, and obtain the target intent classification model that does not require fine-tuning.

Benefits of technology

Based on a small number of labeled and unlabeled samples, an intent classification model was achieved without fine-tuning, saving human, material, and financial resources, and improving the model's generalization and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510570B_ABST
    Figure CN114510570B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method, apparatus and computer equipment for intent classification based on a small sample corpus, the method comprising: constructing a first sample data set, the first sample data set comprising a labeled sample data set and an unlabeled sample data set; obtaining multiple initial weak classification models; training each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model; inputting the unlabeled sample data set into each of the target weak classification models to obtain a first predicted classification label; constructing a second sample data set based on the unlabeled sample data set and the first predicted classification label; training the initial intent classification model based on the second sample data set to obtain a target intent classification model, performing intent classification using the target intent classification model, and outputting the classification result. Through the above steps, the present application can achieve relatively accurate intent classification based on a small number of labeled samples and unlabeled samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method, apparatus, and computer equipment for intent classification based on small sample corpus. Background Art

[0002] Intent classification is a crucial function for chatbots. This involves identifying the user's intent. For example, User A asks, "Please check tomorrow's weather." User A's intent is to "check the weather." User B asks, "Hello, what's your name?" User B's intent is to chat. Chatbots must be able to accurately identify user intent to lay the foundation for subsequent processing (such as word slot extraction) and improve user satisfaction.

[0003] Robot intent classification can generally be categorized into chat and task-based approaches. In related technologies, intent classification is typically implemented using supervised learning methods, which require a large amount of manually labeled data. In real-world applications, there is little or no available corpus relevant to actual business operations. While accumulating conversation logs over time can yield relevant corpus data, manually labeling this data consumes significant human, material, and financial resources. Summary of the Invention

[0004] The purpose of this application is to solve the problems of the prior art to at least a certain extent, and to provide an intent classification method, device and computer equipment based on a small sample corpus, which can obtain an intent classification model that does not require fine-tuning based on a small number of labeled samples and unlabeled samples, saving manpower, material and financial resources, and realizing intent classification.

[0005] The technical solutions of the embodiments of this application are as follows:

[0006] In a first aspect, the present application provides a method for intent classification based on a small sample corpus, the method comprising:

[0007] Constructing a first sample data set, the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels;

[0008] Acquire multiple initial weak classification models, where the multiple initial weak classification models are provided with different template-classification label pairs, where the template-classification label pairs are used to represent a mapping relationship between a template and a classification label;

[0009] Training each of the initial weak classification models based on the labeled sample data set to obtain target weak classification models corresponding to the multiple initial weak classification models one by one;

[0010] Input each second sample corpus in the unlabeled sample data set into each of the target weak classification models to obtain a first predicted classification label corresponding to the second sample corpus output by each of the target weak classification models;

[0011] constructing a second sample data set based on all the second sample corpora and the first predicted classification label corresponding to each of the second sample corpora;

[0012] Training the initial intent classification model based on the second sample data set to obtain a target intent classification model;

[0013] The target intent classification model is used to perform intent classification and output the intent classification result.

[0014] According to some embodiments of the present application, the labeled sample dataset includes a labeled sample training set and a labeled sample test set;

[0015] The training of each of the initial weak classification models based on the labeled sample data set to obtain target weak classification models corresponding to the multiple initial weak classification models includes:

[0016] Training each of the initial weak classification models based on the labeled sample training set to obtain target weak classification models corresponding to the multiple initial weak classification models one by one;

[0017] After obtaining the target weak classification models corresponding to the multiple initial weak classification models one by one, the method further includes:

[0018] Traverse each of the target weak classification models, and perform the following processing on the currently traversed target weak classification model:

[0019] Inputting each first sample corpus in the labeled sample test set into the target weak classification model, so that the target weak classification model outputs a second predicted classification label corresponding to each first sample corpus;

[0020] The prediction accuracy of the target weak classification model is determined according to the second predicted classification label and the annotated label corresponding to each of the first sample corpora.

[0021] According to some embodiments of the present application, the training of each of the initial weak classification models based on the labeled sample training set to obtain target weak classification models corresponding to the multiple initial weak classification models includes:

[0022] Inputting each first sample corpus of the labeled sample training set into the initial weak classification model so that the initial weak classification model outputs a third predicted classification label;

[0023] Determining a value of a first loss function of the initial weak classification model according to the third predicted classification label and the annotated label corresponding to each of the first sample corpora;

[0024] When the value of the first loss function meets the preset training end condition, the training is ended to obtain the target weak classification model;

[0025] When the value of the first loss function does not meet the preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continued to be trained based on the labeled sample training set.

[0026] According to some embodiments of the present application, constructing a second sample dataset based on all the second sample corpora and the first predicted classification label corresponding to each of the second sample corpora includes:

[0027] Determining the first predicted classification label corresponding to each of the second sample corpora according to the prediction accuracy of each of the target weak classification models and the fourth predicted classification label output by each of the target weak classification models;

[0028] The second sample data set is constructed according to all the second sample corpora and the first predicted classification labels corresponding to each of the second sample corpora.

[0029] According to some embodiments of the present application, the first predicted classification label corresponding to each second sample corpus is determined based on the prediction accuracy of each target weak classification model and the fourth predicted classification label output by each target weak classification model, and the calculation formula is:

[0030]

[0031] Wherein, ω(p) represents the prediction accuracy, S p (L|X) represents the fourth predicted classification label, P represents the template-classification label pair, x represents the second sample corpus, and l represents the first predicted classification label.

[0032] According to some embodiments of the present application, the training of the initial intent classification model based on the second sample dataset to obtain the target intent classification model includes:

[0033] Inputting each second sample corpus of the second sample data set into the initial intent classification model, so that the initial intent classification model outputs a fifth predicted classification label;

[0034] determining a value of a second loss function of the initial intent classification model according to the fifth predicted classification label and the first predicted classification label corresponding to each of the second sample corpora;

[0035] When the value of the second loss function meets a preset training end condition, the training is ended to obtain the target intent classification model;

[0036] When the value of the second loss function does not meet the preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continued to be trained based on the labeled sample training set.

[0037] According to some embodiments of the present application, determining the value of the second loss function of the initial intent classification model based on the fifth predicted classification label and the first predicted classification label corresponding to each second sample corpus includes:

[0038] Calculating the distance between the distribution of the fifth predicted classification label and the distribution of the first predicted classification label using KL divergence to obtain a KL divergence value;

[0039] Determine a value of the second loss function according to the KL divergence value.

[0040] In a second aspect, the present application provides an intent classification device based on a small sample corpus, comprising:

[0041] A data set construction module is used to construct a first sample data set, wherein the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels;

[0042] A model acquisition module is used to acquire multiple initial weak classification models, wherein the multiple initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to represent the mapping relationship between the template and the classification label;

[0043] A first training module is configured to train each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models;

[0044] a data labeling module, configured to input each second sample corpus in the unlabeled sample data set into each of the target weak classification models, and obtain a first predicted classification label corresponding to the second sample corpus output by each of the target weak classification models;

[0045] The data set construction module is further configured to construct a second sample data set based on all the second sample corpora and the first predicted classification label corresponding to each of the second sample corpora;

[0046] A second training module is used to train the initial intent classification model based on the second sample data set to obtain a target intent classification model;

[0047] The processing module is used to perform intent classification using the target intent classification model and output the intent classification result.

[0048] In a third aspect, the present application provides a computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more of the processors, the one or more processors execute the steps of any one of the methods described in the first aspect above.

[0049] In a fourth aspect, the present application also provides a computer-readable storage medium, which can be read and written by a processor, and the storage medium stores computer instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of any one of the methods described in the first aspect above.

[0050] The technical solutions provided in the embodiments of the present application have the following beneficial effects:

[0051] In an embodiment of the present application, a first sample data set is constructed, which includes a labeled sample data set and an unlabeled sample data set; multiple initial weak classification models are obtained, and the multiple initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to characterize the mapping relationship between the template and the classification label; each initial weak classification model is trained based on the above-mentioned labeled sample data set to obtain a target weak classification model corresponding to the multiple initial weak classification models one by one, and the text filling form is realized through the template-classification label pairs, which can improve the accuracy of predicted vocabulary; for each second sample corpus in the above-mentioned unlabeled sample data set, it is input into each target weak classification model to obtain the first predicted classification label corresponding to the second sample corpus output by each target weak classification model; based on all the second sample corpora and the first predicted classification labels corresponding to each second sample corpus, a second sample data set is constructed; based on the second sample data set, the initial intent classification model is trained to obtain a target intent classification model, thereby increasing the generalization of the model, and the above-mentioned target intent classification model is used to perform intent classification, and the intent classification result is output. The embodiment of the present application can obtain an intent classification model that does not require fine-tuning based on a small number of labeled samples and unlabeled samples, saving manpower, material and financial resources and realizing intent classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flowchart of an intent classification method based on a small sample corpus provided by an embodiment of the present application;

[0053] Figure 2 yes Figure 1 Schematic diagram of the sub-step flow of step S130;

[0054] Figure 3 is a flowchart of an intent classification method based on a small sample corpus provided by another embodiment of the present application;

[0055] Figure 4 yes Figure 2 Schematic diagram of the sub-step flow of step S131;

[0056] Figure 5 yes Figure 1 Schematic diagram of the sub-step flow of step S150;

[0057] Figure 6 yes Figure 1 Schematic diagram of the sub-step flow of step S160;

[0058] Figure 7 yes Figure 6 Schematic diagram of the sub-step flow of step S162;

[0059] Figure 8This is a schematic diagram of the structure of an intention classification device based on a small sample corpus provided by an embodiment of the present application;

[0060] Figure 9 This is a schematic diagram of the initial weak classification network structure of an intent classification device based on a small sample corpus provided by an embodiment of the present application;

[0061] Figure 10 This is a schematic diagram of a target weak classification network structure of an intent classification device based on a small sample corpus provided by an embodiment of the present application;

[0062] Figure 11 This is a schematic diagram of the initial intent classification network structure of an intent classification device based on a small sample corpus provided by an embodiment of the present application;

[0063] Figure 12 It is a structural diagram of the computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0065] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

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

[0067] Artificial intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0068] Natural Language Processing (NLP): Natural language processing refers to the technology of using the natural language used by humans to communicate with machines. Through human processing of natural language, computers can read and understand it. Research on natural language processing began with human exploration of machine translation. Although natural language processing involves multi-dimensional operations such as speech, grammar, semantics, and pragmatics, in simple terms, the basic task of natural language processing is to segment the processed corpus based on ontology dictionaries, word frequency statistics, contextual semantic analysis, etc., to form semantically rich word units with the smallest part of speech as the unit.

[0069] Prompt template: Given input text x, a function f(x) converts it into a specified format. This involves two steps: using a template, typically a piece of natural language, with two empty slots: [X] for input x and [Z] for answer z; then filling the [X] slot with input x. Prompts have an empty slot for the answer, typically mid-sentence or at the end. If mid-sentence, the prompt is called a cloze prompt; if it's at the end, it's called a prefix prompt. The placement and number of [X] and [Z] can affect the result, so they can be adjusted flexibly as needed. Template formats can be manually defined based on actual business needs, or automatically defined through neural networks.

[0070] Bidirectional Encoder Representation from Transformers (BERT): The BERT model is an NLP model that further enhances the generalization capabilities of word vector models, fully describing features at the character, word, sentence, and even inter-sentence levels. It is built on top of the Transformer. BERT uses three embeddings: TokenEmbedding, SegmentEmbedding, and PositionEmbedding. TokenEmbeddings are word embeddings, with the first word being a CLS marker, which can be used for subsequent classification tasks. SegmentEmbeddings are used to distinguish between two sentences, as pre-training involves not only performing LM but also classification tasks with two sentences as input. PositionEmbeddings, however, are not trigonometric functions like in Transformers, but are learned by BERT during training. However, BERT directly trains a position embedding to preserve position information. A vector is randomly initialized for each position and then included in model training, resulting in an embedding that includes position information. BERT then directly concatenates these position embeddings with the word embeddings.

[0071] Loss function: A loss function maps the value of a random event or its related random variables to a non-negative real number to represent the "risk" or "loss" of the random event. In applications, loss functions are often used as learning criteria in conjunction with optimization problems, that is, solving and evaluating models by minimizing the loss function.

[0072] Cross-Entropy Loss (Binary Cross-Entropy Loss): The cross-entropy loss function predicts the difference between the true value and the predicted value, and the loss value is used to judge the quality of the prediction model. The cross-entropy loss function is often used in classification problems, especially when neural networks are used for classification. In addition, because cross-entropy involves calculating the probability of each category, it is almost always used together with the sigmoid (or softmax) function. In the binary classification case, the model only needs to predict two possible outcomes: the predicted probabilities for each category are p and 1-p.

[0073] KL Divergence (Kullback-Leibler Divergence) loss function: The KL divergence loss function is an asymmetric measure of the difference between two probability distributions. The loss value is used to determine the difference between the two distributions. When the two random distributions are identical, their relative entropy is zero. When the difference between the two random distributions increases, their relative entropy also increases. KL divergence can be used to compare text similarity. First, count the word frequencies and then calculate the KL divergence.

[0074] Based on this, the embodiments of the present application provide an intent classification method, apparatus, and computer device based on a small sample corpus, which can obtain an intent classification model that does not require fine-tuning based on a small number of labeled samples and unlabeled samples, thereby realizing intent classification.

[0075] The intent classification method based on a small sample corpus provided in the embodiment of the present application can acquire and process relevant data based on artificial intelligence technology (AI). AI is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. With the research and progress of artificial intelligence technology, artificial intelligence technology has been widely studied and applied in many fields. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0076] Embodiments of the present application can be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0077] See also Figure 1 , Figure 1The flowchart of a method for classifying intent based on a small sample corpus provided in an embodiment of the present application is shown. The method includes but is not limited to steps S110, S120, S130, S140, S150, S160, and S170.

[0078] Step S110: construct a first sample data set, which includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes multiple first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes multiple second sample corpora without annotated labels.

[0079] It is understandable that in industrial application scenarios, there may not be corpus data related to actual business. The corresponding corpus data is accumulated over a period of time to construct a first sample data set. The first sample data set includes a small portion of the labeled sample data set τ1 and the remaining portion of the unlabeled sample data set τ2 in the first sample data set. The labeled sample data set is manually labeled. Since the labeled sample data set contains a small amount of first sample corpus, the time spent on manual labeling is relatively short. The above setting can solve the problem of manually labeling large amounts of data, which consumes a lot of manpower, material resources, and financial resources, saving manual work time.

[0080] It should be noted that the first sample data set is a collection of actual business scenario corpus; the first sample corpus and the second sample corpus can be text data in the business scenario or voice data. If it is voice data, text information extraction is required for the voice data, which is not elaborated here. Other forms of data can also be converted into text data.

[0081] Step S120 , obtaining a plurality of initial weak classification models, wherein the plurality of initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to represent a mapping relationship between a template and a classification label.

[0082] It is understandable that each different template-category label pair includes a prompt template and a mapping relationship between the text vocabulary and labels (Verbmap). The prompt template and Verbmap can be manually formatted according to the actual business scenario, or they can be automatically formatted by the model. For example, in the classification of chat-type and task-type intents, the above template-category label pair setting method is described. The label y = {y_1, y_2}, where y_1 represents a chat-type intent and y_2 represents a task-type intent. For the input "what is your name", the prompt template can be defined in the following two ways: P1(a) = It was [mask]. what is your name? P2(a) = what is your name? was [mask]. Among them, P1(a) represents one way and P2(a) represents another way. The value at [mask] is a word from the vocabulary, such as "chat" and "task." "Chat" corresponds to the "chatting" intent, and "task" corresponds to the "task-based" intent. The mapping from this word to the label y is represented by V: V("chatting") = "chat," and V("task-based") = "task." Based on actual business scenarios, the above settings create multiple template-category label pairs, denoted as (Pn, Vn). These template-category label pairs can be used for subsequent operations.

[0083] Step S130 , training each initial weak classification model based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models.

[0084] In some embodiments, the labeled sample dataset includes a labeled sample training set and a labeled sample test set. Figure 2 and Figure 9 , training each initial weak classification model based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models, including but not limited to the following steps:

[0085] Step S131 : training each initial weak classification model based on the labeled sample training set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models.

[0086] It is understandable that when inputting the labeled sample training set into the initial weak classification model, the first sample corpus in the labeled sample training set can be input into the initial weak classification model one at a time, or the first sample corpus in the labeled sample training set can be input into the initial weak classification model at a time according to a preset batch size, wherein the preset batch size can be 4 or 8, and the batch size can also be modified according to the actual training situation. By training the initial weak classification model, a target weak classification model corresponding to each of the multiple initial weak classification models is obtained, and the target weak classification model can be used for subsequent operations. Moreover, since the classification training is performed on a small amount of labeled corpus, the above training process consumes less time and resources.

[0087] It should be noted that before inputting each first sample corpus of the labeled sample training set into the initial weak classification model, each first sample corpus is converted into a word vector, or other format conversions can be performed as long as the input format of the initial weak classification model is met.

[0088] refer to Figure 4 and Figure 10 , training each initial weak classification model based on the labeled sample training set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models, including but not limited to the following steps:

[0089] Step S1311: input each first sample corpus of the labeled sample training set into the initial weak classification model, so that the initial weak classification model outputs a third predicted classification label.

[0090] It can be understood that the initial weak classification model includes a pretraining language model (PLM); a fully connected layer (FC); and a softmax layer. The pretraining language model performs feature extraction and word vector prediction on the first sample corpus in the input labeled sample training set. The fully connected layer fuses multiple feature vectors output by the pretraining language model, and then inputs the fusion result into the softmax layer, which outputs the predicted probability. The first sample corpus is input into the initial weak classification model so that the initial weak classification model outputs a third predicted classification label, which is represented by Y1 and Y2. There are multiple initial weak classification models, and the pre-trained language model corresponds to the initial weak classification model. A pre-trained language model corresponds to a template-classification label pair described above. The initial weak classification model is a deep learning model or a shallow neural network model, which can fully extract the features of the first sample corpus. The pre-trained model also includes the vocabulary described in step S120. The words in the vocabulary are used to fill in the [mask] position in the prompt template. Combined with the template-classification label pair, the initial weak classification model is guided to predict the third predicted classification label, thereby improving the accuracy of the predicted vocabulary filled in the prompt template.

[0091] It should be noted that the pre-trained model can be BERT, a robustly optimized BERT pre-training method (Roberta), or other neural network models that can be applied to natural language processing for vocabulary prediction. Roberta is based on BERT with the following adjustments: longer training time, larger batch size, more training data; removal of the next prediction loss; longer training sequences; and a dynamic masking mechanism.

[0092] It should also be noted that the third predicted classification label is the label output by the initial weak classification model when the initial weak classification model is input as a labeled sample training set.

[0093] Step S1312: Determine the value of the first loss function of the initial weak classification model according to the third predicted classification label and the annotation label corresponding to each first sample corpus.

[0094] It is understandable that the cross entropy loss function is used to calculate the third predicted classification label and the annotated label to obtain the value of the first loss function. The weights and biases are back-propagated and derivatized based on the value of the first loss function, thereby updating the parameters of the initial weak classification model to obtain the target weak classification model. Other loss functions for classification can also be used, which will not be described here.

[0095] It should be noted that the value of the first loss function is obtained by inputting the first sample corpus into the initial weak classification model to output the third predicted classification label, and calculating the third predicted classification label and the annotated label.

[0096] Step S1313: When the value of the first loss function meets the preset training end condition, the training is ended to obtain the target weak classification model.

[0097] It is understood that the training termination condition can be that the value of the first loss function is less than a preset loss value, thereby terminating the training; the training termination condition can also be the number of training iterations. For example, the preset number of training iterations is 1000, and the training is terminated when the loop parameter reaches the preset number of training iterations; other training termination conditions can also be used, as long as the training can be terminated. After the training is completed, the target weak classification model is output, and the target weak classification model is used for subsequent calculations.

[0098] Step S1314: When the value of the first loss function does not meet the preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continued to be trained based on the labeled sample training set.

[0099] It is understandable that the labeled sample training set is input into the initial weak classification model to continue training. If the value of the first loss function cannot end the training after multiple trainings, the number of training iterations is used as the end training condition. When the preset number of trainings is reached, regardless of whether the value of the first loss function meets the preset training end condition, the training is ended to obtain the target weak classification model. By combining different training end conditions, the infinite loop problem can be avoided. Among them, multiple times means that the number of trainings is greater than 100,000, and this value can be modified according to actual conditions. Other combinations can also be used as long as the infinite loop problem can be avoided.

[0100] refer to Figure 3 , Figure 3 A flow chart of an intention classification method based on a small sample corpus provided by an embodiment of the present application is shown. After obtaining the target weak classification model corresponding to multiple initial weak classification models one by one, the intention classification method based on a small sample corpus of the above embodiment also includes but is not limited to step S210, step S220 and step S230.

[0101] Step S210 , traverse each target weak classification model, and execute steps S220 and S230 for the currently traversed target weak classification model.

[0102] Step S220 : input each first sample corpus in the labeled sample test set into the target weak classification model, so that the target weak classification model outputs a second predicted classification label corresponding to each first sample corpus.

[0103] It can be understood that the target weak classification model is obtained by training the above-mentioned initial weak classification model, and each first sample corpus of the labeled sample test set is input into the target weak classification model. The first sample corpus in the labeled sample test set can be input into the target weak classification model one at a time, or the first sample corpus in the labeled sample test set can be input into the target weak classification model at one time according to a preset batch size, wherein the preset batch size can be 2 or 4, and the batch size can be modified according to the actual training situation. Using a small amount of labeled corpus to test the target weak classification model can save time and resources consumed in the testing process.

[0104] It should be noted that before inputting each first sample corpus of the labeled sample test set into the target weak classification model, each first sample corpus is converted into a word vector, or other format conversions can be performed to meet the input format of the target weak classification model.

[0105] It should also be noted that the second predicted classification label is the label output by the target weak classification model when the input target weak classification model is a labeled sample test set.

[0106] Step S230 : determining the prediction accuracy of the target weak classification model according to the second predicted classification labels and the annotation labels corresponding to each first sample corpus.

[0107] It is understood that, according to step S220, the second predicted classification label is obtained. For example, the first sample corpus in the labeled sample test set is input into the target weak classification model one at a time to obtain the corresponding second predicted classification label. The value corresponding to the second predicted classification label is divided by the value corresponding to the labeled label to obtain the corresponding prediction accuracy, which is expressed as ωn. The accuracy calculation can also be performed in a batch processing manner, and other accuracy calculation methods can also be used, which are not described in detail here. The accuracy obtained in the above manner is convenient for subsequent solution and calculation.

[0108] Step S140: input each second sample corpus in the unlabeled sample data set into each target weak classification model to obtain a first predicted classification label corresponding to the second sample corpus output by each target weak classification model.

[0109] It is understandable that the target weak classification model is obtained by training the above-mentioned initial weak classification model, and the unlabeled sample data set is input into the target weak classification model. The input method is similar to step S131 and step S220 and will not be repeated here. Through this step, the first predicted classification label corresponding to the second sample corpus can be obtained, and the unlabeled second sample corpus can be converted into a second sample corpus with the first predicted classification label. There is no need for manual participation in data annotation, which saves manpower, material and financial resources, and realizes model enhancement and improves the generalization of the model.

[0110] It should be noted that before inputting each second sample corpus of the unlabeled sample data set into the target weak classification model, each second sample corpus is converted into a word vector, or other format conversions can be performed to meet the input format of the target weak classification model.

[0111] It should also be noted that the first predicted classification label is the soft label that is finally output by the target weak classification model when the input target weak classification model is an unlabeled sample data set, that is, the first predicted classification label is the label of the second sample corpus corresponding to the first predicted classification label.

[0112] Step S150 : constructing a second sample data set based on all second sample corpora and the first predicted classification label corresponding to each second sample corpus.

[0113] refer to Figure 5 , based on all second sample corpora and the first predicted classification labels corresponding to each second sample corpus, constructing a second sample dataset, including but not limited to the following steps:

[0114] Step S151 : determining the first predicted classification label corresponding to each second sample corpus according to the prediction accuracy of each target weak classification model and the fourth predicted classification label output by each target weak classification model.

[0115] It can be understood that, given the second sample corpus X in the input unlabeled sample dataset, and inputting it into each target weak classification model, the target weak classification model outputs the fourth predicted classification label, and the fourth predicted classification label L is represented by S p (L|X)=M(V(L)|P(X)), where P(X) represents the prompt template information, V(L) represents the mapping between the text's vocabulary and labels, and M represents the target classification model. Combined with the prediction accuracy obtained in step S230, a weighted summation operation is performed on the prediction accuracy and the fourth predicted classification label to obtain the first predicted classification label corresponding to each second sample corpus. This process converts unlabeled second sample corpus into second sample corpus with first predicted classification labels, eliminating the need for manual data annotation and saving manpower, material, and financial resources.

[0116] It should be noted that the fourth predicted classification label is the label output by the intermediate process of the target weak classification model when the input target weak classification model is an unlabeled sample data set.

[0117] In some embodiments, according to some embodiments of the present application, the first predicted classification label corresponding to each second sample corpus is determined based on the prediction accuracy of each target weak classification model and the fourth predicted classification label output by each target weak classification model. The calculation formula is:

[0118]

[0119] Among them, ω(p) represents the prediction accuracy, S p (L|X) represents the fourth predicted classification label, P represents the template-classification label pair, x represents the second sample corpus, and l represents the first predicted classification label.

[0120] It should be noted that the data set consisting of all the second sample corpora and the fourth predicted classification labels corresponding to each second sample corpus is expressed as τ2n.

[0121] Step S152 : constructing a second sample data set according to all second sample corpora and the first predicted classification label corresponding to each second sample corpus.

[0122] It should be noted that all second sample corpora in the second sample dataset have corresponding first predicted classification labels. The second dataset is denoted as τ′2. The second sample dataset is an unlabeled sample dataset τ2 obtained based on actual business scenarios. After the second sample corpora are processed by the target classification model, the resulting set consists of second sample corpora annotated with the first predicted labels.

[0123] Step S160: training the initial intent classification model based on the second sample data set to obtain a target intent classification model.

[0124] refer to Figure 6 and Figure 11 , training the initial intent classification model based on the second sample data set to obtain a target intent classification model, including but not limited to the following steps:

[0125] Step S161: input each second sample corpus of the second sample data set into the initial intent classification model, so that the initial intent classification model outputs a fifth predicted classification label.

[0126] It is understood that the initial intent classification model has a similar structure to the initial weak classification model in step S130 and will not be described in detail here. The initial intent classification model is a deep learning model, or a shallow neural network model, that can fully extract the features of the second sample corpus and, combined with the template-classification label pair, guide the initial intent classification model to make predictions, thereby improving the accuracy of predicting the vocabulary to be filled in the prompt template.

[0127] It should be noted that the fifth predicted classification label is the label predicted output by the initial intent classification model when the initial intent classification model inputs the second sample corpus labeled with the first predicted classification label in the second sample data set.

[0128] Step S162: Determine the value of the second loss function of the initial intent classification model based on the fifth predicted classification label and the first predicted classification label corresponding to each second sample corpus.

[0129] according to Figure 7 , determining the value of the second loss function of the initial intent classification model based on the fifth predicted classification label and the first predicted classification label corresponding to each second sample corpus, including but not limited to the following steps:

[0130] Step S1621, using KL divergence to calculate the distance between the distribution of the fifth predicted classification label and the distribution of the first predicted classification label to obtain a KL divergence value;

[0131] Step S1622: Determine the value of the second loss function according to the KL divergence value.

[0132] It is understandable that the KL divergence is used to calculate the distance between the distribution of the fifth predicted classification label and the distribution of the first predicted classification label to obtain the KL divergence value. The KL divergence values ​​are summed and then averaged. Alternatively, the KL divergence values ​​can be added to the cross entropy loss function and then averaged to obtain the value of the second loss function. By backpropagating and derivatizing the weights and biases based on the value of the second loss function, the parameters of the initial intent classification model are updated to obtain the target intent classification model. Other loss functions that include KL divergence can also be used, which will not be described in detail here.

[0133] It should be noted that the value of the second loss function is the distribution similarity value obtained by inputting the second sample corpus into the initial intent classification model to output the fifth predicted classification label, and calculating the fifth predicted classification label and the first predicted classification label through KL divergence.

[0134] Step S163: When the value of the second loss function meets the preset training end condition, the training is ended to obtain the target intent classification model.

[0135] It should be noted that if the value of the second loss function meets the preset training end condition, subsequent operations are performed in a similar manner to step S1313 and are not described here. After the training is completed, a target intent classification model that does not require fine-tuning can be obtained for subsequent intent classification tasks.

[0136] Step S164: When the value of the second loss function does not meet the preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continued to be trained based on the labeled sample training set.

[0137] It should be noted that if the value of the second loss function does not meet the preset training end condition, the subsequent operations are performed in a similar manner to step S1314, which is not described here. According to the training end condition, the infinite loop training problem can be avoided to obtain the target intent classification model.

[0138] Step S170: perform intent classification using the target intent classification model and output the intent classification result.

[0139] It should be noted that by inputting corpus data obtained from actual business scenarios into the target intent classification model described above, it is possible to obtain intent classification for the input corpus, which can be used for subsequent processing to improve user satisfaction. The target intent classification model described above can be used to input corpus data from different scenarios and provide relatively accurate intent classification results, showing good generalization.

[0140] It should also be noted that, by constructing a first sample data set, the first sample data set includes a labeled sample data set and an unlabeled sample data set; obtaining multiple initial weak classification models, and multiple initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to characterize the mapping relationship between the template and the classification label; based on the above-mentioned labeled sample data set, each initial weak classification model is trained to obtain a target weak classification model corresponding to the multiple initial weak classification models one by one, and the text filling form is realized through the template-classification label pairs, which can improve the accuracy of predicted vocabulary; for each second sample corpus in the above-mentioned unlabeled sample data set, it is input into each target weak classification model to obtain the first predicted classification label corresponding to the second sample corpus output by each target weak classification model; based on all second sample corpora and the first predicted classification labels corresponding to each second sample corpus, a second sample data set is constructed; based on the second sample data set, the initial intent classification model is trained to obtain the target intent classification model, thereby increasing the generalization of the model, and the above-mentioned target intent classification model is used to perform intent classification, and the intent classification result is output. The embodiment of the present application can obtain an intent classification model that does not require fine-tuning based on a small number of labeled samples and unlabeled samples, saving manpower, material and financial resources and realizing intent classification.

[0141] refer to Figure 8 , Figure 8 FIG. 1 is a schematic diagram showing the structure of an apparatus 100 for classifying intent based on a small sample corpus provided in one embodiment of the present application. The apparatus 100 includes:

[0142] The data set construction module 110 is used to construct a first sample data set, wherein the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels;

[0143] The model acquisition module 120 is used to acquire multiple initial weak classification models, each of which is provided with different template-classification label pairs, where the template-classification label pairs are used to represent a mapping relationship between a template and a classification label;

[0144] The first training module 130 is used to train each initial weak classification model based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models;

[0145] The data labeling module 140 is configured to input each second sample corpus in the unlabeled sample data set into each target weak classification model to obtain a first predicted classification label corresponding to the second sample corpus output by each target weak classification model;

[0146] The data set construction module 110 is further configured to construct a second sample data set based on all second sample corpora and the first predicted classification label corresponding to each second sample corpus;

[0147] A second training module 150 is configured to train the initial intent classification model based on the second sample data set to obtain a target intent classification model;

[0148] The processing module 160 is used to perform intent classification using the target intent classification model and output the intent classification result.

[0149] It can be understood that the data set construction module 110 is used to construct a first sample data set, and the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels; the model acquisition module 120 is used to obtain a plurality of initial weak classification models, and the plurality of initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to characterize the mapping relationship between the template and the classification label; the first training module 130 is used to train each initial weak classification model based on the labeled sample data set, and obtain the data corresponding to the plurality of initial weak classification models. The target weak classification model is corresponding to each initial weak classification model one by one; the data annotation module 140 inputs each second sample corpus in the unlabeled sample data set into each target weak classification model, and obtains the first predicted classification label corresponding to the second sample corpus output by each target weak classification model; the data set construction module 110 constructs a second sample data set based on all second sample corpora and the first predicted classification label corresponding to each second sample corpus; the second training module 150 trains the initial intent classification model based on the second sample data set to obtain a target intent classification model, and the processing module 160 uses the above-mentioned target intent classification model to perform intent classification and output the intent classification result. This embodiment can obtain an intent classification model that does not require fine-tuning based on a small number of labeled samples and a large number of unlabeled samples, thereby achieving intent classification.

[0150] It should be noted that the target intent classification model trained by the above-mentioned device 100 is input into the above-mentioned target intent classification model by inputting the corpus data obtained in the actual business scenario to obtain the intent classification of the input corpus data, and the intent classification is used for subsequent processing to improve user satisfaction. The target intent classification model trained by the above-mentioned device 100 can perform intent classification on the sample corpus inputted in any scenario and output a relatively accurate intent classification result.

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

[0152] Figure 12 The computer device 500 provided in an embodiment of the present application is shown. The computer device 500 may be a server or a terminal. The internal structure of the computer device 500 includes but is not limited to:

[0153] Memory 510, used for storing programs;

[0154] The processor 520 is used to execute the program stored in the memory 510. When the processor 520 executes the program stored in the memory 510, the processor 520 is used to execute the above-mentioned intention classification method based on small sample corpus.

[0155] The processor 520 and the memory 510 may be connected via a bus or other means.

[0156] Memory 510, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the small sample corpus-based intent classification method described in any embodiment of the present invention. Processor 520 implements the small sample corpus-based intent classification method described above by running the non-transitory software program and instructions stored in memory 510.

[0157] The memory 510 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store and execute the above-mentioned intention classification method based on a small sample corpus. In addition, the memory 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 510 may optionally include a memory remotely located relative to the processor 520, and these remote memories may be connected to the processor 520 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0158] The non-transient software programs and instructions required to implement the above-mentioned intention classification method based on small sample corpus are stored in the memory 510. When executed by one or more processors 520, the intention classification method based on small sample corpus provided by any embodiment of the present invention is executed.

[0159] An embodiment of the present application also provides a computer-readable storage medium storing computer-executable instructions, which are used to execute the above-mentioned intention classification method based on small sample corpus.

[0160] In one embodiment, the storage medium stores computer-executable instructions, which are executed by one or more control processors 520, for example, by a processor 520 in the above-mentioned computer device 500, so that the above-mentioned one or more processors 520 can execute the intention classification method based on small sample corpus provided by any embodiment of the present invention.

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

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

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

[0164] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0165] The above is a detailed description of the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A method for intent classification based on a small sample corpus, characterized in that: The method comprises: Constructing a first sample data set, the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels; Acquire multiple initial weak classification models, wherein the multiple initial weak classification models are provided with different template-classification label pairs, and the template-classification label pairs are used to characterize a mapping relationship between a template and a classification label; Training each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models; For each second sample corpus in the unlabeled sample data set, input it into each of the target weak classification models to obtain a first predicted classification label corresponding to the second sample corpus output by each of the target weak classification models; constructing a second sample data set based on all the second sample corpora and the first predicted classification label corresponding to each of the second sample corpora; Training the initial intent classification model based on the second sample data set to obtain a target intent classification model; Using the target intent classification model to perform intent classification, and outputting intent classification results; The labeled sample data set includes a labeled sample training set and a labeled sample test set; The training of each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models comprises: Training each of the initial weak classification models based on the labeled sample training set to obtain target weak classification models corresponding to the multiple initial weak classification models one by one; After obtaining the target weak classification models corresponding to the multiple initial weak classification models one by one, the method further includes: Each of the target weak classification models is traversed, and the following processing is performed for the currently traversed target weak classification model: Inputting each first sample corpus in the labeled sample test set into the target weak classification model, so that the target weak classification model outputs a second predicted classification label corresponding to each first sample corpus; The prediction accuracy of the target weak classification model is determined according to the second predicted classification labels and the annotated labels corresponding to each of the first sample corpora.

2. The method according to claim 1, characterized in that The training of each of the initial weak classification models based on the labeled sample training set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models comprises: Inputting each first sample corpus of the labeled sample training set into the initial weak classification model so that the initial weak classification model outputs a third predicted classification label; Determining a value of a first loss function of the initial weak classification model according to the third predicted classification label and the annotated label corresponding to each of the first sample corpora; When the value of the first loss function satisfies a preset training end condition, the training is ended to obtain the target weak classification model; When the value of the first loss function does not satisfy a preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continuously trained based on the labeled sample training set.

3. The method according to claim 1, characterized in that The constructing a second sample data set based on all the second sample corpora and the first predicted classification labels corresponding to each of the second sample corpora includes: Determining the first predicted classification label corresponding to each of the second sample corpora according to the prediction accuracy of each of the target weak classification models and the fourth predicted classification label output by each of the target weak classification models; The second sample data set is constructed according to all the second sample corpora and the first predicted classification labels corresponding to each of the second sample corpora.

4. The method according to claim 1, characterized in that: The training of the initial intent classification model based on the second sample data set to obtain a target intent classification model includes: Inputting each second sample corpus of the second sample data set into the initial intent classification model, so that the initial intent classification model outputs a fifth predicted classification label; Determining a value of a second loss function of the initial intent classification model according to the fifth predicted classification label and the first predicted classification label corresponding to each of the second sample corpora; When the value of the second loss function satisfies a preset training end condition, the training is ended to obtain the target intent classification model; When the value of the second loss function does not satisfy a preset training end condition, the model parameters of the initial weak classification model are adjusted, and the initial weak classification model is continuously trained based on the labeled sample training set.

5. The method according to claim 4, characterized in that The determining, according to the fifth predicted classification labels and the first predicted classification labels corresponding to each of the second sample corpora, a value of the second loss function of the initial intent classification model includes: Calculate the distance between the distribution of the fifth predicted classification label and the distribution of the first predicted classification label using KL divergence to obtain a KL divergence value; According to the KL divergence value, a value of the second loss function is determined.

6. An intention classification device based on a small sample corpus, characterized in that: include: A data set construction module is used to construct a first sample data set, wherein the first sample data set includes a labeled sample data set and an unlabeled sample data set, wherein the labeled sample data set includes a plurality of first sample corpora and annotated labels corresponding to the first sample corpora, and the unlabeled sample data set includes a plurality of second sample corpora without annotated labels; A model acquisition module, used to acquire a plurality of initial weak classification models, wherein the plurality of initial weak classification models are provided with different template-classification label pairs, wherein the template-classification label pairs are used to characterize a mapping relationship between a template and a classification label; A first training module is used to train each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models; A data annotation module, for inputting each second sample corpus in the unlabeled sample data set into each of the target weak classification models to obtain a first predicted classification label corresponding to the second sample corpus output by each of the target weak classification models; The data set construction module is further used to construct a second sample data set based on all the second sample corpora and the first predicted classification label corresponding to each of the second sample corpora; A second training module is used to train the initial intent classification model based on the second sample data set to obtain a target intent classification model; A processing module, used to perform intent classification using the target intent classification model and output intent classification results; The labeled sample data set includes a labeled sample training set and a labeled sample test set; The training of each of the initial weak classification models based on the labeled sample data set to obtain a target weak classification model corresponding to each of the multiple initial weak classification models comprises: Training each of the initial weak classification models based on the labeled sample training set to obtain target weak classification models corresponding to the multiple initial weak classification models one by one; After obtaining the target weak classification models corresponding to the multiple initial weak classification models one by one, the intention classification device is further used to: Each of the target weak classification models is traversed, and the following processing is performed for the currently traversed target weak classification model: Inputting each first sample corpus in the labeled sample test set into the target weak classification model, so that the target weak classification model outputs a second predicted classification label corresponding to each first sample corpus; The prediction accuracy of the target weak classification model is determined according to the second predicted classification labels and the annotated labels corresponding to each of the first sample corpora.

7. A computer device, characterized in that: The computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more of the processors, the one or more processors execute the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The storage medium can be read and written by a processor, and the storage medium stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the method as claimed in any one of claims 1 to 5.