Task processing method and device based on meta learning, equipment and medium

By downsampling the initial sample set to form a class-balanced sample set, constructing a meta-training task set, and using a meta-learning module to train the model, the problems of insufficient generalization ability and low efficiency in adapting to new tasks in existing technologies are solved, and efficient recognition under conditions of few samples is achieved.

CN121328666APending Publication Date: 2026-01-13PING AN BANK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511392691.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

Existing technologies rely on a large amount of labeled data in scenarios with few samples, resulting in insufficient generalization ability and difficulty in quickly adapting to new tasks, leading to poor target recognition performance.

Method used

By downsampling an initial sample set to form a class-balanced sample set, a meta-training task set is constructed, and a base model is trained using a meta-learning module. The model initialization parameters are obtained, and the base model is adjusted in conjunction with the support set of the target task to generate the target task model. The target task model is then used to process the query set.

Benefits of technology

It improves the model's generalization ability under limited sample conditions and its efficiency in adapting to new tasks, thereby enhancing the accuracy and adaptability of target object identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121328666A_ABST
    Figure CN121328666A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, can be applied to business scenes such as financial science and technology and medical health, and discloses a task processing method and device based on meta-learning, equipment and a medium. And constructing a meta-training task set based on the category balance sample set, training the basic model to obtain model initialization parameters, obtaining a support set of the target task, adjusting the basic model by using the support set to obtain a target task model, and processing a query set of the target task by using the target task model to generate a target processing result. According to the method, the meta-training tasks are constructed on the class balance sample set and trained, so that the basic model obtains the initialization parameters with high generalization, and the initialization parameters can adapt to new tasks and complete query set identification after being quickly adjusted in combination with the support set of the target task, so that the problems of insufficient generalization and low adaptation efficiency under the condition of few samples are solved; and the identification accuracy and efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a task processing method and device based on meta-learning, equipment and medium. BACKGROUND

[0002] In the field of financial technology business, customer value presents obvious concentration characteristics, and a small number of high-value customers often contribute to most of the wealth share. However, the number of high-quality customers is limited, and the amount of information is relatively scarce, which brings challenges to customer value identification and potential customer mining. Traditional machine learning methods such as logistic regression, random forest and deep learning often show certain limitations in this scenario. First, these methods usually rely on a large number of labeled samples for model training, and in the case of limited number of high-quality customers, it is costly and time-consuming to obtain enough labeled samples. Second, these methods have insufficient generalization ability, and when facing new customer groups or business features that have not yet appeared, they often have difficulty in quickly adapting, resulting in a decrease in identification accuracy. In addition, traditional methods usually rely on complex feature engineering, which requires manual extraction and selection of customer behavior, transaction and other multi-dimensional features, which not only increases the cost of human participation, but also may limit the performance of the model.

[0003] In the field of medical health business, the few-sample problem is also prominent. For example, the number of data related to rare diseases, specific pathological images or special groups is limited, which is difficult to meet the demand of traditional machine learning methods for large-scale training samples. In this case, the performance of traditional methods is limited, which is easy to cause the model to overfit to a small number of existing samples, and performs poorly when applied to new patient data. At the same time, medical data usually has complex distribution characteristics, and there are differences caused by different sources of institutions and different detection methods. The modeling method based on the data distribution assumption of traditional methods often cannot well describe this heterogeneity. In addition, the medical health field also requires the model to have rapid learning and migration ability in order to quickly apply in new diseases or new detection scenarios, while traditional machine learning methods usually need to train the entire model from scratch, which is inefficient and difficult to meet the application demand of rapid response. SUMMARY

[0004] The main purpose of the present application is to provide a task processing method, device, equipment and storage medium based on meta-learning, which aims to solve the technical problems that the prior art relies on a large number of labeled data in the few-sample scene, has insufficient generalization ability and is difficult to quickly adapt to new tasks, resulting in poor target recognition effect.

[0005] To achieve the above purpose, the present application provides a task processing method based on meta-learning, comprising:

[0006] An initial sample set is acquired, the initial sample set including one or more of text data, image data, voice data, time series data, structured table data, graph structure data or other computer device processable data, and the initial sample set is down-sampled to obtain a category balanced sample set;

[0007] Based on the category balanced sample set, a meta-training task set is constructed, each meta-training task in the meta-training task set including a support set and a query set;

[0008] Based on the meta-training task set, a base model is trained by a meta-learning module to obtain model initialization parameters;

[0009] A support set of a target task is acquired;

[0010] The base model is adjusted using the support set of the target task with the model initialization parameters as initial values to obtain a target task model;

[0011] Object data to be processed is received, and a query set of the target task is formed by preprocessing, the query set of the target task is processed using the target task model to generate a target processing result.

[0012] Further, to achieve the above object, the application provides a task processing device based on meta-learning, comprising:

[0013] A data preprocessing module is configured to acquire an initial sample set, the initial sample set including one or more of text data, image data, voice data, time series data, structured table data, graph structure data or other computer device processable data, and the initial sample set is down-sampled to obtain a category balanced sample set;

[0014] A task construction module is configured to construct a meta-training task set based on the category balanced sample set, each meta-training task in the meta-training task set including a support set and a query set;

[0015] A meta-training module is configured to train a base model by a meta-learning module based on the meta-training task set to obtain model initialization parameters;

[0016] A support set acquisition module is configured to acquire a support set of a target task;

[0017] A model adaptation module is configured to adjust a base model using the support set of the target task with the model initialization parameters as initial values to obtain a target task model;

[0018] The inference processing module is used to receive the data of the object to be processed, form a query set of the target task through preprocessing, process the query set of the target task using the target task model, and generate the target processing result.

[0019] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a meta-learning-based task processing program stored in the memory and executable on the processor, wherein when the meta-learning-based task processing program is executed by the processor, it implements the steps of the meta-learning-based task processing method as described above.

[0020] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a meta-learning-based task processing program, wherein the meta-learning-based task processing program, when executed by a processor, implements the steps of the meta-learning-based task processing method as described above.

[0021] Beneficial Effects: This invention relates to the field of artificial intelligence technology and can be applied to business scenarios such as fintech and healthcare. It discloses a task processing method, apparatus, device, and medium based on meta-learning, comprising: acquiring an initial sample set and performing downsampling to form a class-balanced sample set; constructing a meta-training task set containing a support set and a query set based on the class-balanced sample set; training a basic model through a meta-learning module to obtain model initialization parameters; obtaining the support set of the target task; adjusting the basic model using the model initialization parameters to obtain the target task model; and processing the query set of the target task using the target task model to generate the target processing result. This invention, by constructing and training a meta-training task set on a class-balanced sample set, enables the basic model to obtain model initialization parameters with strong generalization ability. After adjustment using the support set of the target task, it can quickly adapt to the target task and ultimately effectively identify the query set of the target task. This solves the problems of insufficient generalization ability and low efficiency in adapting to new tasks under limited sample conditions in existing technologies, thereby improving the accuracy and adaptability of target object recognition. Attached Figure Description

[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:

[0023] Figure 1 This is a schematic diagram of an application environment for a task processing method based on meta-learning in one embodiment of the present invention;

[0024] Figure 2 This is a flowchart illustrating an embodiment of the meta-learning-based task processing method of the present invention;

[0025] Figure 3This is a schematic diagram of the functional modules of a preferred embodiment of the meta-learning-based task processing device of the present invention;

[0026] Figure 4 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;

[0027] Figure 5 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0028] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0029] The meta-learning-based task processing method provided in this invention can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The server can obtain an initial sample set from the client and perform downsampling to form a class-balanced sample set. Based on the class-balanced sample set, a meta-training task set containing a support set and a query set is constructed. A base model is trained through a meta-learning module to obtain model initialization parameters. The support set of the target task is obtained, and the base model is adjusted using the model initialization parameters to obtain the target task model. The target task model is then used to process the query set of the target task to generate the target processing result. This invention constructs and trains a meta-training task set on a class-balanced sample set, enabling the base model to obtain model initialization parameters with strong generalization ability. After adjustment with the support set of the target task, it can quickly adapt to the target task and effectively identify the query set of the target task. This solves the problems of insufficient generalization ability and low efficiency in adapting to new tasks under conditions of few samples in existing technologies, thereby improving the accuracy and adaptability of target object recognition. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.

[0030] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the meta-learning-based task processing method provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0031] like Figure 2 As shown, the task processing method based on meta-learning proposed in this invention includes the following steps:

[0032] S10, obtain an initial sample set, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices, and perform downsampling processing on the initial sample set to obtain a class-balanced sample set;

[0033] In this embodiment, obtaining the initial sample set refers to extracting a set of data points containing multiple categories from one or more data sources. These data sources can be historical databases, online system logs, data streams collected by sensors, or manually labeled datasets. The initial sample set typically exhibits high diversity and complexity, including data with significant differences in the number of categories, as well as records with inconsistent formats, incomplete annotations, or high noise levels. To ensure the effectiveness of subsequent processing, the original data first needs to be standardized and cleaned, such as removing missing items, standardizing the format, removing redundant labels, and supplementing label information through manual annotation or semi-automatic annotation tools, thereby forming a well-structured initial sample set.

[0034] The initial sample set can be considered as a dataset that can be processed by computing devices, covering text data, image data, speech data, time series data, structured tabular data, graph structure data, and other processable data not listed here. Text data is segmented or encoded into discrete token sequences, with unified character sets and encodings, and abnormal symbol cleanup. Image data undergoes size alignment, color space unification, and pixel normalization, with denoising and contrast enhancement performed when necessary. Speech data undergoes endpoint detection, resampling, and time-frequency transformation, extracting stable frame-level representations and masking silent segments. Time series data undergoes timestamp alignment, missing measurement imputation, and amplitude normalization, and windowing slicing is performed when needed. Structured tabular data undergoes field mapping, enumeration alignment, and numerical standardization, and cross-field inconsistent records are repaired. Graph structure data defines the tripartite sets of nodes, edges, and attributes, and performs node deduplication, isolated subgraph processing, and topology consistency verification. Multimodal instances establish a bidirectional index from modality to instance at the sample level, ensuring that subsequent processing maintains a consistent input-output relationship at the instance granularity. New data forms not listed are incorporated into the set after field alignment, form unification, and encoding consistency are completed without changing the downstream process.

[0035] After constructing the initial sample set, it needs to be downsampled to address the learning bias caused by imbalanced class distribution. The downsampling process involves counting the number of samples in each class, identifying the class with the fewest samples, and setting this as the target downsampling number. For classes with more samples than the target number, random sampling is used to ensure that only a subset equal to the target number is retained for each class, thus avoiding excessive bias towards large classes during model training. For classes with fewer samples than or equal to the target number, all samples are retained to prevent further reduction of minority classes. Random sampling can be implemented using pseudo-random number generation algorithms, batch selection, or index-based distribution methods to ensure sample representativeness and diversity.

[0036] Finally, all downsampled subsets of class samples are pooled together to form a class-balanced sample set. This set not only achieves balance in the number of classes but also maintains sample diversity and representativeness, reducing the risk of the model over-relying on the dominant class during learning. As input data for subsequent meta-training tasks, the class-balanced sample set directly determines the balance and generalization ability of the training task.

[0037] In practice, the initial sample set can be constructed from various data sources. For example, data can be exported from financial customer transaction record systems, covering transaction information from both high-net-worth and ordinary customers; or multi-dimensional health data of individuals can be collected from medical and health monitoring platforms, including daily behavioral data and abnormal state data. Downsampling can be implemented using simple random sampling or combined with stratified sampling methods to preserve key distribution characteristics within each category while maintaining category balance. In some application scenarios, heuristic rules can be used to optimize the downsampling results, such as assigning higher retention weights to rare but crucial samples, thereby improving the effectiveness of the final dataset.

[0038] In scenarios with large-scale data, efficient downsampling can be achieved through distributed computing frameworks, such as using the MapReduce architecture to count samples and perform sampling operations in parallel across multiple nodes. In scenarios with limited data volume but high data quality requirements, a combination of manual review and automated tools can be used to ensure the accuracy and reliability of the initial sample set labeling and cleaning processes.

[0039] This embodiment effectively solves the learning bias problem caused by unbalanced class distribution by performing downsampling on the initial sample set to obtain a class-balanced sample set. This enables the model to learn the features of each class in a balanced manner during subsequent training, thereby improving the model's generalization ability and adaptability in scenarios with few samples and significant inter-class differences.

[0040] S20, Based on the class-balanced sample set, construct a meta-training task set, wherein each meta-training task in the meta-training task set includes a support set and a query set;

[0041] In this embodiment, constructing a meta-training task set based on a class-balanced sample set means generating a series of training task units on top of the already balanced sample data; each task unit is called a meta-training task. The data in the class-balanced sample set has already been adjusted in quantity, thus possessing fair representativeness. To construct the meta-training task set, it is necessary to determine the number of classes that each meta-training task should include and to clearly define the sample number allocation between the support set and the query set. The support set provides a small number of samples to help the model quickly adapt to the task, while the query set is used to test the adaptation results and calculate the loss. The support set and the query set together constitute a complete task unit.

[0042] During the construction process, several classes from a balanced sample set are first randomly selected as meta-training task classes to ensure task diversity and representativeness. Random selection can be achieved using a pseudo-random number generator or by employing distribution control methods to avoid frequent selection of certain classes, which could lead to decreased data utilization. After selecting classes, a portion of samples from each class is allocated to the support set. These samples play a "learning" role in the task and are typically few in number. Subsequently, samples from the same class that have entered the support set are removed, and another portion of samples is selected to enter the query set. These samples are used to "validate" the model's learning performance on the task. Both the support set and the query set maintain a consistent number of classes to ensure balance and comparability.

[0043] After constructing a meta-training task, this process needs to be repeated until a predetermined number of tasks are generated. All tasks are then combined to form the meta-training task set. This set can cover the distribution patterns of multiple categories and tasks, providing a wide range of task samples for subsequent training and improving the model's adaptability when facing new tasks.

[0044] In practice, the partitioning of the support set and query set can vary. A fixed ratio can be used, for example, the support set contains K samples per class and the query set contains Q samples per class. Alternatively, a dynamic partitioning approach can be adopted, adaptively adjusting the values ​​of K and Q based on changes in the total number of samples. In some implementations, weights can be set for different classes, thereby increasing the probability of occurrence for specific classes during the meta-training task and improving the model's adaptability to those classes.

[0045] In large-scale distributed environments, the generation of meta-training task sets can be accomplished through parallel processing. For example, a portion of the class-balanced sample set can be allocated to each computing node to independently generate several meta-training tasks, and then the results can be merged, thereby significantly shortening the construction time. In small-scale scenarios or scenarios with high data quality requirements, a fine-grained control approach can be adopted, using manual review or data augmentation strategies to improve the diversity and reliability of support sets and query sets.

[0046] This embodiment constructs a meta-training task set based on a class-balanced sample set, and sets a support set and a query set in each task. This effectively simulates a few-shot learning scenario, allowing the model to adapt to different task distributions in advance during the training phase, thereby possessing rapid transfer and generalization capabilities. This not only solves the problem of difficult model training under scarce sample conditions, but also reduces the model's dependence on large-scale labeled data.

[0047] S30, Based on the meta-training task set, the basic model is trained through the meta-learning module to obtain the model initialization parameters;

[0048] In this embodiment, based on the meta-training task set, the base model is trained through the meta-learning module to obtain the model initialization parameters. This means that on top of the already constructed task set, a specially designed learning mechanism is used to iteratively optimize the base model. The meta-training task set provides a large number of support sets and query sets of different categories to simulate a multi-task learning environment. The meta-learning module is the computational unit responsible for processing these tasks. It can learn task-specific parameters from the support set, evaluate the update effect through the query set, and adjust the parameters of the base model accordingly.

[0049] Training begins with initializing the model parameters of the base model. These parameters are typically random values, but can also be parameters from an existing pre-trained model. The meta-learning module randomly samples several tasks from the meta-training task set to form task batches. Each meta-training task first inputs the support set into the base model, calculates the predicted output through forward propagation, and then compares it with the true labels of the support set to obtain the first loss value. The first loss value is used to calculate the first gradient, which in turn performs an inner loop update on the base model parameters to obtain the task-specific parameters.

[0050] Task-specific parameters are then used to process the query set, calculating the predicted output through forward propagation and calculating a second loss value between the predicted output and the true labels of the query set. This second loss value reflects the model's generalization performance after adapting to new tasks. The meta-learning module summarizes and weights the second loss values ​​of all meta-training tasks in the task batch to calculate the meta-gradient. The meta-gradient is then used to update the parameters of the base model; this update process is called the outer loop update. By continuously repeating task sampling, inner loop updates, and outer loop updates, model initialization parameters that can quickly adapt across multiple tasks are finally obtained.

[0051] In terms of implementation, the inner loop update can employ either a first-order gradient descent method or a second-order gradient approximation method to improve update accuracy. The meta-gradient can be calculated using a simple average or a weighted average, with weights dynamically adjusted based on the importance of different tasks. The task batch size can be fixed or dynamically adjusted based on computational resources and data volume to balance training efficiency and generalization performance.

[0052] In a distributed computing environment, task batches can be distributed across multiple computing nodes for parallel execution. Each node independently calculates the loss for the support set and query set, and finally, the meta-gradients are aggregated at the central node to update the model parameters. This implementation can significantly shorten training time. Furthermore, by introducing a learning rate scheduler, the update step sizes of the inner and outer loops can be differentiated, thereby improving training stability and the quality of the final parameters.

[0053] This embodiment trains the base model using a meta-learning module based on a meta-training task set, obtaining model initialization parameters that enable the model to converge quickly when faced with entirely new tasks. This parameter initialization avoids the drawbacks of relying on large-scale labeled data for long-term training, allowing the model to quickly adapt to new tasks with limited samples, while improving the model's generalization performance.

[0054] S40, Obtain the support set for the target task;

[0055] In this embodiment, obtaining the support set for the target task refers to selecting a small subset of representative and labeled data within the target task environment to help the base model quickly adapt to the target task. First, it is necessary to clarify the target task categories. For example, in a classification task, it is necessary to determine the number and types of categories involved. The determination of categories typically depends on the data definition and business requirements of the target task. For instance, a financial customer classification task may include two categories: high-value customers and low-value customers.

[0056] Once the categories are defined, data needs to be collected from the target task categories. This collection refers not only to extraction from existing databases but can also include real-time data collection, sensor data collection, or manually labeled data entry. The collected data is usually in its raw state, containing noise or inconsistent formats. To ensure the support set can be directly used by the model, the collected data needs to be preprocessed. Preprocessing includes data cleaning (removing missing and outliers), formatting (standardizing feature representations), standardization or normalization (adjusting numerical ranges), and, if necessary, data augmentation operations.

[0057] In the preprocessed dataset, each category typically contains several samples, but to maintain the characteristics of few-shot learning, a subset of samples needs to be selected. This subset is generally much smaller than the full dataset and is usually randomly selected according to a pre-defined sample size or proportion. Random selection avoids sampling bias and makes the support set more representative. Finally, the selected subsets from each category are combined to form the complete support set, which serves as input for subsequent model adjustments.

[0058] The construction of the support set can vary depending on the scenario. It can be selected using a fixed number of samples, such as strictly selecting the same number of samples for each category; or it can be selected proportionally, setting a proportion based on the sample size within each category to maintain a consistent relative distribution. A similarity-based selection strategy can also be introduced, prioritizing samples from the candidate set that are closest to the target category prototype, thereby improving the representativeness of the support set.

[0059] In practice, data preprocessing methods can be adjusted according to the data type. For text data, methods such as word segmentation, stop word removal, and vectorization can be used; for image data, methods such as size scaling, pixel normalization, and image enhancement can be used; and for tabular structured data, methods such as missing value imputation, numerical standardization, and feature selection can be used.

[0060] To improve adaptation performance, diversity constraints can be introduced into the support set to ensure that there are significant differences between different samples during the sample selection process, thus avoiding the selection of highly similar samples that would lead to redundancy in the support set information.

[0061] This embodiment obtains a support set for the target task, enabling the model to quickly adapt using a smaller amount of sample data. This process reduces reliance on large-scale labeled data, achieving good adaptability and recognition performance even in scenarios with scarce samples, while also improving the model's generalization ability and convergence speed in new tasks.

[0062] S50, using the model initialization parameters as initial values, adjust the basic model using the support set of the target task to obtain the target task model;

[0063] In this embodiment, the base model is adjusted using the support set of the target task, with the model initialization parameters as initial values, to obtain the target task model. This involves a specific adaptation process from the generalization results of the meta-training stage to the target task. First, the current parameters of the base model need to be set as the model initialization parameters. These parameters are obtained through learning on multiple meta-training tasks and provide good generalization ability, enabling the base model to have the potential for rapid convergence when facing new tasks. Resetting the base model parameters to this set of parameters provides an optimization starting point for subsequent target task learning.

[0064] Building upon this, the model needs to be tuned using the support set for the target task. The support set is a set of labeled data instances representing the basic class distribution of the target task. The model calculates the error with the current parameters using the support set, i.e., the fine-tuning loss. The fine-tuning loss is typically calculated using common loss functions, such as cross-entropy loss or mean squared error, depending on whether the task is classification or regression. The magnitude of the fine-tuning loss reflects how well the model fits the target task's support set.

[0065] Based on the fine-tuned loss value, the fine-tuning gradient is further calculated. The fine-tuning gradient is the set of partial derivatives of the loss function with respect to the model parameters, indicating how the parameters should be updated to reduce the loss. The fine-tuning gradient is applied to the model parameters using gradient descent or its improved algorithms (such as Adam, RMSProp, etc.) to generate updated model parameters. This update process may involve one iteration or multiple iterations, depending on the complexity of the target task and the size of the support set.

[0066] Finally, the updated model parameters are written into the base model to form the target task model. At this point, the target task model has been adapted to the category and data distribution of the target task, enabling it to more accurately predict the query set of the target task in the subsequent inference stage.

[0067] The implementation methods for adjustments can vary depending on the scenario. If the target task has a small amount of data, a single-step gradient update can be used, i.e., updating the parameters only once to avoid overfitting; alternatively, a multi-step update strategy can be used, performing several iterations on the support set to obtain more stable parameters. Regularization constraints can also be introduced to prevent the updated parameters from deviating too far from the model's initial parameters, ensuring that the model maintains a certain level of generalization ability.

[0068] In implementation, different optimization algorithms can be chosen. Standard stochastic gradient descent can be used, suitable for environments with low computational resource requirements; alternatively, adaptive learning rate optimization algorithms such as Adam can be employed, which converge faster and adapt to the data distribution of different tasks. For structured data tasks, a feature selection mechanism can be introduced, using only key features on the support set for parameter updates to reduce the interference of redundant features on gradient calculation.

[0069] In cross-scenario applications, the learning rate can be adjusted based on the number of categories in the target task and the data complexity. A smaller learning rate can be used when there are many categories to ensure stable updates; a larger learning rate can be used when there are few categories to adapt to the task more quickly.

[0070] This embodiment adjusts the base model using the support set of the target task based on the model's initialization parameters, enabling rapid acquisition of the target task model under conditions of minimal data. This not only reduces reliance on large-scale labeled data but also improves the model's convergence speed and accuracy on new tasks, making the model more practical in scenarios such as finance and healthcare where adaptability to small sample sizes is crucial.

[0071] S60: Receive the data of the object to be processed, and form a query set of the target task through preprocessing. Use the target task model to process the query set of the target task and generate the target processing result.

[0072] In this embodiment, data of objects to be processed from the target application scenario is received, and a query set for the target task is formed through preprocessing. The target task model is then used to process the query set to obtain the target processing result. This belongs to the process of the model performing inference under the new task. The query set is an unlabeled data set in the target task, usually generated from real-world application scenarios, such as financial transaction records, medical monitoring data, image or text input, etc. During the input stage, it is necessary to ensure that the data format of the query set is consistent with the input requirements of the target task model. This usually requires preprocessing operations, including data standardization, normalization, feature encoding, or dimension alignment.

[0073] After the query set is input into the target task model, the model performs forward propagation calculations based on the fine-tuned parameters, outputting the prediction result for each object to be processed. The prediction result may be a probability distribution, a class label, or a numerical prediction, depending on the task type. For classification tasks, the probability distribution of each class is obtained through functions such as softmax, and the class with the highest probability is selected as the output label; for regression tasks, continuous numerical values ​​are directly output as the predicted values.

[0074] After obtaining the prediction results, they need to be further transformed into interpretable target processing results. For example, in classification tasks, a corresponding set of category labels can be generated for each object to be processed; in multi-label tasks, multiple labels may be generated for each object to be processed. Finally, the target processing results, as output, can be used for subsequent decision-making, analysis, or system response.

[0075] In implementation, different inference strategies can be adopted based on the differences in the target task. If the query set data is large, batch inference can be used to input the data into the model in batches, thereby improving computational efficiency and reducing memory usage. If the target task has high requirements for real-time prediction, lightweight mechanisms, such as knowledge distillation, quantized inference, or pruning, can be introduced into the model structure to reduce inference time. When the task categories are unevenly distributed, confidence threshold adjustment can also be introduced in the prediction output stage, so that the model outputs unconfirmed labels on data points with high uncertainty, thereby improving the overall reliability of the prediction.

[0076] In cross-scenario applications, adaptation mechanisms can be adopted based on different input modalities. For example, the query set in financial data may contain time-series transaction features, and a time-series feature extraction module can be added before the input; the query set in medical data may contain physiological monitoring signals, and data quality can be enhanced through feature filtering and noise reduction steps. These implementation methods ensure the applicability of the target task model in different fields.

[0077] This embodiment uses a target task model to process the query set of the target task, which can extend the adaptive capabilities learned by the model on the support set to new unlabeled data, achieving efficient inference. This process not only improves the model's prediction accuracy under conditions with few samples, but also reduces its dependence on large-scale labeled data, enabling the model to be applied more quickly in real-world scenarios such as finance and healthcare and produce usable results.

[0078] This invention relates to the field of artificial intelligence technology and can be applied to business scenarios such as fintech and healthcare. It discloses a task processing method, apparatus, device, and medium based on meta-learning, comprising: acquiring an initial sample set and performing downsampling to form a class-balanced sample set; constructing a meta-training task set containing a support set and a query set based on the class-balanced sample set; training a base model through a meta-learning module to obtain model initialization parameters; acquiring the support set of the target task; adjusting the base model using the model initialization parameters to obtain the target task model; and using the target task model to process the query set of the target task to generate the target processing result. This invention, by constructing and training a meta-training task set on a class-balanced sample set, enables the base model to obtain model initialization parameters with strong generalization ability. After adjustment using the support set of the target task, it can quickly adapt to the target task and ultimately effectively identify the query set of the target task. This solves the problems of insufficient generalization ability and low efficiency in adapting to new tasks under limited sample conditions in existing technologies, thereby improving the accuracy and adaptability of target object recognition.

[0079] In one embodiment, step S10 includes:

[0080] S101, collect raw data containing multiple sample categories from at least one data source, the raw data including one or more of text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer equipment;

[0081] S102, Clean and label the raw data to form an initial sample set;

[0082] S103, determine the multiple sample categories included in the initial sample set;

[0083] S104, Count the number of samples in each of the multiple sample categories;

[0084] S105, determine the target number of downsampling samples based on the minimum number of samples in all sample categories;

[0085] S106, for each sample category whose sample size is greater than the target downsampling size, randomly select a number of samples from the sample category equal to the target downsampling size to form a downsampled sample subset of the sample category;

[0086] S107, for each sample category whose sample size is not greater than the downsampling target size, retain all samples of the sample category to form a downsampled sample subset of the sample category;

[0087] S108 gathers downsampled subsets of all sample categories to form a class-balanced sample set.

[0088] In this embodiment, the initial sample set is acquired by performing collection, cleaning, labeling, and structured integration on one or more data sources. Data sources can be historical business databases, online logs, data collection terminals, third-party data interfaces, or manual labeling repositories. During the collection phase, a unified extraction standard is established around the identifier, time, and category fields. Collection batches and time windows are established, and source markers and version numbers are recorded to ensure subsequent traceability. When dealing with multi-source heterogeneity, field mapping and type unification are first completed, and primary key strategies and deduplication rules are clearly defined to avoid the same entity being repeatedly included in the initial sample set across different sources. The raw data is treated as a data set that can be processed by computing devices at the collection end, allowing for single-modality or multi-modal coexistence. Text data undergoes character set unification and encoding standardization, followed by word segmentation or sub-word encoding and cleanup of abnormal symbols. Image data is aligned to resolution and aspect ratio, unified in color space, and normalized to pixels, with quality screening performed on severely occluded or blurry samples. Speech data undergoes endpoint detection, resampling, and time-frequency transformation to form frame-level or time-frequency representations. Time series data undergoes timestamp alignment, missing measurement imputation, amplitude standardization, and windowed slicing. Structured tabular data undergoes format unification and numerical standardization through pattern mapping and field enumeration alignment, and cross-field consistency checks are performed. Graph structure data defines node, edge, and attribute triples, and performs node deduplication, isolated subgraph processing, and topological consistency checks. Data types not listed individually are converted into computable representations such as tensors, sequences, or graphs via adapters after field alignment, format unification, and encoding consistency, and then incorporated into the unified processing flow.

[0089] Cleaning and labeling perform rule-based processing on missing, anomaly, and conflict issues in the original data. Missing data handling includes deletion, imputation, or rollback to the last valid observation, selecting strategies based on field semantics and business validation constraints. Anomaly handling includes range validation, distribution offset detection, time series consistency checks, and cross-field constraint verification. Conflict handling resolves multiple record conflicts for the same entity using priority tables and consistency rules. Labeling is unified to a single-category dictionary, completing the merging of synonyms and the mapping from hierarchical labels to flat labels. The correspondence between original labels and mapped labels is preserved and written into the metadata area for subsequent auditing and error backtracking. After cleaning and labeling, an initial sample set with a consistent structure is generated, including sample identifiers, category labels, feature vectors, and source metadata.

[0090] The determination of multiple sample categories comes from the joint identification of the label dictionary and the data distribution. First, the available categories in the label dictionary are enumerated, and then the cleaned label value set is used for verification. If a category not covered by the data is found in the dictionary, it is retained in the dictionary but not included in the current balancing process. If temporary labels or fine-grained labels are found in the data, they are merged into the target category set according to the mapping rules. Multi-label samples are counted by primary label in this process. The determination of the primary label follows a priority or confidence decision table, and the decision basis is written into the metadata to ensure the stability of the statistical caliber.

[0091] Sample counts are performed on the initial deduplicated sample set. The statistical scope is based on sample identifiers; duplicate observations with the same identifier are not counted repeatedly. Multiple observations spanning a time window can be used in subsequent tasks without affecting the current count. When data partitioning is required, training-related partitions are performed first, and then the counts are performed in the partitioned training region to avoid information leakage. Multi-source data is concatenated and aggregated by primary key to resolve inflated counts caused by cross-source duplication, ensuring that the sample count for each category reflects the true usable sample size.

[0092] The target number of downsampling samples is equal to the minimum number of samples in all sample categories. To avoid occasional noise samples causing the target number to be abnormally low, pre-processing empty category filtering and extreme noise removal are performed to ensure that all categories participating in the minimum value calculation have usable samples. After calculation, the target number is frozen until the end of this batch of downsampling to maintain the consistency of the processing. If subsequent data revisions cause changes in the number of categories, the process is executed as a new batch, without retrospectively checking the results already generated in this batch.

[0093] For each sample category where the number of samples exceeds the target number of downsampling samples, a random selection without replacement is performed, with the number of selections equal to the target number of downsampling samples. Randomness is achieved using a pseudo-random number generator, and the random seed and sampling list are recorded to ensure reproducible experiments. A stratified randomization strategy is introduced when necessary, stratifying samples by source, time, or key attributes, and then sampling evenly across each stratum to reduce sampling bias. In scenarios with strongly correlated samples, a similarity redundancy removal strategy is used, first removing highly similar candidates using a similarity threshold, and then randomly selecting from the remaining set to improve representativeness. After extraction, a downsampled subset of samples for that category is generated, and the indices of the removed samples are retained to support subsequent verification.

[0094] For each sample category with a sample size not exceeding the downsampling target size, all samples are retained to generate a downsampled subset for that category. To improve downstream adaptation stability, a lightweight consistency check can be performed during the retention process to remove records with missing labels and severe anomalies, recording the reasons for removal to ensure that all retained samples meet the most basic data quality constraints. The retained set does not change the original distribution and time series order of the samples, avoiding the introduction of new biases.

[0095] A class-balanced sample set is formed by aggregating downsampled subsets from all sample categories. The aggregation process unifies field order and data types, merges label dictionaries and source metadata, and constructs category-to-sample and sample-to-source indices for easier subsequent task construction and tracking. To prevent the aggregation order from affecting downstream batch processing, a global shuffling can be performed after aggregation, while retaining the shuffling index. Simultaneously, a class histogram and key statistical summaries are output to verify the class balance of the new set and its similarity to the initial sample set in key feature dimensions, ensuring that balancing does not disrupt the basic feature structure.

[0096] Maintain data governance and traceability throughout the entire process. Establish processing logs, version numbers, and verification summaries for each stage of collection, cleaning, labeling, statistics, extraction, and aggregation, linking them to data batches and time windows; retain random seed and candidate pool lists for randomization processes; and retain version information for rules and mapping tables for mapping and merging operations, supporting subsequent auditing and rollback. In industry applications involving sensitive data, ensure compliance through methods such as data masking, field minimization, and access control.

[0097] This embodiment performs a no-replacement random sampling based on the minimum class size on the initial sample set and aggregates them into a class-balanced sample set. During the learning phase, the observation opportunities for each class are balanced, the gradient contribution from the majority class no longer suppresses the minority class in the long run, and the weight distribution of the loss surface in the class dimension is more balanced. Subsequent task construction can extract support and query sets from the balanced sample set, avoiding systematic bias in the training and evaluation stages. This reduces overfitting and omissions caused by class imbalance, improves the recognition stability on a small number of classes, and provides a clean and reproducible input benchmark for subsequent rapid adaptation and generalization.

[0098] In one embodiment, step S20 above includes:

[0099] S201, Determine the number of meta-training task categories;

[0100] S202, determine the number of support set samples and the number of query set samples;

[0101] S203, randomly select a number of sample categories equal to the number of meta-training task categories from the multiple sample categories contained in the category-balanced sample set as meta-training task categories;

[0102] S204, For each selected meta-training task category, randomly select a number of samples from the meta-training task category equal to the number of support set samples to form a support set;

[0103] S205, For each selected meta-training task category, randomly select a number of samples equal to the number of samples in the query set from the remaining samples in the meta-training task category excluding the support set, and form a query set;

[0104] S206, a meta-training task is formed by combining the support sets and query sets of all selected meta-training task categories;

[0105] S207, Repeat the steps of randomly selecting sample categories from the multiple sample categories contained in the category-balanced sample set as meta-training task categories, constructing a support set for each meta-training task category, constructing a query set for each meta-training task category, and combining them to form meta-training tasks, until a preset number of meta-training tasks are generated.

[0106] S208, Construct a set of meta-training tasks based on all generated meta-training tasks.

[0107] In this embodiment, a meta-training task set is constructed based on a class-balanced sample set, organized and extracted around three quotas: the number of meta-training task categories, the number of support set samples, and the number of query set samples. A meta-training task is a general representation of a few-shot learning training unit, internally composed of a support set and a query set, used to simulate rapid adaptation and evaluation for new tasks at an abstract level. The support set provides a very small number of labeled samples within a single task to trigger local updates of parameter directions; the query set serves as the source of performance metrics and gradient signals within the same task, emphasizing non-overlap with the support set and consistency in source. The number of meta-training task categories limits the number of categories covered by each task, serving as a key lever for controlling task difficulty and category diversity; the number of support set samples and the number of query set samples respectively limit the quota of a single category in the two sets, used to stabilize the supervision and evaluation intensity within the task. These terms come from the abstract decomposition of the meta-learning training paradigm, are independent of data modality, and are applicable to various carriers such as structured tables, time series, images, or text.

[0108] From the balanced sample set, a number of sample classes equal to the number of meta-training task classes are randomly selected as meta-training task classes. This selection is performed without replacement, and the random seed and selection list are recorded to ensure reproducibility and auditability. To avoid long-tail classes being absent for extended periods, rotation constraints and frequency limits can be added to the category-level candidate pool to ensure balanced coverage across batches. If key attributes such as source channel, time window, or region exist, selection can be completed at the category level first, followed by soft constraints at the attribute level, ensuring both category balance and source diversity in the task. The selection action only affects the category index and does not directly access the sample details, reducing upfront costs.

[0109] For each selected meta-training task category, a number of samples equal to the number of samples in the support set are randomly selected from that category to form the support set. To control representativeness and redundancy, a candidate pool can be established within the category first, and highly similar duplicate samples can be removed before performing random sampling without replacement, preserving the sampling order and sample identifiers. If there is temporal correlation within the category, the proportion of samples within the same time period can be limited to prevent the support set from being dominated by a single time slice; if the samples have important attribute labels, a stratified sampling method can be used to distribute the quota evenly at the attribute level, improving the breadth of coverage. After sampling, the support set list is frozen for subsequent query set removal and non-cross-validation.

[0110] For each selected meta-training task category, a number of samples equal to the number of samples in the query set are randomly selected from the remaining samples excluding the support set to form the query set. Strict cross-validation constraints are enforced, with elimination performed through the difference of sample identifier sets, followed by random sampling without replacement from the remaining set. If the remaining sample size is insufficient, the process can revert to the previous construction loop, replacing the support set or re-sampling categories to avoid the query set failing to meet quotas due to extreme scarcity. The source attributes of the query set are kept consistent with those of the support set to avoid systematic differences in the source channels between evaluation and learning data; simultaneously, a detailed list of query sets and source metadata are retained to facilitate subsequent error diagnosis and hard case tracking.

[0111] A meta-training task is formed by combining the support sets and query sets of all selected meta-training task categories. A task-level index is created to record the task identifier, category list, support set list, query set list, and random seed. Consistency checks are performed during the combination phase, including category coverage checks, support set and query set non-overlap checks, quota satisfaction checks, and source attribute constraint checks. If any check fails, the process returns to the corresponding extraction stage and regenerates until the constraints are met. Each generated task is either persisted to disk or cached, supporting decoupling and parallel processing from subsequent training flows.

[0112] The process of randomly selecting sample classes from a balanced sample set as meta-training task classes, constructing a support set for each meta-training task class, constructing a query set for each meta-training task class, and combining these to form meta-training tasks is repeated until a preset number of meta-training tasks are generated. This preset number is constrained by the training schedule and resource budget, aiming to cover a sufficient number of class combinations while avoiding redundancy and excessive repetition. To improve diversity, a class rotation table and a known combination masking table can be introduced in the loop to avoid repeating the same class set within a short period. To control storage usage, streaming writes and batch archiving strategies can be adopted to periodically persist completed task batches and clean up intermediate caches.

[0113] A meta-training task set is constructed based on all generated meta-training tasks, outputting a task directory, a bidirectional index from task to sample, category coverage statistics, and a source distribution summary, which serve as standard inputs for subsequent training stages. The set should also retain a version number, a random seed master table, a construction timestamp, and a validation summary for accurate alignment and comparison across different training rounds. If insufficient category coverage or a low proportion of difficult examples is found during subsequent training and validation, the process can be reverted to the construction phase to adjust the number of meta-training task categories or sample quotas, generating a new set version for continuous improvement through version iteration.

[0114] This embodiment organizes the number of training task categories, support set samples, and query set samples in a quota manner on a class-balanced sample set, and implements sampling without replacement and no-crossing constraints. This achieves stable supervision and evaluation strength within a single task and sufficient category combinations and source diversity across tasks. During the training phase, parameters are updated across a broad task distribution, avoiding bias caused by focusing on a few templated tasks and improving rapid adaptation and output stability on unseen tasks. Simultaneously, random seeds and index lists ensure the reproducibility of the construction process, while versioning and verification summaries reduce the cost of parameter tuning and comparison, providing a consistent and clean input baseline for subsequent training and evaluation.

[0115] In one embodiment, step S30 above includes:

[0116] S301, Initialize the model parameters of the basic model;

[0117] S302, Randomly sample multiple meta-training tasks from the meta-training task set to form a task batch;

[0118] S303, For each meta-training task in the task batch, a first loss value is determined using the support set of the meta-training task;

[0119] S304, determine the first gradient based on the first loss value, and update the model parameters based on the first gradient to obtain task-specific parameters;

[0120] S305, determine the second loss value using the task-specific parameters and the query set of the meta-training task;

[0121] S306, Determine the meta-gradient based on the second loss value of all meta-training tasks in the task batch;

[0122] S307, Update the model parameters based on the meta-gradient to obtain the updated model parameters;

[0123] S308, Repeat the steps of randomly sampling task batches from the meta-training task set to obtain updated model parameters until the training termination condition is met, and use the finally obtained updated model parameters as model initialization parameters.

[0124] In this embodiment, after the meta-training task set is prepared, the training process begins with parameter initialization. The parameter tensors of the base model are loaded with initial values, which can be derived from a random distribution or external pre-training results. To ensure reproducibility, the random seed and parameter version are recorded simultaneously. Subsequently, multiple iterations are performed on the meta-training task set. In each iteration, several meta-training tasks are randomly sampled from the set to form a task batch. The batch size is fixed or adaptively adjusted according to resources. The task identifier, category list, and seed are retained in the sampling record to ensure subsequent comparison and playback.

[0125] For each meta-training task in the task batch, the support set is first input into the base model, and the predicted output is obtained through forward propagation. This predicted output is then aligned with the support set labels to determine the first loss value. The class dimension normalization and sample dimension folding strategy for the first loss value are agreed upon during the construction phase to avoid caliber drift across different rounds. The first gradient is calculated based on the first loss value. Norm clipping and scale balancing can be performed without changing its directionality. Subsequently, the current parameters are updated one or more times using the inner layer learning rate to obtain task-specific parameters. The inner layer learning rate can be decoupled from the outer layer learning rate and can be adaptively adjusted according to rounds or task difficulty to control the extent of adaptation for a single task and avoid exceeding limits. The task-specific parameters are only used for subsequent evaluation of the current task and are not directly written back to the global parameters to isolate interference between tasks.

[0126] Continuing to process the query set of the same task using task-specific parameters, the predicted output is obtained through forward propagation and aligned with the query set labels to determine the second loss value. The second loss value reflects the generalization performance after completing one inner-layer adaptation under the current task and maintains the same statistical caliber as the first loss value. The second loss values ​​of all meta-training tasks within the task batch are aggregated. The aggregation method can be a simple mean or a weighted mean based on class coverage, sample validity, or hard example weights. Numerical stabilization and scale alignment can be performed before aggregation to prevent extreme tasks from dominating outer-layer updates. A meta-gradient is constructed based on the aggregated target. The meta-gradient and the outer-layer learning rate jointly determine the update magnitude of the global parameters. If second-order information is enabled, an approximation term can be introduced to improve directional accuracy while keeping memory usage under control. If resources are limited, a first-order approximation is used to complete outer-layer direction estimation at a lower cost.

[0127] After completing one outer layer update, the updated model parameters are obtained. To improve training stability, momentum terms, parameter decorrelation, or exponential moving averages can be introduced into the outer layer update. Simultaneously, parameter sensitivity indicators are statistically analyzed along the category dimension for constructing soft constraints for the next round of task sampling. After one iteration, new task batches are sampled from the meta-training task set, and the sampling, support set determination of the first loss value, first gradient calculation and inner layer update, query set determination of the second loss value, batch aggregation and meta-gradient calculation, and outer layer update are repeated. Training termination conditions can be triggered by several criteria, such as reaching the upper limit of the number of iterations, no significant improvement in the second loss value on the independent validation task pool, gradient norm remaining below a threshold for an extended period, or outer layer step size converging to a set range. After termination, the parameters obtained from the final outer layer update are used as model initialization parameters and archived along with the training summary, random seed master table, validation curve, and aggregation caliber to form a reusable initialization version.

[0128] At the implementation level, task batches can be executed in parallel across multiple devices: each task independently completes two forward passes for the support set and query set, and one inner layer update, before the second loss value aggregation and outer layer update are completed at the central node; to reduce communication overhead, gradient compression and block synchronization can be used. Hyperparameters such as inner and outer layer learning rates, momentum, weight decay, gradient pruning thresholds, and aggregation weights can be dynamically adjusted by round, by task difficulty, or by class coverage; early stopping and rollback mechanisms are enabled when necessary to prevent outer layer updates from entering unstable regions. Key intermediate quantities are logged and quantified throughout the process, including the distribution of the first and second loss values, the inner and outer layer step sizes, gradient norms, and class coverage curves, ensuring that the training process is diagnosable, interpretable, and comparable.

[0129] This embodiment achieves a two-layer update by repeatedly performing inner-set adaptation and outer-set evaluation on the meta-training task set, and drives global parameter iteration with batch-aggregated meta-gradients. This results in initialization parameters for the base model that are highly sensitive to task transfer signals and have a stable convergence path. This initialization achieves effective adaptation with minimal supervision when facing new tasks, reduces reliance on large-scale annotations, mitigates the long-term impact of class bias on training direction, and maintains output stability and convergence speed under different sources and class combinations. This provides a consistent and reusable starting point for subsequent rapid adjustments and inference.

[0130] In one embodiment, step S40 above includes:

[0131] S401, Determine the target task categories included in the target task;

[0132] S402, For each target task category, collect sample data for that target task category;

[0133] S403, preprocess the sample data for each target task category collected;

[0134] S404, Select a portion of sample data from the preprocessed sample data of each target task category;

[0135] S405 combines partial sample data from all selected target task categories to form a support set for the target task.

[0136] In this embodiment, obtaining the support set for the target task revolves around five stages: category determination, data collection, data preprocessing, sample selection, and set construction, all while maintaining consistent labeling standards and traceable metadata throughout. First, the target task categories are determined. The category set is derived from a business tag dictionary and data distribution joint verification. This involves enumerating candidate categories in the tag dictionary and removing empty categories, while simultaneously merging fine-grained tags from the data into the target category set according to mapping relationships. For multi-label samples, the primary label is determined using a priority or confidence decision table. This decision process, along with the mapping table and version number, is written into the metadata to ensure the stability of subsequent statistics and extraction standards.

[0137] Once the category set is fixed, data collection is performed for each target task category. The collected data can come from historical business databases, online logs, terminal collection streams, or third-party interfaces. A unified extraction standard includes identifier fields, time fields, category fields, and key feature fields. For multi-source heterogeneous scenarios, a field mapping and type unification strategy is adopted. Primary key merging rules are established for cross-source duplicates, preserving source markers, time windows, and collection batches for subsequent deduplication and traceability. If the target task is in a near real-time environment, a sliding time window can be used for scrolling collection with frozen window boundaries to avoid sample drift caused by movement.

[0138] After data collection, preprocessing is performed on the data for each target task category. The preprocessing workflow includes missing data handling, anomaly handling, format standardization, and numerical normalization. Missing data handling involves deletion, imputation, or backfilling based on the field semantics; anomaly handling removes extreme noise through range verification, distribution offset detection, and cross-field consistency checks; format standardization maps text, time, enumerations, and values ​​to a unified encoding space; numerical normalization ensures dimensional consistency and scale comparability. For images and time series, size alignment, pixel normalization, filtering, and noise reduction can be added; for text, word segmentation, stop word processing, and vectorization can be added. A one-to-one index is established between the preprocessed output and the original records to ensure that any sample can be traced back to its original source.

[0139] Based on clean data, a subset of sample data is selected as candidate supporting instances from each target task category. The selection strategy is guided by a small number of high information density and representativeness, and common paths include random sampling without replacement, stratified sampling, and diversity-constrained sampling. Random sampling without replacement is implemented using a pseudo-random number generator and records the random seed to ensure experimental reproducibility; stratified sampling is stratified by time slice, region, or source channel, and then sampling is evenly distributed across each stratum to reduce bias; diversity-constrained sampling first eliminates highly similar samples based on similarity assessment, and then draws from the deredundant set to improve coverage breadth. When the sample size within a category is extremely small and noise still exists, a lightweight consistency check is introduced to eliminate records with missing labels and structural defects, and the elimination list is added to the metadata for auditing. To avoid information leakage with subsequent query sets, a supporting list is generated and the identifiers are frozen for subsequent non-cross-validation use upon completion of the selection.

[0140] After each target task category is selected, a support set for the target task is formed by combining them according to a unified field order, data type, and label dictionary. During the combination phase, a bidirectional index is established from category to sample and from sample to source, outputting a category histogram, a time distribution summary, and the source percentage, verifying the balance and representativeness of the set in both category and key attribute dimensions. To adapt to different training schedules, multiple equivalent support set versions can be generated in parallel, recording version numbers and random seeds, ensuring consistent input for downstream comparative experiments and regression tests. Throughout the process, processing logs, verification summaries, and version ledgers are constructed around data collection, preprocessing, selection, and combination, covering data caliber, randomness, and quality control points, achieving end-to-end traceability.

[0141] This embodiment performs phased data collection, verifiable preprocessing, and quota-based small-scale selection under a clearly defined set of target task categories. It constructs a support set for the target task with non-overlapping constraints and versioned indexes. The small amount of labeled data achieves high information density and balanced coverage in both category and source dimensions. As a result, a stable and reproducible supervision signal is obtained during the fine-tuning stage, reducing bias sources and noise interference, reducing dependence on large-scale labeling, enabling subsequent parameter adjustments to achieve usable convergence with fewer iterations, and keeping the adaptation results consistent and comparable across different running batches.

[0142] In one embodiment, step S50 above includes:

[0143] S501, set the current parameters of the basic model to the model initialization parameters;

[0144] S502, determine the fine-tuning loss value using the support set of the target task;

[0145] S503, determine the fine-tuning gradient based on the fine-tuning loss value;

[0146] S504, Update the parameters of the base model based on the fine-tuned gradient to obtain the updated model parameters;

[0147] S505, the base model containing the updated model parameters is used as the target task model.

[0148] In this embodiment, the current parameters of the base model are set as the model initialization parameters. During loading, parameter shape verification and name alignment are performed to ensure a one-to-one match between weight tensors and buffers. Batch normalization and layer normalization statistics are synchronized to the initialization state to avoid historical runtime remnants affecting the adaptation process. Accuracy and device mapping are consistent, unified to the target operating device and numerical accuracy. Only submodules requiring updates are allowed to participate in training, layers not involved in adjustments are frozen, and a list of trainable parameters and version information is recorded to ensure traceability and rollback capability.

[0149] The fine-tuning loss value is determined using the support set of the target task. The support set is organized into a reproducible data loading sequence with a fixed random seed and sample order. The loss composition is selected based on the task type. For classification scenarios, consistent encoding of the label space is used, supporting both single-label and multi-label methods. The class weights and label smoothing coefficients for both are registered in the metadata to avoid ignoring minor classes. For regression scenarios, outliers are robustly handled using piecewise error penalties to reduce the dominance of extreme samples on the loss. For time series and text scenarios, sequence length alignment and masking management are performed to ensure that effective positions participate in loss accumulation. For multimodal scenarios, single-modal errors are calculated separately for each submodal branch and then aggregated. The loss is reduced with consistent caliber across the sample and class dimensions, outputting a single numerical value as the fine-tuning loss value, which is bound to the support set batch index for logging and comparison.

[0150] The fine-tuning gradient is determined based on the fine-tuning loss value. It is backpropagated to the trainable parameter set via an automatic differentiation engine to generate a gradient tensor. Numerical hygiene checks and pruning are performed on the gradient, including infinite and empty gradient masking, outlier replacement, and global norm upper bound constraints to prevent unstable updates. Scaling and descaling processes are enabled in mixed-precision environments to avoid losing small gradients at low precision. Differentiated learning rates and weight decay strategies are applied to different parameter sets; for example, smaller update rates are used for normalized scaling and biases, and more robust step sizes are used for embedding or feature extraction layers. If necessary, a distance penalty term relative to the model's initial parameters is introduced to keep the current weight offset within an acceptable range and reduce the risk of overfitting.

[0151] The parameters of the base model are updated based on fine-tuned gradients to obtain the updated model parameters. The optimizer performs one or more small-step updates, with the number of steps, step size, and momentum adaptively set according to the size of the support set and the number of classes. Stronger regularization and smaller step sizes are used for scenarios with small datasets, while larger datasets can increase the step size and reduce the regularization strength. Exponential moving averages are used for the parameters involved in the update to smooth noisy gradients, empirically improving the stability of subsequent inference. Consistency checks are performed immediately after the update to check for numerical overflow, weight anomalies after gradient explosion, and reasonable ranges for normalized statistics. In case of anomalies, the system reverts to the pre-update state or retryes with a smaller step size. A snapshot of the updated model parameters, optimized hyperparameters, and a summary of the support set are recorded to form a reproducible experimental unit.

[0152] The base model containing the updated model parameters is used as the target task model. An explicit association is established between the target task model and the model initialization parameters, retaining the lookup hash, generation time, and environment summary to form a versioned artifact. If necessary, inference acceleration preparations are performed on the target task model, including weight quantization, structural pruning, or operator fusion, without altering the weight semantics. The final artifact is stored on disk or registered in a deployable format to the model repository, accompanied by non-cross-validation records and runtime logs with the support set, facilitating stable inference on the target task's query set.

[0153] This embodiment starts with the model's initial parameters and performs small-scale, controlled, and traceable parameter updates on the support set of the target task. The updated model parameters effectively adapt to the target task's category and data distribution without significantly deviating from the initial state. Fine-tuning the loss value provides a supervision signal consistent with the task, and fine-tuning the gradient maintains numerical stability under constraints of pruning, grouping learning rates, and regularization. Versioning and consistency checks during the update process reduce unexpected drift. The resulting target task model achieves usable convergence faster with fewer annotations, reduces dependence on large-scale data, and maintains higher output stability and cross-batch reproducibility in subsequent inference stages.

[0154] In one embodiment, step S60 above includes:

[0155] S601, Receive data of the object to be processed from the target application scenario;

[0156] S602, preprocess the data of the object to be processed to obtain a set of data to be predicted with a uniform format;

[0157] S603, combine the dataset to be predicted into a query set for the target task;

[0158] S604, Input the query set of the target task into the target task model;

[0159] S605, determine the predicted output of each object to be processed in the query set of the target task through the target task model;

[0160] S606, Generate category labels for each object to be processed in the query set of the target task based on the prediction output;

[0161] S607 outputs the target processing result, which includes the category labels of all objects to be processed in the query set containing the target task.

[0162] In this embodiment, when receiving data from the target application scenario, an input channel, source identifier, and time window are established. Data batches and source metadata are recorded to ensure subsequent traceability and consistency verification. The data to be processed may come from online streams, offline files, or API pulls, and includes structured fields, time-series segments, image frames, or text segments. To ensure the stability of subsequent processing, integrity checks and security filtering are performed on the input, eliminating empty records, malformed records, and unsupported encoding formats. A list and reasons for elimination are retained for auditing purposes.

[0163] When preprocessing the data to be processed to obtain a standardized dataset for prediction, a streamlined process is performed focusing on field alignment, value standardization, and morphological consistency. Structured data undergoes field mapping, numerical normalization, and missing data handling, with unified discrete encoding and timestamp representation. Time-series data is segmented, aligned, and managed with masks to ensure valid locations participate in inference. Image data undergoes size alignment, pixel normalization, and color space unification. Text data undergoes word segmentation, stop item processing, and vectorization. For multimodal inputs, alignment indexes are established, binding each modality under the same processing object to form a dataset for direct model consumption. During processing, data summaries and check hashes are generated to verify transformation consistency and lock the version.

[0164] When defining the dataset to be predicted as the query set for the target task, an index and bidirectional mapping of objects to be processed are established, allowing for fast retrieval of both objects to be processed and sources. The query set and the support set for the target task maintain a non-overlapping relationship, with exclusion achieved through sample identifier set difference operations. The comparison results are written into the query set metadata to avoid information leakage during the adaptation phase. A shape and type self-check is performed on the query set to ensure consistency with the input contract of the target task model, including the number of channels, sequence length, and feature dimensions.

[0165] When inputting the query set of the target task into the target task model, two paths are used: batch feeding or streaming feeding. Batch feeding is used in throughput-priority scenarios, controlling memory usage and latency through batch size; streaming feeding is used in real-time-priority scenarios, maintaining low latency through sliding windows and small batch runs. Before input, device mapping and precision mapping are performed to unify the running device and numerical precision, avoiding the overhead caused by cross-device transfer. During the input process, batch indexes, runtime environment, and inference logs are recorded to facilitate anomaly localization and reproduction.

[0166] When determining the predicted output for each object in the query set for the target task using the target task model, only forward propagation is performed. Classification tasks output category probability distributions or unnormalized scores, regression tasks output continuous values, sequence labeling tasks output position-level predictions, and detection tasks output bounding boxes and category pairs. To suppress numerical instability, numerical stabilization operators are enabled during the inference phase, and masks are used for long sequences to prevent invalid positions from participating in the computation. For multimodal structures, sub-branch outputs are obtained separately and fused, with the fusion strategy consistent with that used during model training to ensure distribution alignment.

[0167] When generating category labels for each object to be processed in the query set of the target task based on the predicted output, processing is performed according to the task definition. For single-label classification, the category corresponding to the highest score is selected, and temperature scaling and confidence thresholds are applied as needed to improve consistency. For multi-label classification, multi-label sets are generated by truncating based on thresholds or rankings, and constraints are corrected for mutually exclusive sets. Sequences and detection scenarios undergo deduplication, non-maximum suppression, or span merging to obtain stable labels. The generated category labels are bound to the object indexes and confidence information and key intermediate summaries are retained for quality assessment and threshold backtracking.

[0168] The system aggregates, sorts, and encapsulates results when outputting the target processing results, which include category labels for all objects to be processed in the query set containing the target task. During the aggregation phase, the input order is kept recoverable, and three types of indexes are output: object-to-label, label-to-object, and object-to-source, to support downstream retrieval. A completeness verification and consistency summary is generated for the results, including the coverage ratio of objects to be processed, the proportion of empty results, and the confidence distribution, for runtime quality monitoring. De-identified views are provided when necessary to meet compliance requirements in sensitive scenarios. The final results, along with version, time window, and runtime environment summaries, are archived to ensure horizontal comparison and reproducibility experiments across different runtime batches.

[0169] Example Explanation: In the fintech business, banks, facing an extremely uneven distribution of customer value, urgently need to quickly extract transferable patterns from a very small sample of high-quality customers to achieve efficient value prediction for new customer groups. First, customer data is collected from different business systems, covering multi-dimensional information such as transaction history, account asset structure, credit rating, and interaction behavior. This data is then cleaned, uniformly coded, and labeled to form an initial sample set containing multiple customer categories. Since the sample size varies significantly between different customer categories, directly using this data would cause the model to be biased towards larger customer groups. Therefore, it is necessary to statistically analyze the sample size of each category, using the minimum number of samples in each category as the downsampling target. Subsets are randomly extracted from the excessive categories, while all samples from the scarce categories are retained. This results in a category-balanced sample set, laying the foundation for fair sampling in subsequent tasks.

[0170] Based on this balanced set, a meta-training task set is constructed. A predetermined number of customer categories are randomly selected, and a certain number of samples are drawn from each category to form a support set. Then, samples of the same type are drawn from the remaining categories to form a query set. The support set provides the model with a small amount of task-specific learning information, while the query set is used to test the fit. Through repeated sampling, multiple meta-training tasks covering different combinations of customer categories are generated, and these are combined to form a complete meta-training task set. This set can simulate the diverse customer distributions that may be encountered in banking operations, providing task diversity for subsequent training.

[0171] A meta-training task set is used to train the base model via a meta-learning module. In each task batch, the model first calculates the first loss and obtains the corresponding gradient based on the support set, updating the task-specific parameters; then, these parameters are used to calculate the second loss on the query set. The second losses from multiple tasks collectively determine the meta-gradient, which is used to back-update the model parameters. By iteratively performing sampling, computation, and updating, model initialization parameters that can quickly adapt to new tasks are gradually obtained. This process avoids the dependence of traditional models on large-scale labeled data, enabling the model to generalize and adapt quickly in data-scarce scenarios.

[0172] In practical customer value prediction tasks, the first step is to determine the target customer category, such as high-value, medium-value, and low-value customers. Limited sample data is collected for these categories, which may include high-net-worth transaction records, loan repayment performance, or asset transfer information from the past three months. The collected data undergoes preprocessing, including anomaly removal, feature standardization, and behavioral sequence slicing. A subset of this data is then selected as the support set, and these are combined to form the support set for the target task. This support set allows the model to be quickly adjusted within the specific context of the target customer group.

[0173] Starting with the model's initial parameters, the fine-tuning loss is calculated using the support set of the target task, and a fine-tuning gradient is generated. This updates the parameters of the base model, resulting in a target task model capable of recognizing the characteristics of the current customer group. This process involves small-scale parameter adjustments, eliminating the need for large-scale retraining and enabling adaptation in a very short time.

[0174] Subsequently, the system receives data from real-world application scenarios, such as initial transaction behavior, credit data, and asset and liability information of newly opened customers. After cleaning, standardization, and format unification, a set of data to be predicted is obtained and defined as the query set for the target task. The query set is input into the target task model, which calculates the predicted output for each customer instance through forward propagation, generating a probability distribution or score. Based on these predicted outputs, a corresponding category label is generated for each customer, such as classifying them as a high-potential customer or a general customer. Finally, the system outputs the target processing result containing the predicted labels for all customers. The result can be directly accessed by the banking system for customer segmentation, differentiated marketing, and risk control.

[0175] In the healthcare field, such as health management or home health monitoring, there is a need to quickly identify users' health risks and potential abnormalities under limited sample conditions in order to provide personalized interventions. Initially, raw health data is collected from multiple sources, including heart rate, blood pressure, and sleep patterns recorded by wearable devices; air quality and activity levels collected by home environmental sensors; or basic disease information recorded in community health records. This data is cleaned, anomaly removed, formatted, and labeled to form an initial sample set containing multiple health statuses of different population groups. Because the sample size varies between different health status categories, downsampling is required. By statistically analyzing the sample size of each population group, and aiming for the minimum number of samples in each category, samples from major categories are randomly selected, while samples from minor categories are retained entirely, resulting in a class-balanced sample set. This process ensures that subsequent modeling will not be biased towards common health statuses due to uneven sample distribution, thus maintaining predictive accuracy even under scarce health statuses.

[0176] A meta-training task set is constructed based on a balanced sample set of categories. Several health status categories are randomly selected, and a portion of the data is allocated to each category as a support set, with the remaining data serving as a query set. The support set is used to simulate a small amount of prior knowledge in the health monitoring task, while the query set is used to test the model's adaptability to that task. Multiple tasks are generated through repeated sampling combinations, each containing support and query sets for different categories, ultimately forming a complete meta-training task set. This set can cover diverse health status distributions, such as chronic disease risk in different age groups and physiological characteristics under different lifestyles, thus providing rich transfer scenarios for subsequent model training.

[0177] During training, the model first initializes its parameters and then samples from the meta-training task set to form task batches. In each task, a first loss is calculated using the support set to obtain the update direction, generating task-specific parameters. These parameters are then used to make predictions on the query set, calculating a second loss. The second losses from multiple tasks collectively determine the meta-gradient, which is used to update the model parameters. After multiple iterations, model initialization parameters capable of quickly adapting to new health monitoring tasks are obtained. This training method avoids dependence on large-scale labeled health data, enabling the model to transfer across population groups and scenarios.

[0178] In practical applications, such as predicting health risks for key populations in a community, it is necessary to first collect a support set for the target population. This could include small-scale health record data, recent physical examination indicators, or abnormal trends monitored by wearable devices. After preprocessing, cleaning, and standardization, a subset of samples is selected to form a support set, which is then input into the model for fine-tuning, starting with the initial parameters. During fine-tuning, the fine-tuning loss and gradient are calculated based on the support set, and the model parameters are updated to obtain a target task model capable of identifying specific health characteristics of the population.

[0179] Next, the system receives data from real-world application environments, such as daily monitoring data of newly connected residents, the latest data collected by home environmental sensors, or regular community health screening data. This data is processed in a standardized format to form a query set, which is then input into the target task model. The model outputs a prediction result for each query instance, such as a category label for cardiovascular risk, early signs of diabetes, or sleep disorders. The final result includes a classification of the health status of all individuals, which can be used by community health management departments or personal health assistants for early warning, intervention, or personalized health guidance.

[0180] This embodiment standardizes and preprocesses the data to be processed into a unified set of data to be predicted. The query set is consistent with the input contract of the target task model in terms of form and scope, reducing inference bias caused by format differences. The risk of overestimation caused by the leakage of adaptation information is eliminated by non-cross-validation with the support set. The prediction output of each instance is obtained through batch or streaming feeding and numerical stabilization forward propagation, and category labels are generated by rule-based post-processing, outputting structured target processing results. The above links form a closed loop traceability at the source record, conversion scope and inference log level, maintaining comparability and reproducibility between batches, thereby achieving stable, low-latency and auditable inference output after a small number of samples are adapted.

[0181] In one embodiment, a meta-learning-based task processing apparatus is provided, which corresponds one-to-one with the meta-learning-based task processing methods described in the above embodiments. (Refer to...) Figure 3 ,Figure 3 This is a schematic diagram of the functional modules of a preferred embodiment of the meta-learning-based task processing device of the present invention. The module includes a data preprocessing module 10, a task construction module 20, a meta-training module 30, a support set acquisition module 40, a model adaptation module 50, and an inference processing module 60. Detailed descriptions of each functional module are as follows:

[0182] The data preprocessing module 10 is used to obtain an initial sample set, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices. The module also performs downsampling on the initial sample set to obtain a class-balanced sample set.

[0183] Task construction module 20 is used to construct a meta-training task set based on the category-balanced sample set, wherein each meta-training task in the meta-training task set includes a support set and a query set;

[0184] The meta-training module 30 is used to train the basic model based on the meta-training task set through the meta-learning module to obtain the model initialization parameters;

[0185] Support set acquisition module 40 is used to acquire the support set of the target task;

[0186] The model adaptation module 50 is used to adjust the basic model using the model initialization parameters as initial values ​​and the support set of the target task to obtain the target task model.

[0187] The inference processing module 60 is used to receive the data of the object to be processed, form a query set of the target task through preprocessing, process the query set of the target task using the target task model, and generate the target processing result.

[0188] In one embodiment, the data preprocessing module 10 is specifically used for:

[0189] Raw data containing multiple sample categories is collected from at least one data source, including one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structured data, or other data that can be processed by computer devices;

[0190] The raw data is cleaned and labeled to form an initial sample set;

[0191] Determine the multiple sample categories contained in the initial sample set;

[0192] Count the number of samples in each of the multiple sample categories;

[0193] The target number of downsampling samples is determined based on the minimum number of samples in all sample categories.

[0194] For each sample category whose sample size is greater than the downsampling target size, a sample size equal to the downsampling target size is randomly selected from the sample category to form a downsampled sample subset of the sample category;

[0195] For each sample category whose sample size is no greater than the downsampling target size, all samples of the sample category are retained to form a downsampled subset of the sample category;

[0196] A subset of downsampled samples from all sample categories is collected to form a class-balanced sample set.

[0197] In one embodiment, the task construction module 20 is specifically used for:

[0198] Determine the number of meta-training task categories;

[0199] Determine the number of support set samples and the number of query set samples;

[0200] From the multiple sample categories contained in the category-balanced sample set, a sample category whose number is equal to the number of the meta-training task categories is randomly selected as the meta-training task category;

[0201] For each selected meta-training task category, a number of samples equal to the number of support set samples are randomly selected from the meta-training task category to form a support set;

[0202] For each selected meta-training task category, a number of samples equal to the number of samples in the query set are randomly selected from the remaining samples in the meta-training task category excluding the support set to form the query set.

[0203] A meta-training task is formed by combining the support sets and query sets of all selected meta-training task categories.

[0204] Repeat the steps of randomly selecting sample categories from multiple sample categories contained in the category-balanced sample set as meta-training task categories, constructing a support set for each meta-training task category, constructing a query set for each meta-training task category, and combining them to form meta-training tasks, until a preset number of meta-training tasks are generated.

[0205] Construct a set of meta-training tasks based on all generated meta-training tasks.

[0206] In one embodiment, the meta-training module 30 is specifically used for:

[0207] Initialize the model parameters of the base model;

[0208] Multiple meta-training tasks are randomly sampled from the meta-training task set to form a task batch;

[0209] For each meta-training task in the task batch, a first loss value is determined using the support set of the meta-training task;

[0210] The first gradient is determined based on the first loss value, and the model parameters are updated based on the first gradient to obtain task-specific parameters;

[0211] The second loss value is determined using the task-specific parameters and the query set of the meta-training task;

[0212] The meta-gradient is determined based on the second loss value of all meta-training tasks in the task batch;

[0213] The model parameters are updated based on the meta-gradient to obtain the updated model parameters;

[0214] Repeat the steps of randomly sampling task batches from the meta-training task set to obtain updated model parameters until the training termination condition is met, and use the finally obtained updated model parameters as model initialization parameters.

[0215] In one embodiment, the support set acquisition module 40 is specifically used for:

[0216] Determine the target task categories included in the target task;

[0217] For each target task category, sample data for that target task category is collected;

[0218] Preprocess the sample data for each target task category collected;

[0219] Select a portion of the sample data from the preprocessed sample data for each target task category;

[0220] The selected sample data from all target task categories are combined to form the support set for the target task.

[0221] In one embodiment, the model adaptation module 50 is specifically used for:

[0222] Set the current parameters of the base model to the model initialization parameters;

[0223] The fine-tuning loss value is determined using the support set of the target task;

[0224] The fine-tuning gradient is determined based on the fine-tuning loss value;

[0225] The parameters of the base model are updated based on the fine-tuned gradient to obtain the updated model parameters;

[0226] The base model containing the updated model parameters is used as the target task model.

[0227] In one embodiment, the inference processing module 60 is specifically used for:

[0228] Receive data of objects to be processed from the target application scenario;

[0229] The data of the object to be processed is preprocessed to obtain a set of data to be predicted with a uniform format;

[0230] The dataset to be predicted is combined into a query set for the target task;

[0231] Input the query set of the target task into the target task model;

[0232] The predicted output for each object to be processed in the query set of the target task is determined by the target task model.

[0233] Based on the predicted output, generate category labels for each object to be processed in the query set of the target task;

[0234] Output the target processing results, which include the category labels of all objects to be processed in the query set containing the target task.

[0235] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a meta-learning-based task processing method on the server side.

[0236] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements client-side functions or steps of a meta-learning-based task processing method.

[0237] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0238] An initial sample set is obtained, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices. The initial sample set is then downsampled to obtain a class-balanced sample set.

[0239] Based on the class-balanced sample set, a meta-training task set is constructed, wherein each meta-training task in the meta-training task set includes a support set and a query set;

[0240] Based on the aforementioned meta-training task set, the basic model is trained through the meta-learning module to obtain the model initialization parameters;

[0241] Obtain the support set for the target task;

[0242] Using the model initialization parameters as initial values, the base model is adjusted using the support set of the target task to obtain the target task model;

[0243] The system receives data of objects to be processed, preprocesses it to form a query set for the target task, processes the query set for the target task using the target task model, and generates the target processing result.

[0244] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0245] An initial sample set is obtained, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices. The initial sample set is then downsampled to obtain a class-balanced sample set.

[0246] Based on the class-balanced sample set, a meta-training task set is constructed, wherein each meta-training task in the meta-training task set includes a support set and a query set;

[0247] Based on the aforementioned meta-training task set, the basic model is trained through the meta-learning module to obtain the model initialization parameters;

[0248] Obtain the support set for the target task;

[0249] Using the model initialization parameters as initial values, the base model is adjusted using the support set of the target task to obtain the target task model;

[0250] The system receives data of objects to be processed, preprocesses it to form a query set for the target task, processes the query set for the target task using the target task model, and generates the target processing result.

[0251] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0252] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0253] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0254] It should be noted that if any software tools or components not belonging to this company appear in the embodiments of this application, they are merely illustrative examples and do not represent actual use. The embodiments described above are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A task processing method based on meta-learning, characterized in that, Includes the following steps: An initial sample set is obtained, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices. The initial sample set is then downsampled to obtain a class-balanced sample set. Based on the class-balanced sample set, a meta-training task set is constructed, wherein each meta-training task in the meta-training task set includes a support set and a query set; Based on the aforementioned meta-training task set, the basic model is trained through the meta-learning module to obtain the model initialization parameters; Obtain the support set for the target task; Using the model initialization parameters as initial values, the base model is adjusted using the support set of the target task to obtain the target task model; The system receives data of objects to be processed, preprocesses it to form a query set for the target task, processes the query set for the target task using the target task model, and generates the target processing result.

2. The task processing method based on meta-learning as described in claim 1, characterized in that, An initial sample set is obtained, comprising one or more of the following: text data, image data, audio data, time series data, structured tabular data, graph-structured data, or other data that can be processed by computer equipment. The initial sample set is then downsampled to obtain a class-balanced sample set, including: Raw data containing multiple sample categories is collected from at least one data source, including one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structured data, or other data that can be processed by computer devices; The raw data is cleaned and labeled to form an initial sample set; Determine the multiple sample categories contained in the initial sample set; Count the number of samples in each of the multiple sample categories; The target number of downsampling samples is determined based on the minimum number of samples in all sample categories. For each sample category whose sample size is greater than the downsampling target size, a sample size equal to the downsampling target size is randomly selected from the sample category to form a downsampled sample subset of the sample category; For each sample category whose sample size is no greater than the downsampling target size, all samples of the sample category are retained to form a downsampled subset of the sample category; A subset of downsampled samples from all sample categories is collected to form a class-balanced sample set.

3. The task processing method based on meta-learning as described in claim 1, characterized in that, Based on the aforementioned class-balanced sample set, a meta-training task set is constructed. Each meta-training task in the meta-training task set includes a support set and a query set, including: Determine the number of meta-training task categories; Determine the number of support set samples and the number of query set samples; From the multiple sample categories contained in the category-balanced sample set, a sample category whose number is equal to the number of the meta-training task categories is randomly selected as the meta-training task category; For each selected meta-training task category, a number of samples equal to the number of support set samples are randomly selected from the meta-training task category to form a support set; For each selected meta-training task category, a number of samples equal to the number of samples in the query set are randomly selected from the remaining samples in the meta-training task category excluding the support set to form the query set. A meta-training task is formed by combining the support sets and query sets of all selected meta-training task categories. Repeat the steps of randomly selecting sample categories from multiple sample categories contained in the category-balanced sample set as meta-training task categories, constructing a support set for each meta-training task category, constructing a query set for each meta-training task category, and combining them to form meta-training tasks, until a preset number of meta-training tasks are generated. Construct a set of meta-training tasks based on all generated meta-training tasks.

4. The task processing method based on meta-learning as described in claim 1, characterized in that, Based on the aforementioned meta-training task set, the basic model is trained through the meta-learning module to obtain model initialization parameters, including: Initialize the model parameters of the base model; Multiple meta-training tasks are randomly sampled from the meta-training task set to form a task batch; For each meta-training task in the task batch, a first loss value is determined using the support set of the meta-training task; The first gradient is determined based on the first loss value, and the model parameters are updated based on the first gradient to obtain task-specific parameters; The second loss value is determined using the task-specific parameters and the query set of the meta-training task; The meta-gradient is determined based on the second loss value of all meta-training tasks in the task batch; The model parameters are updated based on the meta-gradient to obtain the updated model parameters; Repeat the steps of randomly sampling task batches from the meta-training task set to obtain updated model parameters until the training termination condition is met, and use the finally obtained updated model parameters as model initialization parameters.

5. The task processing method based on meta-learning as described in claim 1, characterized in that, Obtain the support set for the target task, including: Determine the target task categories included in the target task; For each target task category, sample data for that target task category is collected; Preprocess the sample data for each target task category collected; Select a portion of the sample data from the preprocessed sample data for each target task category; The selected sample data from all target task categories are combined to form the support set for the target task.

6. The task processing method based on meta-learning as described in claim 1, characterized in that, Using the model initialization parameters as initial values, the base model is adjusted using the support set of the target task to obtain the target task model, including: Set the current parameters of the base model to the model initialization parameters; The fine-tuning loss value is determined using the support set of the target task; The fine-tuning gradient is determined based on the fine-tuning loss value; The parameters of the base model are updated based on the fine-tuned gradient to obtain the updated model parameters; The base model containing the updated model parameters is used as the target task model.

7. The task processing method based on meta-learning as described in claim 1, characterized in that, Receive data of objects to be processed, and form a query set for the target task through preprocessing. Process the query set for the target task using the target task model to generate the target processing result, including: Receive data of objects to be processed from the target application scenario; The data of the object to be processed is preprocessed to obtain a set of data to be predicted with a uniform format; The dataset to be predicted is combined into a query set for the target task; Input the query set of the target task into the target task model; The predicted output for each object to be processed in the query set of the target task is determined by the target task model. Based on the predicted output, generate category labels for each object to be processed in the query set of the target task; Output the target processing results, which include the category labels of all objects to be processed in the query set containing the target task.

8. A task processing device based on meta-learning, characterized in that, The meta-learning-based task processing device includes: The data preprocessing module is used to obtain an initial sample set, which includes one or more of the following: text data, image data, voice data, time series data, structured tabular data, graph structure data, or other data that can be processed by computer devices. The module then performs downsampling on the initial sample set to obtain a class-balanced sample set. The task construction module is used to construct a meta-training task set based on the class-balanced sample set, wherein each meta-training task in the meta-training task set includes a support set and a query set; The meta-training module is used to train the basic model based on the meta-training task set through the meta-learning module to obtain the model initialization parameters; The support set acquisition module is used to acquire the support set for the target task. The model adaptation module is used to adjust the basic model using the model initialization parameters as initial values ​​and the support set of the target task to obtain the target task model. The inference processing module is used to receive the data of the object to be processed, form a query set of the target task through preprocessing, process the query set of the target task using the target task model, and generate the target processing result.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a meta-learning-based task processing program stored in the memory and executable on the processor. When executed by the processor, the meta-learning-based task processing program implements the steps of the meta-learning-based task processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a meta-learning-based task processing program, which, when executed by a processor, implements the steps of the meta-learning-based task processing method as described in any one of claims 1-7.

Citation Information

Cited By

  • Point cloud small sample classification method and device for redundancy elimination and discriminant feature mining, and medium

    CN121982700A