A method, apparatus, medium, and equipment for determining contributions to federated learning.

By constructing a target dataset and a comparison dataset, the data contribution of each dimension in federated learning is calculated, which solves the problem of accurately determining the contribution and improves the fairness of resource allocation and the enthusiasm of participants.

CN116502736BActive Publication Date: 2026-07-17ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2023-04-03
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

How to accurately determine the contribution of each participant in federated learning so as to reasonably allocate model usage permissions and avoid data silos and damage to interests caused by misreporting contributions.

Method used

By receiving sample data from other participants and its own sample data, a target dataset and a comparison dataset are constructed, which are then input into the federated learning model to calculate the data contribution of each dimension and determine the contribution of the target participant based on the differences.

Benefits of technology

This improved the accuracy of contribution determination, ensured the fairness of resource allocation and the enthusiasm of participants, and protected the interests of all parties.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116502736B_ABST
    Figure CN116502736B_ABST
Patent Text Reader

Abstract

This specification discloses a method, apparatus, medium, and device for determining the contribution of a federated learning system, which is beneficial for privacy protection. The method determines the target dataset for each dimension based on data sent by other participants and their own data across various dimensions. Then, for each dimension, subsets of the target dataset for that dimension are determined, and the data for that dimension is added to each subset to determine the comparison dataset for each subset. Each subset and its comparison dataset are then input into the federated learning model. Based on the difference between the first result corresponding to each subset and the second result corresponding to the comparison dataset for each subset, the data contribution of the target participant in that dimension is determined. Finally, based on the data contribution of the target participant in each dimension, its own target contribution is determined. This method improves the accuracy of determining data contribution by determining the target participant's own data contribution in each dimension.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, medium and device for determining the contribution of federated learning. Background Technology

[0002] With the continuous development of computer technology, the security of private data has become increasingly important. Machine learning models are developing rapidly, and training these models typically requires a large amount of data. To address the problem of data silos, federated learning has been widely adopted.

[0003] The advantage of federated learning is that it can jointly train a federated learning model using data from all participants, resulting in better performance. Typically, each participant's access to the federated learning model is determined by their contribution to the training process. For example, the duration or number of times each participant can use the model may be determined based on their contribution.

[0004] Therefore, determining the contribution of federated learning is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides a method, apparatus, medium, and device for determining federated learning contributions, in order to partially address the aforementioned problems existing in the prior art.

[0006] The following technical solution is adopted in this specification:

[0007] This specification provides a method for determining contributions to federated learning, the method being applied to target participants in training a federated learning model, the method comprising:

[0008] Receive first sample data sent by other participants; determine the second sample data used by the target participant to train the federated learning model;

[0009] For each dimension corresponding to the second sample data, the target dataset for that dimension is determined based on the data in the second sample data excluding that dimension, and the first sample data.

[0010] Based on the data of each dimension contained in the target dataset of this dimension, determine the subsets of the target dataset of this dimension that are composed of data of different dimensions, and add the second sample data of this dimension to each subset respectively to determine the comparison dataset of each subset;

[0011] Each subset and its comparison dataset are input into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset.

[0012] Based on the differences between each determined first result and each determined second result, the data contribution of the target participant in this dimension is determined;

[0013] The target contribution of the target participant is determined based on its data contribution in each dimension.

[0014] Optionally, receiving first sample data sent by other participants, specifically including:

[0015] The target user is determined from the shared users corresponding to the sample data used to train the federated learning model;

[0016] The user identifier of the target user is sent to other participating parties, enabling the other participating parties to determine the user data of the target user held by the other participating parties;

[0017] Receive user data of the target user sent by the other participating parties as first sample data;

[0018] The second sample data used by the target participant to train the federated learning model specifically includes:

[0019] The user data of the target user is determined as the second sample data.

[0020] Optionally, each subset and its comparison dataset are input into the federated learning model to obtain a first result for each subset and a second result for the comparison dataset of each subset, specifically including:

[0021] Determine the dimensions of the input data of the federated learning model stored by the target participant;

[0022] For each subset, based on the dimension of the input data and the dimension of the data contained in the subset, a preset placeholder is used to fill in the missing data in the subset to obtain the first input data; the first input data is input into the federated learning model to determine the first result corresponding to the subset output by the federated learning model;

[0023] as well as,

[0024] For each subset of the comparison dataset, based on the dimension of the input data and the dimension of the data contained in the comparison dataset of that subset, pre-defined placeholders are used to fill in the missing data in the comparison dataset of that subset to obtain the second input data; the second input data is input into the federated learning model to determine the second result corresponding to the comparison dataset of that subset output by the federated learning model.

[0025] Optionally, based on the differences between each determined first result and each determined second result, the data contribution of the target participant in this dimension is determined, specifically including:

[0026] For each subset, determine the difference between the first result corresponding to that subset and the second result corresponding to the comparison dataset of that subset;

[0027] Based on the determined differences, the data contribution of the target participant in that dimension is determined.

[0028] Optionally, the target participant's own target contribution is determined based on its data contribution in each dimension, specifically including:

[0029] Based on the first sample data and the second sample data, determine the full input data;

[0030] The full input data is input into the federated learning model, and the third result output by the federated learning model is determined as the total data contribution.

[0031] The component contribution of the target participant is determined based on the sum of its data contributions in each dimension.

[0032] The target contribution of the target participant is determined based on the proportion of the component contribution to the total data contribution.

[0033] Optionally, the method further includes:

[0034] The component contribution of the target participant is determined based on the sum of its data contributions in each dimension.

[0035] Based on the first sample data and the second sample data, determine the full input data;

[0036] The full input data is input into the federated learning model, and the third result output by the federated learning model is determined as the total data contribution.

[0037] Send an acquisition request to the other participants, so that the other participants return the determined component contribution of the other participants;

[0038] Receive the component contribution scores returned by the other participants, and determine whether the sum of the component contribution scores returned by the other participants and the component contribution scores of the target participant itself is equal to the total data contribution score;

[0039] If so, then the verification of the target participant's own contribution level is confirmed to be successful;

[0040] If not, then the verification of the target participant's own contribution level is determined to be unsuccessful.

[0041] Optionally, receiving first sample data sent by other participants, specifically including:

[0042] The identifier of the target user is sent to the other participants, enabling the other participants to encrypt the target user's data based on the target user's identifier.

[0043] Receive encrypted data corresponding to the target user sent by the other participating parties.

[0044] Optionally, the federated learning model includes a risk prediction model;

[0045] The method further includes:

[0046] The permissions of the target participant to use the federated learning model are adjusted according to the target contribution of the participant itself; wherein, the permissions include at least the usage duration and the number of times it can be used.

[0047] This specification provides an apparatus for determining contributions to federated learning, the apparatus being applied to a target participant in training a federated learning model, the apparatus comprising:

[0048] A receiving module is used to receive first sample data sent by other participants; and to determine the second sample data used by the target participant to train the federated learning model.

[0049] The determination module is used to determine the target dataset for each dimension corresponding to the second sample data, based on the data in the second sample data excluding that dimension and the first sample data.

[0050] The construction module is used to determine the subsets of the target dataset corresponding to the target dataset of the dimension, which are composed of data of different dimensions, based on the data of each dimension contained in the target dataset of the dimension, and to add the second sample data of the dimension to each subset respectively, and to determine the comparison dataset of each subset;

[0051] The input module is used to input each subset and the comparison dataset of each subset into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset.

[0052] The calculation module is used to determine the data contribution of the target participant in this dimension based on the differences between each determined first result and each determined second result;

[0053] The results module is used to determine the target contribution of the target participant based on its data contribution in each dimension.

[0054] Optionally, the receiving module is specifically configured to: determine a target user from the shared users corresponding to the sample data used to train the federated learning model; send the user identifier of the target user to other participants, so that the other participants can determine the user data of the target user held by the other participants; receive the user data of the target user sent by the other participants as first sample data; and determine the user data of the target user as second sample data.

[0055] Optionally, the input module is specifically configured to: determine the dimension of the input data of the federated learning model stored by the target participant; for each subset, supplement the missing data in the subset with preset placeholders based on the dimension of the input data and the dimension of the data contained in the subset, to obtain first input data; input the first input data into the federated learning model to determine the first result corresponding to the subset output by the federated learning model; and for the comparison dataset of each subset, supplement the missing data in the comparison dataset of the subset with preset placeholders based on the dimension of the input data and the dimension of the data contained in the comparison dataset of the subset, to obtain second input data; input the second input data into the federated learning model to determine the second result corresponding to the comparison dataset of the subset output by the federated learning model.

[0056] Optionally, the calculation module is specifically used to determine, for each subset, the difference between the first result corresponding to the subset and the second result corresponding to the comparison dataset of the subset; and to determine the data contribution of the target participant in this dimension based on the determined differences.

[0057] Optionally, the result module is specifically used to determine the full input data based on the first sample data and the second sample data; input the full input data into the federated learning model to determine the third result output by the federated learning model as the total data contribution; determine the target participant's own component contribution based on the sum of its data contributions in each dimension; and determine the target participant's own target contribution based on the proportion of the component contribution to the total data contribution.

[0058] Optionally, the result module is further configured to: determine the component contribution of the target participant based on the sum of its data contributions in each dimension; determine the full input data based on the first sample data and the second sample data; input the full input data into the federated learning model to determine the third result output by the federated learning model as the total data contribution; send an acquisition request to the other participants, causing them to return their determined component contributions; receive the component contributions returned by the other participants, and determine whether the sum of the component contributions returned by the other participants and the target participant's own component contributions equals the total data contribution; if yes, the target participant's own component contribution verification is successful; if no, the target participant's own component contribution verification is unsuccessful.

[0059] Optionally, the receiving module is specifically configured to send the identifier of the target user to the other participants, so that the other participants encrypt the data of the target user among the other participants based on the identifier of the target user; and receive the encrypted data corresponding to the target user sent by the other participants.

[0060] Optionally, the federated learning model includes a risk prediction model;

[0061] The results module is also used to adjust the permissions of the target participant to use the federated learning model based on the participant's own target contribution; wherein the permissions include at least the usage duration and the number of times it can be used.

[0062] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described addressing test method.

[0063] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described addressing test method.

[0064] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0065] This method determines the target dataset for each dimension based on data sent by other participants and their own data across various dimensions. Then, for each dimension, it identifies subsets of the target dataset for that dimension, adds the data for that dimension to each subset, and determines the comparison dataset for each subset. Each subset and its comparison dataset are then input into a federated learning model. Based on the difference between the first result for each subset and the second result for its comparison dataset, the target participant's data contribution for that dimension is determined. Finally, based on the target participant's data contribution in each dimension, the target participant's target contribution is determined. This method improves the accuracy of determining data contribution by first determining the target participant's own data contribution in each dimension and then determining the target participant's target contribution. Attached Figure Description

[0066] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0067] Figure 1 This is a flowchart illustrating one method for determining federated learning contributions in this specification.

[0068] Figure 2 This is a schematic diagram of one type of first input data in this specification;

[0069] Figure 3 This is a schematic diagram of one type of second input data in this specification;

[0070] Figure 4 A schematic diagram of a device for determining federated learning contributions provided in this specification;

[0071] Figure 5 The corresponding information provided in this specification Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0072] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0073] The embodiments of this specification provide a method, apparatus, medium, and device for determining federated learning contributions. The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0074] Currently, to address the issue of data silos while protecting user privacy, participating parties are using federated learning to improve model training effectiveness.

[0075] To incentivize participants to jointly train the federated learning model, the central server for training the federated learning model will adjust the permissions of each participant to use the federated learning model based on their contribution to the training. For example, it can adjust the duration or number of times a participant can use the model based on their contribution to the training.

[0076] For example, consider a large company, A, with a large and rich volume of user data (meaning different dimensions of data for the same user). Company A training a federated learning model solely using its own data might yield good results. Conversely, a smaller company, B, with less or less rich user data, might train a federated learning model solely using its own data, resulting in only average performance. However, training the same federated learning model using data from both companies would be far more effective than training a model solely using either company's data. If, after training the federated learning model, user A and user B are assigned the same access rights, this allocation method is unattractive to company A, thus reducing the incentive for a large company like company A to participate in federated learning model training.

[0077] Typically, each participating company determines its data contribution based on the amount and richness of the data it contributes, and then adjusts the model's usage permissions according to each company's data contribution. Therefore, it is necessary to accurately determine the data contribution of each participating company.

[0078] Furthermore, data is typically not shared among the participants, which could lead to situations where participants misrepresent their data contributions. For example, although Company A may contribute a large amount of rich and detailed data, only Company A knows the specifics of its own contribution. If Company A's data includes a significant amount of useless data and it misrepresents its contribution, it would harm Company B's interests. Conversely, if Company B misrepresents its contribution, it would harm Company A's interests. Therefore, allocating resources to participants based on their individual data contributions to the training model also has flaws.

[0079] Figure 1 This is a flowchart illustrating one method for determining federated learning contributions in this specification, specifically including the following steps:

[0080] S100: Receive first sample data sent by other participants; determine the second sample data used by the target participant to train the federated learning model.

[0081] This method is applied to the data contribution of the target participant in training a federated learning model. The federated learning described in this method is a vertical federated learning approach. For shared users, each participant possesses shared user data in different dimensions. Each participant provides user data for the shared users in its own dimensions for training the federated learning model. The target participant in this method is any one of the participants training the federated learning model, i.e., the executing entity of this method. Other participants besides the target participant are the other participants described in this method.

[0082] The target data contribution of the target participant in this method refers to the degree of influence of the data contributed by the target participant during the training of the federated learning model on the effectiveness of the federated learning model.

[0083] When multiple parties jointly train the same machine learning model, to determine the data contribution of each party, it is necessary to obtain the training samples of each party. This can be done by inputting the training samples of all participants into the federated learning model as the total input data, and then inputting the training samples of other participants (excluding the target participant) into the federated learning model as sub-input data. The data contribution of the target participant can be determined by the difference between the output results of the federated learning model obtained from the two inputs.

[0084] In one embodiment provided in this specification, the target participant determines its own target contribution by receiving first sample data sent by other participants, and simultaneously determines the data used by the target participant to train the federated learning model—second sample data. Specifically, the target participant can identify a target user from the shared users corresponding to the training data used to train the federated learning model, and then send the identifier of the target user to other participants. These other participants then send the target user's data to the target participant based on the identifier, and receive the first sample data corresponding to the target user from the other participants. After identifying the target user, the target participant determines the target user's user data from the aforementioned training data based on the target user's identifier, using this data as sample data to determine its own contribution to the federated learning. The user identifier can be information commonly used by the target participant and other participants to identify shared users.

[0085] In one embodiment provided in this specification, if there is only one user in the community, it is not necessary to determine the identifier of the target user separately, and the target participant can directly receive the encrypted data of the user in the community sent by other participants.

[0086] In one embodiment provided in this specification, if there are multiple users, the target participant can receive the first sample data of the users sent by other participants in a preset order, and at the same time determine the second sample data of the users in the same preset order.

[0087] The federated learning model described in this method may include a risk prediction model, which can adjust the permissions of the target participant to use the federated learning model according to the target contribution of the participant. The permissions include at least the usage duration and the number of times the participant can use the model.

[0088] S102: For each dimension corresponding to the second sample data, determine the target dataset for that dimension based on the data in the second sample data excluding that dimension and the first sample data.

[0089] In non-federated learning scenarios, where only one party uses its own data to train a machine learning model, that party typically determines the Shapley values ​​of its training samples across various dimensions. Then, it sums these Shapley values ​​to determine the data contribution of its training samples, thereby improving the accuracy of determining the data contribution.

[0090] Specifically, let x represent the training sample of the method, and f represent the machine learning model. x contains data of n dimensions. x can be represented as a dataset of n dimensions {x1, x2, ..., xn}, where x1 represents the data corresponding to dimension 1, or it can be represented as {xj (j=0, ..., n)}. When j=1, x1 represents the data corresponding to dimension 1.

[0091] For the j-th dimension, S is the dataset of data corresponding to the other n-1 dimensions besides the data corresponding to dimension j, and s is a subset of S, with a quantity of M.

[0092] For each s, the data corresponding to dimension j is added to subset s to form a comparison dataset s' of subset s. Subset s is then input into the machine learning model f to obtain the model's output f(s). Similarly, s' is input into the machine learning model f to obtain the model's output f(s'). The marginal contribution of the data corresponding to dimension j in subset s can be determined using f(s') - f(s). This process is repeated for each s.

[0093] The Shapley value of the data corresponding to dimension j in the training sample x is determined by the mean of the marginal contributions of the data corresponding to dimension j in each subset s. Specifically, the mean of the marginal contributions of the data corresponding to dimension j in each subset s is summed and then divided by the number of subsets s, M, to determine the mean of the marginal contributions of the data corresponding to dimension j in each subset s, which is also the Shapley value of the data corresponding to dimension j in the training sample x.

[0094] The contribution of a given data element to a given data element can be determined by summing the Shapley values ​​of the data corresponding to each dimension in the training sample x.

[0095] In accordance with this method, when determining the data contribution of the target participant, we can first determine the component contribution of each dimension of the target participant's second sample data, and then further determine the target participant's own target data contribution. To determine the component contribution of each dimension of the target participant's second sample data, we can first determine the marginal contribution of each dimension of the sample data. Specifically, for each dimension of the second sample data, based on the data in the second sample data excluding that dimension, and the first sample data, we determine the target dataset for that dimension.

[0096] For this target user, the sample data contains data from multiple dimensions of the target user. As mentioned above, the first sample data may also be the result of encrypted data from multiple dimensions of the target user. For example, for the target user, the second sample data of target participant a contains data from three dimensions: a1, a2, and a3. The first sample data of other participant b consists of b1 and b2, and the first sample data of other participant c consists of c1.

[0097] In scenarios where the target participant and other participants use user transaction data to train risk prediction models, the first sample data mentioned above can be user data used by other participants to train risk prediction models, such as user transaction amount, number of transactions, transaction time, etc., and the second sample data mentioned above can be user data used by the target participant to train risk prediction models, such as user age, family relationship, etc.

[0098] In one embodiment provided in this specification, after determining the sample data of the target participant, for each dimension corresponding to the sample data, the target dataset for that dimension is determined based on the data in the sample data other than that dimension, as well as the encrypted data.

[0099] The target dataset for this dimension corresponds to dataset S in the principle of determining the contribution of target data based on the Shapley value mentioned above.

[0100] Specifically, continuing with the previous example, for dimension 1 corresponding to a1 in the second sample data of target participant a, the target dataset for this dimension is {a2, a3, b1, b2, c1}. For dimension 2 corresponding to a2 in the second sample data of target participant a, the target dataset for this dimension is {a1, a3, b1, b2, c1}. For dimension 3 corresponding to a3 in the sample data of target participant a, the target dataset for this dimension is {a1, a2, b1, b2, c1}.

[0101] S104: Based on the data of each dimension contained in the target dataset of this dimension, determine the subsets of the target dataset of this dimension that are composed of data of different dimensions, and add the second sample data of this dimension to each subset respectively, and determine the comparison dataset of each subset.

[0102] In traditional methods for calculating the data contribution of training samples, for each s, the data corresponding to dimension j is added to subset s to form the comparison dataset s' of subset s.

[0103] Corresponding to this scheme, the method for calculating the marginal contribution of the target dataset is to add the data of this dimension to each subset, determine the comparison dataset of each subset, and then determine the marginal contribution of the target dataset based on the comparison dataset of the target dataset and the target dataset as follows.

[0104] Continuing with the previous example, for the dimension corresponding to a1 in the second sample data of target participant a, based on the data (a2, a3, b1, b2, c1) contained in the target dataset for that dimension, determine the subsets composed of data from different dimensions corresponding to the target dataset {a2, a3, b1, b2, c1} for that dimension: {a2}, {a3}, {b1}, {b2}, {b1, b2}, {c1}, {a2, a3}, {a2, b1}, {a2, b2}, {a2, b1, b2}. {a2, c1}, {a3, b1}, {a3, b2}, {a3, b1, b2}, {a3, c1}, {a2, b1, c1}, {a2, b2, c1}, {a2, b1, b2, c1}, {a3, b1, c1}, {a3, b2, c1}, {a3, b1, b2, c1}, {a2, a3, b1}, {a2, a3, b2}, {a2, a3, b1, b2}, {a2, a3, c1}, {a2, a3, b1, b2, c1}, etc.

[0105] In a scenario where target participants and other participants use user transaction data to train risk prediction models, a1 can be the user's age. In this case, the target dataset is determined by the second sample data (excluding the user's age) and the first sample data, and a subset of each target dataset is determined.

[0106] It should be noted that the target dataset for the above dimension consists of subsets of data from different dimensions, and each subset is a non-empty subset of the target dataset for that dimension.

[0107] Each subset of the target dataset mentioned above corresponds to each subset s in the principle of determining the contribution of the target data unilaterally based on the Shapley value.

[0108] After determining the subsets of data from different dimensions corresponding to the target dataset other than that dimension, the data of that dimension is added to each subset to obtain the comparison dataset of each subset.

[0109] The comparison datasets for each subset are the comparison datasets s' of each subset s in the principle of determining the contribution of the target data based on the Shapley value.

[0110] Specifically, for each subset, the data of that dimension from the second sample data is added to that subset to obtain the alignment dataset for that subset. Continuing the previous example, if the data a1 of that dimension from the second sample data is added to subset {a2}, then the alignment dataset for subset {a2} is {a1, a2}. In the subset {b1, b2}, the comparison dataset is {a1, b1, b2}. The data a1 of this dimension is added to the subset {a2}. In {b1, b2, c1}, the comparison dataset of the subset {a2, b1, b2, c1} is {a1, a2, b1, b2, c1}.

[0111] In a scenario where the target participant and other participants use user transaction data to train a risk prediction model, after determining the target dataset consisting of the second sample data (excluding user age and other dimensions) and the first sample data, one subset of the target dataset can be determined as {transaction amount q, transaction time t}. Then, the comparison dataset for this subset is {age o, transaction amount q, transaction time t}.

[0112] S106: Input each subset and the comparison dataset of each subset into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset.

[0113] For each subset, the target participant inputs the subset into the federated learning model to obtain the first result corresponding to the subset, and inputs the comparison dataset of the subset into the federated learning model to obtain the second result corresponding to the comparison dataset of the subset.

[0114] The first result corresponding to this subset is the output result f(s) of model f corresponding to the subset s in the above principle of determining the contribution of target data by one party based on the Shapley value. The second result corresponding to the comparison dataset of this subset is the output result f(s') of model f corresponding to the subset s in the above principle of determining the contribution of target data by one party based on the Shapley value.

[0115] S108: Based on the differences between each determined first result and each determined second result, determine the data contribution of the target participant in this dimension.

[0116] In traditional methods for calculating the data contribution of a training sample, the marginal contribution of the data corresponding to dimension j in subset s can be determined using f(s') - f(s). For each s, the marginal contribution of the data corresponding to dimension j in subset s is determined as described above. That is, based on the differences between each determined first result and each determined second result, the data contribution of the target participant in that dimension is determined. This corresponds to the principle described above where a single party determines the target data contribution based on the Shapley value, where the marginal contribution of the data corresponding to dimension j in subset s is determined based on f(s') and f(s).

[0117] Specifically, for each subset, the target participant determines the difference between the second result corresponding to the comparison data of that subset and the first result corresponding to that subset as the marginal contribution of that subset. Then, the mean of the marginal contributions of each subset is determined, which is the data contribution of the target participant in that dimension.

[0118] Specifically, since each subset in each subset has a one-to-one correspondence with the comparison dataset of that subset, and each subset corresponds to a first result, and each subset's comparison dataset corresponds to a second result, we can sum up the determined second results, sum up the determined first results, and then calculate the difference between the sum of the second results and the sum of the first results. Dividing this difference by the number of first results (or second results) will also yield the mean of the marginal contribution of each subset, i.e., the data contribution of the target participant in this dimension.

[0119] S110: Determine the target contribution of the target participant based on its own data contribution in each dimension.

[0120] As described in steps S100 to S108 above, the target participant determines its own data contribution in each dimension, and then sums up the data contribution in each dimension. The sum can be used as the target participant's own component contribution. The target participant's own target contribution is determined based on the target participant's component contribution.

[0121] After the target participant and other participants use user transaction data to train a risk prediction model, the data contribution of the risk control prediction scenario trained by the target participant is determined. Based on this data contribution, the target participant's access to the risk prediction model can be adjusted, such as the number of times or the duration of use.

[0122] Optionally, the target participant determines its own target contribution level, and other participants can also determine their own target contribution levels as described in steps S100~S110. The target participant can receive the target contribution levels sent by other participants. Based on the target participant's own target contribution level and the target contribution levels received from other participants, the permissions of each participant to use the model can be determined.

[0123] However, there is a possibility that other participants may misreport their target contribution. Optionally, the total data contribution of all participants can be determined first, and it can be judged whether the target participant's own contribution and the contribution of other participants have passed the verification. Based on the verified contribution of the target participant and the contribution of other participants, the permissions of each participant to use the model can be determined.

[0124] Specifically, the following method can be used to determine whether the target participant's own contribution and the contribution of other participants pass verification. The target participant can determine its own contribution based on the sum of its data contributions in each dimension. Based on the first sample data and the second sample data, the full input data is determined and input into the federated learning model. The third result output by the federated learning model is determined as the total data contribution. A request is sent to other participants to obtain their determined contribution. The target participant receives the contribution returned by other participants and determines whether the sum of the contribution returned by other participants and the target participant's own contribution equals the total data contribution. If so, the target participant's own contribution verification passes; otherwise, the target participant's own contribution verification fails.

[0125] Optionally, the total data contribution of all participants can be determined, the component contribution of the target participant can be determined based on its own data contribution in each dimension, the proportion of the target participant's component contribution to the total data contribution of all participants can be used as the target participant's own target contribution, and then the permissions of each participant to use the model can be determined based on the target participant's own target contribution.

[0126] Specifically, based on the first and second sample data, the full input data can be determined. This full input data is then fed into the federated learning model, and the third result output by the model is determined as the total data contribution. Based on the sum of the target participant's data contributions across all dimensions, the target participant's own component contribution is determined. Based on the proportion of this component contribution to the total data contribution, the target participant's own target contribution is determined. At this point, the proportion of this component contribution to the total data contribution is the target participant's own target contribution. Based on the target participant's own target contribution, the access rights of each participant to the model are determined.

[0127] This method determines the target dataset for each dimension based on data sent by other participants and the target participant's own data for each dimension. Then, for each dimension, it determines the subsets of the target dataset for that dimension, adds the data for that dimension to each subset, determines the comparison dataset for each subset, and then inputs each subset and its comparison dataset into the federated learning model. Based on the difference between the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset, it determines the data contribution of the target participant in that dimension. Finally, based on the data contribution of the target participant in each dimension, it determines the target contribution of the target participant.

[0128] As can be seen from the above method, this method improves the accuracy of determining data contribution by determining the data contribution of the target participant in each dimension and then determining the target contribution of the target participant.

[0129] In the context of federated learning, the data of each participant is not shared, meaning that the target participant usually cannot directly obtain the specific data used by other participants to train the federated learning model.

[0130] Based on this, this specification provides an embodiment to solve this problem. The target participant can receive encrypted data sent by other participants, wherein the encrypted data is the result of encrypting the data used by other participants to train the federated learning model. The target participant can also determine its target data contribution based on the encrypted data.

[0131] Specifically, as described in steps S100-102, the target participant can send the identifier of the target user to the other participants, so that the other participants can encrypt the data of the target user in the other participants according to the identifier of the target user, and receive the encrypted data corresponding to the target user sent by the other participants.

[0132] For the target user, the second sample data contains data from multiple dimensions of the target user. As mentioned above, the encrypted data may also be the result of encrypting data from multiple dimensions of the target user. For example, for the target user, the sample data of target participant A contains data from three dimensions: a1, a2, and a3. The encrypted data of other participant B is the result of summing and encrypting the data from dimensions b1 and b2. The encrypted data of other participant c is the result of encrypting one dimension of data from c1. It should be noted that if there are multiple other participants, then each of these participants will use the same encryption method for their respective first samples.

[0133] After determining the sample data of the target participants, for each dimension corresponding to the sample data, based on the data in the sample data excluding that dimension, and the encrypted data, the target dataset for that dimension is determined. This target dataset for that dimension corresponds to dataset S in the aforementioned principle of determining the contribution of a single party to the target data based on the Shapley value.

[0134] Specifically, continuing with the previous example, for dimension 1 corresponding to a1 in the sample data of target participant a, the target dataset for this dimension is {a2, a3, ...} , For dimension 2 corresponding to a2 in the sample data of target participant a, the target dataset for this dimension is {a1, a3, ...}. , For dimension 3 corresponding to a3 in the sample data of target participant a, the target dataset for this dimension is {a1, a2, ...}. , }

[0135] As described in step S104, the data of this dimension is added to each subset to determine the comparison dataset of each subset. Then, as described in the following steps, the marginal contribution of the target dataset is determined based on the comparison dataset of the target dataset and the target dataset.

[0136] Continuing with the previous example, for the dimension corresponding to a1 in the sample data of the target participant a, based on the data of each dimension (a2, a3, ...) contained in the target dataset of that dimension... , ), determine the target dataset {a2, a3, ) for this dimension , The corresponding subsets are composed of data from different dimensions: {a2}, {a3}, { }、{ }、{a2、a3}、{a2、 }、{a2、 }、{a3、 }、{a3、 }、{a2、 , }、{a3、 , }、{a2、a3、 }、{a2、a3、 }、{a2、a3、 , }

[0137] After determining the subsets of data from different dimensions corresponding to the target dataset other than that dimension, the data of that dimension is added to each subset to obtain the comparison dataset of each subset.

[0138] The comparison datasets for each subset are the comparison datasets s' of each subset s in the principle of determining the contribution of the target data based on the Shapley value.

[0139] Specifically, for each subset, the data of that dimension is added to that subset to obtain the alignment dataset for that subset. Continuing the example above, if the data of that dimension a1 is added to subset {a2}, then the alignment dataset for subset {a2} is {a1, a2}. The data of that dimension a1 is then added to subset {a2}... In}, then the subset { The comparison dataset is {a1,} }, add the data a1 of this dimension to the subset {a2, , In}, then the subset {a2, , The comparison dataset is {a1, a2,} , }

[0140] As described in step S106, each subset and its comparison dataset are input into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset.

[0141] Finally, as described in step S108, the data contribution of the target participant in this dimension is determined based on the differences between each determined first result and each determined second result.

[0142] Based on the premise that the participating parties do not share specific data, this specification can also provide another embodiment to solve the problem. The encrypted data of all participating parties can be input into the federated learning model as the total input data, and the encrypted data of other participating parties except the target participating party can be input into the federated learning model as the sub-input data. The data contribution of the target participating party can be determined based on the difference between the output results of the federated learning model obtained from the two inputs.

[0143] Specifically, the target participant receives first encrypted data sent by other participants and determines the encryption result of the second sample data used by the target participant to train the federated learning model as the second encrypted data. The first encrypted data is the encryption result of the first sample data used by other participants to train the federated learning model.

[0144] For example, for the target user, the second encrypted data of the target participant 'a' is the result of encrypting the sum of data from three dimensions: a1, a2, and a3. The first encrypted data of other participant b is the result of summing and encrypting the data in dimensions b1 and b2. The first encrypted data of other participant c is the result of encrypting one dimension of data of c1. .

[0145] It should be noted that the encryption methods for the first and second sample data are the same. That is, the target participant and other participants respectively perform homomorphic encryption on the first and second sample data to obtain the first encrypted data and the second encrypted data. Since the data is not shared, the target participant encrypts the second sample data in a preset way, and other participants also encrypt the first sample data in the same preset way.

[0146] A target dataset consisting of first encrypted data is determined, and each subset of the target dataset is determined. For each subset, second encrypted data is added to the subset, and the comparison dataset of the subset is determined.

[0147] Continuing with the previous example, the target dataset consisting of the first encrypted data is { , }, the subsets of the target dataset are { }、{ }、{ , }. Among them, the subset { The comparison dataset is} }, { , The comparison dataset is { , }

[0148] Each subset and its comparison dataset are input into the federated learning model to obtain a first result for each subset and a second result for the comparison dataset. Based on the differences between the determined first and second results, the target participant's data contribution in that dimension is determined. Based on the target participant's data contribution in each dimension, the target participant's target contribution is determined.

[0149] In summary, this method can determine the data contribution of each participant while protecting user privacy, i.e., without sharing data.

[0150] It should be noted that before the participants train the longitudinal federated learning model, a Private Set Intersection (PSI) is required. This involves determining the common user IDs of the training samples from all participants and aligning the sample data based on these common user IDs. The specific method for PSI is not limited in this document.

[0151] It should be noted that, in one embodiment provided in this specification, the federated machine learning model that a target participant can use, i.e., the federated machine learning model used in this method, can be pre-stored by that target participant. The input dimensions of the federated learning models pre-stored by different target participants can be different. For example, participant A is a target participant, and participant A's sample data is {a1, a2, a3}, which corresponds to 3 dimensions. Participants B and C also participate in the training of the federated learning model. Participant A's stored federated learning model has 5 input dimensions, and the input data is {a1, a2, a3}. , If participant B is the target participant, and participant B's sample data is {b1, b2, b3, b4}, its sample data has 4 dimensions. Participants A and C also participate in the federated learning model training. Participant B stores the input dimensions of the federated learning model, which have 6 dimensions. The data input to the model can be { b1, b2, b3, b4 }, or {b1, b2, b3, b4,} In short, the data is input into the federated learning model stored by the target participant according to the preset splicing order.

[0152] As described in step S106, each subset and its comparison dataset are input into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset. Considering the dimension of the input data of the federated learning model stored by the target participant, specifically, the dimension of the input data of the federated learning model stored by the target participant is first determined, and the splicing order of the input data of each dimension of the federated learning model stored by the target participant is also determined.

[0153] For each subset, based on the dimension of the input data and the dimension of the data contained in the subset, a preset placeholder is used to fill in the missing data in the subset to obtain the first input data. The first input data is then input into the federated learning model to determine the first result corresponding to the subset output by the federated learning model.

[0154] Furthermore, for each subset of the comparison dataset, based on the dimension of the input data and the dimension of the data contained in the comparison dataset of the subset, pre-defined placeholders are added to the missing data in the comparison dataset of the subset to obtain the second input data. The second input data is then input into the federated learning model to determine the second result corresponding to the comparison dataset of the subset output by the federated learning model.

[0155] Continuing with the previous example, participant A is the target participant, and participant A's sample data is {a1, a2, a3}, corresponding to 3 dimensions. Participants B and C are also involved in training the federated learning model. Participant A stores the input dimensions of the federated learning model, which are 5. The data input to this model is in the order {a1, a2, a3, ...}. , The order of} is used for splicing.

[0156] For dimension 1 of the sample data of participant A, the target dataset is determined to be {a2, a3, ...} , }, one subset of the target dataset is {a2, a3,} }, then as Figure 2 As shown, the first input data is determined as {0, a2, a3, ...} based on the input dimensions of the federated learning model stored by participant A. The alignment dataset is {a1, a2, a3, 0}, and its own alignment dataset is {a1, a2, a3, 0}. }, then as Figure 3 As shown, the second input data can be {a1, a2, a3, ...} ,0}.

[0157] In one embodiment provided in this specification, the federated machine learning model used by different target participants can also have the same structure, that is, a federated learning model jointly trained by multiple participants using data from each party, in which case the dimension of the input data of the federated learning model is uniform. Optionally, the dimension of the input data of the uniform federated learning model is the number of participants participating in the training of the uniform federated learning model, and the input data is encrypted data of each participant concatenated in a preset order.

[0158] For example, for participant A, the sample data {a1, a2, a3} of participant A is encrypted to obtain... Participants B and C also participated in training this unified federated learning model. The encrypted data obtained after encrypting the data from participants B and C respectively were as follows: and The unified federated learning model requires input data with three dimensions. The data input to the model is ordered according to { , , The order of} is used for splicing.

[0159] For dimension 1 of the sample data of participant A, the target dataset is determined to be {a2, a3, ...} , }, one subset of the target dataset is {a2, a3,} If the subset is determined to be a subset {a2, a3} belonging to the target participant's own sample data, then the dimensions of the subset are compared with those of the target participant's own sample data. Zeros are padded to the missing dimensions of the subset, resulting in {0, a2, a3}. This padded subset is then encrypted. Then, pad the missing dimensions in the input dimensions of this unified federated learning model with zeros, so the first input data is { , ,0}.

[0160] The comparison dataset for this subset is {a1, a2, a3, ...} }, comparing the dimensions of the target participant's own sample data, there are no missing dimensions, so no padding with zeros is needed. The dataset {a1, a2, a3} belonging to the target participant's own sample data in the comparison dataset of this subset is then encrypted to obtain... Then the second input data is { , ,0}.

[0161] It should be noted that the method described above, which involves padding missing input dimensions with zeros after determining the splicing order, is applicable to all embodiments of this method.

[0162] Furthermore, the above method determines the target contributor's own target contribution and access to the model based on the target user's data in the data used by each participant to train the federated learning model.

[0163] Specifically, in one embodiment provided in this description, multiple target users can be identified from the shared users. For each target user, the target contribution level determined by the target participant for that target user is determined. Encrypted data and the target participant's sample data for that target user are input into the federated learning model to determine the total data contribution level output by the federated learning model for that target user. Based on the target participant's own target data contribution level for that target user and the total data contribution level for that target user, the component proportion of the target participant's use of the model is determined. Finally, based on the determined component proportions, the average proportion of the target participant's use of the model is determined, such as the proportion of usage time or the proportion of usage frequency.

[0164] For each target user, the target user's identifier is sent to other participants, enabling them to determine their respective contribution levels to that target user based on the identifier. The method for determining the contribution level based on the target user's identifier is as described above. The system receives the contribution levels sent by other participants. It then determines whether the sum of the target participant's own contribution level for that target user and the contribution levels of other participants for that target user equals the total data contribution for that target user. If so, the target participant's own contribution level, the contribution levels of other participants for that target user, and the total data contribution for that target user all pass verification. If not, the target participant's own contribution level, the contribution levels of other participants for that target user, and the total data contribution for that target user all fail verification.

[0165] The verified contribution of each target participant to each target user is determined as the credible contribution of the target participant. The verified total data contribution to each target user is determined. Based on the credible contribution of the target participant and the determined total data contribution to each target user, the permission of the target participant to use the model is determined.

[0166] Specifically, for each target participant's credible contribution, the target user corresponding to that credible contribution is determined, the total data contribution to that target user is determined, the proportion of that credible contribution to the total data contribution to that target user is determined, and the proportion of model usage rights is determined based on the sum of the determined proportions.

[0167] The proportion of usage rights determined by the credible contributions of verified target participants is more accurate and is conducive to increasing the enthusiasm of each participant to join federated learning.

[0168] The above describes one or more embodiments of the methods provided in this specification. Based on the same concept, this specification also provides corresponding apparatus, such as... Figure 4 As shown.

[0169] Figure 4 This specification provides an apparatus for determining contributions to federated learning, the apparatus being applied to target participants in training a federated learning model, the apparatus comprising:

[0170] The receiving module 401 is used to receive first sample data sent by other participants; and to determine the second sample data used by the target participant to train the federated learning model.

[0171] The determining module 402 is used to determine the target dataset for each dimension corresponding to the second sample data, based on the data in the second sample data other than that dimension and the first sample data.

[0172] The construction module 403 is used to determine each subset of the target dataset corresponding to the target dataset of the dimension, which is composed of data of different dimensions, based on the data of each dimension contained in the target dataset of the dimension, and to add the second sample data of the dimension to each subset respectively, and to determine the comparison dataset of each subset;

[0173] The input module 404 is used to input each subset and the comparison dataset of each subset into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset.

[0174] The calculation module 405 is used to determine the data contribution of the target participant in this dimension based on the differences between each determined first result and each determined second result;

[0175] Result module 406 is used to determine the target contribution of the target participant based on its own data contribution in each dimension.

[0176] Optionally, the receiving module 401 determines a target user from the shared users corresponding to the sample data used to train the federated learning model; sends the user identifier of the target user to other participants, enabling the other participants to determine the user data of the target user held by the other participants; receives the user data of the target user sent by the other participants as first sample data; and determines the user data of the target user as second sample data.

[0177] Optionally, the input module 404 is specifically configured to: determine the dimension of the input data of the federated learning model stored by the target participant; for each subset, supplement the missing data in the subset with preset placeholders according to the dimension of the input data and the dimension of the data contained in the subset to obtain first input data; input the first input data into the federated learning model to determine the first result corresponding to the subset output by the federated learning model; and for the comparison dataset of each subset, supplement the missing data in the comparison dataset of the subset with preset placeholders according to the dimension of the input data and the dimension of the data contained in the comparison dataset of the subset to obtain second input data; input the second input data into the federated learning model to determine the second result corresponding to the comparison dataset of the subset output by the federated learning model.

[0178] Optionally, the calculation module 405 is specifically used to determine, for each subset, the difference between the first result corresponding to the subset and the second result corresponding to the comparison dataset of the subset; and to determine the data contribution of the target participant in this dimension based on the determined differences.

[0179] Optionally, the result module 406 is specifically used to determine the full input data based on the first sample data and the second sample data; input the full input data into the federated learning model to determine the third result output by the federated learning model as the total data contribution; determine the target participant's own component contribution based on the sum of the target participant's data contributions in each dimension; and determine the target participant's own target contribution based on the proportion of the component contribution to the total data contribution.

[0180] Optionally, the result module 406 is further configured to: determine the component contribution of the target participant based on the sum of its data contributions in each dimension; determine the full input data based on the first sample data and the second sample data; input the full input data into the federated learning model to determine the third result output by the federated learning model as the total data contribution; send an acquisition request to the other participants, causing them to return their determined component contributions; receive the component contributions returned by the other participants, and determine whether the sum of the component contributions returned by the other participants and the target participant's own component contributions equals the total data contribution; if yes, the component contribution of the target participant is verified as valid; if no, the component contribution of the target participant is verified as invalid.

[0181] Optionally, the receiving module 401 is specifically configured to send the identifier of the target user to the other participants, so that the other participants encrypt the data of the target user among the other participants according to the identifier of the target user; and receive the encrypted data corresponding to the target user sent by the other participants.

[0182] Optionally, the federated learning model includes a risk prediction model;

[0183] The result module 406 is further configured to adjust the permissions of the target participant to use the federated learning model based on the participant's own target contribution; wherein the permissions include at least the usage duration and the number of uses.

[0184] This instruction manual also provides Figure 5 The diagram shows the structure of the electronic device. Figure 5 At the hardware level, the autonomous driving device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for various operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The method described herein. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0185] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0186] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0187] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0188] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0189] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0190] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0191] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0192] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0194] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

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

[0196] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0197] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0198] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0199] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0200] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this application.

Claims

1. A method for determining contributions to federated learning, said method being applied to target participants in training a federated learning model, said method comprising: Receive the first sample data sent by other participants; Determine the second sample data used by the target participant to train the federated learning model; For each dimension corresponding to the second sample data, the target dataset for that dimension is determined based on the data in the second sample data excluding that dimension, and the first sample data. Based on the data of each dimension contained in the target dataset of this dimension, determine the subsets of the target dataset of this dimension that are composed of data of different dimensions, and add the second sample data of this dimension to each subset respectively to determine the comparison dataset of each subset; Each subset and its comparison dataset are input into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset. Based on the differences between each determined first result and each determined second result, the data contribution of the target participant in this dimension is determined; The target contribution of the target participant is determined based on its own data contribution in each dimension; The component contribution of the target participant is determined based on the sum of its data contributions in each dimension. Based on the first sample data and the second sample data, determine the full input data; The full input data is input into the federated learning model, and the third result output by the federated learning model is determined as the total data contribution. Send an acquisition request to the other participants, so that the other participants return the determined component contribution of the other participants; Receive the component contribution scores returned by the other participants, and determine whether the sum of the component contribution scores returned by the other participants and the component contribution scores of the target participant itself is equal to the total data contribution score; If so, then the verification of the target participant's own contribution level is confirmed to be successful; If not, then the verification of the target participant's own contribution level is determined to be unsuccessful.

2. The method as described in claim 1, wherein receiving first sample data sent by other participating parties specifically includes: The target user is determined from the shared users corresponding to the sample data used to train the federated learning model; The user identifier of the target user is sent to other participating parties, enabling the other participating parties to determine the user data of the target user held by the other participating parties; Receive user data of the target user sent by the other participating parties as first sample data; The second sample data used by the target participant to train the federated learning model specifically includes: The user data of the target user is determined as the second sample data.

3. The method as described in claim 1, wherein each subset and its comparison dataset are input into the federated learning model to obtain a first result corresponding to each subset and a second result corresponding to the comparison dataset of each subset, specifically includes: Determine the dimensions of the input data for the federated learning model; For each subset, based on the dimension of the input data and the dimension of the data contained in the subset, a preset placeholder is used to fill in the missing data in the subset to obtain the first input data; the first input data is input into the federated learning model to determine the first result corresponding to the subset output by the federated learning model; as well as, For each subset of the comparison dataset, based on the dimension of the input data and the dimension of the data contained in the comparison dataset of that subset, pre-defined placeholders are used to fill in the missing data in the comparison dataset of that subset to obtain the second input data; the second input data is input into the federated learning model to determine the second result corresponding to the comparison dataset of that subset output by the federated learning model.

4. The method as described in claim 1, wherein the data contribution of the target participant in this dimension is determined based on the differences between each determined first result and each determined second result, specifically including: For each subset, determine the difference between the first result corresponding to that subset and the second result corresponding to the comparison dataset of that subset; Based on the determined differences, the data contribution of the target participant in that dimension is determined.

5. The method as described in claim 1, wherein determining the target participant's own target contribution based on the target participant's own data contribution in each dimension specifically includes: Based on the first sample data and the second sample data, determine the full input data; The full input data is input into the federated learning model, and the third result output by the federated learning model is determined as the total data contribution. The component contribution of the target participant is determined based on the sum of its data contributions in each dimension. The target contribution of the target participant is determined based on the proportion of the component contribution to the total data contribution.

6. The method as described in claim 2, wherein receiving first sample data sent by other participating parties specifically includes: The identifier of the target user is sent to the other participants, enabling the other participants to encrypt the target user's data based on the target user's identifier. Receive encrypted data corresponding to the target user sent by the other participating parties.

7. The method of claim 1, wherein the federated learning model includes a risk prediction model; The method further includes: The permissions of the target participant to use the federated learning model are adjusted according to the target contribution of the participant itself; wherein, the permissions include at least the usage duration and the number of times it can be used.

8. An apparatus for determining contributions to federated learning, the apparatus being applied to a target participant in training a federated learning model, the apparatus comprising: The receiving module is used to receive the first sample data sent by other participants; Determine the second sample data used by the target participant to train the federated learning model; The determination module is used to determine the target dataset for each dimension corresponding to the second sample data, based on the data in the second sample data excluding that dimension and the first sample data. The construction module is used to determine the subsets of the target dataset corresponding to the target dataset of the dimension, which are composed of data of different dimensions, based on the data of each dimension contained in the target dataset of the dimension, and to add the second sample data of the dimension to each subset respectively, and to determine the comparison dataset of each subset; The input module is used to input each subset and the comparison dataset of each subset into the federated learning model to obtain the first result corresponding to each subset and the second result corresponding to the comparison dataset of each subset. The calculation module is used to determine the data contribution of the target participant in this dimension based on the differences between each determined first result and each determined second result; The results module is used to determine the target contribution of the target participant based on its data contribution in each dimension. The result module is further configured to determine the component contribution of the target participant based on the sum of its data contributions in each dimension; determine the full input data based on the first sample data and the second sample data; input the full input data into the federated learning model; and determine the third result output by the federated learning model as the total data contribution. Send an acquisition request to the other participants, so that the other participants return the determined component contribution of the other participants; Receive the component contribution scores returned by the other participants, and determine whether the sum of the component contribution scores returned by the other participants and the component contribution scores of the target participant itself is equal to the total data contribution score; if yes, then determine that the component contribution score of the target participant itself has passed the verification; if no, then determine that the component contribution score of the target participant itself has failed the verification.

9. The apparatus of claim 8, wherein the receiving module is specifically configured to: determine a target user from among the shared users corresponding to the sample data used to train the federated learning model; send the user identifier of the target user to other participants, enabling the other participants to determine the user data of the target user held by the other participants; receive the user data of the target user sent by the other participants as first sample data; and determine the user data of the target user as second sample data.

10. The apparatus of claim 8, wherein the input module is specifically configured to: determine the dimension of the input data of the federated learning model stored by the target participant; for each subset, supplement the missing data in the subset with preset placeholders according to the dimension of the input data and the dimension of the data contained in the subset, to obtain first input data; input the first input data into the federated learning model, to determine the first result corresponding to the subset output by the federated learning model; and for each subset's comparison dataset, supplement the missing data in the comparison dataset of the subset with preset placeholders according to the dimension of the input data and the dimension of the data contained in the comparison dataset of the subset, to obtain second input data; input the second input data into the federated learning model, to determine the second result corresponding to the comparison dataset of the subset output by the federated learning model.

11. The apparatus of claim 8, wherein the calculation module is specifically configured to, for each subset, determine the difference between the first result corresponding to the subset and the second result corresponding to the comparison dataset of the subset; and determine the data contribution of the target participant in that dimension based on the determined differences.

12. The apparatus of claim 8, wherein the result module is specifically configured to: determine full input data based on the first sample data and the second sample data; input the full input data into the federated learning model; determine the third result output by the federated learning model as the total data contribution; determine the component contribution of the target participant based on the sum of its data contributions in each dimension; and determine the target contribution of the target participant based on the proportion of the component contribution to the total data contribution.

13. The apparatus of claim 9, wherein the receiving module is specifically configured to: send the identifier of the target user to the other participating parties, so that the other participating parties encrypt the data of the target user among the other participating parties according to the identifier of the target user; and receive the encrypted data corresponding to the target user sent by the other participating parties.

14. The apparatus of claim 8, wherein the federated learning model includes a risk prediction model; The results module is further configured to adjust the permissions of the target participant to use the federated learning model based on the participant's own target contribution; wherein, The permissions include at least the duration and number of uses.

15. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1 to 7.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method of any one of claims 1 to 7.