Picture data recommendation method based on meta learning and reinforcement learning

Through meta-learning and reinforcement learning methods, small sample models are constructed, data value is evaluated and data selection is optimized, and the challenges of data value evaluation and selection in data transactions are solved, and efficient data utilization is achieved in the case of small sample size and data imbalance , ensure data privacy and model performance.

CN118939822APending Publication Date: 2024-11-12HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410727328.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

Existing data feature selection and sample selection methods are difficult to effectively evaluate the value of data in data trading scenarios, especially when the sample size is small and the data is unbalanced, and the calculation complexity is high, so the relationship between exploration and utilization cannot be balanced, resulting in selection. The data is locally optimal.

Method used

Using the image data recommendation method based on meta-learning and reinforcement learning, the image data value of different data providers is evaluated through the construction of a small sample model, combining the specific task scenarios of the data demander, and adjusting the data selection strategy through federal training and reinforcement learning. Optimize the data utilization process to ensure data privacy and security.

Benefits of technology

With small sample sizes, it can effectively evaluate the value of the data, balance the exploration and utilization of different data sets, optimize data selection, reduce model training time costs, provide dynamic and intelligent data selection references, and improve model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939822A_ABST
    Figure CN118939822A_ABST
Patent Text Reader

Abstract

The invention discloses a picture data recommendation method based on meta learning and reinforcement learning. The method comprises the following steps: 1, simulating differentiated data in a data transaction scene; 2, constructing a small sample training model based on meta learning; 3, calculating the contribution degree of each data provider to model training in the small sample scene; 4, designing a reinforcement learning reward function; 5, designing a selected probability function of the data provider; 6, designing federal training aggregation weight; and 7, constructing a termination condition, stopping training when the change of the relative loss is smaller than a set threshold value in several continuous iteration periods, and obtaining a data set recommended for the data demand side. According to the method, the data demander can be helped to estimate the data value under the condition that the sample size is small, meanwhile, uncertainty of contribution value estimation of different types of picture data can be fully considered, accurate estimation of the data value and data selection are carried out while data is not leaked, and therefore the recommendation efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image data recommendation, and specifically is a method for recommending image data based on meta-learning and reinforcement learning. Background Art

[0002] Model training cannot be separated from a large amount of rich data, which is generally obtained through public data sets or data purchase. The selection and purchase of training data sets has the following challenges: First, the value of data sets is difficult to evaluate. Unlike traditional commodities, data has scene applicability and different values ​​in different scenes; second, data has the characteristics of being reproducible and easy to leak. In order to protect data privacy, data providers are generally only willing to provide a small amount of sample data during the data transaction process. Data demanders can only evaluate the overall data value through a small amount of sample data. At the same time, data is available but not visible. In order to prevent data leakage, data demanders can only use data, but cannot download data to local for local training. This brings great challenges to the selection and purchase of data demanders in data transaction scenarios.

[0003] Existing methods for data selection recommendation focus on data feature selection and data sample selection. Existing data feature selection methods are mainly divided into feature selection based on evaluation strategy, feature selection based on search strategy, and feature selection based on different supervisory information. Feature selection based on evaluation strategy evaluates the effectiveness of features by defining feature importance evaluation criteria, such as information gain, correlation coefficient, etc. A filtering feature selection method is used before model training, and a packaged feature selection method is used to consider the differences of subsequent learners. This method ignores the interaction between features and has high computational overhead for multiple training. Feature selection based on search strategy searches the feature subset space to find the optimal or approximately optimal feature combination, including greedy search, genetic algorithm, etc. This type of method can consider the interaction between features, but the computational cost is high when the search space is large, and the obtained feature subset may not be the global optimal. Feature selection methods based on different supervisory information adopt different strategies according to whether the learning task is supervised learning, unsupervised learning, or semi-supervised learning to adapt to different learning scenarios, but usually rely on fixed data sets and predefined label information, and are sensitive to parameter selection and have poor adaptability to specific types of data.

[0004] Existing data sample selection methods are mainly divided into sampling-based methods, clustering-based methods, and neighbor classification rule-based methods. Although the sampling-based data sample selection method is simple to operate, the sampling randomness is relatively large, and the result deviation is relatively large. The clustering-based data sample selection method is mostly carried out when there is no overlap in different types of data sets, and the number of clusters to be divided is difficult to determine. In addition, the existence of noise samples has a greater impact on the data selection method based on clustering algorithms. The neighbor classification rule-based method may be biased towards the majority class when the data is unbalanced, thereby ignoring the importance of the minority class. At the same time, it is sensitive to noise and outliers because these points may be mistakenly considered to be important samples, thereby affecting the performance of the final model. The model actively requests to mark those samples that it considers to be most useful.

[0005] The current data feature selection and data sample selection methods are relatively general. They are not combined with specific task scenarios and cannot be applied to scenarios in which only a small amount of sample data can be obtained in data transactions. In addition, the computational complexity is high and it is impossible to balance the relationship between exploration and utilization in the case of data imbalance, resulting in the selected data features or samples being locally optimal. Summary of the invention

[0006] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes a method for recommending image data based on meta-learning and reinforcement learning, in order to help data demanders estimate the value of data when the sample size is small. At the same time, it can fully consider the uncertainty of estimating the contribution value of image data of different categories, accurately estimate the value of data and select data without leaking data, thereby making the recommendation efficiency higher.

[0007] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0008] The image data recommendation method based on meta-learning and reinforcement learning of the present invention is characterized in that it is applied to a recommendation scenario consisting of one data demander and M data providers, and is performed in the following steps:

[0009] Step 1: record the local image data set of M data providers as D = {D1, ..., D i ,…,D M}, where D i represents the local image data set of the i-th data provider, and Among them, d ij represents the jth type of local image data of the i-th data provider, N i is the total number of categories of local image data of the i-th data provider, j∈[1,N i ], i∈[1,M];

[0010] Step 2: From D i Extract several image data from each type of local image data in and form a small sample image data set of the i-th data provider Among them, c ij represents the j-th type of small sample image data of the ith data provider, thereby obtaining a small sample image set C of M data providers = {C1,…C i ,…C M};

[0011] C i Partition into meta-training set and meta-test set

[0012] The meta-training set Divide into training support set and the training query set in, represents the training support set of the i-th data provider The k-th image support sample in , for , and is the training support set of the i-th data provider The total number of supporting samples in the picture; Represents the training query set of the i-th data provider The h-th image query sample in express Labels; is the training query set of the i-th data provider The total number of query image samples in ;

[0013] Meta-test set of the i-th data provider Test support set and the test queryset in, Represents the test query set of the i-th data provider The g-th image in supports the sample, for , and is the test query set of the i-th data provider The total number of supporting samples in the picture;

[0014] D i Divide into training set Test Set and validation set

[0015] Step 3: Use the base model to build a small sample model and train it to get the optimal parameter θ * The small sample model below;

[0016] Step 3.1, initialize the parameters θ of the small sample model; Input the initialized small sample model for inner loop training to obtain the parameter θ' of the small sample model after inner loop update of the i-th data provider i ;

[0017] Step 3.2: Input the small sample model after the inner loop update to perform outer loop training to obtain the optimal parameter θ of the updated small sample model * :

[0018] Step 4: Optimal parameter θ * The performance of the small sample model under , and the global accuracy is obtained

[0019] Step 5: Calculate the contribution Shapley value φ of the i-th data provider using formula (7): i :

[0020]

[0021] In formula (7), S represents the small sample picture set of all data providers except the small sample picture set of several data providers, |S| is the number of data providers in S; {Ci} represents the small sample picture set including several data providers;

[0022] Step 6: Define the total number of data selection rounds as Q, the number of current data selection rounds as q, and initialize q = 1; the reward value obtained by the i-th data provider after the q-1th round of data selection is Define the loss baseline b for the qth round of data selection q , and initialize the initial b q =0;

[0023] Step 7: Use formula (8) to calculate the probability that the i-th data provider is selected in the q-th round of data selection:

[0024]

[0025] In formula (8), is the sign function of the ith data provider in the q-1th round of data selection, is 1, indicating that the i-th data provider is selected in the q-1th round of selection. 0 means not selected;

[0026] Step 8: According to the probability of being selected in the qth round of data, the base model is federated trained to obtain the base model after federation training;

[0027] Step 9: sort the reward values ​​obtained by the ith data provider after the Qth round of data selection in descending order, so as to recommend the local image data sets corresponding to the top-ranked data providers to the data demander.

[0028] The image data recommendation method based on meta-learning and reinforcement learning of the present invention is also characterized in that step 3.1 includes:

[0029] Step 3.1.1. The input is processed in the initialized small sample model to obtain the category prediction probability of each image support sample in the training support set of the i-th data provider. in, express The predicted probability of the category;

[0030] Step 3.1.2: Use formula (1) to construct the average cross entropy loss of the training support set of the i-th data provider: And it is used to perform inner loop training on the small sample model under the parameter θ, and obtain the small sample model parameter θ of the i-th data provider after the inner loop training i ;

[0031]

[0032] In formula (1), is the indicator variable of the image support sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class;

[0033] Step 3.1.3: Use formula (2) to calculate the parameter θ of the small sample model of the i-th data provider after inner loop training: i Update to obtain the parameter θ' of the small sample model after the inner loop update of the i-th data provider i :

[0034]

[0035] In formula (2), α is the learning rate of the inner loop training.

[0036] The step 3.2 comprises:

[0037] Step 3.2.1. Input the updated small sample model in the inner loop for processing to obtain the category prediction probability of each image query sample in the training query set of the i-th data provider in, express The predicted probability of the category;

[0038] Step 3.2.2: Use formula (3) to construct the average cross entropy loss of the training query set of the i-th data provider: And used to adjust the parameter θ' i The small sample model under the outer loop training is trained to obtain the small sample model parameters θ" after the outer loop training of M data providers;

[0039]

[0040] In formula (1), is the indicator variable of the image query sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class;

[0041] Step 3.2.3: Use formula (4) to aggregate the cross entropy loss gradients of the M data providers on the small sample model after inner loop training, so as to obtain the optimal parameter θ of the updated small sample model. * :

[0042]

[0043] In formula (4), β is the meta-learning rate of the outer loop training.

[0044] The step 4 comprises:

[0045] Step 4.1: Input optimal parameter θ * The small sample model under is processed to obtain the test query set of the i-th data provider The predicted category of each image query sample in in, express The prediction category of

[0046] Step 4.2: Use formula (5) to obtain the test query set of the i-th data provider Accuracy

[0047]

[0048] In formula (5), Ι(·) is the indicator function. The value is 1, otherwise, is 0;

[0049] Step 4.3: Use formula (6) to aggregate the accuracy of M data providers in their respective test query sets to obtain the global accuracy

[0050]

[0051] The step 4 comprises:

[0052] Step 8.1: Use formula (9) to calculate the aggregate weight of the i'th data provider in the qth round of data selection:

[0053]

[0054] In formula (9), k q represents the total number of data providers in the qth round of data selection; It represents the reward value obtained by the i'th data provider in the qth round of data selection after the q-1th round of data selection;

[0055] Step 8.2: Use formula (10) to calculate the i'th data provider in the qth round of data selection in the validation set The moving average of the T-round validation loss

[0056]

[0057] In formula (10), Indicates the number of data providers in the validation set in the qth round of data selection. The loss of the t-th round of verification on , t∈(0,T]; T represents the total number of verification rounds;

[0058] Step 8.3: Use formula (11) to calculate the reduction in the training loss of the base model by the i'th data provider in the qth round of data selection:

[0059]

[0060] Step 8.4: Use formula (12) to obtain the reward weight of the i'th data provider in the qth round of data selection:

[0061]

[0062] In formula (12), MaxDiff q represents the maximum reward weight in the qth round of data selection, MinDiff q represents the minimum reward weight in the qth round of data selection;

[0063] Step 8.5: Use formula (13) to get the reward value obtained by the i'th data provider after the qth round of data selection:

[0064]

[0065] Step 8.6: Use equation (14) to calculate b q Update to get the loss baseline b in the q+1th round of data selection q+1 :

[0066]

[0067] Step 8.7: Use formula (15) to get the probability that the i-th data provider is selected in the q+1th round of data selection:

[0068]

[0069] Step 8.8: Return to step 8.1 and execute sequentially until q>Q, thereby obtaining the base model after federal training.

[0070] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the image data recommendation method, and the processor is configured to execute the program stored in the memory.

[0071] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the picture data recommendation method when the computer program is executed by a processor.

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] 1. The present invention adopts a meta-learning method and focuses on the type of image data. It can build a small sample model based on the specific task scenarios of the data demander, under the premise of obtaining only a small number of image data samples from the data provider, and effectively evaluate the potential value of image data from different data providers based on the training results.

[0074] 2. The present invention adopts a reinforcement learning method to calculate the probability of different data provider image data sets being selected according to the contribution of the data provider's image data set in model optimization and the exploration degree of the image data set. It can adjust the data selection strategy according to real-time feedback, optimize the data utilization process, and provide a dynamic and intelligent data selection reference for data demanders.

[0075] 3. The present invention can effectively protect the data privacy and security of different data providers by adopting a federated training method, and adjust the federated training aggregation weight according to the data reward values ​​of different data providers, which helps to reduce the time cost of model training and enables data demanders to obtain better model performance in a shorter time. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a schematic diagram of the overall process of the present invention;

[0077] Figure 2 Figure 2 is a diagram of the data selection algorithm of the present invention. DETAILED DESCRIPTION

[0078] In this embodiment, a method for recommending image data based on meta-learning and reinforcement learning is to conduct effective data value assessment in combination with specific task scenarios when only a small amount of image data samples from the data provider is obtained, and at the same time, it can balance the relationship between exploration and utilization of different image data sets, so as to effectively calculate the probability of image data sets from different data providers being selected, and provide a reference for image data selection by data demanders. Specifically, Figure 1 As shown, the following steps are included:

[0079] Step 1: In order to simulate the differences in data sets between different data providers in real data scenarios, different types of noise, data enhancement, image filters, and local occlusion are added to the image data of some data providers to generate differentiated image data sets. The local image data set of M data providers is recorded as D = {D1, ..., D i , …, D M}, where D i represents the local image data set of the i-th data provider, and Among them, d ii represents the jth type of local image data of the i-th data provider, N i is the total number of categories of local image data of the i-th data provider, j∈[1, N i ], i∈[1,M].

[0080] Step 2: In the data transaction scenario, the data demander is only willing to provide a small amount of sample data to protect data privacy. To simulate the small sample data of the data demander,i Extract several image data from each type of local image data in and form a small sample image data set of the i-th data provider Among them, c ij represents the j-th type of small sample image data of the ith data provider, thereby obtaining a small sample image set C of M data providers = {C1,…C i ,…C M}.

[0081] C i Partition into meta-training set and meta-test set

[0082] The meta-training set Divide into training support set and the training query set in, represents the training support set of the i-th data provider The k-th image support sample in , for , and is the training support set of the i-th data provider The total number of supporting samples in the picture; Represents the training query set of the i-th data provider The h-th image query sample in express Labels; is the training query set of the i-th data provider The total number of query image samples in .

[0083] Meta-test set of the i-th data provider Test support set and the test queryset in Represents the test query set of the i-th data provider The g-th image in supports the sample, for , and is the test query set of the i-th data provider The total number of supported samples in the image.

[0084] D i Divide into training set Test Set and validation set

[0085] Step 3: Use the base model to build a small sample model and train it to get the optimal parameter θ * The small sample model below;

[0086] Step 3.1, inner loop training: In order to quickly find the model parameters that reduce the loss value the fastest on different data provider tasks, a limited number of gradient updates are performed on the meta-training support sets of different data providers.

[0087] Step 3.1.1, initialize the parameters θ of the small sample model; The input is processed in the initialized small sample model to obtain the category prediction probability of each image support sample in the training support set of the i-th data provider. in, express The predicted probability of the category;

[0088] Step 3.1.2: Use formula (1) to construct the average cross entropy loss of the training support set of the i-th data provider: And it is used to perform inner loop training on the small sample model under the parameter θ, and obtain the small sample model parameter θ of the i-th data provider after the inner loop training i ;

[0089]

[0090] In formula (1), is the indicator variable of the image support sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class.

[0091] Step 3.1.3: Use formula (2) to calculate the parameter θ of the small sample model of the i-th data provider after inner loop training: i Update to obtain the parameter θ' of the small sample model after the inner loop update of the i-th data provider i :

[0092]

[0093] In formula (2), α is the learning rate of the inner loop training.

[0094] Step 3.2, outer loop training: Through the rapid adaptation mechanism of meta-learning, the small sample model after inner loop training can quickly adjust parameters to adapt to specific tasks on different data provider query sets. The outer loop training further optimizes the parameters of the small sample model and improves the standard initial performance of the small sample model on new tasks.

[0095] Step 3.2.1. Input the updated small sample model in the inner loop for processing to obtain the category prediction probability of each image query sample in the training query set of the i-th data provider in, express The predicted probability of the category.

[0096] Step 3.2.2: Use formula (3) to construct the average cross entropy loss of the training query set of the i-th data provider: And used to adjust the parameter θ' i The small sample model under the outer loop training is trained to obtain the small sample model parameters θ" after the outer loop training of M data providers;

[0097]

[0098] In formula (1), is the indicator variable of the image query sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class.

[0099] Step 3.2.3: Use formula (4) to aggregate the cross entropy loss gradients of the M data providers on the small sample model after inner loop training, so as to obtain the optimal parameter θ of the updated small sample model. * :

[0100]

[0101] In formula (4), β is the meta-learning rate of the outer loop training.

[0102] Step 4: Optimal parameter θ * The performance of the small sample model under the condition of , and the accuracy is obtained. Accuracy is used as an objective performance indicator to calculate the contribution of different clients. It ensures that the calculated contribution value reflects the actual impact of each data set on the model performance, and ensures the objectivity and fairness of the contribution evaluation:

[0103] Step 4.1: Input optimal parameter θ * The small sample model under is processed to obtain the test query set of the i-th data provider The predicted category of each image query sample in in, express The prediction category of

[0104] Step 4.2: Use formula (5) to obtain the test query set of the i-th data provider Accuracy

[0105]

[0106] In formula (5), 1· is the indicator function, if The value is 1, otherwise, is 0.

[0107] Step 4.3: Use formula (6) to aggregate the accuracy of M data providers in their respective test query sets to obtain the global accuracy

[0108]

[0109] Step 5: Calculate the contribution Shapley value φ of the i-th data provider using formula (7): i :

[0110]

[0111] In formula (7), S represents the small sample image set of all data providers except the small sample image set of several data providers, |S| is the number of data providers in S; {C i} represents a small sample image collection containing several data providers; in the small sample model, the Shapley value is used to evaluate the contribution of different data sets, which can comprehensively consider the contribution of different data set combinations and ensure that each data set is evaluated accordingly based on its actual contribution to improving model performance.

[0112] Step 6: Define the total number of data selection rounds as Q, the number of current data selection rounds as q, and initialize q = 1; the reward value obtained by the i-th data provider after the q-1th round of data selection is Define the loss baseline b for the qth round of data selection q , and initialize the initial b q = 0, the reinforcement learning algorithm selected by the data provider is as follows Figure 2 shown.

[0113] Step 7: Use formula (8) to calculate the probability that the i-th data provider is selected in the q-th round of data selection: The probability of each data provider being selected depends on the degree of optimization of the base model training, and the loss value calculated after the q-1th round of training for different data providers is used. On the other hand, it is also affected by the exploration degree of different data providers. It is quantified by the number of rounds in which different data providers participate in training, and the upper confidence bound of UCB is used to calculate the exploration degree of different data providers in the q-1 round.

[0114]

[0115] In formula (8), is the sign function of the ith data provider in the q-1th round of data selection, is 1, indicating that the i-th data provider is selected in the q-1th round of selection. A value of 0 indicates that the item is not selected.

[0116] Step 8: According to the probability of being selected in the qth round of data, the base model is federated trained to obtain the base model after federation training;

[0117] Step 8.1: Use formula (9) to calculate the aggregate weight of the i'th data provider in the qth round of data selection:

[0118]

[0119] In formula (9), k q represents the total number of data providers in the qth round of data selection; Indicates the reward value obtained by the i'th data provider in the qth round of data selection after the q-1th round of data selection, using the reward value calculated by the i'th data provider after the q-1th round of training In the selected k q The proportion of the total reward value of each data provider is used as the aggregation weight of the qth round of federated training. This can fully utilize the image sample data of data providers with good performance while selecting data providers, and effectively optimize the model.

[0120] Step 8.2: Use formula (10) to calculate the i'th data provider in the qth round of data selection in the validation set The moving average of the T-round validation loss

[0121]

[0122] In formula (10), Indicates the number of data providers in the validation set in the qth round of data selection. The loss of the t-th round of verification on , t∈(0,T]; T represents the total number of verification rounds;

[0123] Step 8.3: Use formula (11) to calculate the reduction in the training loss of the base model by the i'th data provider in the qth round of data selection:

[0124]

[0125] Step 8.4: Use formula (12) to obtain the reward weight of the i'th data provider in the qth round of data selection:

[0126]

[0127] In formula (12), MaxDiff q represents the maximum reward weight in the qth round of data selection, MinDiff q represents the minimum reward weight in the qth round of data selection;

[0128] Step 8.5: Use formula (13) to get the reward value obtained by the i'th data provider after the qth round of data selection:

[0129]

[0130] Step 8.6: Use equation (14) to calculate b q Update to get the loss baseline b in the q+1th round of data selection q+1 , the update of the loss baseline reflects the changing trend of the model performance with the training rounds, so that the reward mechanism can be dynamically adjusted according to the real-time performance of the model to ensure that the reward value matches the improvement of the current model performance:

[0131]

[0132] Step 8.7: Use formula (15) to get the probability that the i-th data provider is selected in the q+1th round of data selection:

[0133]

[0134] Step 8.8: Return to step 8.1 and execute sequentially until q>Q, thereby obtaining the base model after federal training.

[0135] Step 9: Sort the reward values ​​obtained by the i-th data provider after the Q-th round of data selection in descending order, so as to recommend the local image data sets corresponding to the top-ranked data providers to the data demander. The overall process diagram of small sample model training and data selection is as follows: Figure 1 shown.

[0136] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0137] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A method for recommending image data based on meta-learning and reinforcement learning. It is characterized in that It is applied to a recommendation scenario consisting of one data demander and M data providers, and proceeds as follows: Step 1: record the local image data set of M data providers as D = {D 1 ,…,D i ,…,D M }, where D i represents the local image data set of the i-th data provider, and Among them, d ij represents the jth type of local image data of the i-th data provider, N i is the total number of categories of local image data of the i-th data provider, j∈[1,N i ], i∈[1,M]; Step 2: From D i Extract several image data from each type of local image data in and form a small sample image data set of the i-th data provider Among them, c ij represents the j-th type of small sample image data of the ith data provider, thereby obtaining the small sample image set C of M data providers = {C 1 ,…C i ,…C M }; C i Partition into meta-training set and meta-test set The meta-training set Divide into training support set and the training query set in, represents the training support set of the i-th data provider The k-th image support sample in , for , and is the training support set of the i-th data provider The total number of supporting samples in the picture; Represents the training query set of the i-th data provider The h-th image query sample in express Labels; is the training query set of the i-th data provider The total number of query image samples in ; Meta-test set of the i-th data provider Test support set and the test queryset in, Represents the test query set of the i-th data provider The g-th image in supports the sample, for , and is the test query set of the i-th data provider The total number of supporting samples in the picture; D i Divide into training set Test Set and validation set Step 3: Use the base model to build a small sample model and train it to get the optimal parameter θ * The small sample model below; Step 3.1, initialize the parameters θ of the small sample model; Input the initialized small sample model for inner loop training to obtain the parameter θ' of the small sample model after inner loop update of the i-th data provider i ; Step 3.2: Input the small sample model after the inner loop update to perform outer loop training to obtain the optimal parameter θ of the updated small sample model * : Step 4: Optimal parameter θ * The performance of the small sample model under , and the global accuracy is obtained Step 5: Calculate the contribution Shapley value φ of the i-th data provider using formula (7): i : In formula (7), S represents the small sample image set of all data providers except the small sample image set of several data providers, |S| is the number of data providers in S; {C i } represents a small sample image set containing several data providers; Step 6: Define the total number of data selection rounds as Q, the number of current data selection rounds as q, and initialize q = 1; the reward value obtained by the i-th data provider after the q-1th round of data selection is Define the loss baseline b for the qth round of data selection q , and initialize the initial b q =0; Step 7: Use formula (8) to calculate the probability that the i-th data provider is selected in the q-th round of data selection: In formula (8), is the sign function of the ith data provider in the q-1th round of data selection, is 1, indicating that the i-th data provider is selected in the q-1th round of selection. 0 means not selected; Step 8: According to the probability of being selected in the qth round of data, the base model is federated trained to obtain the base model after federation training; Step 9: sort the reward values ​​obtained by the ith data provider after the Qth round of data selection in descending order, so as to recommend the local image data sets corresponding to the top-ranked data providers to the data demander.

2. According to the method for recommending image data based on meta-learning and reinforcement learning according to claim 1, It is characterized in that The step 3.1 comprises: Step 3.1.

1. The input is processed in the initialized small sample model to obtain the category prediction probability of each image support sample in the training support set of the i-th data provider. in, express The predicted probability of the category; Step 3.1.2: Use formula (1) to construct the average cross entropy loss of the training support set of the i-th data provider: And it is used to perform inner loop training on the small sample model under the parameter θ, and obtain the small sample model parameter θ of the i-th data provider after the inner loop training i ; In formula (1), is the indicator variable of the image support sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class; Step 3.1.3: Use formula (2) to calculate the parameter θ of the small sample model of the i-th data provider after inner loop training: i Update to obtain the parameter θ' of the small sample model after the inner loop update of the i-th data provider i : In formula (2), α is the learning rate of the inner loop training.

3. According to the method for recommending image data based on meta-learning and reinforcement learning according to claim 1, It is characterized in that The step 3.2 comprises: Step 3.2.

1. Input the updated small sample model in the inner loop for processing to obtain the category prediction probability of each image query sample in the training query set of the i-th data provider in, express The predicted probability of the category; Step 3.2.2: Use formula (3) to construct the average cross entropy loss of the training query set of the i-th data provider: And used to adjust the parameter θ' i The small sample model under the outer loop training is trained to obtain the small sample model parameters θ" after the outer loop training of M data providers; In formula (1), is the indicator variable of the image query sample, indicating Tags For the jth class, let Otherwise, let express The predicted probability of the category is the predicted probability of the jth class; Step 3.2.3: Use formula (4) to aggregate the cross entropy loss gradients of the M data providers on the small sample model after inner loop training, so as to obtain the optimal parameter θ of the updated small sample model. * : In formula (4), β is the meta-learning rate of the outer loop training.

4. According to the method for recommending image data based on meta-learning and reinforcement learning according to claim 1, It is characterized in that The step 4 comprises: Step 4.1: Input optimal parameter θ * The small sample model under is processed to obtain the test query set of the i-th data provider The predicted category of each image query sample in in, express The prediction category of Step 4.2: Use formula (5) to obtain the test query set of the i-th data provider Accuracy In formula (5), 1· is the indicator function, if The value is 1, otherwise, is 0; Step 4.3: Use formula (6) to aggregate the accuracy of M data providers in their respective test query sets to obtain the global accuracy 5. According to the method for recommending image data based on meta-learning and reinforcement learning according to claim 1, It is characterized in that The step 4 comprises: Step 8.1: Use formula (9) to calculate the aggregate weight of the i'th data provider in the qth round of data selection: In formula (9), k q represents the total number of data providers in the qth round of data selection; It represents the reward value obtained by the i'th data provider in the qth round of data selection after the q-1th round of data selection; Step 8.2: Use formula (10) to calculate the i'th data provider in the qth round of data selection in the validation set The moving average of the T-round validation loss In formula (10), Indicates the number of data providers in the validation set in the qth round of data selection. The loss of the t-th round of verification on , t∈(0,T]; T represents the total number of verification rounds; Step 8.3: Use formula (11) to calculate the reduction in the training loss of the base model by the i'th data provider in the qth round of data selection: Step 8.4: Use formula (12) to obtain the reward weight of the i'th data provider in the qth round of data selection: In formula (12), MaxDiff q represents the maximum reward weight in the qth round of data selection, MinDiff q represents the minimum reward weight in the qth round of data selection; Step 8.5: Use formula (13) to get the reward value obtained by the i'th data provider after the qth round of data selection: Step 8.6: Use equation (14) to calculate b q Update to get the loss baseline b in the q+1th round of data selection q+1 : Step 8.7: Use formula (15) to get the probability that the i-th data provider is selected in the q+1th round of data selection: Step 8.8: Return to step 8.1 and execute sequentially until q>Q, thereby obtaining the base model after federal training.

6. An electronic device comprising a memory and a processor, It is characterized in that The memory is used to store a program that supports the processor to execute the image data recommendation method according to any one of claims 1 to 5, and the processor is configured to execute the program stored in the memory.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the image data recommendation method according to any one of claims 1 to 5 are executed.