Blockchain-based Data Processing Method, Device, Equipment and Medium

By conducting cryptographic federated modeling and legality assessment on blockchain, the security risks and contribution assessment problems in federated model construction are solved, and the construction of high-quality federated models is achieved quickly and securely.

CN111950739BActive Publication Date: 2025-08-05WEBANK (CHINA)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010822839.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-13
Publication Date
2025-08-05
Estimated Expiration
2040-08-13

AI Technical Summary

Technical Problem

In the prior art, the construction of the federal model poses security risks and is difficult to quickly build high-quality models, and it is not possible to effectively evaluate the contribution of each participant.

Method used

Through blockchain technology, the target pending model data is sent to the blockchain block, and each participant performs encrypted federal modeling and determines the legitimacy and contribution of the participant based on the federal parameter information.

Benefits of technology

It improves the security of data exchange, clarifies the legitimacy and contribution of participants, attracts participants of high-quality data to join, and quickly and safely builds a high-quality federal model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111950739B_ABST
    Figure CN111950739B_ABST
Patent Text Reader

Abstract

This application discloses a blockchain-based data processing method, apparatus, device, and medium. The method includes: sending target model data to be processed to a blockchain block, so that each second participant can perform preset federated modeling with the first participant based on the target model data; receiving each federated parameter information encrypted and sent to the blockchain block by each second participant during the preset federated modeling process; and determining the legitimacy of the participation of the corresponding second participant based on each federated parameter information, and determining the contribution of each legitimate second participant. This application solves the technical problem in the prior art that it is difficult to construct a federated model safely and quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a data processing method, device, equipment and medium based on blockchain. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, blockchain, artificial intelligence, etc.) are being applied in the financial field, but the financial industry also has higher requirements for technology, such as the financial industry has higher requirements for blockchain-based data processing.

[0003] Federated learning can help multiple data sources jointly train a federated model while protecting user privacy. However, when building a federated model, existing technologies require each participant to directly exchange data, which leads to security risks during data exchange. When building a federated model, they only focus on the model's effectiveness and assume that all participants have the same contribution. This makes it difficult to attract participants with high-quality data to join, making it difficult to quickly build a high-quality federated model. In other words, existing technologies have technical problems that make it difficult to quickly and securely build a high-quality federated model. Summary of the Invention

[0004] The main purpose of this application is to provide a blockchain-based data processing method, device, equipment and medium, aiming to solve the technical problem in the existing technology that it is difficult to build a federal model safely and quickly.

[0005] To achieve the above objectives, the present application provides a blockchain-based data processing method, which is applied to a first participant, wherein the first participant and each second participant establish a federated communication connection via a blockchain. The blockchain-based data processing method includes:

[0006] Sending the target model data to be processed to the blockchain block, so that each second party can perform preset federated modeling with the first party based on the target model data to be processed;

[0007] Receiving each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process;

[0008] The participation legitimacy of the corresponding second participant is determined based on each federation parameter information, and the contribution degree of each legitimate second participant is determined.

[0009] Optionally, the step of determining the participation legitimacy of the corresponding second participant based on each federation parameter information includes:

[0010] Determining the associated parties to which each second party is associated;

[0011] A verification result obtained by receiving the associated participant based on the blockchain and verifying the federation parameter information of the corresponding second participant;

[0012] wherein the association participant federation corresponds to the federation parameter information of the second participant and the local federation parameter information to obtain an association model, and the association model is verified based on a first preset verification data set of the association participant to obtain a verification result;

[0013] Based on the verification result, the legitimacy of participation of the corresponding second participant is determined.

[0014] Optionally, the step of determining the contribution of each legitimate second party includes:

[0015] Determining each federation model determined by the first participant based on each federation parameter information;

[0016] Obtaining a second preset verification data set of the first participant;

[0017] Predicting the second preset verification data set based on each federated model to obtain prediction results;

[0018] The contribution of each second participant is correspondingly determined based on each prediction result.

[0019] Optionally, each second participant encrypts and sends each federation parameter information during the preset federation modeling process;

[0020] Before the step of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes:

[0021] determining whether encrypted federation parameter information of all second parties has been received;

[0022] If the encrypted federation parameter information of all second participants is received, the decryption of the federation parameter information is triggered collaboratively.

[0023] Optionally, the step of determining the contribution of each legitimate second party includes:

[0024] Obtaining each sending time of each legitimate second participant sending each federation parameter information to the blockchain block during the preset federation modeling process;

[0025] Based on the length of the sending time, the contribution of each legitimate second participant is determined.

[0026] Optionally, after the steps of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes:

[0027] Get the preset modeling optimization reward data;

[0028] Based on the size of the contribution, the reward amount in the modeling optimization reward data is distributed to each participant.

[0029] Optionally, the blockchain-based data processing method includes:

[0030] Save the federation parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

[0031] The present application further provides a blockchain-based data processing device, which is applied to a first participant, wherein the first participant and each second participant establish a federated communication connection via a blockchain, and the blockchain-based data processing device includes:

[0032] A modeling module, configured to send the target model data to be processed to the blockchain block, so that each second party can perform a preset federated modeling with the first party based on the target model data to be processed;

[0033] A receiving module, configured to receive each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process;

[0034] The first determination module is used to determine the participation legitimacy of the corresponding second participant based on each federation parameter information, and determine the contribution degree of each legitimate second participant.

[0035] Optionally, the first determining module includes:

[0036] A first determining unit, configured to determine associated parties associated with each second party;

[0037] A first receiving unit is configured to receive, based on the blockchain, a verification result obtained by the associated participant after verifying the federation parameter information of the corresponding second participant;

[0038] wherein the association participant federation corresponds to the federation parameter information of the second participant and the local federation parameter information to obtain an association model, and the association model is verified based on a first preset verification data set of the association participant to obtain a verification result;

[0039] The second determining unit is used to determine the participation legitimacy of the corresponding second participant based on the verification result.

[0040] Optionally, the first determining module further includes:

[0041] a third determining unit, configured to determine each federation model determined by the first participant based on each federation parameter information;

[0042] A first acquiring unit, configured to acquire a second preset verification data set of the first participant;

[0043] A prediction unit, configured to predict the second preset verification data set based on each federated model to obtain prediction results;

[0044] The fourth determining unit is used to determine the contribution of each second participant based on the prediction results.

[0045] Optionally, each second participant encrypts and sends each federation parameter information during the preset federation modeling process;

[0046] The blockchain-based data processing device further includes:

[0047] a second determining module, configured to determine whether encrypted federation parameter information of all second parties has been received;

[0048] The decryption module is used to collaboratively trigger decryption of each federation parameter information upon receiving the encrypted federation parameter information of all second participants.

[0049] Optionally, the first determining module further includes:

[0050] A second obtaining unit is configured to obtain the sending time of each legitimate second participant sending each federation parameter information to the blockchain block during the preset federation modeling process;

[0051] The fifth determining unit is configured to determine the contribution of each legal second participant based on the length of the sending time.

[0052] Optionally, the blockchain-based data processing device further includes:

[0053] The acquisition module is used to obtain the preset modeling optimization reward data;

[0054] A distribution module is used to distribute the reward amount in the modeling optimization reward data to each participant based on the size of the contribution.

[0055] Optionally, the blockchain-based data processing device further includes:

[0056] The saving module is used to save the federation parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

[0057] The present application also provides a blockchain-based data processing device, which is a physical device. The blockchain-based data processing device includes: a memory, a processor, and a program of the blockchain-based data processing method stored in the memory and executable on the processor. When the program of the blockchain-based data processing method is executed by the processor, the steps of the blockchain-based data processing method described above can be implemented.

[0058] The present application also provides a medium, on which is stored a program for implementing the above-mentioned blockchain-based data processing method. When the program for the blockchain-based data processing method is executed by a processor, the steps of the above-mentioned blockchain-based data processing method are implemented.

[0059] The present application provides a blockchain-based data processing method, apparatus, device and medium. Compared with the prior art in which each participant directly exchanges data when building a federated model and only focuses on the model effect, which makes it difficult to quickly and safely build a high-quality federated model, in the present application, the target model data to be processed is sent to the blockchain block, so that each second participant can perform preset federated modeling with the first participant based on the target model data to be processed; the federated parameter information encrypted and sent to the blockchain block by each second participant during the preset federated modeling process is received; the legitimacy of the participation of the corresponding second participant is determined based on the respective federated parameter information, and the contribution degree of each legitimate second participant is determined. In this application, each participant performs federal modeling based on blockchain encryption, rather than directly exchanging data. This improves the security of data exchange. Furthermore, in this application, based on each federal parameter information, the legitimacy of the participation of the corresponding second participant is determined through blockchain, and the contribution of each legitimate second participant is determined. That is, in this application, each second participant is audited through blockchain to clarify the legitimacy and contribution of each participant, rather than assuming that the contribution of each participant is the same. This makes it easier to attract participants with high-quality data to join. By attracting participants with high-quality data to join, the speed of building a high-quality federal model can be accelerated, and a high-quality federal model can be built quickly and safely. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0062] Figure 1 This is a flowchart of the first embodiment of the blockchain-based data processing method of this application;

[0063] Figure 2 This is a detailed flowchart of the steps for determining the legitimacy of participation of the corresponding second participant based on each federated parameter information in the first embodiment of the blockchain-based data processing method of the present application;

[0064] Figure 3 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0065] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0066] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0067] The present application embodiment provides a data processing method based on blockchain. In the first embodiment of the data processing method based on blockchain in the present application, refer to Figure 1 , applied to a first participant, the first participant and each second participant establish a federated communication connection via a blockchain, the blockchain-based data processing method comprising:

[0068] Step S10: Send the target model data to be processed to the blockchain block, so that each second party can perform preset federated modeling with the first party based on the target model data to be processed;

[0069] Step S20: receiving each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process;

[0070] Step S30: determining the participation legitimacy of the corresponding second participants based on each federation parameter information, and determining the contribution of each legitimate second participant.

[0071] The specific steps are as follows:

[0072] Step S10: Send the target model data to be processed to the blockchain block, so that each second party can perform preset federated modeling with the first party based on the target model data to be processed;

[0073] In this embodiment, the blockchain-based data processing method is applied to the first participant, and the first participant and each second participant are connected to each other through the blockchain for federal communication, and the first participant and the second participant together constitute a blockchain-based data processing system, which belongs to a blockchain-based data processing device.

[0074] It should be noted that the first participant can be a coordinator or any ordinary participant. In particular, in this embodiment, it can be the first block of the blockchain created by the first participant, that is, the first participant (coordinator) initiates the first federated learning task and creates the first blockchain block. In the first blockchain block, the first participant writes the blockchain content such as the target model data to be processed (including the initial model, initial model parameters and performance detection protocol), and each second participant obtains the blockchain content of the first blockchain block based on the blockchain (by downloading, etc.), and then each second participant performs pairwise federation with the first participant based on the blockchain content of the downloaded first blockchain block (different pairwise federations can be different). At the same time or not), after each federation with the second participant, the first participant will calculate the degree of improvement of the model after the federation. That is, for each second participant, after obtaining the blockchain content of the first blockchain block, the initial model is iteratively trained based on local data, and the second model parameters (or model) corresponding to the first preset number of iterations or after the initial model converges are sent to the first participant. The first participant fuses the second model parameters with the first model parameters obtained by its own training (that is, when the participant is training, the first participant also synchronously trains the model based on its own data), obtains the first fusion parameters, and determines the model improvement degree corresponding to each second participant this time, and then obtains the model contribution degree of each second participant.

[0075] It should be noted that the first participant can also be any ordinary participant that obtained the write right (with the greatest model contribution) in the previous round of competition. That is, in this embodiment, the first participant can be variable. The first participant publishes the target model data to be processed to the blockchain block for acquisition by other second participants. After the second participants obtain the target model data to be processed, each second participant then performs pairwise federation with the first participant based on the downloaded target model data to be processed. After each federation with the first participant, the first participant will calculate the improvement degree of the model after the federation with the second participant. Specifically, for the second participant, the first participant iteratively trains the first target model to be processed in the target model data to be processed based on local data, and sends the fourth model parameters corresponding to the second preset number of iterations or after the convergence of the first target model training to the first participant. The first participant fuses the fourth model parameters with the third model parameters obtained by its own training (that is, when each second participant trains, the first participant also synchronously trains the model based on its own data) to obtain second fusion parameters, and determines the improvement degree of the model after the federation with the second participant.

[0076] Step S20: receiving each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process;

[0077] Receive each federated parameter information encrypted and sent to the blockchain block by each second participant during the preset federated modeling process, wherein the federated parameter information includes information such as the model, model parameters, and gradients of the model parameters. That is, in this embodiment, each second participant iteratively trains the initial model based on local data during the preset federated modeling process, and encrypts and sends the corresponding second model parameters (or model parameter gradients) after a corresponding number of iterations or after the initial model converges to the first participant.

[0078] Specifically, for example, in this embodiment, each participant can be a shopping website, on which user data on items such as rating data, click data or purchase data can be obtained. Taking the model training as matrix factorization (MF) as an example, MF decomposes the rating matrix of each participant user on the item into the product of two sub-matrices (model training is to confirm the decomposition method, that is, to confirm U and V so that the loss function or optimization equation is minimized), where the matrix X∈R n×m is the user's behavior data on the item, n is the number of users, m is the number of items, X(i,j)∈R represents the behavior of user i on item j, such as rating data. U∈R n×k Represents the user interest matrix, V∈R k×mRepresents the item clustering matrix, k<n,m. For the participants, it is necessary to solve the following optimization equation to obtain U and V;

[0079]

[0080] Among them, ||X-UV|| 2 is the sum of squares of the errors between X and UV; is a regularization term, representing the sum of the squares of the elements of U and V; λ is a hyperparameter of the regularization term. It should be noted that U and V can be initialized first. After initialization, the above optimization equation can be solved by the gradient descent method to obtain the final U and V that meet the requirements (that is, each participant obtains the federated parameter information based on local data).

[0081] In the scenario where N parties jointly model the model, If all participants have the same users, that is, the number of users n in the behavior matrix is the same, then all behavior matrices X are decomposed i , and share the global user interest matrix to build a joint recommendation system. In this embodiment, it is necessary to solve the following joint optimization equation to obtain U and V.

[0082]

[0083] In order to solve the joint optimization equation to obtain U and V, and to protect user privacy and data security, the updated gradient ΔU (i.e., federated parameter information) of the user interest feature matrix of each second participant is required, and the updated gradient is encrypted and sent to the first participant based on the blockchain.

[0084] Step S30: determining the participation legitimacy of the corresponding second participants based on each federation parameter information, and determining the contribution of each legitimate second participant.

[0085] The legitimacy of the participation of the corresponding second participant is determined based on each federated parameter information. Specifically, the legitimacy of the participation of the corresponding second participant is determined through the performance detection protocol obtained by each second participant. It should be noted that in this embodiment, the legitimacy of the participation of the corresponding second participant can be determined based on the performance detection protocol: other second participants determine whether the performance is improved after obtaining the corresponding model parameters of the second participant to be tested. If the performance is improved, the corresponding second participant is a legitimate participant. On the contrary, if the performance is reduced, the corresponding second participant is an illegitimate participant. Specifically, for example, the blockchain-based federated learning is a model for training cat recognition, then the federated parameter information can be a cat-determining feature. A second participant sends the A federal parameter information to the blockchain block for acquisition by other second participants and the first participant, such as parameter information of cat ears, or parameter information with specific cat characteristics such as cat hair color. Specifically, other second participants adjust local training based on the A federal parameter information. For example, the A federal parameter information is the data of cat ears in the interest matrix, then each other second participant selects all cat ear data from the local data, constructs adjustment data, and performs performance testing based on the adjustment data. If the performance of each other second participant is improved, the corresponding second participant has participation legitimacy. Conversely, if the performance is reduced, the corresponding second participant does not have participation legitimacy.

[0086] In this embodiment, the participation legitimacy of the corresponding second participant may also be determined by other methods. Specifically, the step of determining the participation legitimacy of the corresponding second participant based on each federation parameter information includes:

[0087] Step S31, determining the associated parties associated with each second party;

[0088] In this embodiment, the associated parties associated with each second party are determined by the first party. For example, it is determined that the parties associated with party a are parties b and c, which are the same users. The associated parties can also be determined by other methods, which are not limited here.

[0089] Step S32, receiving the associated participant based on the blockchain and verifying the federation parameter information of the corresponding second participant to obtain a verification result;

[0090] wherein the association participant federation corresponds to the federation parameter information of the second participant and the local federation parameter information to obtain an association model, and the association model is verified based on a first preset verification data set of the association participant to obtain a verification result;

[0091] The blockchain receives the associated party and verifies the federated parameter information of the corresponding second party, and obtains the verification result. Specifically, after verifying a certain party, the associated party places the verification result in the blockchain block for the first party to obtain.

[0092] Among them, the associated participant federation obtains the associated model based on the federated parameter information of the second participant and the corresponding local federated parameter information, that is, the aggregated federated parameter information (including verification gradient information) is obtained through the federated parameter information of the second participant and the corresponding local federated parameter information, and the target to-be-processed model is adjusted based on the aggregated federated parameter information to obtain the associated model. The associated model is verified based on the first preset verification data set of the associated participant to obtain a verification result, which includes a positive feedback result (accuracy improvement, etc.) and a reverse feedback result.

[0093] Step S33: Determine the legitimacy of participation of the corresponding second participant based on the verification result.

[0094] Based on the verification result, the legitimacy of participation of the corresponding second participant is determined. Specifically, if the verification result is a positive feedback result, it is determined that the corresponding second participant has the legitimacy to participate; if the verification result is a negative feedback result, it is determined that the corresponding second participant does not have the legitimacy to participate.

[0095] The step of determining the contribution of each legitimate second participant includes:

[0096] Step S34: determining each federation model determined by the first participant based on each federation parameter information;

[0097] Step S35, obtaining a second preset verification data set of the first participant;

[0098] Step S36, predicting the second preset verification data set based on each federated model to obtain prediction results;

[0099] Step S37: Determine the contribution of each second participant based on the prediction results.

[0100] In this embodiment, a method for determining the contribution of the second participant is provided. In this method, first, each federated model determined by the first participant based on the federated parameters (which may include gradients, etc.) of each second participant is determined, a second preset verification data set of the first participant is obtained, the second preset verification data set is input into each federated model, and the second preset verification data set is predicted based on each federated model to obtain each prediction result. The contribution of each second participant is determined based on the accuracy of each prediction result and the correlation between the accuracy of each prediction result and the contribution.

[0101] In this embodiment, it should be noted that the determination of each federated model can be simultaneous or at different times. Specifically, for example, the first participant can perform pairwise federation to obtain a federated model after receiving a federated parameter corresponding to a second participant. Alternatively, the first participant can perform pairwise federation to obtain a federated model only after receiving the federated parameter corresponding to the second participant, and then obtain the second preset verification data set of the first participant; predict the second preset verification data set based on each federated model to obtain each prediction result; and determine the contribution of each second participant based on each prediction result.

[0102] Obtaining a second preset verification dataset of the first participant; performing predictions on the second preset verification dataset based on each federated model to obtain prediction results; and determining a contribution of each second participant based on each prediction result. In this embodiment, after determining the contribution of each participant, the contribution can also be recorded via blockchain.

[0103] After the steps of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes:

[0104] Step S40, obtaining preset modeling optimization reward data;

[0105] Step S50: Distribute the reward amount in the modeling optimization reward data to each participant based on the contribution level.

[0106] In this embodiment, preset modeling optimization reward data is also obtained, specifically, a preset modeling optimization reward amount is obtained, and based on the size of the contribution, the reward amount in the modeling optimization reward data is distributed to each participant, wherein the reward amount in the modeling optimization reward data is distributed to each participant according to the preset correlation between the size of the contribution and the reward amount, wherein the greater the contribution, the more reward amount is divided, thereby attracting high-quality participants to participate in federal modeling.

[0107] It should be noted that in this embodiment, after obtaining the contribution degree, the top-ranked participants can also be broadcast through the blockchain to promote participants with large contributions, so as to attract participants with high-quality data to participate in the federation and improve the rate of federation modeling.

[0108] It should be noted that, in this embodiment, the contribution of each legitimate second participant may be determined after one iteration, or after multiple iterations, and no specific limitation is made here.

[0109] Compared with the prior art in which each participant directly exchanges data when building a federated model and only focuses on the model effect, making it difficult to quickly and safely build a high-quality federated model, the present application provides a blockchain-based data processing method, device, equipment and medium. In this method, the target model data to be processed is sent to the blockchain block, so that each second participant can perform preset federal modeling with the first participant based on the target model data to be processed; the federal parameter information encrypted and sent to the blockchain block by each second participant during the preset federal modeling process is received; the legitimacy of the participation of the corresponding second participant is determined based on the federal parameter information, and the contribution of each legitimate second participant is determined. In the present application, each participant performs federal modeling based on blockchain encryption, rather than directly exchanging data, thereby improving the security of data exchange. Furthermore, in the present embodiment, based on each federal parameter information, the legitimacy of the participation of the corresponding second participant is determined through blockchain, and the contribution of each legitimate second participant is determined. That is, in the present application, each second participant is audited through blockchain to clarify the legitimacy and contribution of each participant, rather than assuming that the contribution of each participant is the same. Therefore, it is easy to attract participants with high-quality data to join. By attracting participants with high-quality data to join, the speed of building a high-quality federal model can be accelerated, and a high-quality federal model can be built quickly and safely.

[0110] This embodiment of the present application provides a data processing method based on blockchain. Based on the first embodiment, in another embodiment of the data processing method based on blockchain of the present application, each second participant encrypts and sends each federation parameter information during the preset federation modeling process;

[0111] Before the step of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes:

[0112] Step A1, determining whether encrypted federation parameter information of all second participants has been received;

[0113] It should be noted that different second participants have different rates of iterating models based on the target model data to be processed. Therefore, the time when the federal parameter information is sent to the first participant based on the blockchain is also different. In this embodiment, it is determined whether the encrypted federal parameter information of all second participants is received, where all second participants refer to participants who pull the target model data to be processed from the blockchain block.

[0114] Step A2: If the encrypted federation parameter information of all second participants is received, collaboratively trigger decryption of the federation parameter information.

[0115] In this embodiment, if the encrypted federation parameter information of all second participants is received, the decryption of the federation parameter information is triggered collaboratively. If the encrypted federation parameter information of all second participants is not received, the decryption of the federation parameter information cannot be performed. In other words, in this embodiment, decryption requires multi-party collaboration to ensure security.

[0116] The step of determining the contribution of each legitimate second participant includes:

[0117] Step B1: obtaining the sending time of each federal parameter information sent by each legal second participant to the blockchain block during the preset federal modeling process;

[0118] In this embodiment, the sending time of each federal parameter information sent by each legal second participant to the blockchain block during the preset federal modeling process is also obtained. Specifically, if a second participant has strong modeling ability or computing ability, the federal parameter information is obtained first, and then, the federal parameter information is sent to the blockchain block first. If another second participant has strong modeling ability or computing ability, the federal parameter information is obtained later, and then, the federal parameter information is sent to the blockchain block later. In this embodiment, based on the blockchain record, the sending time of each federal parameter information sent by each legal second participant to the blockchain block during the preset federal modeling process is obtained. The first participant can apply to the blockchain block to obtain the sending time of each federal parameter information sent by each legal second participant to the blockchain block during the preset federal modeling process.

[0119] Step B2: Determine the contribution of each legitimate second participant based on the length of the sending time.

[0120] Based on the length of the sending time, the contribution of each legal second participant is determined. Specifically, based on the preset correlation between the length of the sending time and the contribution, the contribution of each legal second participant is determined. For example, if the sending time is 10S, the contribution is 10%; if the sending time is 5S, the contribution is 20%. In this embodiment, each second participant is ranked based on the size of the contribution.

[0121] In this embodiment, each legitimate second participant sends each federation parameter information to each sending time in the blockchain block during the preset federation modeling process; based on the length of the sending time, the contribution of each legitimate second participant is accurately determined.

[0122] The present application embodiment provides a data processing method based on blockchain. In another embodiment of the data processing method based on blockchain in the present application,

[0123] The blockchain-based data processing method includes:

[0124] Step C1: Save the federation parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

[0125] In this embodiment, the blockchain block records the federal parameter information reported by each second participant, as well as the timestamp of each participant's reporting, i.e., the reporting time, etc. In addition, the blockchain block also records the gradient value, verification gradient, and model status reported by each participant, and records the contribution of each second participant. In addition, it should be noted that in this embodiment, information such as the number of times each participant participates in model training can also be recorded. Therefore, the first participant can save the federal parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

[0126] In this embodiment, the federation parameter information reported by each second participant based on the blockchain block record is saved, and the contribution of each second participant based on the blockchain block record is saved, thereby facilitating subsequent queries.

[0127] Reference Figure 3 , Figure 3 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0128] like Figure 3As shown, the blockchain-based data processing device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. Communication bus 1002 is used to connect and communicate between processor 1001 and memory 1005. Memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk drive. Memory 1005 may also be a storage device independent of processor 1001.

[0129] Optionally, the blockchain-based data processing device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The rectangular user interface may include a display and an input submodule such as a keyboard. Optionally, the rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WiFi interface).

[0130] Those skilled in the art will understand that Figure 3 The blockchain-based data processing device structure shown in the figure does not constitute a limitation on the blockchain-based data processing device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0131] like Figure 3 As shown, memory 1005, a computer medium, may include an operating system, a network communication module, and a blockchain-based data processing program. The operating system is a program that manages and controls the hardware and software resources of blockchain-based data processing devices, supporting the execution of blockchain-based data processing programs and other software and / or programs. The network communication module is used to enable communication between components within memory 1005, as well as with other hardware and software in the blockchain-based data processing system.

[0132] exist Figure 3 In the blockchain-based data processing device shown, the processor 1001 is used to execute the blockchain-based data processing program stored in the memory 1005 to implement the steps of any of the above-mentioned blockchain-based data processing methods.

[0133] The specific implementation of the blockchain-based data processing device of this application is basically the same as the above-mentioned embodiments of the blockchain-based data processing method, and will not be repeated here.

[0134] The present application further provides a blockchain-based data processing device, which is applied to a first participant, wherein the first participant and each second participant establish a federated communication connection via a blockchain, and the blockchain-based data processing device includes:

[0135] A modeling module, configured to send the target model data to be processed to the blockchain block, so that each second party can perform a preset federated modeling with the first party based on the target model data to be processed;

[0136] A receiving module, configured to receive each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process;

[0137] The first determination module is used to determine the participation legitimacy of the corresponding second participant based on each federation parameter information, and determine the contribution degree of each legitimate second participant.

[0138] Optionally, the first determining module includes:

[0139] A first determining unit, configured to determine associated parties associated with each second party;

[0140] A first receiving unit is configured to receive, based on the blockchain, a verification result obtained by the associated participant after verifying the federation parameter information of the corresponding second participant;

[0141] wherein the association participant federation corresponds to the federation parameter information of the second participant and the local federation parameter information to obtain an association model, and the association model is verified based on a first preset verification data set of the association participant to obtain a verification result;

[0142] The second determining unit is used to determine the participation legitimacy of the corresponding second participant based on the verification result.

[0143] Optionally, the first determining module further includes:

[0144] a third determining unit, configured to determine each federation model determined by the first participant based on each federation parameter information;

[0145] A first acquiring unit, configured to acquire a second preset verification data set of the first participant;

[0146] A prediction unit, configured to predict the second preset verification data set based on each federated model to obtain prediction results;

[0147] The fourth determining unit is used to determine the contribution of each second participant based on the prediction results.

[0148] Optionally, each second participant encrypts and sends each federation parameter information during the preset federation modeling process;

[0149] The blockchain-based data processing device further includes:

[0150] a second determining module, configured to determine whether encrypted federation parameter information of all second parties has been received;

[0151] The decryption module is used to collaboratively trigger decryption of each federation parameter information upon receiving the encrypted federation parameter information of all second participants.

[0152] Optionally, the first determining module further includes:

[0153] A second obtaining unit is configured to obtain the sending time of each legitimate second participant sending each federation parameter information to the blockchain block during the preset federation modeling process;

[0154] The fifth determining unit is configured to determine the contribution of each legal second participant based on the length of the sending time.

[0155] Optionally, the blockchain-based data processing device further includes:

[0156] The acquisition module is used to obtain the preset modeling optimization reward data;

[0157] A distribution module is used to distribute the reward amount in the modeling optimization reward data to each participant based on the size of the contribution.

[0158] Optionally, the blockchain-based data processing device further includes:

[0159] The saving module is used to save the federation parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

[0160] The specific implementation of the blockchain-based data processing device of this application is basically the same as the various embodiments of the blockchain-based data processing method described above, and will not be repeated here.

[0161] An embodiment of the present application provides a medium, and the medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned blockchain-based data processing methods.

[0162] The specific implementation methods of the medium of this application are basically the same as the embodiments of the above-mentioned blockchain-based data processing method, and will not be repeated here.

[0163] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.

Claims

1. A data processing method based on blockchain, characterized in that: Applied to a first participant, the first participant and each second participant establish a federated communication connection via a blockchain, the blockchain-based data processing method comprising: Sending the target model data to be processed to the blockchain block, so that each second party can perform preset federated modeling with the first party based on the target model data to be processed; Receiving each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process; Determining the legitimacy of participation of the corresponding second participant based on each federation parameter information, and determining the contribution of each legitimate second participant; The step of determining the participation legitimacy of the corresponding second participant based on each federation parameter information includes: Determining associated parties associated with each second party, wherein the associated parties are parties with the same user; A verification result obtained by receiving the associated participant based on the blockchain and verifying the federation parameter information of the corresponding second participant; wherein the federation of the associated participants corresponds to federation parameter information of the second participant and the corresponding local federation parameter information, obtains aggregated federation parameter information through the federation parameter information of the second participant and the corresponding local federation parameter information, adjusts the target to-be-processed model based on the aggregated federation parameter information to obtain an associated model, and verifies the associated model based on a first preset verification data set of the associated participants to obtain a verification result; Based on the verification result, the legitimacy of participation of the corresponding second participant is determined.

2. The data processing method based on blockchain according to claim 1, characterized in that: The step of determining the contribution of each legitimate second participant includes: Determining each federation model determined by the first participant based on each federation parameter information; Obtaining a second preset verification data set of the first participant; Predicting the second preset verification data set based on each federated model to obtain prediction results; The contribution of each second participant is correspondingly determined based on each prediction result.

3. The data processing method based on blockchain according to claim 1, characterized in that: Each second participant encrypts and sends each federation parameter information during the preset federation modeling process; Before the step of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes: determining whether encrypted federation parameter information of all second parties has been received; If the encrypted federation parameter information of all second participants is received, the decryption of the federation parameter information is triggered collaboratively.

4. The data processing method based on blockchain according to claim 3, characterized in that: The step of determining the contribution of each legitimate second participant includes: Obtaining each sending time of each legitimate second participant sending each federation parameter information to the blockchain block during the preset federation modeling process; Based on the length of the sending time, the contribution of each legitimate second participant is determined.

5. The data processing method based on blockchain according to claim 1, characterized in that: After the steps of determining the participation legitimacy of the corresponding second participants based on each federation parameter information and determining the contribution of each legitimate second participant, the method includes: Get the preset modeling optimization reward data; Based on the size of the contribution, the reward amount in the modeling optimization reward data is distributed to each participant.

6. The blockchain-based data processing method according to any one of claims 1 to 5, characterized in that: The blockchain-based data processing method includes: Save the federation parameter information reported by each second participant based on the blockchain block record, and save the contribution of each second participant based on the blockchain block record.

7. A data processing device based on blockchain, characterized in that: Applied to a first participant, the first participant and each second participant establish a federated communication connection via a blockchain, the blockchain-based data processing device comprising: A modeling module, configured to send the target model data to be processed to the blockchain block, so that each second party can perform a preset federated modeling with the first party based on the target model data to be processed; A receiving module, configured to receive each federation parameter information encrypted and sent by each second participant to the blockchain block during the preset federation modeling process; A first determination module is used to determine the legitimacy of participation of the corresponding second participant based on each federation parameter information, and determine the contribution of each legitimate second participant; The first determining module includes: A first determining unit is configured to determine associated parties associated with each second party, wherein the associated parties are parties with the same user; A first receiving unit is configured to receive, based on the blockchain, a verification result obtained by the associated participant after verifying the federation parameter information of the corresponding second participant; wherein the federation of the associated participants corresponds to federation parameter information of the second participant and the corresponding local federation parameter information, obtains aggregated federation parameter information through the federation parameter information of the second participant and the corresponding local federation parameter information, adjusts the target to-be-processed model based on the aggregated federation parameter information to obtain an associated model, and verifies the associated model based on a first preset verification data set of the associated participants to obtain a verification result; The second determining unit is used to determine the participation legitimacy of the corresponding second participant based on the verification result.

8. A data processing device based on blockchain, characterized in that: The blockchain-based data processing device includes: a memory, a processor, and a program stored in the memory for implementing the blockchain-based data processing method, other participants or blockchain The memory is used to store a program for implementing a blockchain-based data processing method; The processor is used to execute a program for implementing the blockchain-based data processing method to implement the steps of the blockchain-based data processing method as described in any one of claims 1 to 6.

9. A medium, characterized in that The medium stores a program for implementing a blockchain-based data processing method, and the program for implementing a blockchain-based data processing method is executed by a processor to implement the steps of the blockchain-based data processing method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for determining contribution degree of participant

    CN110717671A

  • Federated learning method and device based on block chain

    CN111125779A

  • Edge device performance evaluation method based on block chain, management method and medium

    CN111274110A