Privacy information calculation method and correctness verification method for multi-center medical data
By transmitting model weights and generating global gradient values in multi-center medical data processing, combining the zero-knowledge proof and hash value verification of blockchain, the traceability problem of training process and results in federated learning is solved, and data privacy protection and Verification of correctness of model training.
Patent Information
- Application Number
- CN202411765129.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Federated learning technology cannot trace and verify training processes and training results in multi-center medical data processing, resulting in the inability to fully play a role in the original data.
By transferring model weights between task initiator and compute node for training, generating global gradient values and updating model weights, and using blockchain for zero-knowledge proof and hash value verification, ensuring trusted delivery of data privacy and training results .
It realizes independent training and data privacy protection between multiple clients, ensures the correctness of model training and trustworthy data delivery, and verifies the completion of model training by the task initiator and the correctness of training data of each client.
Smart Images

Figure CN119249496A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of new generation information technology, and in particular to a privacy information calculation method and correctness verification method for multi-center medical data. Background Art
[0002] In order to design a machine learning framework that enables artificial intelligence systems to use their own data more efficiently and accurately while meeting data privacy, security and regulatory requirements, the industry has proposed federated learning technology. Federated learning technology refers to the collaboration of multiple clients to solve machine learning problems under the coordination of a central server. In this process, the original data of each client is guaranteed to be stored locally without exchange or transmission. This technical solution protects data privacy and security to the greatest extent because participants do not need to share data but only need to transmit local model parameters. At the same time, using multi-party collaborative training models can improve model performance more than using local data sets to train models alone. However, when the central server and multiple clients of this technical solution belong to both or multiple parties of the transaction, it is impossible to trace and verify the training process, training results and interaction results, resulting in a lot of local original data being unable to play a role in a wide range. Summary of the invention
[0003] In view of the above problems, the present invention is proposed to provide a technical solution to overcome the above problems or at least partially solve the above problems.
[0004] The present invention provides a privacy information calculation method for multi-center medical data, which is used by a task initiator. The method comprises: Sending the current model weight for a task to multiple computing nodes participating in the task execution, so that the computing nodes use the model weight as their initial weight, train the local medical data, and obtain updated single-node gradient values; Receiving a plurality of the single-node gradient values, and summing and calculating the sum of the single-node gradient values to generate a global gradient value; The model weight for the task is updated according to the global gradient value.
[0005] Optionally, the method also includes: determining whether the global gradient value is less than a predetermined threshold; if it is less than or equal to the predetermined threshold, determining that the model has converged and ending the task; if it is greater than the predetermined threshold, sending the updated model weights to multiple computing nodes participating in the task to perform the next round of training on the local privacy medical data until it is determined that the model has converged.
[0006] Optionally, the method also includes: when the model converges, notifying the computing node to generate a first zero-knowledge proof for the task based on the single-node gradient value of the last round, and submitting it to the blockchain.
[0007] Optionally, the method further includes: before sending the model weight to the computing node, generating a global weight hash value based on the model weight and submitting it to the blockchain.
[0008] Optionally, the method includes: selecting a corresponding on-chain verification contract according to the type of the task; generating task parameters according to the selected on-chain verification contract; accordingly, generating a global weight hash value based on the model weight includes: generating a global weight hash value according to the task parameters and model weight.
[0009] Optionally, the method further includes: when the model converges, receiving final data sent by the computing node, which includes a hash value of at least part of the medical data and a hash value of a single-node gradient value in a previous round.
[0010] The present invention provides a privacy information calculation method for multi-center medical data, which is used for a computing node that performs a task. The method comprises: Receive the model weight sent by the task initiator as its initial weight; The local medical data is trained based on the initial weights to obtain an updated single-node gradient value; and the updated single-node gradient value is sent to the task initiator.
[0011] Optionally, before training the local medical data based on the initial weights, the method further includes: calculating a hash value based on the initial weights and verifying it through a blockchain; and if the verification is successful, training the local medical data based on the initial weights.
[0012] Optionally, the method further includes: receiving a notification from the task initiator that the model has converged, generating a single-node gradient value hash value according to the most recently updated single-node gradient value based on the notification, and submitting it to the blockchain.
[0013] Optionally, the method further includes: receiving a notification that the model has converged, and based on the notification, sending a hash value of the final single-node gradient value and a hash value of part of the medical data as final delivery data to the task initiator.
[0014] Optionally, the method further includes: after sending the most recently updated single-node gradient value to the task initiator for a predetermined time, generating a single-node gradient value hash value based on the final single-node gradient value, and submitting it to the blockchain.
[0015] Optionally, the method also includes: when updating local medical data on a daily basis, submitting the hash value of the updated medical data to the blockchain.
[0016] Optionally, when the task initiator model converges, the method further includes: Obtaining a hash value of at least a portion of original data local to the computing node as a first hash value; Calculate the hash value of the model weight in the previous round as the second hash value; Obtain the hash value of the most recently updated single-node gradient value as the third hash value; Generate zero-knowledge ZK based on the first hash value, the second hash value, and the third hash value, and submit it to the blockchain.
[0017] The present invention also provides a method for verifying the correctness of data for a blockchain, which specifically includes: Verify whether the zero-knowledge proof data is relevant to the current task according to the zero-knowledge ZK verification contract previously selected by the task party, wherein the selected zero-knowledge ZK verification contract is related to the task type; Extracting a first hash value from the zero-knowledge proof data, and determining whether the original data passes verification based on whether the first hash value is consistent with a hash value that has been uploaded to the chain when the original data was previously updated, wherein the first hash value is a hash value of at least part of the original data; Extract a second hash value from the zero-knowledge proof data, and verify whether the task initiator has received the model based on whether the second hash value is consistent with the hash value previously uploaded to the chain by the task initiator, where the second hash value is the hash value of the model weight uploaded to the chain by the task initiator in the last round; Extracting a third Hash value from each zero-knowledge proof data, and obtaining a result of adding gradient values of all computing nodes based on the third Hash value, wherein the third Hash value is a final single-node gradient value of each computing node; Whether the model converges is verified according to whether the addition result is less than a predetermined threshold.
[0018] The present invention also provides a computer device, which includes a processor and a memory, wherein a computer program is stored in the memory. When the computer program is executed by the processor, the processor completes the aforementioned method for calculating privacy information for multi-center medical data, or completes the aforementioned method for calculating privacy information for multi-center medical data, or implements the aforementioned method for verifying the correctness of blockchain data.
[0019] Through the above technical scheme, the present invention can realize the task training of large medical models based on medical data of multiple clients (multi-centers), realize the data storage and verification of the training process based on the task type, and ensure that each client is independent of each other, does not interfere with each other and does not leak privacy. It can verify the credibility of information privacy calculation and the successful delivery of information through zero-knowledge proof, that is, verify that the model training of the task initiator has been completed, verify the correctness of the training data of each client, and verify that each client has delivered the final model training result of the corresponding task.
[0020] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above technical solution of the present invention and its objectives, features and advantages more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 A flowchart of a method for calculating privacy information of multi-center medical data proposed by the present invention and applied to a task initiator is shown; Figure 2 The first round of communication process between computing nodes and task initiators in the privacy information calculation method for multi-center medical data is shown; Figure 3 The communication process of the last round between the computing nodes and the task initiator in the privacy information calculation method for multi-center medical data is shown; Figure 4 The communication process between the computing node and the task initiator and the blockchain platform in the privacy information calculation method for multi-center medical data is shown; Figure 5 The principle of computing nodes generating zero-knowledge proof data is shown; Figure 6 The process of task verification by the blockchain platform based on zero-knowledge proof data generated by computing nodes is shown; Figure 7 The process of computing nodes generating zero-knowledge proof data is shown; Figure 8 The flow of the method for calculating the privacy information of medical data performed on the computing node side is shown; Fig. 9 A flow chart of a method for verifying data correctness of a blockchain is shown; Fig.10 The structure of a computer device for executing a private information calculation method is shown. DETAILED DESCRIPTION
[0022] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0023] The present invention provides a privacy information calculation method for multi-center medical data, which is used by a task initiator, such as Figure 1 As shown, the method includes: S11. Sending the current model weight for a task to multiple computing nodes participating in the task execution, so that the computing nodes use the model weight as their initial weight, train the local medical data, and obtain updated single-node gradient values; S12. Receive multiple single-node gradient values and sum them to generate a global gradient value; S13. Update the model weight for the task according to the global gradient value.
[0024] Through the above method, the present invention can realize task training of large medical models based on medical data from multiple clients (multiple centers), realize data storage of the training process based on task types, and ensure that each client is independent of each other, does not interfere with each other, and does not leak privacy information.
[0025] The above technical solution gives the execution process of a logistic regression task. The above-mentioned "task initiator" can be the purchaser of medical data, and the "computing node" can be the holder of medical data. In the above technical solution, the execution of the first round of tasks is described, that is, the task initiator first sends the current model weights to all computing nodes, and the computing nodes use them as initial weights, train on local private data, obtain updated gradient values, and send them back to the task initiator. After the task initiator sums the gradient values of multiple computing nodes, it obtains the global gradient value, and uses the global gradient value to update the model weights, completing a round of calculation. In actual task execution, the execution of each task is likely to have multiple rounds. Whether to proceed to the next round is mainly determined by the task initiator based on the global gradient value to determine whether the model converges. If the model does not converge, the next round is executed.
[0026] like Figure 2As shown, the task initiator at least includes a convergence judgment module, a model update module and a security aggregation module, wherein the convergence judgment module sends the updated weights of the previous round to each computing node, and the computing node performs model training locally based on the weights of the previous round and local privacy data (or original data) to generate a single-node gradient value. The calculation method of model training has been sent to the computing node by the task initiator in advance. In order to ensure data security, the single-node gradient value is aggregated with the mask to generate a masked single-node gradient value, and the masked single-node gradient value is sent to the task provider. The task provider receives the single-node gradient values of all computing nodes and performs addition operations through the security aggregation module to generate a global gradient value; the model is updated based on the global gradient value, and the model weight of the current round is generated after the model is updated. Based on the model weight, the convergence judgment module is used to determine whether the model converges. If the model does not converge, a new round is started, and the currently updated model weight is used as the model weight to repeat steps S11-S13.
[0027] Specifically, the task initiator determines whether the global gradient value is less than a predetermined threshold. If the global gradient value is less than or equal to the predetermined threshold, the model is determined to have converged and the task is terminated. If the global gradient value is greater than the predetermined threshold, the updated model weights are sent to multiple computing nodes participating in the task to perform the next round of training on the local private medical data until the model is determined to have converged. As a specific embodiment, it is determined whether the global gradient value is zero. If the global gradient value is zero, the model is determined to have converged. Figure 3 As shown, when judging that the model has converged, the task initiator generates a converged final model; if the global gradient value is not zero, it is judged that the model has not converged.
[0028] like Figure 4 As shown, each time the task initiator updates the model weight, it generates a global weight hash value based on the global gradient value and submits it to the blockchain. When the task initiator generates a global gradient value each time in each round, it generates a global weight hash value based on the global gradient value and uploads it to the blockchain because it does not know whether this round is the last round.
[0029] The task initiator selects the corresponding ZK verification contract according to the number of dimensions of the model, and sends the selected ZK verification contract to the zero-knowledge proof verification module of the blockchain platform. The ZK verification contract is pre-set by the blockchain platform and can be used in multiple tasks. The zero-knowledge proof verification module sends the selected ZK verification contract to the local training module of the computing node. The local training module accesses the blockchain platform based on the ZK verification contract and obtains the model weight hash value of the last round on the chain by the task initiator. The local training module performs a consistency comparison with the received model weight according to the model weight hash value of the last round on the chain. If they are consistent, the step of generating zero-knowledge proof is performed.
[0030] We abstract the zero-knowledge proof into a set of inputs and outputs, namely, public input, secret input, and public output. The input and output correspond to the calculation steps, and the zero-knowledge proof can set certain inputs to be invisible to the outside. In the present invention, it is proved that the person who submits the zero-knowledge proof data knows a set of secret inputs, and together with the public input, the public output is indeed calculated according to the previously defined calculation steps. The public input and public output can be extracted from the zero-knowledge proof data and are visible to the outside, while the secret input cannot be extracted. Therefore, the design of the zero-knowledge proof is transformed into the design of input and output.
[0031] In the present invention, if Figure 5 , 6 As shown in the figure, one of the secret inputs of the zero-knowledge proof is the original data of the computing node (or private data, local data). By calculating the hash value of the original data in the zero-knowledge proof and publishing the hash value as a public output, the traceability of the original data is achieved. If the zero-knowledge proof data passes the verification later, it means that the hash value of the data used in this calculation is indeed the output value. The blockchain further compares the hash value with the hash value recorded on the chain to confirm that the data used to perform the calculation is indeed the data that has been previously stored on the chain. A public input of the zero-knowledge proof is the weight of the last round, and a public output of the zero-knowledge proof is the zero-knowledge proof data, which contains the single-node gradient value of the last round, the hash value of the private data, and the hash value of the weight of the last round.
[0032] As a specific implementation method, Figure 7 As shown in the figure, the specific process of generating zero-knowledge proof by computing node includes: S71. Obtain a hash value of at least part of the original data (privacy data) of the local computing node as a first hash value; S72. Calculate the hash value of the previous round of model weights as the second hash value; S73. Obtain the hash value of the most recently updated single-node gradient value as the third hash value; S74. Generate zero-knowledge ZK based on the first hash value, the second hash value, and the third hash value, and submit it to the blockchain as a public output.
[0033] In this way, during the entire task process, the computing node only needs to generate a zero-knowledge proof ZK data at the end and submit it to the blockchain. Once the blockchain verification is passed, the task can be completed.
[0034] In data transactions, computing nodes (data holders) are willing to start computing only after receiving money, and task initiators (data buyers) are willing to pay only after receiving the calculation results, so transactions cannot be carried out. In the present invention, the blockchain can play the role of "Alipay" in data transactions by storing the original data hash values of computing nodes, the intermediate results of tasks submitted by task initiators, and the zero-knowledge proof data submitted by computer nodes. The "machine trust" created by consensus algorithms and codes replaces the "reputation guarantee", so that data transactions can be carried out reliably. Because, through zero-knowledge proof technology, it is possible to verify the calculation results, so there is no dispute. Based on the intermediate results of tasks submitted by the task initiator to the blockchain (the model weight hash value of each round) and the zero-knowledge proof submitted by each computing node to the blockchain (including the original data hash value), the blockchain platform verifies the zero-knowledge proof data. If the verification is passed, the delivered result must be qualified. If the verification fails, the delivered result must be wrong.
[0035] In each round of training, the computing node calculates the locally stored raw data according to the model weight value received from the task initiator, and the calculation steps are also obtained from the task initiator. The task initiator converts the analysis and calculation steps originally prepared to be performed by itself into privacy calculations and sends them to the computing node. The computing nodes complete the calculations on their local data, and then summarize the calculation results to form the final calculation results and send them to the task initiator. Therefore, the buyers of data transactions change from the original "buying and selling data" to "buying and selling calculation results". In the process of multiple rounds of communication, what is transmitted is the constantly updated global model weights and the intermediate process single node gradient values. Through such a transmission process, the final buyer gets the calculation results he wants, but cannot get the original data of each center, thereby protecting the privacy of the data and allowing each center to repeatedly sell the same data, which is conducive to making full use of the data and giving full play to the value of the data.
[0036] In order to prevent the computing node from leaking privacy when sending a single-node gradient value to the task initiator, the computing node adds a mask before sending the single-node gradient value.
[0037] Because each round of tasks is started by the task initiator, in order to verify that the calculation results submitted by the computing node are obtained by completing the current task, and to prevent the computing node from submitting a zero-knowledge proof of another task to deceive the verification process, the task initiator selects the corresponding on-chain verification contract according to the type of the task; generates task parameters according to the selected on-chain verification contract, and generates a global weight hash value according to the task parameters and model weights. In this embodiment, the verification contract is preset on the blockchain, so when the task initiator submits a task, it does not need to generate a corresponding new contract every time. The computing node can trust the correctness of the contract, and the computing node does not need to verify the correctness of the verification contract every time, so that it can not only verify that each computing node has completed the calculation for the current task, but also greatly save the computing power required for verification.
[0038] The present invention provides a privacy information calculation method for multi-center medical data, which is applied to computing nodes, such as Figure 8 As shown, the method includes: S81. Receive the model weight sent by the task initiator as its initial weight; S84. Train the local medical data based on the initial weights to obtain updated single-node gradient values; and send the updated single-node gradient values to the task initiator.
[0039] As a preferred implementation, before sending the updated single-node gradient value to the task initiator, a mask is added to prevent leakage of privacy information.
[0040] Before training the local medical data based on the initial weights, the method further includes: S83. Based on the initial weights, the hash value is calculated by itself and verified through the blockchain; if the verification is passed, the local medical data is trained based on the initial weights. The initial weights include task parameters, and the verification is to compare the hash value with the hash value of the initial weight on the chain of the corresponding task initiator. If the two hash values are consistent, the verification is considered to be passed. The process of self-verification of the computing node is conducive to ensuring that the zero-knowledge proof generated last can pass the verification process executed by the blockchain, so that the data transaction can be successfully completed in the end.
[0041] Before training the local medical data based on the initial weights, the method further includes: S82. Acquiring a calculation method for training from the task sender, and in step S84, training the local medical data based on the initial weights using the acquired calculation method.
[0042] Before the computing node performs model training, the task initiator (or data buyer) needs to send the computing method (or computing method) used to perform the training to the computing node. At the same time, the task initiator also needs to provide a set of zero-knowledge proof generation methods (generation algorithms) and verification methods (verification contracts). The generation methods and verification methods are related to the calculation steps, and different calculation steps will have different generation methods and verification methods. When the computing node delivers the calculation results (including single-node gradient values) to the task initiator, it executes the above generation method on at least part of the original data to generate a piece of data, and sends the piece of data and the calculation result together to the task initiator, so that the task initiator can use the verification method to verify the piece of data. If the piece of data passes the verification, it can be confirmed that the calculation result is calculated in accordance with the requirements of the calculation step, thereby completing the verification of the calculation process.
[0043] The computing node receives the ZK verification contract from the blockchain platform, generates a single-node gradient value hash value based on the latest generated single-node gradient value according to the ZK verification contract, and submits it to the blockchain. Because the task initiator determines whether the model converges, the task initiator generally initiates the zero-knowledge proof generation process and the zero-knowledge proof verification process to start the data transaction settlement process.
[0044] In order to avoid the situation where the task initiator does not send a notification or initiate the data transaction settlement process after judging that the model has converged, the data transaction settlement process can be initiated by the computing node after the task times out. After the computing node sends the most recently updated single-node gradient value to the task initiator for a predetermined time, it generates a single-node gradient value hash value based on the most recently updated single-node gradient value and submits it to the blockchain. After the zero-knowledge proof data Proof of all computing nodes are uploaded to the chain, the blockchain platform communicates with the task initiator to enable the task initiator to select the corresponding ZK verification contract, and then sends the selected ZK verification contract to the computing node, so that the computing node generates zero-knowledge proof data and executes subsequent verification processes. The task initiator can also select the corresponding ZK verification contract before the first round of model training, send the selected ZK verification contract to the computing node, and submit it to the blockchain.
[0045] The zero-knowledge proof of computing nodes can prove the correctness of the computing process and the relevance of data without exposing the original data. It can verify the correctness of data transactions or implement data transaction audits. It is an important piece in the technical puzzle of realizing data transaction infrastructure and realizes trusted computing.
[0046] Here, it is specially noted that the delivery of calculation results by the computing node to the task initiator is not the same as the generation of zero-knowledge proof by the computing node and submission to the blockchain. The delivery of calculation results is a necessary step for data transactions between the computing node (data holder) and the task initiator (data buyer), while the generation of zero-knowledge proof by the computing node and submission to the blockchain is a verification process that is tamper-proof, fair and objective, to ensure that the data communication process between the two parties is verifiable.
[0047] The present invention can not only verify the calculation process of the computing node, but also verify the local original data calculated by each computing node. In fact, when the computing node updates the local original medical data on a daily basis, it is not necessary to submit the hash value of the updated original medical data to the blockchain for evidence when executing the task. These stored hash values can be used in subsequent data transaction settlement processes, and the blockchain verifies the credibility of the original data. After obtaining the said section of data, the task initiator parses a set of hash values from it and compares it with the hash value previously stored by the computing node to verify that the computing node does use the original data corresponding to the hash value, thereby verifying the correctness of the original data.
[0048] When necessary, the task initiator may also require the computing node to provide a portion of the original data according to the sampling inspection, and by comparing the hash value of this portion of the original data with the hash value of the data previously uploaded to the chain, it is determined that this portion of the data is indeed the data that has been previously stored, thereby realizing the traceability of the original data, thereby ensuring that the computing node will not falsify the original data because the task initiator initiates the task. The technical means of data traceability are combined with the blockchain. The data of the computing node (data holder) is usually continuously uploaded to the chain for hash value storage, and as long as the data is updated, it is immediately uploaded to the chain. After the task initiator executes the computing task, this embodiment verifies the generation time of the data by itself through the blockchain to prevent the data holder from temporarily falsifying a large amount of data for this task.
[0049] After the privacy-preserving transaction verification is achieved through zero-knowledge proof, the prepayment locking, zero-knowledge proof submission and verification, payment and other functions can also be completed on the blockchain through smart contracts. The transaction data and zero-knowledge proof left by each computing node and task initiator on the blockchain are a very complete set of audit data. Logically, the transaction has been verified through these data and cannot be tampered with, which can be used to audit transactions in the future.
[0050] In the present invention, data holders, buyers, etc. each build a node to form a blockchain network to realize the function of data transaction. The rules of this system are transparent, there is no risk of cheating by a trusted third party, and it can be fully trusted by all parties. The buyer believes that the money will only be transferred after I get a satisfactory calculation result. The data holder believes that as long as I submit the correct calculation result, I will definitely get the money. The blockchain first charges the buyer and then notifies the data holder to start the calculation. The data holder delivers the calculation result to the buyer and submits the corresponding zero-knowledge proof to the blockchain. After the blockchain verifies that the result is correct, it sends the calculation result to the buyer and pays the data holder.
[0051] The present invention provides a method for verifying the correctness of data in a blockchain. Fig. 9 As shown, the method includes: S91. Verify whether the zero-knowledge proof data is related to the current task according to the zero-knowledge ZK verification contract previously selected by the task party, wherein the selected zero-knowledge ZK verification contract is related to the task type; S92. Extract a first hash value from the zero-knowledge proof data, and determine whether the original data passes the verification based on whether the first hash value is consistent with the hash value that has been uploaded to the chain when the original data was previously updated, wherein the first hash value is the hash value of at least part of the original data; S93. Extracting a second hash value from the zero-knowledge proof data, and verifying whether the task initiator has received the model based on whether the second hash value is consistent with the hash value previously uploaded by the task initiator, wherein the second hash value is the hash value of the model weight uploaded by the task initiator in the last round; S94. Extracting a third hash value from each zero-knowledge proof data, and obtaining the sum of the gradient values of all computing nodes based on the third hash value, wherein the third hash value is the final single-node gradient value of each computing node; S95. Verify whether the model converges according to whether the addition result is less than a predetermined threshold.
[0052] In the above technical solution, the original data proof is implemented through step S92, the model acceptance proof is implemented through step S93, and the model convergence proof is implemented through steps S94 and S95.
[0053] First, in order to realize the original data proof, one of the secret inputs of the computing node to generate the zero-knowledge proof is at least part of the original data. By calculating the hash value of the original data in generating the zero-knowledge proof and publishing the hash value as a public output, the original data can be traced. If the zero-knowledge proof data passes the verification, it means that the hash value of the data used by the computing node in this calculation is indeed the output value. The blockchain further compares the public hash value with the hash value previously recorded on the blockchain to confirm that the data used to perform the calculation is indeed the data previously stored on the blockchain.
[0054] In the implementation of model convergence proof, the method of judging model convergence is that the sum of the gradient values output by all computing nodes is less than the threshold. Therefore, the zero-knowledge proof generated by a single node cannot directly prove the convergence of the model. Therefore, it is necessary to publish the gradient value as a public output in the zero-knowledge proof. After the blockchain obtains the gradient values of all nodes and sums them, it can be judged whether the model has converged. Since only one round of zero-knowledge proof is calculated after the model converges, only the gradient value of a single node in the last round is made public, and the privacy data of the computing node will not be exposed.
[0055] In the present invention, the model receives the proof, and the proof of this step is designed very cleverly, which solves the problem in the prior art that if the task initiator denies it, it is difficult to prove that the calculation result of the computing node has been sent to the other party. Let's look back at the execution process of the last round. At the beginning of the execution, the task initiator needs to send the initial model weight to the computing node. The gradient value obtained by the last round of model training is close to zero, that is, the model weight sent by the task initiator in the last round is actually the final converged model. In this way, we can achieve the proof. In the secret input of the zero-knowledge proof, add the model weight of the previous round, and then output the hash of the weight of the previous round in the public output. Then when the round starts, the task initiator is required to put the hash value of the model weight on the chain. In this way, when the zero-knowledge proof passes the verification, it means that the model converges and the hash value of the model weight is A. Then A has actually been on the chain by the task initiator. Since the task initiator can generate its hash value A, it means that it already has a converged model corresponding to the hash value A.
[0056] The present invention also provides a computer device, such as Fig.10As shown, the computer device includes a processor 1001, a communication interface 1002 and a memory 1003, wherein the processor 1001, the communication interface 1002 and the memory 1003 are connected via a communication bus 1004, and a computer program is stored in the memory 1003. When the computer program is executed by the processor, the processor completes the aforementioned privacy information calculation method for multi-center medical data, or completes the aforementioned privacy information calculation method for multi-center medical data, or implements the aforementioned data correctness verification method for blockchain.
[0057] Through the above technical scheme, the present invention can realize the task training of large medical models based on medical data of multiple clients (multi-centers), realize the data notarization of the training process based on the task type, and ensure that each client is independent of each other, does not interfere with each other and does not leak privacy. It can verify through zero-knowledge proof that the model training of the task initiator has been completed, verify the correctness of the training data of each client, and verify that each client has delivered the final training model result of the corresponding task.
[0058] As a specific application, the above technical solution can be applied to multimodal standardized medical data sets. The data center storing the electronic medical record text modality database can be used as a computing node, the data center storing the DICOM standard medical imaging modality and annotation data can be used as a computing node, and the data centers of different hospitals can be used as computing nodes respectively. The data model can be divided into a federated statistical model, a federated feature engineering model, a federated machine learning model, a federated information retrieval model or an evaluation model. The federated statistical model performs statistical training on the original data. The algorithms that can be used include data statistics, longitudinal Pearson, summation of multi-party privacy data, intersection of two-party data samples, longitudinal KMeans, and overall stability index. etc. calculation processes; the said federated feature engineering model performs feature sampling training on the original data, and the algorithms that can be used include federated sampling, longitudinal feature selection, longitudinal / lateral feature binning and other calculation processes; the federated machine learning model performs deep learning on the original data, and the algorithms that can be used include longitudinal or transverse logistic regression, longitudinal linear regression, longitudinal Poisson regression, transverse or longitudinal NN, transverse or longitudinal SecureBoost, longitudinal KMeans, longitudinal Pearson and other learning algorithms; the federated information retrieval model realizes the retrieval of information, and the secure information retrieval PIR algorithm can be used; and the evaluation model can provide binary classification, multi-classification, regression evaluation, clustering evaluation, federation and unilateral comparison evaluation algorithms. Of course, the above is just an enumeration of specific models and corresponding specific algorithms that can be used. The present invention is not limited to the above models and algorithms, and the present invention is universal for various models and algorithms.
[0059] The device on the task initiator's end is not necessarily a server or a cloud server. The device that performs model aggregation is preferably a cloud server, which communicates with multiple institutions or site devices with computing power and local data through a network connection. The model training results finally aggregated by the cloud server can be uploaded to the task initiator's end device. This setting has low requirements for the device on the task initiator's end and is conducive to the realization of data flow.
[0060] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0061] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0062] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0063] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A privacy information calculation method for multi-center medical data, used by a task initiator, characterized in that: The method includes: Sending the current model weight for a task to multiple computing nodes participating in the task execution, so that the computing nodes use the model weight as their initial weight, train the local medical data, and obtain updated single-node gradient values; Receiving a plurality of the single-node gradient values, and summing and calculating the sum of the single-node gradient values to generate a global gradient value; The model weight for the task is updated according to the global gradient value.
2. The privacy information calculation method for multi-center medical data according to claim 1 is further characterized in that: The method also includes: determining whether the global gradient value is less than a predetermined threshold; if it is less than or equal to the predetermined threshold, determining that the model has converged and ending the task; if it is greater than the predetermined threshold, sending the updated model weights to multiple computing nodes participating in the task to perform the next round of training on the local privacy medical data until it is determined that the model has converged.
3. The privacy information calculation method for multi-center medical data according to claim 2 is further characterized in that: The method also includes: when the model converges, notifying the computing node to generate a first zero-knowledge proof for the task based on the single-node gradient value of the last round, and submitting it to the blockchain.
4. The method for calculating privacy information of multi-center medical data according to claim 1 or 2, further characterized in that: The method also includes: before sending the model weight to the computing node, generating a global weight hash value based on the model weight and submitting it to the blockchain.
5. The privacy information calculation method for multi-center medical data according to claim 4 is further characterized in that: The method also includes: selecting a corresponding on-chain verification contract according to the type of the task; generating task parameters according to the selected on-chain verification contract, and generating a global weight hash value based on the model weight, including: generating a global weight hash value according to the task parameters and model weight.
6. The privacy information calculation method for multi-center medical data according to claim 3 is further characterized in that: The method also includes: when the model converges, receiving final data sent by the computing node, which includes a hash value of at least part of the medical data and a hash value of a single-node gradient value in a previous round.
7. A method for calculating privacy information of multi-center medical data, used for computing nodes for executing tasks, characterized in that: The method includes: Receive the model weight sent by the task initiator as its initial weight; Training the local medical data based on the initial weights to obtain an updated single-node gradient value; The updated single-node gradient value is sent to the task initiator.
8. The method for calculating privacy information of multi-center medical data according to claim 7, further characterized in that: Before training the local medical data based on the initial weights, the method further includes: calculating a hash value based on the initial weights and verifying it through a blockchain; and if the verification is successful, training the local medical data based on the initial weights.
9. The privacy information calculation method for multi-center medical data according to claim 7, further characterized in that: The method also includes: receiving a notification that the model has converged, and submitting a hash value of a final single-node gradient value and a hash value of a previous round of model weights to a blockchain according to the notification.
10. The privacy information calculation method for multi-center medical data according to claim 7, further characterized by: The method also includes: receiving a notification that the model has converged, and based on the notification, sending a hash value of a final single-node gradient value and a hash value of part of the medical data as final delivery data to a task initiator.
11. The privacy information calculation method for multi-center medical data according to claim 7, further characterized by: The method also includes: after sending the most recently updated single-node gradient value to the task initiator for a predetermined time, generating a single-node gradient value hash value according to the final single-node gradient value, and submitting it to the blockchain.
12. The privacy information calculation method for multi-center medical data according to claim 7, further characterized by: The method also includes: when updating local medical data on a daily basis, submitting the hash value of the updated medical data to the blockchain.
13. The privacy information calculation method for multi-center medical data according to claim 10, further characterized in that: When the task initiator model converges, the method further includes: Obtaining a hash value of at least a portion of original data local to the computing node as a first hash value; Calculate the hash value of the model weight in the previous round as the second hash value; Obtain the hash value of the most recently updated single-node gradient value as the third hash value; Generate zero-knowledge ZK based on the first hash value, the second hash value, and the third hash value, and submit it to the blockchain.
14. A method for verifying the correctness of data in a blockchain, characterized in that: The method includes: Verify whether the zero-knowledge proof data is relevant to the current task according to the zero-knowledge ZK verification contract previously selected by the task party, wherein the selected zero-knowledge ZK verification contract is related to the task type; Extracting a first hash value from the zero-knowledge proof data, and determining whether the original data passes verification based on whether the first hash value is consistent with a hash value that has been uploaded to the chain when the original data was previously updated, wherein the first hash value is a hash value of at least part of the original data; Extract a second hash value from the zero-knowledge proof data, and verify whether the task initiator has received the model based on whether the second hash value is consistent with the hash value previously uploaded to the chain by the task initiator, where the second hash value is the hash value of the model weight uploaded to the chain by the task initiator in the last round; Extracting a third Hash value from each zero-knowledge proof data, and obtaining a result of adding gradient values of all computing nodes based on the third Hash value, wherein the third Hash value is a final single-node gradient value of each computing node; Whether the model converges is verified according to whether the addition result is less than a predetermined threshold.
15. A computer device, comprising a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method for calculating privacy information for multi-center medical data as described in any one of claims 1 to 6 is completed, or the method for calculating privacy information for multi-center medical data as described in any one of claims 7 to 13 is completed, or the method for verifying data correctness for blockchain as described in claim 14 is implemented.
Citation Information
Patent Citations
Computing outsourcing block chain privacy verification method and device and computer equipment
CN112035889A
Federal learning-based medical data sharing and privacy protection method and system
CN114996762A
Anti-poison attack privacy protection federated learning method based on block chain
CN116451805A
Privacy calculation method and system with verifiable calculation process and traceable original data
CN118520516A
Federated learning method and system based on blockchain
WO2023138152A1
