Training method, device and electronic device for classification network model

By using supervised training parameters and small sample data to train the initial classification network model and adopting a dynamic storage mechanism, the problem of weak model generalization ability in existing technologies is solved, and better classification results are achieved with small sample data.

CN113971459BActive Publication Date: 2025-10-21ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010723231.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-24
Publication Date
2025-10-21
Estimated Expiration
2040-07-24

AI Technical Summary

Technical Problem

The existing neural network models used for intent classification under small-sample data training have weak generalization capabilities and are prone to forgetting during multi-task migration.

Method used

By obtaining the supervised training parameters and small sample data provided by the client, the initial classification network model is trained using a dynamic storage mechanism to enhance the generalization ability of the model.

Benefits of technology

The generalization ability of the classification network model under small sample data is improved, and it can better identify and classify new intent tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971459B_ABST
    Figure CN113971459B_ABST
Patent Text Reader

Abstract

The application provides a training method and device of a classification network model, an electronic device and a computer storage medium. The method comprises: obtaining first sample data provided by a client for supervised training; obtaining a supervised training parameter based on the first sample data; the supervised training parameter is used for supervised training of an initial classification network model; obtaining second sample data provided by the client; the second sample data is small sample data used for training the initial classification network model; and training the initial classification network model by using the supervised training parameter and the second sample data to obtain a target classification network model. According to the training method of the classification network model, the supervised training parameter is obtained by using the first sample data. Then, the initial classification network model is trained by using the second sample data of the small sample data in combination with the supervised training parameter to obtain the target classification network model. Therefore, the target classification network model obtained has enhanced classification generalization ability.
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 training method, device, electronic device, and computer storage medium for a classification network model. Background Art

[0002] With the rapid development of deep learning and natural language processing technologies, the application of neural network technology is becoming increasingly widespread. In deep learning, in particular, combining deep learning with neural network technology can achieve excellent results. In task-based conversations using deep learning and natural language processing, intent classification is crucial. However, when creating a new task-based conversation task, each intent often has only a small number of examples. Therefore, a pressing challenge is how to use these small samples to build an intent classification model.

[0003] Existing techniques use a meta-learning approach to train neural network models for intent classification using small amounts of data. While existing techniques for training network models can address the small amount of data required for training, meta-learning is based on transferring knowledge across multiple tasks. However, because meta-learning is based on transferring knowledge across multiple tasks, this existing technique is prone to forgetting during the transfer process, resulting in weak generalization capabilities. Summary of the Invention

[0004] The present application provides a training method for a classification network model to solve the problem of weak generalization ability of the model using the existing classification network model training method. The present application also provides a training device for the classification network model, as well as corresponding electronic equipment and computer media.

[0005] This application provides a training method for a classification network model, including:

[0006] Obtaining first sample data for supervised training provided by a client; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0007] Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0008] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0009] Optionally, obtaining supervised training parameters based on the first sample data includes:

[0010] Selecting a portion of data from the first sample data as a first basic data set;

[0011] Based on the first basic data set, supervised training parameters are obtained.

[0012] Optionally, obtaining supervised training parameters based on the first basic data set includes:

[0013] Encoding the first basic data set to obtain encoding information corresponding to the first basic data set;

[0014] Obtain supervised training parameters according to the encoding information corresponding to the first basic data set.

[0015] Optionally, obtaining supervised training parameters according to the encoding information corresponding to the first basic data set includes:

[0016] A supervised training parameter is obtained according to the encoding information corresponding to the first basic data set and the category information corresponding to the first basic data set.

[0017] Optionally, encoding the first basic data set to obtain encoding information corresponding to the first basic data set includes:

[0018] The first basic data set is provided to the encoder of the initial classification network model, vector information corresponding to the first basic data set output by the encoder is obtained, and the vector information corresponding to the first basic data set is used as encoding information corresponding to the first basic data set.

[0019] Optionally, the using the supervised training parameters and the second sample data to train the initial classification network model includes:

[0020] The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

[0021] Optionally, the adopting a dynamic storage mechanism to fuse the second sample data with the supervised training parameters to obtain fused data of the second sample data includes:

[0022] Selecting a portion of data from the second sample data as a second basic data set;

[0023] Encoding the second basic data set to obtain encoding information corresponding to the second basic data set;

[0024] A dynamic storage mechanism is used to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data.

[0025] Optionally, encoding the second basic data set to obtain encoding information corresponding to the second basic data set includes:

[0026] The second basic data set is provided to the encoder, vector information corresponding to the second basic data set output by the encoder is obtained, and the vector information corresponding to the second basic data set is used as encoding information corresponding to the second basic data set.

[0027] Optionally, the second basic data set is sample data of a specified number of categories in the second sample data; wherein the number of sample data in each category of the second basic data set is the same.

[0028] Optionally, the adopting a dynamic storage mechanism to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data includes:

[0029] Providing the encoding information corresponding to the second basic data set and the supervised training parameters to the dynamic storage mechanism module in the initial classification network model to obtain a first output result of the dynamic storage mechanism module;

[0030] The first output result of the dynamic storage mechanism module is used as fusion data of the second sample data.

[0031] Optionally, also include:

[0032] Using the target classification network model to classify the data to be classified;

[0033] The method of using the target classification network model to classify the data to be classified includes:

[0034] The dynamic storage mechanism is used to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified;

[0035] The fused data of the data to be classified is provided to the target classification network model to obtain a classification result.

[0036] Optionally, the adopting the dynamic storage mechanism to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified includes:

[0037] Extracting a portion of samples from all categories of sample data in the second basic data set as data to be classified;

[0038] Encoding the data to be classified to obtain encoding information corresponding to the data to be classified;

[0039] The coding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module are provided to the dynamic storage mechanism module to obtain fused data of the data to be classified.

[0040] Optionally, encoding the data to be classified to obtain encoding information corresponding to the data to be classified includes: providing the data to be classified to the encoder, obtaining vector information corresponding to the data to be classified output by the encoder, and using the vector information corresponding to the data to be classified as the encoding information corresponding to the data to be classified.

[0041] Optionally, providing the encoding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module to the dynamic storage mechanism module to obtain fused data of the data to be classified includes:

[0042] The vector information corresponding to the data to be classified is fused with the first output result of the dynamic storage mechanism module using the dynamic storage mechanism module to obtain a class vector; and the class vector is used as fused data of the data to be classified.

[0043] Optionally, providing the fused data of the data to be classified to the target classification network model to obtain a classification result includes:

[0044] Providing the fused data of the data to be classified to the distance classifier of the target classification network model to obtain an output result of the distance classifier;

[0045] The output result of the distance classifier is used as the classification result.

[0046] Correspondingly, the present application provides a training device for a classification network model, comprising:

[0047] A supervised training parameter obtaining unit, configured to obtain first sample data for supervised training provided by a client; and obtain supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0048] A sample data obtaining unit, configured to obtain second sample data provided by a client; wherein the second sample data is small sample data used to train the initial classification network model;

[0049] A training unit is used to train the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model.

[0050] This application also provides a training method for a classification network model, including:

[0051] Obtaining first sample data related to a multi-dialogue domain for supervised training provided by a client; obtaining supervised training parameters based on the first sample data related to the multi-dialogue domain; wherein the supervised training parameters are used for supervised training of an initial classification network model; and the initial classification network model is used to classify natural language information related to the multi-dialogue domain;

[0052] Obtaining second sample data related to a multi-dialogue field provided by a client; wherein the second sample data is small sample data used to train the initial classification network model;

[0053] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0054] The present application provides an electronic device, including:

[0055] processor;

[0056] The memory is used to store a computer program, which is executed by the processor to perform a training method for a classification network model, the method comprising the following steps:

[0057] Obtaining first sample data for supervised training provided by a client; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0058] Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0059] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0060] The present application provides a computer storage medium storing a computer program. The computer program is executed by a processor to perform a training method for a classification network model. The method includes the following steps:

[0061] Obtaining first sample data for supervised training provided by a client; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0062] Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0063] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0064] Compared with the prior art, this application has the following advantages:

[0065] The present application provides a training method for a classification network model, including: obtaining first sample data provided by a client for supervised training; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used to supervise the training of an initial classification network model; obtaining second sample data provided by the client; wherein the second sample data is small sample data for training the initial classification network model; using the supervised training parameters and the second sample data to train the initial classification network model to obtain a target classification network model. Due to the training method for the classification network model of the present application, the supervised training parameters are first obtained through the first sample data. Afterwards, the initial classification network model is trained using the second sample data of the small sample data in combination with the supervised training parameters to obtain a target classification network model. Thus, the obtained target classification network model has enhanced classification generalization capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0067] Figure 1 This is a schematic diagram of an application scenario embodiment provided by the first embodiment of the present application.

[0068] Figure 2 Flowchart of the training method for the classification network model provided in the second embodiment of the present application.

[0069] Figure 3 A schematic diagram of the process of training the initial classification network model provided in the second embodiment of the present application.

[0070] Figure 4 Schematic diagram of a training device for a classification network model provided in the third embodiment of the present application.

[0071] Figure 5 A schematic diagram of an electronic device provided in the fifth embodiment of the present application. DETAILED DESCRIPTION

[0072] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

[0073] The embodiments provided in this application can be applied to scenarios where clients and servers interact with each other. Figure 1 As shown, it is a schematic diagram of an application scenario embodiment provided by the first embodiment of the present application. First, the client sends the first sample data for supervised training and the small sample data for training the initial classification network model to the server, and the server obtains the first sample data for supervised training and the small sample data for training the initial classification network model. After the server obtains the first sample data for supervised training and the small sample data for training the initial classification network model, the server performs the following processing: First, based on the first sample data, the supervised training parameters are obtained. Afterwards, the second sample data (i.e., the small sample data for training the initial classification network model) and the supervised training parameters are provided to the initial classification network model, so as to train the initial classification network model, and then obtain the target classification network model based on the training results. After obtaining the target classification network model, the target classification network model can also be used for classification.

[0074] Specifically, the first sample data used for supervised training can be supervised learning information of known categories. For example, in task-based dialogue scenarios using deep learning and natural language processing technologies, supervised learning information can refer to natural language information of known categories. In the multi-dialogue domain, the classification of natural language information is particularly important, that is, determining to which domain the natural language information belongs within the multi-dialogue domain.

[0075] With the continuous development and advancement of internet technology, human-computer interaction services are gradually becoming part of people's work and daily lives, bringing significant convenience. People communicate with intelligent products (such as smart robots, smart speakers, or other smart electronic gadgets) to obtain the information they need. During this communication process, intelligent products use deep learning and natural language processing technologies to classify the acquired language information, thereby obtaining the information needed and completing the interactive process. Human-computer interaction covers a wide range of sectors, including e-commerce, telecommunications, government affairs, finance, education, entertainment, healthcare, and tourism. For example, in the e-commerce industry, users can communicate with intelligent customer service representatives to perform tasks such as issuing invoices, expediting shipments, checking logistics, changing addresses, and receiving parcels. Similarly, in the telecommunications industry and across the entire operator sector, users can communicate with intelligent customer service representatives to check phone bills, data usage, purchase plans, report problems, and change passwords. Of course, during human-computer dialogue, in order to ensure that smart products can accurately serve users, that is, to improve service quality, smart products need to accurately identify user intentions during the dialogue process, and then give correct feedback based on user intentions, thereby providing the information required by users or performing corresponding actions.

[0076] Specifically, when applying human-computer interaction services in the telecommunications industry, intelligent customer service can fulfill user needs and provide feedback to users. For example, a user might call a telecom operator to inquire about their monthly phone bill or data plan usage. Conventional technology requires users to perform subsequent service inquiries by selecting numeric keys following voice prompts, which can be cumbersome. Human-computer interaction services effectively address this issue. After dialing the operator, users can directly engage in a human-computer interaction with intelligent customer service, eliminating the need to contact a human or perform service inquiries by keystroke. This process requires intelligent customer service to understand the voice corresponding to the customer's service inquiries through deep learning and natural language understanding. During this human-computer interaction process, intelligent customer service specifically classifies the customer's voice inquiry. Specifically, the intelligent customer service needs to understand the specific service area to which the user's inquiry belongs. Based on the customer's intent, the intelligent customer service then performs corresponding operations or obtains information related to the service, and then provides the user with the information they need through corresponding operations. In this way, users can simply communicate their inquiry needs to the intelligent customer service through voice, and the intelligent customer service then provides the information they need through the aforementioned methods.

[0077] The use of supervised learning information can provide a basis for the training process of the initial classification network model using small sample data. Since the supervised learning information is sample data of known categories, supervised training parameters can be obtained based on this supervised learning information. Of course, it is understandable that before obtaining the supervised training parameters, it is necessary to obtain supervised learning information of known categories in advance. Obtaining supervised learning information of known categories can be done as follows: the server sends a request to the client to obtain supervised learning information of known categories. After receiving the request from the server to obtain supervised learning information of known categories, the client sends pre-stored supervised learning information of known categories to the server in response to the request information.

[0078] At the same time, the server can simultaneously obtain small sample data for training the initial classification network model in the process of pre-obtaining supervised learning information of known categories. Similar to the method of obtaining supervised learning information of known categories, obtaining small sample data for training the initial classification network model can be done in the following way: the server sends a request to the client to obtain small sample data for training the initial classification network model. After the client receives the request sent by the server to obtain small sample data for training the initial classification network model, the client sends the pre-stored small sample data for training the initial classification network model to the server in response to the request information. In this way, the server can obtain supervised learning information of known categories and small sample data for training the initial classification network model.

[0079] As explained in the above process, after obtaining the supervised learning information of known categories, the supervised training parameters can be obtained. After obtaining the small sample data for training the initial classification network model, the small sample data is used to train the initial classification network model.

[0080] The process of training the initial classification network model using small sample data is as follows:

[0081] After obtaining the supervised training parameters, the small sample data used to train the initial classification network model and the supervised training parameters are provided to the initial classification network model to obtain a target classification network model. The classification network model training method of the present application first obtains the supervised training parameters using the first sample data. Subsequently, the initial classification network model is trained using the second sample data of the small sample data in combination with the supervised training parameters to obtain a target classification network model. This results in the obtained target classification network model having enhanced classification generalization capabilities.

[0082] It should be noted that the application scenario is only an embodiment of the application scenario. The purpose of providing this application scenario embodiment is to facilitate understanding of the training method of the classification network model of the present application, and is not used to limit the training method of the classification network model of the present application.

[0083] The present application provides a training method, device, electronic device, and computer storage medium for a classification network model, and the following are specific embodiments.

[0084] like Figure 2 , which is a flow chart of an embodiment of a training method for a classification network model provided in the second embodiment of the present application. The method comprises the following steps.

[0085] Step S201: Obtain first sample data provided by a client for supervised training.

[0086] As the first step of the training method of the classification network model of the second embodiment, the first sample data for supervised training provided by the client is first obtained. Specifically, the above-mentioned first sample data for supervised training can be supervised learning information of a known category. For example, in the task-based dialogue scenario of deep learning and natural language processing technology, supervised learning information can refer to natural language information of a known category, that is, intention data of a known category. The use of supervised learning information can provide a basis for the training process of training the initial classification network model using small sample data. Since the supervised learning information is sample data of a known category, supervised training parameters can be obtained based on this supervised learning information. Of course, it is understandable that supervised learning information of a known category needs to be obtained in advance before obtaining the supervised training parameters.

[0087] One method for obtaining supervised learning information of known categories may be as follows: the server sends a request to the client for obtaining supervised learning information of known categories. After receiving the request from the server, the client sends pre-stored supervised learning information of known categories to the server in response to the request.

[0088] Step S202: Based on the first sample data, obtain supervised training parameters; wherein the supervised training parameters are used to supervise the initial training classification network model.

[0089] After obtaining the first sample data in step S201, that is, obtaining supervised learning information of a known category, supervised training parameters are obtained based on the first sample data; wherein the supervised training parameters are used for supervised training of the initial classification network model.

[0090] Specifically, as one implementation of obtaining supervised training parameters based on the first sample data: first, a portion of data is selected from the first sample data as a first basic data set. After the first basic data set is selected, supervised training parameters are obtained based on the first basic data set.

[0091] Based on the first basic data set, the supervised training parameters may be obtained in the following manner.

[0092] First, the first basic data set is encoded to obtain encoding information corresponding to the first basic data set. Then, supervised training parameters are obtained based on the encoding information corresponding to the first basic data set.

[0093] More specifically, obtaining the supervised training parameters according to the encoding information corresponding to the first basic data set may be obtaining the supervised training parameters according to the encoding information corresponding to the first basic data set and the category information corresponding to the first basic data set.

[0094] In the above process, it is mentioned that the first basic data set is encoded to obtain encoding information corresponding to the first basic data set. As a method of encoding the first basic data set and obtaining encoding information corresponding to the first basic data set, the first basic data set is provided to the encoder of the initial classification network model, vector information corresponding to the first basic data set output by the encoder is obtained, and the vector information corresponding to the first basic data set is used as the encoding information corresponding to the first basic data set.

[0095] Step S203: Obtain second sample data provided by the client.

[0096] In this embodiment, the second sample data is small sample data used to train an initial classification network model.

[0097] In step S201 of the present application, first sample data for supervised training is obtained. While obtaining the first sample data for supervised training, second sample data, i.e., small sample data for training an initial classification network model, can be obtained.

[0098] In other words, in the process of obtaining supervised learning information of known categories in advance, small sample data for training the initial classification network model can be obtained at the same time. Similar to the method of obtaining supervised learning information of known categories, obtaining small sample data for training the initial classification network model can be done in the following way: the server sends a request to the client to obtain small sample data for training the initial classification network model. After the client receives the request sent by the server to obtain small sample data for training the initial classification network model, the client sends the pre-stored small sample data for training the initial classification network model to the server in response to the request information. In this way, the server can obtain supervised learning information of known categories and small sample data for training the initial classification network model.

[0099] It is understandable that obtaining the second sample data in step S203 may be performed before obtaining the first sample data for supervised training in step S201, or after obtaining the first sample data for supervised training in step S201 and obtaining supervised training parameters based on the first sample data.

[0100] Step S204: using the supervised training parameters and the second sample data to train the initial classification network model to obtain a target classification network model.

[0101] After obtaining the supervised training parameters and the second sample data, the supervised training parameters and the second sample data are used to train the initial classification network model to obtain the target classification network model.

[0102] Specifically, as an implementation method of using supervised training parameters and second sample data to train the initial classification network model, it can be: using a dynamic storage mechanism to fuse the second sample data with the supervised training parameters to obtain fused data of the second sample data; and using the fused data of the second sample data to train the initial classification network model.

[0103] After obtaining the small sample data for training the initial classification network model in step S203, and after obtaining the supervised training parameters in step S202, a dynamic storage mechanism is used to fuse the second sample data (i.e., the small sample data for training the initial classification network model) with the supervised training parameters to obtain fused data of the second sample data.

[0104] Specifically, as an implementation method of adopting a dynamic storage mechanism to fuse the second sample data with the supervised training parameters to obtain fused data of the second sample data, the following method may be adopted.

[0105] First, a portion of data is selected from the second sample data as a second basic data set.

[0106] Afterwards, the second basic data set is encoded to obtain encoding information corresponding to the second basic data set.

[0107] Finally, a dynamic storage mechanism is used to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data.

[0108] One way to encode the second basic data set and obtain the encoding information corresponding to the second basic data set may be as described below.

[0109] The second basic data set is provided to the encoder of the initial classification network model, vector information corresponding to the second basic data set output by the encoder is obtained, and the vector information corresponding to the second basic data set is used as encoding information corresponding to the second basic data set.

[0110] It should be noted that, in the second basic data set mentioned above, the second basic data set is sample data of a specified number of categories in the second sample data. In addition, the number of sample data in each category of the second basic data set is the same.

[0111] For example, randomly select C class samples from the second sample data, and construct a meta-learning task with K samples of each class (a total of C×K data) as the support set input of the initial classification network model.

[0112] Specifically, the dynamic storage mechanism is used to fuse the encoding information corresponding to the second basic dataset with the supervised training parameters to obtain the fused data of the second sample data as described below. The encoding information corresponding to the second basic dataset and the supervised training parameters are provided to the dynamic storage mechanism module in the initial classification network model to obtain the first output of the dynamic storage mechanism module. The first output of the dynamic storage mechanism module is then used as the fused data of the second sample data.

[0113] After obtaining the fused data of the second sample data, an initial classification network model is trained based on the fused data of the second sample data to obtain a target classification network model.

[0114] After obtaining the fused data of the second sample data, the initial classification network model is trained based on the fused data of the second sample data to obtain a target classification network model. The target classification network model can then be used for classification. In this embodiment, supervised training parameters are used to supervise the training process of the initial classification network model, thereby obtaining the target classification network model after training.

[0115] After obtaining the target classification network model, the target classification network model can be used to classify the data to be classified.

[0116] The target classification network model can be used to classify the data to be classified as follows: First, the data to be classified is fused with the supervised training parameters using a dynamic storage mechanism to obtain the fused data of the data to be classified. Then, the fused data of the data to be classified is provided to the target classification network model to obtain the classification result.

[0117] As an implementation method of using a dynamic storage mechanism to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified: first, a part of samples are extracted from all categories of sample data of the second basic data set as the data to be classified; then, the data to be classified is encoded to obtain encoding information corresponding to the data to be classified; finally, the encoding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module are provided to the dynamic storage mechanism module to obtain fused data of the data to be classified.

[0118] The data to be classified can be obtained by extracting a batch of samples from the C categories as prediction targets for the classification network model. Specifically, the classification network model learns how to distinguish the C categories from a total of C × K data. During training, each round of sample extraction generates a different meta-learning task, allowing for different combinations of categories to be sampled. This sampling method enables the target classification network model to identify commonalities across different meta-learning tasks. For example, it learns how to extract important features and compare similar samples, or it learns to forget domain-specific aspects of the meta-learning task. This learning mechanism enables the target classification network model to perform well even when faced with new meta-learning tasks.

[0119] The above encoding of the data to be classified to obtain the encoding information corresponding to the data to be classified can be: providing the data to be classified to the encoder of the target classification network model, obtaining the vector information corresponding to the data to be classified output by the encoder, and using the vector information corresponding to the data to be classified as the encoding information corresponding to the data to be classified.

[0120] The above-mentioned providing the encoding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module to the dynamic storage mechanism module to obtain the fused data of the data to be classified can be: fusing the vector information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module using the dynamic storage mechanism module to obtain the class vector; and using the class vector as the fused data of the data to be classified.

[0121] Specifically, the fused data of the data to be classified is provided to the target classification network model to obtain the classification result, which can be provided to the distance classifier of the target classification network model to obtain the output result of the distance classifier; and the output result of the distance classifier is used as the classification result.

[0122] The following is a detailed introduction to training the initial classification network model and performing classification. Figure 3 As shown, it is a schematic diagram of the process of training the initial classification network model.

[0123] The initial classification network model of this embodiment obtains supervised training parameters based on the supervised learning stage, and trains the classification network model in combination with the supervised training parameters. Figure 3 As shown, in the supervised learning phase, the first sample data of the training set categories is selected as the training set, with a total of C categories. In the meta-learning phase, C categories are randomly sampled from the training set, and K samples from each category (a total of C×K data) are used to construct the second sample data. A batch of samples is then extracted from these C categories as the model's prediction targets, namely the data to be classified in the figure. This requires the model to learn how to distinguish these C categories from the C×K data. During the training process, different data to be classified is sampled in each round, and different data to be classified contains different category combinations. This mechanism enables the target classification network model to identify commonalities across different meta-learning tasks. For example, how to extract important features and compare similar samples, or forget domain-related aspects of the meta-learning task. The target classification network model trained with this learning mechanism can also perform well when faced with new meta-learning tasks.

[0124] In the supervised learning stage, a first sample data is first collected from all the training data, and then the supervised learning parameters are trained based on the encoder (BERT encoder) and the distance classifier (Cosine distance classifier). In this way, the supervised training parameters can be used as the feature representation of each class. Then, a dynamic storage mechanism module is designed based on the supervised training parameters to adjust the parameters in the initial classification network model.

[0125] In the meta-learning stage, in order to summarize the class-level representation from the support set, we designed a dynamic storage mechanism module based on the knowledge of supervised learning. Unlike the traditional static memory mechanism, the dynamic storage mechanism module uses a dynamic routing mechanism to give the memory process better flexibility, thereby improving the generalization ability of few-shot learning. Generalization ability refers to the ability to recognize new categories. In the final classification, the class vector is sent to the distance classifier to obtain the classification result. The classification result can be a category score. Traditional classifiers generally use dot multiplication to obtain the score, and then normalize it through softmax. However, this classifier is not suitable for completely new categories faced in few-shot learning. Therefore, cosine similarity is used to calculate this score in this embodiment.

[0126] For a classifier trained in this way, the feature vectors belonging to the same class will inevitably be very close to the corresponding classification parameters, so the final classification parameter W can be used as the category feature of the first sample data, and then as a dynamic storage mechanism module.

[0127] The present application provides a training method for a classification network model, including: obtaining first sample data provided by a client for supervised training; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used to supervise the training of an initial classification network model; obtaining second sample data provided by the client; wherein the second sample data is small sample data for training the initial classification network model; using the supervised training parameters and the second sample data to train the initial classification network model to obtain a target classification network model. Due to the training method for the classification network model of the present application, the supervised training parameters are first obtained through the first sample data. Afterwards, the initial classification network model is trained using the second sample data of the small sample data in combination with the supervised training parameters to obtain a target classification network model. Thus, the obtained target classification network model has enhanced classification generalization capabilities.

[0128] In the second embodiment described above, a method for training a classification network model is provided. Correspondingly, the present application also provides a training device for a classification network model. Figure 4 As shown, it is a schematic diagram of a training device for a classification network model provided in the third embodiment of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0129] This embodiment provides a training device for a classification network model, including:

[0130] The supervised training parameter obtaining unit 401 is configured to obtain first sample data for supervised training provided by a client; and obtain supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0131] The sample data obtaining unit 402 is configured to obtain second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0132] The training unit 403 is used to train the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model.

[0133] Optionally, the supervised training parameter obtaining unit is specifically used to:

[0134] Selecting a portion of data from the first sample data as a first basic data set;

[0135] Based on the first basic data set, supervised training parameters are obtained.

[0136] Optionally, the supervised training parameter obtaining unit is specifically used to:

[0137] Encoding the first basic data set to obtain encoding information corresponding to the first basic data set;

[0138] Obtain supervised training parameters according to the encoding information corresponding to the first basic data set.

[0139] Optionally, the supervised training parameter obtaining unit is specifically used to:

[0140] A supervised training parameter is obtained according to the encoding information corresponding to the first basic data set and the category information corresponding to the first basic data set.

[0141] Optionally, the supervised training parameter obtaining unit is specifically used to:

[0142] The first basic data set is provided to the encoder of the initial classification network model, vector information corresponding to the first basic data set output by the encoder is obtained, and the vector information corresponding to the first basic data set is used as encoding information corresponding to the first basic data set.

[0143] Optionally, the training unit is specifically used to:

[0144] The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

[0145] Optionally, the training unit is specifically used to:

[0146] Selecting a portion of data from the second sample data as a second basic data set;

[0147] Encoding the second basic data set to obtain encoding information corresponding to the second basic data set;

[0148] A dynamic storage mechanism is used to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data.

[0149] Optionally, the training unit is specifically used to:

[0150] The second basic data set is provided to the encoder, vector information corresponding to the second basic data set output by the encoder is obtained, and the vector information corresponding to the second basic data set is used as encoding information corresponding to the second basic data set.

[0151] Optionally, the second basic data set is sample data of a specified number of categories in the second sample data; wherein the number of sample data in each category of the second basic data set is the same.

[0152] Optionally, the training unit is specifically used to:

[0153] Providing the encoding information corresponding to the second basic data set and the supervised training parameters to the dynamic storage mechanism module in the initial classification network model to obtain a first output result of the dynamic storage mechanism module;

[0154] The first output result of the dynamic storage mechanism module is used as fusion data of the second sample data.

[0155] Optionally, also include taxa;

[0156] The classification unit is used to:

[0157] Using the target classification network model to classify the data to be classified;

[0158] The classification unit is specifically used for:

[0159] The dynamic storage mechanism is used to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified;

[0160] The fused data of the data to be classified is provided to the target classification network model to obtain a classification result.

[0161] Optionally, the classification unit is specifically used to:

[0162] Extracting a portion of samples from all categories of sample data in the second basic data set as data to be classified;

[0163] Encoding the data to be classified to obtain encoding information corresponding to the data to be classified;

[0164] The coding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module are provided to the dynamic storage mechanism module to obtain fused data of the data to be classified.

[0165] Optionally, the classification unit is specifically used to: provide the data to be classified to the encoder, obtain vector information corresponding to the data to be classified output by the encoder, and use the vector information corresponding to the data to be classified as encoding information corresponding to the data to be classified.

[0166] Optionally, the classification unit is specifically used to:

[0167] The vector information corresponding to the data to be classified is fused with the first output result of the dynamic storage mechanism module using the dynamic storage mechanism module to obtain a class vector; and the class vector is used as fused data of the data to be classified.

[0168] Optionally, the classification unit is specifically used to:

[0169] Providing the fused data of the data to be classified to the distance classifier of the target classification network model to obtain an output result of the distance classifier;

[0170] The output result of the distance classifier is used as the classification result.

[0171] Based on the first and second embodiments, the fourth embodiment of the present application further provides a training method for a classification network model. Since this embodiment has been introduced in detail in the first and second embodiments, it will not be repeated here.

[0172] A fourth embodiment of the present application provides a training method for a classification network model, including:

[0173] Obtaining first sample data related to a multi-dialogue domain for supervised training provided by a client; obtaining supervised training parameters based on the first sample data related to the multi-dialogue domain; wherein the supervised training parameters are used for supervised training of an initial classification network model; and the initial classification network model is used to classify natural language information related to the multi-dialogue domain;

[0174] Obtaining second sample data related to a multi-dialogue field provided by a client; wherein the second sample data is small sample data used to train the initial classification network model;

[0175] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0176] In the above-mentioned second embodiment, a training method for a classification network model is provided. Correspondingly, the fifth embodiment of the present application provides an electronic device corresponding to the method of the second embodiment. Figure 5 As shown, it shows a schematic diagram of the electronic device provided by this embodiment.

[0177] A fifth embodiment of the present application provides an electronic device, including:

[0178] Processor 501;

[0179] The memory 502 is used to store a computer program. The computer program is executed by the processor to perform a training method for a classification network model. The method includes the following steps:

[0180] Obtaining first sample data for supervised training provided by a client; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0181] Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0182] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0183] In the above-mentioned second embodiment, a training method for a classification network model is provided. Correspondingly, the sixth embodiment of the present application provides a computer storage medium corresponding to the method of the second embodiment.

[0184] A sixth embodiment of the present application provides a computer storage medium storing a computer program. The computer program is executed by a processor to perform a training method for a classification network model. The method includes the following steps:

[0185] Obtaining first sample data for supervised training provided by a client; obtaining supervised training parameters based on the first sample data; wherein the supervised training parameters are used for supervised training of an initial classification network model;

[0186] Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model;

[0187] The initial classification network model is trained using the supervised training parameters and the second sample data to obtain a target classification network model.

[0188] Although the present application is disclosed as above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0189] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-permanent storage in a computer-readable medium, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0190] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology to store information. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmitting medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable storage media, such as modulated data signals and carrier waves.

[0191] 2. Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A training method for a classification network model, characterized in that: include: Obtaining first sample data related to the field of human-computer interaction for supervised training provided by a client; obtaining supervised training parameters based on the first sample data related to the field of human-computer interaction; wherein the first sample data includes C categories, the categories including e-commerce, telecommunications, government affairs, finance, education, entertainment, health, and tourism, and the supervised training parameters are used to supervise the training of an initial classification network model, the initial classification network model being used to classify natural language information related to the field of human-computer interaction; Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model; Training the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model includes: The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

2. The method according to claim 1, characterized in that The obtaining of supervised training parameters based on the first sample data includes: Selecting a portion of data from the first sample data as a first basic data set; Based on the first basic data set, supervised training parameters are obtained.

3. The method according to claim 2, characterized in that The obtaining of supervised training parameters based on the first basic data set includes: Encoding the first basic data set to obtain encoding information corresponding to the first basic data set; Obtain supervised training parameters according to the encoding information corresponding to the first basic data set.

4. The method according to claim 3, characterized in that The obtaining of supervised training parameters according to the encoding information corresponding to the first basic data set includes: A supervised training parameter is obtained according to the encoding information corresponding to the first basic data set and the category information corresponding to the first basic data set.

5. The method according to claim 3, characterized in that The encoding of the first basic data set to obtain encoding information corresponding to the first basic data set includes: The first basic data set is provided to the encoder of the initial classification network model, vector information corresponding to the first basic data set output by the encoder is obtained, and the vector information corresponding to the first basic data set is used as encoding information corresponding to the first basic data set.

6. The method according to claim 1, characterized in that The adopting a dynamic storage mechanism to fuse the second sample data with the supervised training parameters to obtain fused data of the second sample data includes: Selecting a portion of data from the second sample data as a second basic data set; Encoding the second basic data set to obtain encoding information corresponding to the second basic data set; A dynamic storage mechanism is used to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data.

7. The method according to claim 6, characterized in that The encoding of the second basic data set to obtain encoding information corresponding to the second basic data set includes: The second basic data set is provided to the encoder, vector information corresponding to the second basic data set output by the encoder is obtained, and the vector information corresponding to the second basic data set is used as encoding information corresponding to the second basic data set.

8. The method according to claim 6, characterized in that The second basic data set is sample data of a specified number of categories in the second sample data; wherein the number of sample data in each category of the second basic data set is the same.

9. The method according to claim 6, characterized in that The adopting a dynamic storage mechanism to fuse the encoding information corresponding to the second basic data set with the supervised training parameters to obtain fused data of the second sample data includes: Providing the encoding information corresponding to the second basic data set and the supervised training parameters to the dynamic storage mechanism module in the initial classification network model to obtain a first output result of the dynamic storage mechanism module; The first output result of the dynamic storage mechanism module is used as fusion data of the second sample data.

10. The method according to claim 9, characterized in that Also includes: Using the target classification network model to classify the data to be classified; The method of using the target classification network model to classify the data to be classified includes: The dynamic storage mechanism is used to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified; The fused data of the data to be classified is provided to the target classification network model to obtain a classification result.

11. The method according to claim 10, characterized in that The adopting the dynamic storage mechanism to fuse the data to be classified with the supervised training parameters to obtain fused data of the data to be classified includes: Extracting a portion of samples from all categories of sample data in the second basic data set as data to be classified; Encoding the data to be classified to obtain encoding information corresponding to the data to be classified; The coding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module are provided to the dynamic storage mechanism module to obtain fused data of the data to be classified.

12. The method according to claim 11, characterized in that The encoding of the data to be classified to obtain encoding information corresponding to the data to be classified includes: providing the data to be classified to the encoder, obtaining vector information corresponding to the data to be classified output by the encoder, and using the vector information corresponding to the data to be classified as the encoding information corresponding to the data to be classified.

13. The method according to claim 12, characterized in that Providing the encoding information corresponding to the data to be classified and the first output result of the dynamic storage mechanism module to the dynamic storage mechanism module to obtain fused data of the data to be classified, including: The vector information corresponding to the data to be classified is fused with the first output result of the dynamic storage mechanism module using the dynamic storage mechanism module to obtain a class vector; and the class vector is used as fused data of the data to be classified.

14. The method according to claim 13, characterized in that Providing the fused data of the data to be classified to the target classification network model to obtain a classification result includes: Providing the fused data of the data to be classified to the distance classifier of the target classification network model to obtain an output result of the distance classifier; The output result of the distance classifier is used as the classification result.

15. A training device for a classification network model, characterized in that: include: A supervised training parameter obtaining unit, configured to obtain first sample data related to the field of human-computer dialogue and provided by a client for supervised training; and obtain supervised training parameters based on the first sample data; wherein the first sample data includes C categories, including e-commerce, telecommunications, government affairs, finance, education, entertainment, health, and tourism; and the supervised training parameters are used to supervise the training of an initial classification network model, and the initial classification network model is used to classify natural language information related to the field of human-computer dialogue; A sample data obtaining unit, configured to obtain second sample data provided by a client; wherein the second sample data is small sample data used to train the initial classification network model; A training unit, configured to train the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model, comprising: The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

16. A training method for a classification network model, characterized in that: include: Obtaining first sample data related to a multi-dialogue domain for supervised training provided by a client; Obtaining supervised training parameters based on the first sample data involving the multi-dialogue domain; wherein the first sample data includes C categories, the categories including e-commerce, telecommunications, government affairs, finance, education, entertainment, health, and tourism; and the supervised training parameters are used to supervise the training of an initial classification network model; the initial classification network model is used to classify natural language information involving the multi-dialogue domain; Obtaining second sample data related to a multi-dialogue field provided by a client; wherein the second sample data is small sample data used to train the initial classification network model; Training the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model includes: The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

17. An electronic device, characterized in that: include: processor; The memory is used to store a computer program, which is executed by the processor to perform a training method for a classification network model, the method comprising the following steps: Obtaining first sample data related to the field of human-computer interaction for supervised training provided by a client; obtaining supervised training parameters based on the first sample data related to the field of human-computer interaction; wherein the first sample data includes C categories, the categories including e-commerce, telecommunications, government affairs, finance, education, entertainment, health, and tourism, and the supervised training parameters are used to supervise the training of an initial classification network model, the initial classification network model being used to classify natural language information related to the field of human-computer interaction; Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model; Training the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model includes: The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

18. A computer storage medium, characterized in that The computer storage medium stores a computer program, which is executed by a processor to perform a training method for a classification network model, the method comprising the following steps: Obtaining first sample data related to the field of human-computer interaction for supervised training provided by a client; obtaining supervised training parameters based on the first sample data related to the field of human-computer interaction; wherein the first sample data includes C categories, the categories including e-commerce, telecommunications, government affairs, finance, education, entertainment, health, and tourism, and the supervised training parameters are used to supervise the training of an initial classification network model, the initial classification network model being used to classify natural language information related to the field of human-computer interaction; Obtaining second sample data provided by the client; wherein the second sample data is small sample data used to train the initial classification network model; Training the initial classification network model using the supervised training parameters and the second sample data to obtain a target classification network model includes: The second sample data is fused with the supervised training parameters by adopting a dynamic storage mechanism to obtain fused data of the second sample data; and the initial classification network model is trained by using the fused data of the second sample data.

Citation Information

Patent Citations

  • Method and device for realizing model training, computer storage medium and terminal

    CN111310917A