Data processing method and device, equipment, storage medium and program product

By sampling and processing the training data set in meta-learning and generating different types of classification models, calculating the distance between models and updating parameters, the problem of long meta-training time is solved, and the training efficiency and generalization ability of the model are improved.

CN119557731APending Publication Date: 2025-03-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411681520.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing meta-learning scheme consumes a lot of training time in meta-training tasks, resulting in inefficient training of machine learning models, and thus wasting computing resources and power resources.

Method used

By sampling at least two training data sets, a subset of training data is obtained, and a meta-learner is used to generate a benchmark classification model and a sample classification model, calculate the distance between similar and different types of models, and update the meta-learner parameters to minimize similar and maximize different types of distances.

Benefits of technology

This method can shorten the training time of the classification model, improve training efficiency, save computing resources and power resources, and improve the generalization ability and classification accuracy of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557731A_ABST
    Figure CN119557731A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, equipment, a storage medium and a program product, and relates to the technical field of machine learning. The method comprises the following steps: respectively sampling at least two training data sets to obtain at least one training data subset corresponding to each training data set; each training data set corresponds to one classification task; obtaining respective reference classification models of the at least two classification tasks; obtaining at least one sampling classification model of each classification task in the at least two classification tasks; based on the reference classification models of the at least two classification tasks and the at least one sampling classification model of each classification task, obtaining a first distance and a second distance; and by taking minimization of the first distance and maximization of the second distance as targets, updating parameters of the meta learner. The method can shorten the training time of the classification model, improves the training efficiency of the classification model, and saves the operation resources and power resources consumed during the training of the classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning technology, and in particular to a data processing method, device, equipment, storage medium and program product. Background Art

[0002] Meta-learning is a subcategory in the field of machine learning that can be used to train machine learning models so that they can learn new tasks efficiently, thereby reducing the need for large amounts of labeled data.

[0003] In the related art, meta-learning includes a meta-training phase and a meta-testing phase. In the meta-training phase, the meta-learner can learn the common points in multiple tasks in order to solve new tasks; in the meta-testing phase, new tasks can be assigned to the meta-learner to evaluate the performance of meta-learning.

[0004] However, the meta-learning scheme in the related art aims to minimize the verification loss of the meta-training task. In order to achieve the goal of minimizing the verification loss of the meta-training task, a large amount of training time is required, which in turn affects the training efficiency of the machine learning model and causes a waste of computing resources and power resources when training the machine learning model. Summary of the invention

[0005] The present application provides a data processing method, device, equipment, storage medium and program product, which can shorten the training time of the classification model, improve the training efficiency of the classification model, and thus save the computing resources and power resources consumed when training the classification model; the technical solution is as follows:

[0006] According to one aspect of the present application, a data processing method is provided, the method comprising:

[0007] Performing sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each of the training data sets; each of the training data sets corresponds to a classification task;

[0008] Obtaining respective benchmark classification models for at least two of the classification tasks; one of the benchmark classification models is a model generated by a meta-learner using the training data set of one of the classification tasks;

[0009] Obtain at least one sampling classification model for each of the classification tasks in at least two of the classification tasks; a sampling classification model is a model generated by the meta-learner through a subset of the training data of one of the classification tasks;

[0010] Based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks, a first distance and a second distance are obtained; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks;

[0011] The parameters of the meta-learner are updated with the goal of minimizing the first distance and maximizing the second distance.

[0012] According to one aspect of the present application, a data processing device is provided, the device comprising:

[0013] A subset sampling module, used to perform sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each of the training data sets; each of the training data sets corresponds to a classification task;

[0014] A first model acquisition module is used to acquire respective benchmark classification models of at least two of the classification tasks; one of the benchmark classification models is a model generated by a meta-learner using the training data set of one of the classification tasks;

[0015] A second model acquisition module is used to acquire at least one sampled classification model for each of the at least two classification tasks; a sampled classification model is a model generated by the meta-learner through a subset of the training data of one of the classification tasks;

[0016] A distance acquisition module, used to acquire a first distance and a second distance based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks;

[0017] A parameter updating module is used to update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0018] In some embodiments, the distance acquisition module is used to acquire the intra-task distance of at least two classification tasks based on the respective baseline classification models of at least two classification tasks and at least one sampling classification model of each classification task; the intra-task distance is used to indicate the difference between the baseline classification model and the sampling classification model of the same classification task;

[0019] The distance acquisition module is used to acquire the first distance based on the respective intra-task distances of at least two of the classification tasks.

[0020] In some embodiments, the distance acquisition module is used to acquire the average value of the distances between the model representation of at least one of the sampled classification models of the first classification task and the model representation of the benchmark classification model of the first classification task, to obtain the intra-task distance of the first classification task;

[0021] The first classification task is any one of at least two classification tasks.

[0022] In some embodiments, the distance acquisition module is used to acquire the inter-task distance between each two of the classification tasks in at least two of the classification tasks based on the respective benchmark classification models of the at least two of the classification tasks;

[0023] The distance acquisition module is used to acquire the second distance based on an inter-task distance between every two of the classification tasks in at least two of the classification tasks.

[0024] In some embodiments, the distance acquisition module is used to acquire the distance between the model representation of the benchmark classification model of the second classification task and the model representation of the benchmark classification model of the third classification task as the inter-task distance between the second classification task and the third classification task;

[0025] The second classification task and the third classification task are any two of the at least two classification tasks.

[0026] In some embodiments, the parameter updating module is used to obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance;

[0027] The parameter updating module is used to solve the updated parameters of the meta-learner with the goal of minimizing the loss function.

[0028] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the data processing method as described above.

[0029] According to another aspect of the present application, a computer-readable storage medium is provided, wherein at least one computer instruction is stored in the computer-readable storage medium, and the at least one computer instruction is loaded and executed by a processor to implement the data processing method described above.

[0030] According to another aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the data processing method described above.

[0031] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0032] By sampling the training data set to obtain a training data subset, the number of training samples of the meta-learner can be expanded; by processing the training data set and the training data subset by the meta-learner, a baseline classification model and a sampling classification model for each classification task can be obtained; this scheme can improve the generalization ability of the classification model and the accuracy of the classification model for classifying input data by minimizing the differences between classification models corresponding to the same classification task and maximizing the differences between classification models corresponding to different classification tasks, thereby shortening the training time of the classification model, improving the training efficiency of the classification model, and saving computing resources and power resources consumed when training the classification model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0034] Figure 1 is an architectural diagram of a computer system provided by an exemplary embodiment of the present application;

[0035] Figure 2 is a flow chart of a data processing method provided by an exemplary embodiment of the present application;

[0036] Figure 3 is a schematic diagram of a model representation provided by an exemplary embodiment of the present application;

[0037] Figure 4 is a flow chart of a data processing method provided by an exemplary embodiment of the present application;

[0038] Figure 5 This is a schematic diagram of effect improvement provided by an exemplary embodiment of the present application;

[0039] Figure 6 is a flowchart of a method for processing image data provided by an exemplary embodiment of the present application;

[0040] Figure 7is a flowchart of a method for processing image data provided by an exemplary embodiment of the present application;

[0041] Figure 8 is a flow chart of a molecular data processing method provided by an exemplary embodiment of the present application;

[0042] Fig. 9 is a flow chart of a molecular data processing method provided by an exemplary embodiment of the present application;

[0043] Fig.10 is a block diagram of a data processing device shown in an exemplary embodiment of the present application;

[0044] Fig.11 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application.

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0048] The terms used in the present disclosure are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure. The singular forms "a", "said" and "the" used in the present disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0049] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0050] The following are some definitions of terms involved in this application:

[0051] 1) Meta-learning: also known as learning how to learn, refers to learning to improve the learning algorithm itself, that is, learning to learn, aiming to enable the learning system to quickly adapt to new tasks. Among them, the task is the basic unit of meta-learning. In meta-training, the meta-learner can imitate the learning process of many related tasks to gain experience on how to adapt; in meta-testing, the adaptation process of meta-training performs unknown tasks. Among them, the adaptation process is implemented by the meta-learner generating a task-specific model, which receives a set of training examples and returns a prediction model. By using meta-learning to give the model the ability to learn quickly similar to humans, a good model can be obtained in the absence of labeled data.

[0052] 2) Meta-Learner: It is the core component of meta-learning and is an algorithm that can automatically adjust the learning strategy. Meta-learners improve the generalization ability and adaptation speed of the model on new tasks by learning from multiple tasks.

[0053] Please refer to Figure 1 , which shows an architecture diagram of a computer system provided by an exemplary embodiment of the present application. The computer system can be implemented as an architecture of a configuration system of a data processing method. Figure 1 As shown, the computer system may include: a terminal device 100 and a server 200. The terminal device 100 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the present application.

[0054] Optionally, the terminal device 100 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. A client that runs a target application may be installed in the terminal device 100, and the target application may be an application with a data processing function. The present application does not limit the form of the target application, including but not limited to an application (Application, App) installed in the terminal device 110, a mini-program, etc., and may also be in the form of a web page.

[0055] Optionally, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms. Among them, the cloud servers of big data and artificial intelligence platforms can provide artificial intelligence cloud services. The server 200 may be the background server of the above-mentioned target application, used to provide background services for the client of the target application.

[0056] In a data processing scheme involved in the present application, the meta-learning method can follow the idea of ​​"training is testing" to minimize the verification loss of the meta-training task as the meta-goal, where the supervision signal is directly generated by the sample label. In order to provide stronger supervision, some studies assume that the task-specific target model of the meta-training task is available, and then supervise the meta-training by adjusting the learning model and the corresponding target model, using model weights or knowledge distillation. However, due to the high learning cost of the target model, or even its unavailability in many practical problems, the meta-goal that requires a target model has very limited application.

[0057] Based on this, the subsequent embodiments of this application provide a new data processing method, which uses the alignment and discrimination capabilities of the meta-learner as an efficient meta-training algorithm with additional supervisory signals. Among them, alignment can ensure that the meta-learner can capture the core essence of the task and remain invariant to noise; discrimination can ensure that the meta-learner can learn specific models for unique tasks.

[0058] For example, Figure 1As shown, taking the server 200 executing the above data processing method as an example, the server 200 obtains at least two training data sets according to a specific classification task, and each training data set corresponds to a classification task; then, the server 200 performs sampling processing on the at least two training data sets respectively to obtain at least one training data subset corresponding to each training data set; then, the server 200 inputs the training data sets of the at least two classification tasks respectively into the meta-learner to obtain the benchmark classification models of the at least two classification tasks respectively; the server 200 inputs the training data subsets of the at least two classification tasks respectively into the meta-learner to obtain at least one sampling classification model for each classification task in the at least two classification tasks; then, the server 200 obtains a first distance based on the benchmark classification model and the sampling classification model corresponding to the same classification task, and obtains a second distance based on the benchmark classification models corresponding to different classification tasks; then, the server 200 updates the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0059] Please refer to Figure 2 , which shows a flow chart of a data processing method provided by an exemplary embodiment of the present application. The method is executed by a computer device, and optionally, the computer device can be Figure 1 The terminal device 100 in the system shown in the figure; or, it can also be the server 200, or, it can also be the terminal device 100 and the server 200. Figure 2 As shown, the method may include step 210 , step 220 , step 230 , step 240 and step 250 .

[0060] Step 210: Perform sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each training data set; each training data set corresponds to a classification task.

[0061] The training data set is a training sample pre-acquired by the computer device. The computer device acquires at least two corresponding training data sets according to different classification tasks. Each training data set and training data subset contains at least two types of samples.

[0062] Optionally, the above classification task is an image classification task, or a text classification task, or a molecular property classification task, or other classification tasks.

[0063] Exemplarily, the computer device obtains at least two training data sets consisting of different images according to the image classification task as the training data sets for the image classification task. The images in each training data set correspond to at least two categories, and each category corresponds to at least one sample image. For example, the training data set a contains animals of different categories (such as cats, dogs, etc.), and the classification task of the training data set a is to obtain the category of the animal in the picture; the training data set b contains vehicles of different categories (such as cars, motorcycles, etc.), and the classification task of the training data set b is to obtain the category of the vehicle in the picture; the training data set c contains electronic devices of different categories (such as computers, mobile phones, etc.), and the classification task of the training data set c is to obtain the category of the electronic device in the picture.

[0064] In an embodiment of the present application, by sampling at least two training data sets, a more representative training data subset can be generated, thereby improving the generalization ability and training efficiency of the model.

[0065] Optionally, in the process of sampling at least two training data sets respectively, the computer device randomly selects a part of the training data set from each training data set as a training data subset by random sampling; the random sampling method can reduce the model's dependence on specific samples and improve generalization ability. Alternatively, the computer device selects a part of the training data set from each training data set according to the category ratio by stratified sampling, as a training data subset; the stratified sampling method can ensure that the ratio of each category in each subset is the same as that of the original data set, avoiding model skewness caused by category imbalance.

[0066] Optionally, in the process of sampling at least two training data sets respectively, the computer device obtains a subset of training data by oversampling, and makes the training samples more balanced by increasing the number of minority class samples, which helps the model to better learn the characteristics of the minority class. Alternatively, the computer device obtains a subset of training data by undersampling, and makes the data set more balanced by reducing the number of majority class samples, which reduces the overfitting of the model to the majority class.

[0067] Step 220: Obtain respective baseline classification models for at least two classification tasks; a baseline classification model is a model generated by a meta-learner using a training data set of a classification task.

[0068] In an embodiment of the present application, a computer device inputs a training data set of each classification task into a meta-learner; thereafter, the meta-learner outputs a benchmark classification model corresponding to each classification task.

[0069] That is, a computer device can input a training data set of a classification task into a meta-learner; then, the meta-learner outputs a benchmark classification model corresponding to the classification task.

[0070] The meta-learner processes the input data according to a specified method. Optionally, the specified method is an amortization-based method, a metric-based method, or an optimization-based method.

[0071] Step 230: Obtain at least one sampled classification model for each of the at least two classification tasks; a sampled classification model is a model generated by a meta-learner using a subset of training data for a classification task.

[0072] In an embodiment of the present application, a computer device inputs a subset of training data for each classification task into a meta-learner; thereafter, the meta-learner outputs a sampling classification model corresponding to each classification task.

[0073] That is to say, a computer device can input a training data subset of a classification task into a meta-learner; then, the meta-learner outputs a sampling classification model corresponding to the training data subset of the classification task; for a classification task, multiple sampling classification models can be generated (one sampling classification model for each training data subset).

[0074] Step 240: Based on the respective baseline classification models of at least two classification tasks and at least one sampling classification model of each classification task, obtain a first distance and a second distance; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks.

[0075] The distance between the above models refers to the difference between the models.

[0076] Optionally, the computer device obtains the first distance corresponding to classification task 1 based on a benchmark classification model corresponding to classification task 1 and a sampling classification model corresponding to classification task 1; or, when there are multiple sampling classification models corresponding to classification task 1, the computer device obtains the first distance corresponding to classification task 1 based on any two sampling classification models corresponding to classification task 1.

[0077] Optionally, the computer device obtains the corresponding second distance between classification task 1 and classification task 2 based on a benchmark classification model corresponding to classification task 1 and a benchmark classification model corresponding to classification task 2; or, the computer device obtains the corresponding second distance between classification task 1 and classification task 2 based on a benchmark classification model corresponding to classification task 1 and a sampling classification model corresponding to classification task 2; or, the computer device obtains the corresponding second distance between classification task 1 and classification task 2 based on a sampling classification model corresponding to classification task 1 and a sampling classification model corresponding to classification task 2; or, the computer device obtains the corresponding second distance between classification task 1 and classification task 2 based on a sampling classification model corresponding to classification task 1 and the benchmark classification model corresponding to classification task 2.

[0078] Exemplarily, the computer device may vectorize respective baseline classification models of at least two classification tasks and at least one sampling classification model of each classification task, and obtain the first distance and the second distance by calculating the vectors.

[0079] Step 250: Update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0080] Among them, the minimization of the first distance indicates that the distance between the classification models corresponding to the same classification task is small, that is, the difference between the classification models corresponding to the same classification task is small, which can improve the comparison ability of the meta-learner.

[0081] Among them, the above-mentioned maximization of the second distance indicates that the distance between the classification models corresponding to different classification tasks is large, that is, the difference between the classification models corresponding to different classification tasks is large, which can improve the distinguishing ability of the meta-learner.

[0082] The updated meta-learner is used to generate a classification model for a classification task through an input training data set; the classification model is used to perform classification on the input information.

[0083] In one possible implementation, the updated meta-learner is used to generate an image classification model for an image classification task through an input image training data set (which may include image samples and categories labeled for image elements in the image samples); the image classification model is used to perform classification processing on the input image to obtain the classification category of the image elements in the input image.

[0084] In another possible implementation, the updated meta-learner is used to generate a text classification model for a text classification task through an input text training data set (which may include text samples and categories annotated for the text samples); the text classification model is used to perform classification processing on the input text to obtain the classification category of the input text.

[0085] In another possible implementation, the updated meta-learner is used to generate a molecular property classification model for a molecular property task through an input molecular training data set (which may include molecular structure samples, and categories of molecular properties (such as physical properties, chemical properties, etc.) annotated for the molecular structure samples); the molecular property classification model is used to perform classification processing on the input molecular structure to obtain a classification category of the molecular property corresponding to the input molecular property.

[0086] In summary, the scheme shown in the embodiment of the present application can expand the number of training samples of the meta-learner by obtaining a training data subset through sampling processing of the training data set; the baseline classification model and the sampling classification model of each classification task can be obtained by processing the training data set and the training data subset by the meta-learner; this scheme can improve the generalization ability of the classification model and the accuracy of the classification model in classifying the input data by minimizing the differences between the classification models corresponding to the same classification task and maximizing the differences between the classification models corresponding to different classification tasks, thereby shortening the training time of the classification model, improving the training efficiency of the classification model, and saving the computing resources and power resources consumed when training the classification model.

[0087] Based on the above Figure 2 In the embodiment shown in the figure, in a possible implementation scheme, the above Figure 2 Step 240 in the illustrated embodiment may be implemented as step 240a and step 240b.

[0088] Step 240a: Based on the respective baseline classification models of the at least two classification tasks and at least one sampling classification model of each classification task, obtain the intra-task distances of the at least two classification tasks; the intra-task distance is used to indicate the difference between the baseline classification model and the sampling classification model of the same classification task.

[0089] In an embodiment of the present application, a computer device obtains an intra-task distance corresponding to a classification task based on a baseline classification model and a sampling classification model of the same classification task.

[0090] Exemplarily, taking the case where there are N sampling classification models for classification task 1, the computer device can sequentially obtain N first sub-distances between the N sampling classification models and the benchmark classification model; then, take the average or weighted average of the N first sub-distances to obtain the intra-task distance of classification task 1.

[0091] Step 240b: Obtain a first distance based on the respective intra-task distances of at least two classification tasks.

[0092] Exemplarily, the computer device may take an average or a weighted average of at least two intra-task distances to obtain the first distance.

[0093] Based on the above embodiments, this embodiment shows a feasible solution for obtaining the first distance. First, the intra-task distances corresponding to each classification task are obtained respectively, and then the first distance is obtained according to the intra-task distances, which can improve the accuracy of the first distance.

[0094] Based on the solutions shown in the above embodiments of the present application, in a possible implementation scheme, the above step 240a can be implemented as follows: obtaining the average value of the distances between the model representation of at least one sampled classification model of the first classification task and the model representation of the benchmark classification model of the first classification task, and obtaining the intra-task distance of the first classification task;

[0095] The first classification task is any one of at least two classification tasks.

[0096] Exemplarily, a mapping function for calculating the model representation is pre-set in the computer device. Accordingly, the computer device can obtain the model representation corresponding to the sampling classification model and the benchmark classification model according to the mapping function.

[0097] For example, the meta-learner is defined as g(·,θ), the training data set of the first classification task is D, and the benchmark classification model of the first classification task is h=g(D,θ). In order to obtain the first distance, the computer device represents the model h with a vector, that is, the above model representation, and then calculates the distance between each two vectors. Among them, the model representation e=ψ(h)=ψ(g(D,θ)), ψ() is a simple mapping. g(D,θ) and ψ(g(D,θ)) are defined for different meta-learning algorithms as follows Figure 3 shown.

[0098] The intra-task distance of the first classification task τ The definition is shown in formula (1):

[0099]

[0100] in, is to use the specified sampling strategy π κ From the training dataset The K training data subsets obtained by sampling, is the model representation of the sampled classification model for the kth training data subset, Model representation of the baseline classification model for the training dataset.

[0101] The embodiment of the present application obtains the intra-task distance by using the model representation corresponding to the sampling classification model and the benchmark classification model, which can improve the accuracy of the intra-task distance.

[0102] Based on the solutions shown in the above embodiments of the present application, in a possible implementation scheme, the above Figure 2 Step 240 in the illustrated embodiment may be implemented as step 240c and step 240d.

[0103] Step 240c: Based on the respective benchmark classification models of the at least two classification tasks, obtain the inter-task distance between every two classification tasks in the at least two classification tasks.

[0104] In an embodiment of the present application, a computer device obtains inter-task distances corresponding to different classification tasks based on benchmark classification models of different classification tasks.

[0105] Exemplarily, taking the case where there are M classification tasks, the computer device can combine the baseline classification models of the M classification tasks in pairs, and obtain M (M-1) second sub-distances between the two combinations; then, take the average or weighted average of the M (M-1) second sub-distances to obtain the inter-task distances of the M classification tasks.

[0106] Step 240d: Obtain a second distance based on the inter-task distance between every two classification tasks in at least two classification tasks.

[0107] Exemplarily, the computer device may take an average or a weighted average of at least two intra-task distances and an inter-task distance between every two classification tasks to obtain the second distance.

[0108] Based on the above embodiments, this embodiment shows a feasible solution for obtaining the second distance. The inter-task distance between each two classification tasks is first obtained respectively, and then the second distance is obtained according to the inter-task distance, which can improve the accuracy and efficiency of the second distance.

[0109] Based on the solutions shown in the above embodiments of the present application, in a possible implementation scheme, the above step 240c can be implemented as follows:

[0110] Obtaining a distance between a model representation of a benchmark classification model for the second classification task and a model representation of a benchmark classification model for the third classification task as an inter-task distance between the second classification task and the third classification task;

[0111] The second classification task and the third classification task are any two of the at least two classification tasks.

[0112] Exemplarily, a mapping function for calculating the model representation is pre-set in the computer device. Accordingly, the computer device can obtain the model representations corresponding to the benchmark classification models of each classification task according to the mapping function.

[0113] For example, based on the above formula (1), the distance between tasks D out The definition is shown in formula (2):

[0114]

[0115] Among them, B is the number of classification tasks, b is B classification tasks, τ, τ′ represent different classification tasks in B classification tasks, is the model representation of the baseline classification model for the classification task τ, Model representation of the baseline classification model for the classification task τ′.

[0116] The embodiment of the present application obtains the distance between tasks through the model representation corresponding to the benchmark classification model, which can improve the accuracy of the distance between tasks.

[0117] Based on the solutions shown in the above embodiments, the above Figure 2 Step 250 in the embodiment may be implemented as step 250a and step 250b.

[0118] Step 250a: Obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance.

[0119] The validation error loss function is the loss of the classification model on the validation set. The validation set is separated from the training data set and is used to evaluate the performance of the classification model on new data. By minimizing the validation error loss function, we can ensure that the classification model not only performs well on the training data, but also improve the generalization of the classification model.

[0120] Step 250b: With the goal of minimizing the loss function, solve and obtain the updated parameters of the meta-learner.

[0121] For example, based on the above formulas (1) and (2), in a batch of tasks b, the traditional meta-training goal is, the loss function is as shown in formulas (3) and (4):

[0122] L=L v +λ(D in -D out ); (3)

[0123]

[0124] Among them, L v To minimize the validation loss function, λ is a positive coefficient.

[0125] Compared to minimizing the validation error as the loss function, the embodiment of the present application minimizes the validation error and the difference between the first distance and the second distance as the loss function. By minimizing the loss function, the classification model generated by the meta-learner only needs a small amount of gradient updates to quickly adapt to new tasks.

[0126] In summary, based on the above embodiments, please refer to Figure 4 , which shows a flow chart of a data processing method provided by an exemplary embodiment of the present application. Figure 4 As shown, the data processing method includes the following steps:

[0127] Step 401: perform sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each training data set; each training data set corresponds to a classification task.

[0128] Step 402: Obtain respective benchmark classification models for at least two classification tasks.

[0129] Among them, a baseline classification model is a model generated by the meta-learner through a training dataset of a classification task.

[0130] Step 403: Obtain at least one sampled classification model for each of the at least two classification tasks.

[0131] Among them, a sampled classification model is a model generated by a meta-learner through a subset of training data for a classification task.

[0132] Step 404: Based on the respective benchmark classification models of the at least two classification tasks and at least one sampled classification model of each classification task, obtain the respective intra-task distances of the at least two classification tasks.

[0133] The intra-task distance is used to indicate the difference between the baseline classification model and the sampled classification model for the same classification task.

[0134] Optionally, the above step 404 may implement:

[0135] Obtain the average value of the distance between the model representation of at least one sampling classification model of the first classification task and the model representation of the benchmark classification model of the first classification task, and obtain the intra-task distance of the first classification task; wherein the first classification task is any one of the at least two classification tasks.

[0136] Step 405: Obtain a first distance based on the respective intra-task distances of at least two classification tasks.

[0137] Step 406: Based on the respective benchmark classification models of the at least two classification tasks, obtain the inter-task distance between every two classification tasks in the at least two classification tasks.

[0138] Optionally, the above step 406 may be implemented as follows:

[0139] Obtain a distance between a model representation of a baseline classification model for a second classification task and a model representation of a baseline classification model for a third classification task as an inter-task distance between the second classification task and the third classification task; wherein the second classification task and the third classification task are any two of at least two classification tasks.

[0140] Step 407: Obtain a second distance based on the inter-task distance between every two classification tasks in at least two classification tasks.

[0141] Step 408: Obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance.

[0142] Step 409: With the goal of minimizing the loss function, the updated parameters of the meta-learner are obtained.

[0143] Among them, the execution method of step 401 to step 409 is the same as the execution method of the above-mentioned embodiments of the present application, and will not be repeated here.

[0144] Exemplarily, based on any one or more of the above embodiments, the embodiment of the present application proposes a model training method based on contrastive meta learning (ConML).

[0145] Traditional contrastive learning (CL) trains the encoder in an unsupervised manner. This method directly compares the output of the meta-learner in the model space, giving the model the ability to align and distinguish, and utilizing the distinguishable identity of unlabeled samples. Considering that the tasks in meta-learning are also unlabeled but have distinguishable identities, ConML treats the tasks as unlabeled samples in CL. The positive samples in ConML are different subsets of training data for the same classification task, while the negative samples are training data sets for different classification tasks. In the model space output by the meta-learner, the intra-task distance between positive samples and the cross-task distance between negative samples can be measured.

[0146] The contrastive meta-objective is to minimize the intra-task distance while maximizing the cross-task distance, corresponding to the expected alignment and discrimination capabilities, respectively. Among them, ConML is general and cheap because it can be plugged into any meta-learning algorithm, follows a distributed training style, and does not require additional data or model training.

[0147] ConML can be generally applied to enhance representative meta-learning algorithms from different categories, such as optimization-based (e.g., MAML), metric-based (e.g., ProtoNet), and amortization-based (e.g., Simple CNAPS).

[0148] In addition, by transforming in-context learning (ICL) into a meta-learning paradigm, ConML improves the performance of the four ICL functions by Figure 5 As shown in Figure 2, ConML improves the effect of function LR. Figure 5 As shown in (a) in the figure, ConML improves the effect of function SLR. Figure 5 As shown in (b) in the figure, ConML improves the effect of function DT. Figure 5 As shown in (c) in the figure, ConML improves the effect of function NN. Figure 5 As shown in (d) in .

[0149] On the one hand, the data processing method shown in the above embodiment of the present application can be applied to the picture classification scene, for example, the above data processing method is applied to the animal picture classification scene, the vehicle picture classification scene, the person picture classification scene, etc. Among them, the above training data set is a picture training data set, the above training data subset is a picture training data subset, and the above classification task is a picture classification task. Please refer to Figure 6 , which shows a flow chart of a method for processing image data provided by an exemplary embodiment of the present application. Figure 6 As shown, the image data processing method includes the following steps:

[0150] Step 610: performing sampling processing on at least two image training data sets respectively to obtain at least one image training data subset corresponding to each image training data set; each image training data set corresponds to an image classification task;

[0151] Step 620: Obtain respective benchmark classification models for at least two image classification tasks; a benchmark classification model is a model generated by a meta-learner using an image training dataset of an image classification task;

[0152] Step 630: Obtain at least one sampled classification model for each of the at least two image classification tasks; a sampled classification model is a model generated by a meta-learner using a subset of image training data for an image classification task;

[0153] Step 640: Based on the respective benchmark classification models of at least two image classification tasks and at least one sampled classification model of each image classification task, a first distance and a second distance are obtained; the first distance is used to indicate the distance between classification models corresponding to the same image classification task; the second distance is used to indicate the distance between classification models corresponding to different image classification tasks;

[0154] Step 650: Update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0155] Optionally, the distance acquisition module is used to acquire the intra-task distance of at least two image classification tasks based on the respective baseline classification models of the at least two image classification tasks and at least one sample classification model of each image classification task; the intra-task distance is used to indicate the difference between the baseline classification model and the sample classification model of the same image classification task;

[0156] The distance acquisition module is used to acquire a first distance based on the intra-task distances of at least two image classification tasks.

[0157] Optionally, a distance acquisition module is used to acquire an average value of distances between a model representation of at least one sampled classification model of the first image classification task and a model representation of a benchmark classification model of the first image classification task, to obtain an intra-task distance of the first image classification task;

[0158] The first image classification task is any one of at least two image classification tasks.

[0159] Optionally, a distance acquisition module is used to acquire an inter-task distance between every two image classification tasks in at least two image classification tasks based on respective benchmark classification models of the at least two image classification tasks;

[0160] The distance acquisition module is used to acquire a second distance based on an inter-task distance between every two image classification tasks in at least two image classification tasks.

[0161] Optionally, a distance acquisition module is used to acquire a distance between a model representation of a benchmark classification model for the second image classification task and a model representation of a benchmark classification model for the third image classification task as an inter-task distance between the second image classification task and the third image classification task;

[0162] The second image classification task and the third image classification task are any two of the at least two image classification tasks.

[0163] Optionally, a parameter updating module is used to obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance;

[0164] The parameter updating module is used to solve the updated parameters of the meta-learner with the goal of minimizing the loss function.

[0165] Image classification is a core task in computer vision. It can classify images into predefined categories based on their content. It is very important in practical applications, such as image search engines, security recording, medical diagnosis, etc. The machine learning model trained by the above data processing method can automatically learn the features of the image and improve the classification performance.

[0166] Exemplarily, the experimental results of the above data processing method on the small sample image classification dataset 1 (miniImageNet) are shown in Table 1, and the experimental results of the above data processing method on the small sample image classification dataset 2 (tieredImageNet) are shown in Table 2.

[0167] Table 1

[0168]

[0169] Table 2

[0170]

[0171] Please refer to Figure 7 , which shows a flow chart of a method for processing image data provided by an exemplary embodiment of the present application. Figure 7As shown, taking the image training data set a of the image classification task a and the image training data set b of the image classification task b as examples, the computer device performs sampling processing on the image training data set a of the image classification task a to obtain the image training data subset a1; then, the image training data set a, the image training data subset a1, and the image training data set b are input into the meta-learner g θ , respectively obtain the benchmark classification model h corresponding to the image training dataset a w1 , the sampling classification model h corresponding to the image training data subset a1 w2 , the benchmark classification model h corresponding to the image training dataset b w3 ; Then, the benchmark classification model h w1 , sampling classification model h w2 , benchmark classification model h w3 Represented by vectors, we get the benchmark classification model h w1 The model representation w1, sampling classification model h w2 The model representation w2, the benchmark classification model h w3 Then, according to the model representation w1 and model representation w2, the benchmark classification model h is obtained. w1 , sampling classification model h w2 The distance between them is obtained according to the model representation w2 and model representation w3 to obtain the sampling classification model h w2 , benchmark classification model h w3 The distance between them; then, to minimize the baseline classification model h w1 , sampling classification model h w2 The distance between them is maximized, which is the sampling classification model h w2 , benchmark classification model h w3 The distance between them is the target, and the parameters of the meta-learner are updated.

[0172] Among them, the minimum benchmark classification model h w1 , sampling classification model h w2 The distance between them can train the alignment ability of the meta-learner and maximize the sampling classification model h w2 , benchmark classification model h w3 The distance between them can train the meta-learner's ability to distinguish.

[0173] That is, in order to endow the meta-learner with the required alignment and discrimination capabilities, this application designs a contrastive meta-learning objective measured in the output space of the meta-learner (i.e., the model space), and achieves alignment by minimizing the intra-task distance, which is the distance between models generated from different subsets of the same task. Discrimination is achieved by maximizing the inter-task distance, which is the distance between models generated from different tasks.

[0174] On the other hand, the method shown in the above embodiment of the present application can be applied to the molecular property prediction scenario, for example, the above data processing method is applied to the solubility prediction scenario and the biological activity prediction scenario. Among them, the above training data set is a molecular training data set, the above training data subset is a molecular training data subset, and the above classification task is a molecular property classification task. Please refer to Figure 8 , which shows a flow chart of a molecular data processing method provided by an exemplary embodiment of the present application. Figure 8 As shown, the molecular data processing method includes the following steps:

[0175] Step 810: performing sampling processing on at least two molecular training data sets respectively to obtain at least one molecular training data subset corresponding to each molecular training data set; each molecular training data set corresponds to a molecular property classification task;

[0176] Step 820: Obtain respective benchmark classification models for at least two molecular property classification tasks; a benchmark classification model is a model generated by the meta-learner using a molecular training data set of a molecular property classification task;

[0177] Step 830: Obtain at least one sampling classification model for each of the at least two molecular property classification tasks; a sampling classification model is a model generated by a meta-learner using a subset of molecular training data for a molecular property classification task;

[0178] Step 840: Based on the respective benchmark classification models of at least two molecular property classification tasks and at least one sampled classification model of each molecular property classification task, a first distance and a second distance are obtained; the first distance is used to indicate the distance between classification models corresponding to the same molecular property classification task; the second distance is used to indicate the distance between classification models corresponding to different molecular property classification tasks;

[0179] Step 850: Update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0180] Optionally, the distance acquisition module is used to acquire the intra-task distance of at least two molecular property classification tasks based on the respective benchmark classification models of the at least two molecular property classification tasks and at least one sampling classification model of each molecular property classification task; the intra-task distance is used to indicate the difference between the benchmark classification model and the sampling classification model of the same molecular property classification task;

[0181] The distance acquisition module is used to acquire a first distance based on the intra-task distances of at least two molecular property classification tasks.

[0182] Optionally, the distance acquisition module is used to acquire the average value of the distances between the model representation of at least one sampling classification model of the first molecular property classification task and the model representation of the benchmark classification model of the first molecular property classification task, to obtain the intra-task distance of the first molecular property classification task;

[0183] The first molecular property classification task is any one of at least two molecular property classification tasks.

[0184] Optionally, the distance acquisition module is used to acquire the inter-task distance between every two molecular property classification tasks in at least two molecular property classification tasks based on the respective benchmark classification models of the at least two molecular property classification tasks;

[0185] The distance acquisition module is used to acquire a second distance based on an inter-task distance between every two molecular property classification tasks in at least two molecular property classification tasks.

[0186] Optionally, the distance acquisition module is used to acquire the distance between the model representation of the benchmark classification model of the second molecular property classification task and the model representation of the benchmark classification model of the third molecular property classification task as the inter-task distance between the second molecular property classification task and the third molecular property classification task;

[0187] The second molecular property classification task and the third molecular property classification task are any two of the at least two molecular property classification tasks.

[0188] Optionally, a parameter updating module is used to obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance;

[0189] The parameter updating module is used to solve the updated parameters of the meta-learner with the goal of minimizing the loss function.

[0190] Molecular prediction is an important task in computational chemistry and drug discovery. Its goal is to predict the physical and chemical properties of molecules through computational methods. These properties are crucial for applications such as drug screening and material design. The machine learning model trained by the above data processing method can efficiently process complex molecular structure information, accurately predict the physical and chemical properties of molecules, reduce the computational cost in practical applications, and assist in the analysis and processing of the physical and chemical properties of molecules in practical applications.

[0191] Exemplarily, the experimental results of the above data processing method on the small sample image classification dataset 1 (miniImageNet) are shown in Table 3.

[0192] Table 3

[0193] algorithm 2-shot 4-shot 8-shot 16-shot MAML .009±.006 .125±.009 .146±.007 .159±.009 PAR .124±.007 .140±.005 .149±.009 .164±.008 ProtoNet .117±.006 .142±.007 .175±.006 .206±.008 CNP .139±.004 .155±.008 .174±.006 .187±.009 Hypro .122±.007 .150±.006 .175±.008 .216±.007 IterRefLSTM - - - .234±.010 ADKF-IFT .131±.007 .166±.005 .202±.006 .234±.009 ConML-Hypro .175±.006 .196±.006 .218±.005 .239±.007

[0194] In addition, the method shown in the above embodiment of the present application can be applied to text classification scenarios, for example, the above data processing method is applied to spam filtering scenarios, sentiment analysis scenarios, and news classification scenarios. Among them, the above training data set is a text training data set, the above training data subset is a text training data subset, and the above classification task is a text property classification task. Please refer to Fig. 9 , which shows a flowchart of a text data processing method provided by an exemplary embodiment of the present application. Fig. 9 As shown, the text data processing method includes the following steps:

[0195] Step 910: performing sampling processing on at least two text training data sets respectively to obtain at least one text training data subset corresponding to each text training data set; each text training data set corresponds to a text property classification task;

[0196] Step 920: Obtain respective benchmark classification models for at least two text property classification tasks; a benchmark classification model is a model generated by the meta-learner using a text training data set of a text property classification task;

[0197] Step 930: obtaining at least one sampled classification model for each of the at least two text property classification tasks; a sampled classification model is a model generated by a meta-learner using a subset of text training data for a text property classification task;

[0198] Step 940: Based on the respective benchmark classification models of at least two text property classification tasks and at least one sampled classification model of each text property classification task, a first distance and a second distance are obtained; the first distance is used to indicate the distance between classification models corresponding to the same text property classification task; the second distance is used to indicate the distance between classification models corresponding to different text property classification tasks;

[0199] Step 950: Update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0200] Optionally, the distance acquisition module is used to acquire the intra-task distance of at least two text property classification tasks based on the respective baseline classification models of the at least two text property classification tasks and at least one sampling classification model of each text property classification task; the intra-task distance is used to indicate the difference between the baseline classification model and the sampling classification model of the same text property classification task;

[0201] The distance acquisition module is used to acquire a first distance based on the respective intra-task distances of at least two text property classification tasks.

[0202] Optionally, a distance acquisition module is used to acquire the average value of the distances between the model representation of at least one sampled classification model of the first text property classification task and the model representation of the benchmark classification model of the first text property classification task, so as to obtain the intra-task distance of the first text property classification task;

[0203] The first text property classification task is any one of at least two text property classification tasks.

[0204] Optionally, the distance acquisition module is used to acquire the inter-task distance between every two text property classification tasks in at least two text property classification tasks based on the respective benchmark classification models of the at least two text property classification tasks;

[0205] The distance acquisition module is used to acquire a second distance based on an inter-task distance between every two text property classification tasks in at least two text property classification tasks.

[0206] Optionally, a distance acquisition module is used to acquire the distance between the model representation of the benchmark classification model of the second text property classification task and the model representation of the benchmark classification model of the third text property classification task as the inter-task distance between the second text property classification task and the third text property classification task;

[0207] The second text property classification task and the third text property classification task are any two of at least two text property classification tasks.

[0208] Optionally, a parameter updating module is used to obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance;

[0209] The parameter updating module is used to solve the updated parameters of the meta-learner with the goal of minimizing the loss function.

[0210] Text prediction is an important task in computational chemistry and drug discovery. Its goal is to predict the physical and chemical properties of text through computational methods. These properties are crucial for applications such as drug screening and material design. The machine learning model trained by the above data processing method can efficiently process complex text structure information, accurately predict the physical and chemical properties of text, reduce the computational cost in practical applications, and assist in the analysis and processing of the physical and chemical properties of text in practical applications.

[0211] Please refer to Fig.10 , which shows a block diagram of a data processing device shown in an exemplary embodiment of the present application, the device can be used to perform the following Figure 2In the method shown, all or part of the steps performed by the computer device are as follows Fig.10 As shown, the device comprises:

[0212] The subset sampling module 1001 is used to perform sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each training data set; each training data set corresponds to a classification task;

[0213] The first model acquisition module 1002 is used to acquire respective benchmark classification models of at least two classification tasks; a benchmark classification model is a model generated by a meta-learner through a training data set of a classification task;

[0214] The second model acquisition module 1003 is used to acquire at least one sampled classification model for each classification task in at least two classification tasks; a sampled classification model is a model generated by a meta-learner through a training data subset of a classification task;

[0215] The distance acquisition module 1004 is used to acquire a first distance and a second distance based on respective baseline classification models of at least two classification tasks and at least one sampled classification model of each classification task; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks;

[0216] The parameter updating module 1005 is used to update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

[0217] In some embodiments, the distance acquisition module 1004 is used to acquire the intra-task distance of at least two classification tasks based on the respective baseline classification models of the at least two classification tasks and at least one sample classification model of each classification task; the intra-task distance is used to indicate the difference between the baseline classification model and the sample classification model of the same classification task;

[0218] The distance acquisition module 1004 is configured to acquire a first distance based on respective intra-task distances of at least two classification tasks.

[0219] In some embodiments, the distance acquisition module 1004 is used to acquire the average value of the distances between the model representation of at least one sampled classification model of the first classification task and the model representation of the benchmark classification model of the first classification task, to obtain the intra-task distance of the first classification task;

[0220] The first classification task is any one of at least two classification tasks.

[0221] In some embodiments, the distance acquisition module 1004 is used to acquire the inter-task distance between each two classification tasks in at least two classification tasks based on the respective benchmark classification models of the at least two classification tasks;

[0222] The distance acquisition module 1004 is configured to acquire a second distance based on an inter-task distance between every two classification tasks in at least two classification tasks.

[0223] In some embodiments, the distance acquisition module 1004 is used to acquire the distance between the model representation of the benchmark classification model of the second classification task and the model representation of the benchmark classification model of the third classification task as the inter-task distance between the second classification task and the third classification task;

[0224] The second classification task and the third classification task are any two of the at least two classification tasks.

[0225] In some embodiments, the parameter updating module 1005 is used to obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance;

[0226] The parameter updating module is used to solve the updated parameters of the meta-learner with the goal of minimizing the loss function.

[0227] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0228] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.

[0229] Please refer to Fig.11, which shows a block diagram of a computer device shown in an exemplary embodiment of the present application. The computer device can be implemented as a server in the above-mentioned solution of the present application. The computer device 1100 includes a central processing unit (CPU) 1101, a system memory 1104 including a random access memory (RAM) 1102 and a read-only memory (ROM) 1103, and a system bus 1105 connecting the system memory 1104 and the central processing unit 1101. The computer device 1100 also includes a mass storage device 1106 for storing an operating system 1109, an application program 1110 and other program modules 1111.

[0230] The mass storage device 1106 is connected to the central processing unit 1101 through a mass storage controller (not shown) connected to the system bus 1105. The mass storage device 1106 and its associated computer readable medium provide non-volatile storage for the computer device 1100. That is, the mass storage device 1106 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0231] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that the computer storage medium is not limited to the above. The above-mentioned system memory 1104 and mass storage device 1106 can be collectively referred to as memory.

[0232] According to various embodiments of the present disclosure, the computer device 1100 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1100 can be connected to the network 1108 through the network interface unit 1107 connected to the system bus 1105, or the network interface unit 1107 can be used to connect to other types of networks or remote computer systems (not shown).

[0233] The memory also includes at least one computer instruction, which is stored in the memory. The central processing unit 1101 implements all or part of the steps in the methods shown in the above embodiments by executing the at least one computer instruction.

[0234] In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and program instructions. When the chip runs on a computer device, it is used to implement the data processing method in the above aspect.

[0235] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the data processing methods provided in the above-mentioned method embodiments.

[0236] In an exemplary embodiment, a computer-readable storage medium is also provided, in which computer instructions are stored. The computer instructions are loaded and executed by a processor to implement the data processing methods provided by the above-mentioned method embodiments.

[0237] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0238] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0239] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: The method comprises: Performing sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each of the training data sets; each of the training data sets corresponds to a classification task; Obtaining respective benchmark classification models for at least two of the classification tasks; one of the benchmark classification models is a model generated by a meta-learner using the training data set of one of the classification tasks; Obtain at least one sampling classification model for each of the classification tasks in at least two of the classification tasks; a sampling classification model is a model generated by the meta-learner through a subset of the training data of one of the classification tasks; Based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks, a first distance and a second distance are obtained; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks; The parameters of the meta-learner are updated with the goal of minimizing the first distance and maximizing the second distance.

2. The method according to claim 1, characterized in that The obtaining of the first distance and the second distance based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks comprises: Based on respective baseline classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks, obtaining respective intra-task distances of at least two of the classification tasks; the intra-task distances are used to indicate the difference between the baseline classification model and the sampled classification model of the same classification task; The first distance is acquired based on respective intra-task distances of at least two of the classification tasks.

3. The method according to claim 2, characterized in that The obtaining of the intra-task distances of at least two classification tasks based on the respective benchmark classification models of at least two classification tasks and at least one sampled classification model of each classification task comprises: Obtaining an average value of the distances between a model representation of at least one of the sampled classification models of the first classification task and a model representation of the benchmark classification model of the first classification task, to obtain an intra-task distance of the first classification task; The first classification task is any one of at least two classification tasks.

4. The method according to claim 1, characterized in that: The obtaining of the first distance and the second distance based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks comprises: Based on respective benchmark classification models of at least two of the classification tasks, obtaining an inter-task distance between every two of the classification tasks in at least two of the classification tasks; The second distance is acquired based on an inter-task distance between every two of the classification tasks in at least two of the classification tasks.

5. The method according to claim 4, characterized in that The obtaining, based on respective benchmark classification models of at least two of the classification tasks, an inter-task distance between each two of the classification tasks in at least two of the classification tasks comprises: Acquire a distance between a model representation of the benchmark classification model of the second classification task and a model representation of the benchmark classification model of the third classification task as the inter-task distance between the second classification task and the third classification task; The second classification task and the third classification task are any two of the at least two classification tasks.

6. The method according to any one of claims 1 to 5, characterized in that: The updating of the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance includes: Obtain a loss function; the loss function includes a first loss function and a second loss function, the first loss function is a loss function that minimizes a verification error, and the second loss function is a difference between the first distance and the second distance; With the goal of minimizing the loss function, the updated parameters of the meta-learner are obtained.

7. A data processing device, characterized in that: The device comprises: A subset sampling module, used to perform sampling processing on at least two training data sets respectively to obtain at least one training data subset corresponding to each of the training data sets; each of the training data sets corresponds to a classification task; A first model acquisition module is used to acquire respective benchmark classification models of at least two of the classification tasks; one of the benchmark classification models is a model generated by a meta-learner using the training data set of one of the classification tasks; A second model acquisition module is used to acquire at least one sampled classification model for each of the at least two classification tasks; a sampled classification model is a model generated by the meta-learner through a subset of the training data of one of the classification tasks; A distance acquisition module, used to acquire a first distance and a second distance based on respective benchmark classification models of at least two of the classification tasks and at least one sampled classification model of each of the classification tasks; the first distance is used to indicate the distance between classification models corresponding to the same classification task; the second distance is used to indicate the distance between classification models corresponding to different classification tasks; A parameter updating module is used to update the parameters of the meta-learner with the goal of minimizing the first distance and maximizing the second distance.

8. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the data processing method according to any one of claims 1 to 6.